Temperature (LLM non-determinism)
A setting that controls how random a model’s word choices are; even at zero, answers can still differ between runs.
Temperature is a sampling setting that controls how random a model’s word choices are, from focused to varied. Even at zero, the same request can return different text between runs.
Low temperature makes output more focused and repeatable, high makes it more varied. Batching and hardware differences on the provider’s side mean the same request can still return different text, and some reasoning models fix the setting themselves. So tests on model output cannot be exact string comparisons: check properties, run each case several times, and validate structure with schemas.
Temperature differs from reasoning effort, which sets how much the model works before answering. For data extraction, structured outputs constrain the shape of the answer, which no temperature value can do. Track changes over time with prompt regression tests and evals that score each case over several runs. Creative tasks such as drafting copy are where a higher value helps; for anything a person or system will act on, keep it low and measure the spread.
Related terms
- Evals: A repeatable test set that scores an AI feature, so changes can be measured instead of guessed.
- Prompt regression: An answer that used to be right goes wrong after a change to the prompt or the model.
- Structured outputs: The model’s answer is constrained to match a JSON schema you provide.
- Reasoning and effort: Models that think before answering, with a setting for how much thinking to spend.
