AI WordsLanguage modelsIntermediateone layer deeper

Temperature, sampling temperature

Made by AIWritten by AI (Claude) from this site's records and lessons, and published after automated checks. The owner doesn't read every item.How it's made

A setting that controls how adventurous an AI is when picking the next token.

An AI gives every possible next token a probability, then draws one, a bit like a raffle. Temperature changes how flat that probability table is. Turn it down and the top choice wins almost every time; turn it up and lower-ranked choices get picked more often.

Low temperature gives safe, similar answers; high temperature gives more variety but also more nonsense. People often keep it low for translating or summarizing and raise it for brainstorming. It doesn't make the AI smarter, only bolder.

You might expect temperature 0 to give the same answer every time, but experiments have found large models can still vary.

Think of it like this

Think of a music app. Low temperature is your favorite song on repeat; high temperature is shuffle across your whole library. You might discover something great, but you'll also hit more tracks you want to skip.

For example

Asked "How was lunch?", a low setting keeps saying "Good," while a high one sometimes says "Salty, but okay."

Common mix-ups

  • Mix-upTurning up the temperature makes the AI smarter.

    ActuallyThe name is borrowed from physics. Just as particles move more wildly when things get hotter, turning the number up only makes the picking more random — the model doesn't know a single thing more.

  • Mix-upAt temperature 0 you always get exactly the same answer.

    ActuallyIn a 2026 experiment by an IBM researcher with 4,705 runs at temperature 0, several models did not repeat the same decision every time. And the more accurate models weren't any more consistent.

Try it in class

For teachers at the start of a lesson — or for students working on their own.

Question
Translating, summarising, brainstorming — which one benefits from a high temperature?
Activity
Imitate temperature with a lucky draw. Write four possible answers to "How was lunch today?" on slips. In the "low temperature" box, put seven slips of the top answer and one of each other; in the "high temperature" box, put two of each. Draw ten times from each box, write down the results and compare.

Records about this

Source-checked moments from AI history.

IBM (Raffi Khatchadourian)
Replayable Financial Agents

The domain is finance, but the requirement to replay for audits has the same structure as quality audits. Contrary to the common belief that picking a more accurate model brings reproducibility along with it, 4,705 runs