TECHNOLOGY · 5 MIN
How a chatbot writes, one word at a time
It keeps predicting the next piece of text.
How does a chatbot like ChatGPT write an answer?
Every answer is built one small piece at a time.
Scoring the next word
A language model reads the text so far and gives every possible next word a probability. After “The cat sat on the”, “mat” scores high and “roof” scores low. It picks one, usually a likely one but not always, adds it, and repeats. Turn up the randomness, called temperature, and unlikely words get picked more often.
Learned from patterns
Before it ever chats, the model trains on huge amounts of text, guessing each next word and adjusting billions of internal numbers whenever it guesses wrong. That’s how it picks up grammar, facts and styles. It’s also why it can say false things fluently: it produces likely text, and likely isn’t always true.
Turn on JavaScript to watch each board draw itself, solve one on your own and explain it back.
More in Technology
See the whole library