Page languageFrançaisEnglish
Teacher area
Laurent PoupetClaude trainer and artificial intelligence architectStudent area

Category · Models and how they work

What is temperature in a language model?

Temperature is the setting that controls how much chance goes into choosing tokens. When it is low, answers are more consistent; when it is high, they are more varied. Even at zero, two answers are not always identical.

By , Claude trainer and artificial intelligence architect · Updated

How it works

  • Technically, it divides the scores of the possible tokens before the draw; the lower it is, the more clearly the most likely token wins.
  • For extraction or classification it is set as low as possible for consistency; for writing or brainstorming, a medium value adds variety.
  • For an agent, a low temperature suits the choice of tools and their arguments, where consistency matters more than originality.

The trap to avoid

The trap is tuning the temperature to make up for a bad prompt; a vague instruction stays vague, whatever the dose of chance.

Related terms

Where this is taught

Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.

See the full program

All glossary terms

Trial lesson · 30 min · $20

Book (new tab)