Intermediate

Temperature: the “predictable or creative” dial of an AI

Temperature is a setting that controls how much randomness goes into a language model's word choices. Set low, the model almost always picks the most likely word and answers consistently; set higher, it takes less expected paths and varies its answers more.

Data as of October 22, 2026

Key figures

LevelIntermediate

How it works

A language model writes its answer one token at a time. At each step, it assigns a probability to every possible next token: after “The cat is sleeping on the…”, “couch” might be very likely, “roof” less so, “cloud” hardly at all. Then it has to pick one. Temperature reshapes that distribution before the pick:

  • low: the gaps widen, and the most likely word wins almost every time;
  • high: the probabilities even out, and less expected words get a real chance.

Scales differ between providers. As of October 22, 2026, OpenAI’s API accepts a temperature between 0 and 2, while Claude’s API accepts 0 to 1, with 1 as the default, according to their official references.

A concrete example

A marketing team asks a model to name a new line of teas. At a low temperature, it suggests safe names that barely change from one run to the next. At a high temperature, the ideas get more surprising, with a few odd ones mixed in. The same team extracting dollar amounts from invoices into a spreadsheet wants the opposite: a low temperature, the same result every time, no creativity. To write instructions suited to each case, our prompt generator gives you a starting template.

Why it matters

Temperature explains why two runs of the same prompt produce different answers, and why a program expecting a strict format can occasionally break. It’s a simple lever for balancing reliability against creativity, best combined with structured output when format matters.

The setting matters less with reasoning models, though. Anthropic’s documentation states that models released after Claude Opus 4.6 no longer let you set temperature: only a value of 1 is still accepted.

Common myths

  • “Low temperature means true answers.” No: it makes answers more stable, not more accurate. A model can confidently repeat the same hallucination.
  • “Higher means smarter or more creative.” Past a certain point, the text just becomes incoherent.
  • “It’s the same setting everywhere.” Ranges and defaults vary from one provider to another.

Related terms: token, structured output, reasoning model, hallucination, API.

Related terms

Try it

Full glossary

Frequently asked questions

What temperature should I use?

Anthropic's documentation recommends values closer to 0 for analytical or multiple-choice tasks and closer to 1 for creative ones. For data extraction, classification or code, a low value is a good starting point; for slogan ideas, turn it up and compare.

Does a temperature of 0 always give the same answer?

Not quite. Anthropic notes that even at 0, results are not fully deterministic. Answers become much more stable, but small variations can remain.

Can I change the temperature in ChatGPT or Claude?

Not in the consumer apps, which use their own settings. You set it through the API, or in developer and automation tools that expose it. And some recent models no longer accept it at all.

How is it different from top_p?

Top_p is another sampling method: the model only considers the words that together make up a given share of the total probability. OpenAI recommends adjusting one or the other, not both.

Data sources

Data as of October 22, 2026

Report an error

Does a figure, a date or a fact look wrong? Tell us: every report is checked.