AI glossary

What is temperature in an AI model?

Temperature is a setting that controls how much randomness a model uses when picking the next token: low gives more predictable answers, high gives more varied ones.

At each step, the model computes a probability for every possible token. At low temperature it almost always picks the most likely ones, so the same question gets very similar answers. At high temperature it gives less likely options more of a chance, and the text comes out more varied: sometimes more creative, sometimes more erratic.

It is mostly adjusted when you use a model through an API. For extracting data or classifying, a low temperature works best; for brainstorming, a higher one.

Setting it to zero does not make the model smarter or stop hallucinations: it only makes it more consistent.

Related terms

Updated on