Berk Bayri

Temperature

A setting that controls how much randomness a language model uses when picking its next token. Low values make answers more predictable, high values make them more varied. It changes word choice, not the model's knowledge.

At every step, a large language model produces a ranked list of possible next tokens, each with a probability. Temperature decides how strictly the model follows that ranking. Near zero, it almost always takes the top choice. Turned up, lower-ranked options get picked more often, so the wording becomes more varied and occasionally strange.

The term comes from statistical physics, where temperature governs how widely a system spreads across its possible states. In a model it works in a similar way: higher temperature flattens the probabilities, lower temperature sharpens them.

What teams get wrong

Temperature is often treated as a creativity dial or a truth dial. It is neither. A low setting does not make a model more accurate. If the most probable answer is wrong, a low temperature produces that wrong answer more consistently. Hallucination is reduced by grounding, retrieval and checks, not by turning a knob.

Low temperature is also not a guarantee of identical outputs. Hosted models can return different text for the same prompt even at zero, partly because the server groups requests into batches of varying size and the arithmetic shifts slightly with them. Some newer reasoning models do not let customers set temperature at all.

Where it matters for decisions

For extraction, classification and anything that feeds an automated step, a low setting makes results easier to test and compare. For brainstorming or drafting alternatives, a higher one gives more spread. Either way, record the setting alongside the model version when you run an evaluation. A score measured at one temperature says little about behavior at another.