AI chatbots like GPT-3 and its new descendant ChatGPT, show some impressive abilities. (See When AI was old-fashioned.)
My writer friends always ask me: what makes these AI programs so darned quick? How come they don't get writer's block? As soon as you give them a prompt, they respond with a stream of grammatical sentences. In fact, you often need to instruct them to keep their answer short, otherwise they produce reams of words.
Preparation is the thing
Speaking coaches and clubs like Toastmasters will tell you that whether you call it "extempore" or "impromptu", good speakers are always well prepared. What seems like a last-minute speech has been researched, composed, and rehearsed several times.
Of course, you've got to be quick on your feet, able to take your prepared topics and connect them to your given subject and your audience spontaneously, but what makes it look effortless is solid preparation.
The AI chatbots are no different.
Their authors, like presidential speechwriters, have taken pains to do the research and prepare the model. When you give the chatbot a prompt, it uses the model to generate its response.
What is the nature of these language models?
A memorable phrase
Human languages like English have built-in patterns that you naturally learn as you read and listen. A lot of our ability to write text comes from our knowledge of these patterns.
Look at this fill-in-the-blanks puzzle:
Cleanliness is next to —
It's an eighteenth-century quote from Church of England revivalist John Wesley, but you don't need to be a Methodist to complete the sentence with "godliness." Even if you've only seen it once, you probably have no trouble remembering the sentence; it's that memorable.
Contrast this with long passages full of run-of-the-mill cliches that fill too many official or business reports (or Church sermons). Those are not memorable. Even if the individual cliches and tired turns of phrase are easy to regurgitate, prose infested with them gets repetitive at the level of sentences and paragraphs. A hack writer can drone on and on for entire chapters without conveying much information. His readers can get the gist of the plot even if they sleep through most of the page.
Natural language and information theory
During World War II, American mathematician Claude Shannon designed secret codes for the government. After the war, he quantified the above observation about efficient communication in a couple of papers.