AI · Term

Temperature

Temperature is a setting that controls how random or predictable an AI language model's output is, with low values making it pick the most likely words and high values making its choices more varied and surprising.

Temperature is set by whoever calls the model, usually a developer through an API. Consumer chat apps generally fix it for you. It changes how the model chooses among possible next words, not what the model knows, so it is a style dial rather than an intelligence or accuracy dial.

A common misunderstanding is that low temperature makes a model truthful. It makes it consistent. A model that does not know a fact will state the same wrong answer every time at low temperature, just as confidently as it would state the right one. If an answer is wrong, the cause is almost always missing or poor information, not the temperature setting.

How it works

At each step, a large language model calculates a probability for every possible next token. Temperature adjusts those probabilities before one is picked. A low value sharpens them, so the most likely token wins almost every time. A high value flattens them, giving less likely tokens a real chance of being chosen.

At a temperature of zero, the model picks the top token every time, so the same input usually gives nearly the same output, though small variations can still occur for technical reasons. The allowed range depends on the provider, commonly from zero up to one or two. Values well above one tend to produce rambling or incoherent text.

Temperature is often used alongside a related setting called top-p, which limits the choice to the smallest set of tokens whose probabilities add up to a chosen share. Some providers advise adjusting one of the two, not both at once. Some reasoning models fix their sampling settings and ignore or reject a custom temperature, so check the provider's documentation for the model you use.

Example

A web shop uses an AI model in two places. For pulling the size, colour and material out of supplier descriptions into a product table, the developer sets a low temperature, because the same description should always give the same result. For suggesting five headline ideas for a seasonal campaign, a higher temperature gives more varied options to choose from.

To check the setting, the developer runs the extraction task three times on the same twenty descriptions and compares the results. At low temperature they match; at a high one, a few fields differ between runs, which would have caused errors in the catalogue. For the headlines, the developer instead asks for ten options in one request at a moderate temperature, then the marketer picks two. Generating many options and choosing by hand works better than hoping a single high-temperature answer will be good.

Why it matters for your business

If you commission an AI feature, temperature is one of the settings that decides whether it behaves consistently. Data extraction, classification and customer-facing answers usually need low values; brainstorming and creative drafts benefit from higher ones. The setting will not fix a weak prompt or missing information, so if answers are wrong, look at the instructions and sources first. Ask a supplier which temperature each feature uses and why; a clear answer is a good sign they tested it. In practice most business tools settle on one low value for factual work and change it rarely.

Common mistakes

  • Lowering temperature to stop the model inventing facts, when the real fix is grounding it in reliable sources.
  • Using a high temperature for tasks where the same input must always give the same output.
  • Changing temperature and top-p together, which makes it hard to tell which change had an effect.
  • Assuming temperature values mean the same thing across different providers' models.

Questions people ask

What temperature should I use?

Use a low value, at or near zero, for extraction, classification and factual answers where consistency matters. Use a moderate to higher value for brainstorming, slogans and creative drafts. Test on your real task, because the best value varies between models and providers.

Does temperature zero make AI answers deterministic?

Nearly, but not always perfectly. The model picks the most likely token each time, so outputs are usually identical or very close, but small differences can still appear because of how calculations run on the provider's hardware. Do not rely on exact repeatability for critical systems.

Can I change temperature in ChatGPT or Claude?

Not in the standard consumer apps, which choose settings for you. You can set temperature when using the models through the providers' developer APIs or test consoles, which is how businesses tune it for their own tools.

Related terms

Have something worth building right?