AI & automation

What is temperature in an AI model?

Temperature is a setting sent with each request to a language model that controls how much randomness goes into choosing the next word: low values make answers more predictable and repeatable, higher values make them more varied and surprising.

How it works

At every step the model scores many possible next tokens. Temperature reshapes those scores before one is picked. Near zero, the top choice almost always wins, so the same question gets nearly the same answer each time. Higher up, less likely words get a real chance, which produces fresher phrasing but also more drift and more mistakes.

The exact range and default differ by provider, and some recent reasoning models fix the value or ignore it, so check the documentation for the model you use.

Choosing a value

  • Pulling fields out of invoices, classifying tickets, generating SQL or JSON: keep it low. You want consistency, not creativity.
  • Customer support and FAQ answers: low to moderate, so wording sounds natural without inventing details.
  • Brainstorming names, ad variations or story ideas: higher, then have a person pick.

What temperature does not fix

A low temperature does not make a model truthful; it only makes it consistent, including consistently wrong. Accuracy comes from good instructions, grounding the model in your own data and checking outputs. Change one setting at a time, and compare results on the same test questions, otherwise you will not know what helped.

Questions, answered

Usually very close, but not always identical, because of how providers run models on their hardware.

Providers generally suggest adjusting one of them and leaving the other at its default.

By the Stegnor team · Updated