Temperature is the most visible setting in any AI developer console and the most consistently misdescribed. It is usually presented as a creativity dial, which is close enough to be memorable and wrong enough to lead people into using it badly.
What does temperature actually control?
At each step, the model produces a probability for every possible next token. Temperature reshapes that list of probabilities before one is chosen.
At low temperature the differences between candidates are exaggerated, so the leading option becomes overwhelmingly likely and the output is close to deterministic. At high temperature the differences are flattened, so less likely tokens get a realistic chance of being selected. At zero, the top candidate is chosen every time.
Why is calling it creativity misleading?
Because it does not add ideas. It widens the pool of tokens the model is willing to draw from, which produces more varied phrasing and, past a certain point, incoherence. Turning it up does not make the model imaginative; it makes it less inclined to take the safest word.
Genuine variety in output comes from the prompt, from examples and from asking for several distinct approaches. A vague request at high temperature produces vague answers with unpredictable wording, which is the worst of both.
Which value suits which task?
- Zero to 0.3. Extraction, classification, structured output, factual answers, code. Anything where you want the same input to give the same result.
- 0.5 to 0.8. General writing, explanation, summarising, most conversation. This is roughly where consumer chat interfaces sit by default.
- 0.9 to 1.2. Brainstorming, alternative phrasings, fiction, anything where repetition is the problem you are solving.
- Above 1.5. Rarely useful. Output degrades into loosely connected words fairly quickly.
Ranges differ between providers, and some cap the value at one while others allow two. A setting copied from one platform to another does not necessarily mean the same thing.
What is top-p and how does it differ?
Top-p, also called nucleus sampling, takes a different route to a related goal. Rather than reshaping probabilities, it restricts the candidate list to the smallest group whose combined probability reaches a threshold. At 0.9, tokens are drawn only from the set that accounts for ninety per cent of the probability mass.
The practical difference is that top-p adapts to the situation. Where the model is confident, the candidate set is tiny. Where it is uncertain, the set is large. Most guidance suggests adjusting one of the two settings and leaving the other at its default, because tuning both together makes results hard to reason about.
Does temperature zero guarantee identical answers?
Not quite, and this surprises people building on APIs. Floating point arithmetic on parallel hardware does not always produce bit-identical results, batching can change how requests are processed, and providers update models without changing the name. Zero gives you high consistency rather than a guarantee.
Where reproducibility genuinely matters, some providers offer a seed parameter, which helps but carries the same caveats about model updates underneath.
Where do you find the setting?
In API calls, in developer playgrounds and in most tools aimed at building workflows. It is usually hidden in consumer chat interfaces, which pick a middle value on your behalf and do not expose it.
If you are working in a chat window and want more consistent output, the equivalent lever is the prompt: specify the format, give an example of what you want and ask for a single answer rather than options. That constrains the likely continuations, which is what a low temperature does by a different route.
What is worth remembering?
Temperature changes how a model chooses between candidates it has already produced. It cannot add knowledge, improve reasoning or make a bad prompt good. When an answer is wrong, the setting is almost never the reason, and adjusting it is a way of avoiding the harder work of saying more clearly what you actually wanted.