AI builder glossary
Temperature
A legacy sampling setting that made output more predictable or more varied, now rejected or discouraged on many current reasoning models.
At each step a model produces a probability for every possible next token. Temperature reshaped those probabilities before one was picked: low values sharpened them toward the most likely token, high values flattened them toward more varied choices. Related settings, top_p and top_k, trimmed the candidate list in other ways.
For years, builders reached for temperature reflexively, setting it to zero for extraction and higher for creative writing. That reflex is now out of date. Current Claude models reject temperature, top_p, and top_k with an error, and many other providers' reasoning models either reject them or recommend leaving them at defaults. Check each model's documentation before relying on them.
Even where it still exists, temperature was never a guarantee. A low setting doesn't make output deterministic or correct, and a high one isn't the best way to get variety. The modern replacements are more direct: structured outputs and validation for consistent formats, clear instructions and examples for tone, effort for how hard the model works, and asking explicitly for several distinct options when you want variety.
If you migrate older code, remove sampling parameters rather than translating them, and use your evals to confirm behavior holds.
A team porting a two-year-old extraction script gets errors from the temperature setting. They remove it, switch to a strict output schema, and their eval set shows the same field accuracy as before.
Learn more in the course
Related terms
Go from definitions to doing
Learn to build AI-powered apps in 132 practical lessons.