Why AI Never Gives the Same Answer Twice

Cascade Insights · AI explainer series

Why AI Never Gives the Same Answer Twice

How a model picks each word, shown on odds you can reshape and draw from

When a model chooses the next word, it never picks one outright. It scores every candidate, then draws from the odds. Two controls shape that draw: temperature, which decides how boldly it gambles, and a filter, which decides which words are even allowed in the running. Watch them act on the same odds.

New to the vocabulary? Tap any dotted term for a plain-language definition, or .

Prompt
01 Temperature: how boldly it draws
1.00 Balanceda natural mix of safe and surprising
0 · always the favorite 1 · natural 2 · anything goes
02 The filter: which words are eligible

The filter is off, so every word the temperature leaves with any odds can be drawn, right down to the long shots. Flip it on to cut the tail.

k = 4fixed · set behind the scenes

Words kept
7 of 7
Odds covered
100%

Draw a wordThe model only from what survives both steps. Cut words can't be picked, whatever their old odds were.
Press draw to sample →
Recent draws
Try this: push temperature high, draw ×10, and watch a wild word slip in. Then turn the filter on and draw again, and it's gone.

the fuller picture: how it works under the hood
01One word at a time, in a loop

The model doesn't plan the sentence and then write it out. It generates one at a time, in a loop, and each pass is a complete repeat of what this page shows: score every candidate, reshape the odds by temperature, cut with the filter, draw one. Then the word it just picked gets added to the input, and the whole thing runs again from the top for the word after that. So a fifteen-word sentence is fifteen separate trips through this exact process. The name for that feed-the-output-back loop is .

The sky is → draws blue  →  The sky is blue → draws next word  →  ... → draws a
02The real choice spans the whole vocabulary

The bars here show seven candidates so the shape stays readable. In a real model, the probability is spread across the model's entire , the tens of thousands of word-pieces it knows (often over a hundred thousand). Nearly every one gets some sliver, including strange ones. The odd word here stands in for that whole invisible tail: thousands of unlikely word-pieces, each with a vanishingly small slice. (These word-pieces are "tokens" in the sense. Here the word means the size of the model's menu, not the handful of tokens any one answer is billed for.)

03The order the two controls run in

The two controls run at different points in the same pipeline. The model produces raw scores, or , over the whole vocabulary. turns them into odds, and reshapes them on the way. The filter ( or ) cuts the tail, and then whatever survives is and drawn from.

The filter step has a proper name: practitioners call it , and top-p specifically is also known as . This page says "the tail" because that's the readable version of the same idea.

full vocabulary → temperature reshapes → filter cuts the tail → renormalize survivors → draw one
04Two knobs, two different jobs

is about boldness: among the words still in play, how willing is the model to gamble on a less-likely one. The filter is about eligibility: which words are in play at all. That's why you can run a high temperature and still stay coherent, as long as the filter removed the bad options before the bold draw. Which filter you use matters too: keeps a fixed headcount no matter the shape, while adapts, keeping few words when the model is confident and many when it's unsure. Raise the temperature with top-p on and watch it keep more words on its own. Top-k won't budge.

05What this looks like when it goes wrong

Both ends of the dial have a failure mode. Turn everything down and you get : flat, repetitive text that can fall into a loop and say the same clause forever. Turn everything up and the model starts drawing words it has almost no reason to pick, which reads as incoherence. Most defaults you'll meet, like a temperature near 1 with around 0.9, are a compromise between those two, chosen empirically rather than derived. And if you need the same answer twice, the setting that gets you closest is , optionally with a fixed . Even then, isn't guaranteed in practice.

06Whether you can set it yourself

In most chat apps you never could: the product picks the temperature and the filter for you. Developers calling a model directly used to get both knobs, but that is changing. Starting with Claude Opus 4.7 in April 2026, Anthropic's models stopped honoring custom temperature and filter settings, and as of October 2026 its newest models reject any value other than the default. On those models, the lever left to you is effort, how much the model thinks before it answers, which Why AI Has Different Modes covers. The sampling on this page still happens on every word. The vendor just holds the dials, so check what your model allows before you design around them.