May 15, 2021 Author: Matthew Renze

How do we use AI to generate new text from scratch?

In my last article in this series on The AI Developer’s Toolkit, I introduced you to the three most popular AI tools for text analysis. These tools allowed us to extract useful information from bodies of text.

However, there are many cases where want to generate new text from scratch. This set of tasks is referred to as text synthesis.

In this article, I’ll introduce you to the three most popular AI tools for text synthesis.

Text Completion

Text completion allows us to predict missing words or upcoming words. It answers the question “what word is missing here?” or “what words will likely come next”?

For example, we can use text completion to predict what words a user is likely to type next in an email. We provide the text-completion model with the text of an incomplete sentence as input. Then the model produces the most-likely text as output.

Text completion is useful anytime you need to predict missing or future words in a body of text. For example:

  • auto-completing sentences while you’re typing
  • correcting transcription errors while transcribing spoken words in videos
  • verifying sentence syntax by checking statistical word probabilities in a sentence

Text Generation

Text generation allows us to synthesize a body of text from a simple prompt. It allows us to create entire documents just by providing a few written instructions.

For example, we can use text completion to compose new emails for us automatically. We provide the text-generation model with a simple text prompt as input. Then, the model produces the text of a full email as output.

Text generation is useful anytime you need to synthesize text-based content using a short prompt. For example:

  • automatically generating articles for a website
  • replying to simple questions in tech-support emails
  • automatically generating an FAQ from support tickets

Language Translation

Language translation allows us to translate text from one language into another language. It answers the question, “how do I say this sentence in another language?”

For example, we can use language translation to convert text from English into Spanish. We provide the language-translation model with text “Hello World!” as input. Then the model produces text “Hola Mundo!” as output.

Language translation is useful anytime we need to convert text from one language into another language. For example, …

  • translating your website for an international audience
  • translating support emails from customers around the world
  • reading documents written in a foreign language

Other Tools

In addition to the text-synthesis tools we’ve seen so far, there are also a variety of other text-synthesis tools including:

  • Text summarization – which reduces a large body of text into a much smaller synopsis of the text
  • Language transliteration – which converts words from one alphabet into words that are pronounceable in a second alphabet
  • Program synthesis – which converts visual descriptions and pseudo code into actual source code

As we can see, text-synthesis tools allow us to transform existing text and to create new text from scratch.

If you’d like to learn how to use all of the tools listed above, please watch my online course: The AI Developer’s Toolkit.

The future belongs who those who invest in AI today. Don’t get left behind!

Start Now!

Share this Article