temperature
Temperature is a setting that determines how predictable or how varied and surprising the language model's answer to the same question will be.
In plain terms
The language model assembles the answer word by word (more precisely, token by token), choosing from several possible continuations at each step. Temperature regulates how strictly it adheres to the most probable continuation versus allowing rarer, more unusual solutions.
Imagine a chef. At a low temperature, they always cook exactly by the recipe: reliable, but you always get the same dish. At a high temperature, they improvise: sometimes they find a great new flavor, sometimes the result is inedible.
That is why a low value is usually used for precise, verifiable tasks (data extraction, calculation, coding), and a higher one for brainstorming, naming and writing poetry. Temperature does not change what the model knows, only how it chooses from what it knows.
How it works
- At each step, the model assigns a score to every possible next word fragment (token): the better it fits the text, the higher the score.
- The scores are divided by the temperature value, and only then are they converted into probabilities. A value of 1 leaves the model's original probabilities unchanged.
- If the value is small (close to 0), differences are amplified: the most likely token almost always wins, and the response becomes predictable. Division by exactly zero is impossible, so in practice 0 means the model always selects the most likely token without sampling.
- If the value is high (above 1), the differences blur: rarer tokens also appear frequently, the text becomes more varied, but it is more prone to drift.
- The model finally 'samples' a token from these adjusted probabilities, then repeats the entire process for the next step.
An everyday example
You ask the chatbot to name your new bakery, and each time you click the "Regenerate" button, you get different ideas. This is due to temperature: the system intentionally leaves some randomness in the response. If the same model is set up to extract data from invoices, it is run at a low temperature so that it produces much more consistent results.
Who is affected
A common misconception
Limits and risks
- Low temperature does not guarantee accuracy: a consistent response can be consistently wrong.
- An excessively high value can result in incoherent, meaningless text and more factual errors.
- In most consumer chat applications, you cannot adjust this because the provider has pre-set it.
- Values cannot be transferred from one model to another: the same number may represent a different scale and behavior with another provider.
Similar, but not the same
- top-p sampling – Top-p completely excludes the least likely continuations. Temperature does not rule out any option; it only sharpens or blurs the differences between probabilities.
- hallucination – A hallucination is the model's false, fabricated statement; temperature is merely a setting that may increase the likelihood of this, but is not the cause.
- prompt – The prompt tells the model what you are asking, while the temperature determines how much freedom it has to choose among possible responses.
Related concepts
sampling, text generation, model parameter
–
greedy decoding, top-p sampling, top-k sampling, token, hallucination, large language model
A brief history
The name comes from statistical physics, where temperature determines how disorderedly particles are distributed among the possible states. It entered machine learning with the Boltzmann machines described in 1985, and the 2015 paper on knowledge distillation by Geoffrey Hinton and colleagues made it widely known.
Where things stand
As of late 2026, temperature is an adjustable parameter in the developer interfaces of most language models, but it typically stays hidden in consumer applications. For several newer step-by-step thinking (reasoning) models, the provider fixes or restricts its value, so it can be tuned little or not at all.
In the news
- Schneider: warmer coolant could make AI data centers more water-hungrySep 21, 2026 · Ipar
Also known as
temperature · temperature · temperature parameter · temperature parameter · sampling temperature · sampling temperature · softmax temperature · LLM temperature
Sources
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.