AI Concepts·advanced
Temperature
A dial between predictable and random. 0 = rigid, 1 = creative.
When an LLM generates text, at every step it has a probability distribution over which token comes next. Temperature controls how much it plays it safe.
- Temperature 0: always picks the most likely next token. Deterministic, repetitive, sometimes bland.
- Temperature 1 (default): samples from the full distribution. Varied, creative, occasionally off.
- Higher than 1: weird. Sometimes useful for brainstorming, often just incoherent.
You set temperature when calling the API. On claude.ai you don't get to touch it. For factual questions, lower is better. For creative writing, 0.7–1.0 is the sweet spot.