Part 1 · How it writes
Same prompt, different answers
Sampling and temperature: why a reply can change when nothing else did.
Step 1 of 5
Watch the video
Why can the same request come back different? The video shows how the model picks each token, and what a setting called temperature changes.
Read the transcript
Send the same request twice, and you can get two different replies. Nothing went wrong. It's how the loop picks.
At each step, the model has odds for every possible next token. It doesn't have to take the top one. It samples: it picks at random, weighted by those odds. A likely token wins most of the time, and a less likely one sometimes.
One different early pick, and the rest of the reply can head down another path.
A setting called temperature changes how spread out the odds are. At zero, the top token is taken every time. Turn it up, and the odds even out, so the picks vary more.
We tried it. We gave GPT-4.1 mini the week's main counts for Pinewick and asked for an email subject line, without saying whether to use the counts. Five times at temperature zero, and five at one.
At zero, all five were the same line, with no counts. At one, there were three different lines, and two of them put the counts in.
The request left that choice open, so the model made it. Some newer models, including Anthropic's newest, don't let you set temperature at all. If a reply must include something, like those counts, ask for it, then check that it's there.
Next: where those odds come from in the first place. How a model is trained.
Now turn the dial yourself. The bars are the six likeliest next tokens from the sentence in One word at a time. Turn it down toward 0 and watch the top token take over. Then turn it up past 1 and watch the shares even out.
Low temperature puts the odds on one word; high temperature spreads them out
The most common complaint from our coffee subscribers this week was about the
Shares among these 6 tokens at temperature 1.0 Shares among these 6 tokens at temperature 1.0
- ·delayed 55%
- ·incons 12%
- ·quality 10%
- ·delay 8%
- ·delivery 8%
- ·inconsistent 7%
Every other token is left out, so these 6 add up to 100%. · marks a space. Computed from GPT-4.1 mini’s odds, recorded on 9 Nov 2026.
At 1, the six keep their recorded ratios.
That pick is called Sampling Picking each next token at random, in proportion to the model's odds., and the dial is Temperature A setting that sharpens or flattens the odds before sampling.. Here are the subject-line runs from the video: the same request, five times at temperature 0 and five at 1.
What to look for
Click through the five samples on each side. At temperature 0, does the subject line ever change? At 1, which samples put the week's counts in the line?
You
Write a subject line for an email to Pinewick Coffee's leadership team summarizing this week's customer feedback. The main points: 11 messages about late deliveries, 7 about billing, and one report of mold on sealed beans. Reply with the subject line only.
Temperature 0
Recorded Recorded from GPT-4.1 mini · 9 Nov 2026
Weekly Customer Feedback: Delivery Delays, Billing Issues & Mold Report
Temperature 1
Recorded Recorded from GPT-4.1 mini · 9 Nov 2026
Weekly Customer Feedback Summary: Delivery Delays, Billing Issues & Mold Report
At temperature 0, five separate requests with no chat history all gave the same subject line. What does that show?
-
The model Sampling Picking each next token at random, in proportion to the model's odds. each token from its odds, so different answers to the same request are normal.
-
Temperature A setting that sharpens or flattens the odds before sampling. changes how varied the picks are, and many current models don't let you set it.
-
If a reply must include something, ask for it in the Prompt The instructions and material you give a model., then check the reply has it.
Try it at work
Next time you need options, ask for several in one request and pick, instead of rerunning the same request.
Every lesson’s takeaways are on the course cheat sheet.