Temperature
Temperature is a sampling parameter between 0 and 2 controlling how randomly an LLM selects its next token — low = deterministic, high = creative.
At temperature 0 the model always picks the most likely next token — reproducible, conservative output. At 1 it follows the full probability distribution (balanced, somewhat creative). Above 1 it gets wild, eventually incoherent. For code and factual data: 0–0.2. For marketing/creative: 0.7–1.0. For brainstorming: 1.2+. Temperature 0 isn't 100% deterministic due to floating-point arithmetic.
Example
Same prompt, temperature 0: always 'The capital of the Netherlands is Amsterdam.' Temperature 1.2: possibly 'Amsterdam, that vibrant capital, is the political and cultural heart of the Netherlands.' Same info, different energy.
Frequently asked questions
When temperature 0?
Classification, extraction, code gen, structured output (JSON) — anything where consistency is critical. At 0 output stays repeatable for identical input.
Does temperature affect hallucination?
Indirectly. Higher temperature = more random tokens = higher chance of deviating from fact. For RAG tasks always keep temperature low.
Related terms
Further reading
- → Our service: GEO