Temperature (AI)

Simple Definition

Temperature is a setting that controls how random or creative an AI model’s responses are.

  • Low temperature (close to 0) — responses are more focused, consistent, and predictable
  • High temperature (close to 1 or above) — responses are more varied, creative, and sometimes surprising

Think of it like a dial between “safe and precise” and “wild and creative.”

How Temperature Works

When an AI generates text, it assigns probabilities to potential next tokens (words or word-pieces). Temperature adjusts how those probabilities are used:

  • Low temperature — strongly favors the most likely next token. The output is predictable and consistent.
  • High temperature — spreads probability across more options. The output is more varied but may be less coherent.

Practical Guide

TemperatureBest For
0Factual Q&A, data extraction, classification
0.3–0.5Technical writing, structured summaries
0.7–1.0Creative writing, brainstorming, marketing copy
1.0+Experimental or deliberately surprising output

Most general-purpose AI tools default to around 0.7.

When You Can Set It

Consumer tools like ChatGPT don’t expose temperature as a user setting. You typically control it when using:

  • The OpenAI, Anthropic, or Google AI APIs directly
  • AI coding environments like LangChain or LlamaIndex
  • Developer tools and custom AI applications
  • LLM — the models temperature applies to
  • Inference — the process where temperature affects output
  • Prompt Engineering — working with model settings to get better outputs
  • Token — the unit of text temperature affects at each generation step

See AI terms in action

Browse practical AI workflows that use the concepts in this glossary.

Last updated: