Open Agent School · Public worked example
Temperature: meaning and example
Welcome! Take one idea with you today.
During token sampling, temperature rescales model scores before they become a probability distribution. Lower positive temperature concentrates probability on higher-scoring choices; higher temperature spreads it more evenly. It changes selection behavior, not the model's stored knowledge or access to evidence.
Picture it: A museum wants several titles for an exhibit, then a factual label listing the opening date. More varied title drafts can be useful. A varied date is not. The team must decide separately how to sample creative wording and how to retrieve and verify the date.
What is easy to mix up?
It is a sampling control. Grounding, tool results, task design, and evaluation address factual reliability; a repeatable answer can still be wrong.
Teaching example by Open Agent School. Source: Hugging Face Transformers - Generation configuration.