# LLM Temperature

> A setting for how random the model's word picks are. Low is steady, high is wild.

**Field:** Artificial Intelligence  
**Category:** LLMs  
**Also known as:** Temperature, Sampling Temperature

## Think of it like

Think of it like a dial from calm to wild. Turn it down for safe words and up for surprise.

## Definition

Temperature is a setting that controls how random a model's word choices are. A low value, near 0, makes the most likely token win almost every time, so answers are steady and plain. A value of 1 keeps the chances as the model gave them. Higher values flatten the chances, so rare tokens get picked more and the text gets more varied, then strange. Most tools let you set it between 0 and 1 or 2.

## Example

Emma sets temperature to 0 to pull dates out of invoices, so she gets the same result each time. For slogan ideas she uses 0.9 and gets more variety.

## Why it matters

It is the first knob to turn when answers are too dull or too wild for the job.

## Common mistake

Thinking 0 makes the model correct. It makes it consistent, which is not the same; a wrong answer just repeats.

## Three principles

- **Low is steady.** The top token wins.
- **High is varied.** Rare tokens get picked.
- **Pick per job.** Facts low, ideas higher.

## Related terms

- [LLM Sampling](https://learn.benibix.com/term/ai/sampling)
- [Top-p Sampling](https://learn.benibix.com/term/ai/top-p-sampling)
- [Top-k Sampling](https://learn.benibix.com/term/ai/top-k-sampling)
- [Regenerate Response](https://learn.benibix.com/term/ai/regenerate-response)
- [Softmax Function](https://learn.benibix.com/term/ai/softmax)
- [LLM Non-Determinism](https://learn.benibix.com/term/ai/llm-non-determinism)
- [Greedy Decoding](https://learn.benibix.com/term/ai/greedy-decoding)

## Told apart from

- [Temperature vs Top-p Sampling](https://learn.benibix.com/compare/temperature-vs-top-p-sampling): People often think temperature and top-p are two names for one setting. Temperature changes the shape of all the chances, making the top word stronger or the field flatter. Top-p does not reshape them; it cuts off the long tail of unlikely words. Most guides say to change one and leave the other alone.

## Taught in

- [Temperature and Sampling](https://learn.benibix.com/learn/ai-llms/temperature-and-sampling): LLMs, 3/15

![Three bar charts of the same next-word chances. At low temperature one bar towers over the rest. At medium temperature the bars are as the model gave them. At high temperature the bars are almost flat.](https://learn.benibix.com/diagrams/llm-temperature.svg)

---

Source: https://learn.benibix.com/term/ai/temperature
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
