Text Generation
Text generation refers to the automatic creation of coherent text by a computer program. Modern AI programs write word by word, each time choosing the continuation that best fits the text so far.
Text generation means: a computer program writes text itself, rather than merely copying it or assembling it from prefabricated building blocks. You provide a beginning, such as a question or half a sentence, and the program continues writing. Sentence by sentence, something emerges that never existed in exactly this form before. The programs behind this have previously read enormous amounts of text and learned from it which words typically follow one another. They do not understand content the way a human does. They make very good predictions about how a text could sensibly continue.
Why machines can suddenly write
Until a few years ago, computers could only produce very rigid texts. A weather report from measurement data was possible, a free-form essay was not. The sentences sounded wooden because someone had specified every phrasing by hand. Since around 2020, this has changed fundamentally. Programs like ChatGPT write texts that read fluently and are often indistinguishable from human-written texts.
This has economic consequences that financial media also report on extensively. Writing was long a purely human activity and correspondingly expensive. Product descriptions, form letters, first drafts of reports: all of this can now be produced in seconds. Companies are investing billions in this technology because it affects a large share of office work.
At the same time, new problems arise. A program can deliver false information in perfectly formulated sentences. Such invented but convincingly worded statements are called hallucinations. In addition, false reports and spam can now be produced in any quantity. Both are reasons why legislators are dealing with the topic.
Word by word instead of sentence by sentence
The core is simpler than one might think. The program receives the text so far and calculates which next piece of text is most likely to follow. These pieces of text are called tokens and are usually about as long as a syllable. Once the piece is chosen, it is appended, and the calculation starts again from the beginning. In this way, the text grows step by step until the program considers an ending appropriate.
The most probable continuation is not always chosen. A setting called temperature controls how much randomness is allowed. Low temperature delivers sober, predictable texts, of the kind wanted for a summary. Higher temperature brings more variety, but also more nonsense. That is why the same question asked twice rarely produces exactly the same answer.
A common misconception: many people consider such programs to be a search engine with better language. That is not correct. A search engine searches existing pages, a text generator formulates anew. Only if it is specifically given sources does it rely on concrete documents. Without this aid, it draws solely on what stuck during training.
From the chat window to autocomplete
Text generation is most visible in chat programs like ChatGPT, Claude, or Gemini. Every answer there is produced character by character, which can be seen from the typing-like appearance of the words. Translation in DeepL and the summarization of long articles also belong to this category. In search engines, the short answer texts above the list of results appear in this way as well.
Less noticeably, the technology is embedded in everyday tools. Email programs suggest entire reply sentences. Development environments for programmers complete missing program code, which is technically the same procedure. Customer service systems formulate initial responses to inquiries, which a human then only needs to review.
In business news, the term usually comes up in connection with costs. Every generated text consumes computing time in large data centers, and providers often bill per thousand tokens. Those comparing prices therefore pay attention to two figures: the price for the input text and the price for the generated one. Output is almost always more expensive than input.