AI Glossary
Temperature (generation parameter)
temperature, temperature parameter, model temperature, LLM temperature
Temperature is a generation parameter that controls the randomness of a model's responses. A low value gives more predictable, repeatable results; a high one gives more varied and less predictable output.
- It controls randomness when choosing the next token.
- Low value: repeatability; high value: variety and a higher risk of errors.
- It's matched to the task, not set once and for all.
Temperature affects how a language model chooses the next token. At a low value the model almost always reaches for the most probable word, so responses are consistent and repeatable. At a high value it spreads the choice wider, which makes results more varied but also less predictable.
In practice the value is matched to the task during inference. For data extraction, classification, or source-grounded answers, temperature is set low. For generating text variants or ideas, it's raised, accepting greater variability and a higher risk of errors.
Related terms
Related articles