Jargon:Temperature
1 min read
Say this at the party
“Temperature is a dial for how adventurous an AI's word choices are. Low gives safe, predictable answers. High gives more surprising ones.”
In plain English
When an AI writes, it picks each next word from a list of options, each with a score for how likely it is.
Temperature changes how it picks. At low temperature it almost always goes for the top choice, so answers are steady and repeatable. At high temperature it is happier to pick less likely words, so answers get more varied and creative.
Turn it up too far and the writing turns into nonsense.
Where it came from
The name is borrowed from physics. The maths AI uses to turn scores into choices (the softmax function) has the same shape as an old physics formula, where heat makes particles behave more randomly. Researchers kept the word.
See it in action
Leah uses an AI tool to write a birthday poem with the temperature turned up, so she gets a few wild options. For a summary of her bank statement, she wants it turned right down.
What people get wrong
- A high temperature doesn't make the AI cleverer or more imaginative. It just makes it take more chances.
- Temperature zero doesn't mean the AI is always right. It only means it is more consistent, including being consistently wrong.
Go deeper
- GuideAnthropicGlossary - Claude Platform DocsA short, plain explanation of what temperature changes in practice.
- PostPatrick von Platen, Hugging Face, 2020How to generate text: using different decoding methods for language generation with TransformersShows, with examples, how lowering the temperature makes word choices safer.
- ArticleWikipediaSoftmax function - WikipediaFor the curious: the maths behind it, and its link to temperature in physics.
Related jargon
Drafted with AI. The AI Council (Claude, ChatGPT and Gemini) gave counsel. Phin signed it off.