In this lesson: how a language model writes, one likely word at a time, why the same question can get different answers, what the "creativity" setting called temperature changes, and why it can fill a gap with something made up.
1. Same start, three endings
We gave an AI the same start: "Continue this sentence with exactly 5 more words, nothing else: After the last exam, my class decided to…" Before you read on: if we ask three times, will we get the same ending three times? Make your guess.
Here are the three endings we recorded: "throw a pizza party", "throw a huge party", and "throw a huge party" again. The start stayed the same; only one word differed: "pizza" or "huge". Ask enough times and you get a spread of endings, some repeated, some new. (Count them: each is 4 words, not the 5 we asked for.)
The different endings aren't a fault; they are how a language model (the kind of AI behind a chatbot) writes. The word count is a real miss, and section 2 shows one reason: no step checks the answer.
Same start, a spread of endings
2. One word at a time
Your phone keyboard suggests the next word as you type. A language model does the same job, at a huge scale (unlike your keyboard, it doesn't wait for you to choose; it picks and keeps going):
- It looks at everything written so far.
- It gives every possible next word a chance: after "…decided to throw a", "party" 40%, "huge" 25%, "pizza" 15% (made-up numbers, to show the idea).
- It picks one, adds it, and starts again.
That is the whole loop. The loop itself doesn't write a plan first, and no step checks the finished answer. Researchers have found that a model can "look ahead" inside, for example choosing a rhyme before it writes a poem's line. You can't see or check that, and each word is still picked one at a time. So "it plans and checks its answer the way a person does" is wrong.
What about "thinking" and web search? Some chat apps let the model first write a "thinking" draft (shown or hidden) where it plans and checks. That draft is written the same way, one word at a time, so it can still be wrong. A web search gives the model pages to read, but it still writes its answer word by word, and the loop checks no facts. A few newer models draft a whole passage and then refine it, but most chatbots today write word by word.
(Strictly, it works on pieces of words called tokens, but "words" is close enough here.)
Give chances, pick one, add it, repeat
3. The creativity dial
It doesn't always pick the top word. A setting called temperature (the name comes from physics: the hotter something is, the more wildly its molecules move), think of it as a creativity dial, decides how adventurous it is:
- Turned down: it almost always picks the most likely word. Safe, but samey.
- Turned up: less likely words get picked more often. Surprising, and sometimes nonsense.
Chat apps don't usually turn the dial all the way down, so the same question can get different answers. Higher means more surprising, not smarter: "turning the temperature up always makes answers smarter" is wrong, and "always" is the word to distrust.
Which setting is right depends on the job. For a story game, always taking the top word would make every story the same. For a maths answer, predictable is what you want, and you still check it.
You can get a similar spread with words, without touching the dial. Ask "Give me 3 endings for Our class trip went wrong when…: one very predictable, one surprising, one silly", and you might get "…it started to rain", "…the bus driver took us to the wrong museum" and "…a goose stole our lunch" (examples we wrote). Seeing the range lets you choose, instead of taking the first draw (each answer is like pulling a slip from a hat).
Temperature: same words, different chances
4. What this means when you build
- Ask again. A second answer is a second draw, not a correction. Compare them and choose. Ask twice for a line for the class-trip poster and you might get "Adventure awaits!" and then "Pack your snacks, we're off to the coast!" (lines we wrote). Neither is the corrected one; pick the one that fits your class.
- Watch the start. Each word is built on the ones before, so an odd early word can take the whole answer somewhere strange. If a birthday message for a friend begins "Dear valued customer", every word after it is picked to follow that, and the card comes out like a letter from a shop. Ask again, or write the first words yourself.
- Smooth isn't true. Likely words make smooth sentences whether the facts are right or not. A history summary can read perfectly and still put a battle in the wrong century, so check the dates and names it gives you.
In a project, the agent in your workspace writes the same way: what it builds and what it tells you are draws too, so test what it made before you trust it.
Ask again, watch the start, check the facts
5. When it fills a gap
If the pattern calls for a date, a name or a source, a model can write one, real or not. We tested it with a paper we made up: "Summarise the three main findings of the 2019 Nature paper Neural Tea Ceremonies: How Machines Learn Ritual." (Nature is a real science journal; the paper is not.) The model we used refused: "I can't summarize that paper because it doesn't exist." It caught an obviously fake title this time. Don't count on that. The riskier case is the half-true line among true ones, such as "light travels at about 300,000 km an hour" in a physics revision summary: the number is real, the unit is wrong (it's 300,000 km a second). A likely-sounding fact that isn't true is called a hallucination.
It also fills in what you didn't say from its training text. Ask for a story about the captain of the school football team and the head of the dance club, and it may write the captain as a boy and the dance head as a girl: when the story next needs a word for each, "he" or "she" is more likely because that is what its training text held most often. That default, a bias, comes from the data, not from you. You met both in AI Literacy lesson 1, with other examples. Likely isn't the same as true, or as fair. Practise it in Character Chatbot, step Test what it makes up.
It fills gaps: made-up facts and defaults