Skip to content

Temperature

A generation parameter ranging from 0 to 1. Lower values yield strict, predictable responses; higher values produce creative and diverse ones.

How It Works

During generation, the model selects the next word from a set of probabilities. Temperature controls how 'fuzzy' this selection is:

  • 0.1–0.2 — the model almost always picks the most probable word. Responses are strict and deterministic;
  • 0.7–1.0 — the model often chooses less obvious options. Responses are lively but riskier.

What to Choose for Tasks

Task Temperature
Code, facts, math 0.1–0.3
Technical documentation 0.3–0.5
Normal dialogue 0.5–0.7
Poetry, ideas, brainstorming 0.8–1.0

Relation to Hallucinations

High temperature increases the likelihood of hallucinations: the model strays from facts for 'creativity'. Low temperature decreases this but makes responses more templated.

See Also

← All terms