Temperature, top-p and why sampling settings are not a quality slider
What temperature and top-p change in an LLM, when to turn them down, and why they cannot fix missing facts.
Overview
Temperature and top-p (nucleus sampling) change how randomly an LLM picks the next token. They are not a “quality” knob. They trade variety against repeatability.
Practical defaults
- Extraction, classification, JSON: low temperature (near 0). You want the same input to produce the same shape.
- Brainstorming titles: moderate temperature. Variety is the point.
- Anything that must match a source: low temperature plus RAG. Sampling cannot invent a missing policy paragraph correctly.
Common confusion
Raising temperature will not make a model “smarter,” and lowering it will not make a wrong fact true. If the model lacks the invoice number, it may still emit a plausible one. See why LLMs hallucinate.
Providers document their own ranges; confirm current parameter names in the API you use.
Related
Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.