It sounds like this“It always picks the single most likely next word, so it should give the same answer every time.”
Thinking it always picks the most likely word
Why it feels right
Computers are supposed to be predictable: the same input, the same output. A calculator never gives two answers to 17 times 24, so a language model, being a computer program, should give one answer to one question. And in a sense it does give one thing every time: the same chances for the next word. The surprise is what happens next.
Why it’s wrong
At normal settings it samples: a token with a 92% chance is picked about 92 times in 100. Once one draw goes a different way, everything after it is scored on different text, so whole replies diverge.
A worked example
After the words 'The best way to start is', suppose the model gives ' by' a 60% chance, ' to' 30% and ' with' 10%. Ask ten times and you would expect about six 'by', three 'to' and one 'with'.
How often do two replies open the same way? Add up the squares of the chances: 0.6 times 0.6 plus 0.3 times 0.3 plus 0.1 times 0.1 is 0.46. Fewer than half the time. And that is only one word. Each word chosen changes the text the next one is scored on, so the two replies drift apart. Twenty words in, two replies being identical is rare.
Nothing was wrong with the model either time. It simply drew from the same chances twice.
How to catch yourself
- You expect the identical answer when you press 'regenerate'.
- You treat a different second answer as proof that the first was wrong, or that the model has changed its mind.
- You think the randomness means the model does not know the answer.
What to hold instead
At normal settings the model draws each token like a weighted die. The same prompt gives the same chances, not the same reply. To make replies more repeatable, lower the temperature: at 0 the model always takes the top token, though even then, tiny differences in how the computation is run can occasionally change a result.
Where you’ll meet it
- Pressing 'regenerate' and getting a different answer.
- Comparing two models on one run each, which mostly compares luck.
- Tests for software that uses a model, which become flaky when replies vary.
Questions people ask
- Why does ChatGPT give a different answer every time?
- Because it picks each word by chance, weighted by how likely the model thinks each word is. A different word early on changes what comes after, so whole replies differ even though the model has not changed.
- Can I make an AI give the same answer every time?
- Mostly. Setting the temperature to 0 makes it take the top token each time, which makes replies nearly repeatable. Some services also let you set a 'seed'. Exact repeatability is not always guaranteed.