Introducing Retort (beta)

language generation as a service

Andrew Brown
Indent Labs
4 min readMar 13, 2016

--

You’re reading this on Medium, and Medium claims this post has been written by me — a real person — and most certainly not written by a free linguistic API capable of generating believably-human English text.

And in this case, Medium is right. I actually wrote this post.

However, that may not always be the case elsewhere on the Internet from here on — there’s a new API in town, and it’s shaping up to sweep the world wide web by storm: Retort.

What is Retort?

Retort is a collection of natural language generation APIs that enable easily adding and maintaining natural language generation, stimulus response, Markov chains, and identity mirroring in web-connected applications.

What does this mean?

It means applications that interface with Retort can talk back to you. It means anyone, anywhere can quickly throw together a bot that interacts and talks with others from across the globe, either obviously as a bot or under the guise of being a real human being — like you or me. The API is service-agnostic, so you can hook that bot up to Facebook, Twitter, reddit, IRC, Medium—or anywhere on the Internet — and it’ll just work.

Browsing the API documentation at the Retort homepage, you’ll see that it supports three main language tasks right now, with more coming soon.

First off, you’ll be exposed to Retort’s namesake: stimulus response (also known as retorts). Simply pass any stimulus or phrase into the API (e.g. “Hello there!”) and you’ll instantly receive a response back (e.g. “Hey, what’s up?”), as if a human friend were the one responding.

Next up, you’ll see that Retort supports building Markov chains as a service. You can generate random text per sentence, or take more of a Lorem Ipsum approach and generate paragraphs of text at a time.

To support Markov generation, you can also generate ngram sequences on their own. Passing a single word to Retort can list what words often follow before or after yours, or pick a consequent for you!

And, of course, there’s identity mirroring. Any of the above endpoints can be tagged or scoped down to a particular identity, letting you generate random text as if it were written by a certain friend on Facebook, or a particular user on Twitter, or even a given subreddit as a whole.

There is no sign-up, no fees, no rate-limiting, and no gotchas. Retort is an open source linguistics API powering the next generation of creative intelligence tools, and I can’t wait to see what everyone builds with it.

What’s next?

This beta is just the beginning. I will be eagerly awaiting any and all feedback over the beta period and will be working as quickly as possible to polish and tweak the service into a fantastic, irreplaceable tool. But after that, the fun only continues.

The next big step for Retort is incorporating the unique linguistic fingerprinting that our other beta product, Dactyl, provides. By guiding language generation through stylized heuristics, Retort’s identity mirroring will improve leaps and bounds. Rather than just used the words and phrasing that someone frequently uses, Retort will incorporate the tiniest details of their unique writing style also.

It’s an exciting time, and I want to invite all of you to ride this wild ride with me. Whether you’re a writer, a reader, a developer, or a bot pretending to be human, I’d love to hear from you. Those interested can browse Retort’s homepage and API documentation, source code, and issue tracker freely.

Thanks for reading — now get writing!

What is Indent Labs?

Indent Labs is, at its core, an ambitious open-source natural language processing project aimed squarely at moonshots in the field of writing. Wouldn’t it be awesome if you could generate quality stories from outlines, or automatically outline a story? What about generating a story as you make decisions on behalf of a character?

The first word processor showed up in the 60's and revolutionized writing through technology. Isn’t it time for another shift forward?

--

--