Temperature

Temperature is a setting on a language model that controls how random its word choices are: low values make it pick the most likely next word every time, high values let less likely, more varied options win.

LLMs & languagesampling temperatureLLM temperature
§ 01DefinitionTemperature

No jargon, no math

In plain words, what is it?

Every time a language model writes a word, it holds a ranked list of candidate words with scores (logits). Temperature reshapes those scores before the dice are rolled. Divide the scores by a low temperature and the gap between first and second choice explodes: the top word wins almost always, so the output becomes focused, deterministic, repetitive. Divide by a high temperature and the scores flatten: unlikely words get real chances, the output varies more, and at extreme values it turns to noise. At exactly 0 the dice disappear and the model always picks the top word (greedy decoding). Temperature changes style, not knowledge: the same model at 0 and at 1 knows the same facts, it just commits to them differently. Where it breaks: near-zero produces loops and safe clichés, above 1.5 produces word salad. Set it per task: 0 for extraction and classification, around 0.7 for drafting, 1 or more for brainstorming.

§ 03

Want this running in your stack?

We design and ship AI systems with permissions, logs and human approval. It starts with a 30-minute scoping call.