Glossary · 3 · Working with models: prompts and context
Temperature (sampling)
Also known as: Sampling temperature, Top-p
Temperature is a setting that controls how much randomness a language model uses when choosing each next token: low values make output more focused and repeatable, high values make it more varied and creative.
- Intermediate
- Technical writers
- Developers
In one sentence
Temperature in AI explained: the setting that makes model output more predictable or more creative — and which value suits documentation.
Example
A team uses a low temperature for generating API reference descriptions and a higher one for brainstorming blog headlines.
Why it matters on your learning path
- Technical writers: For factual, consistent content, prefer low temperature; it doesn’t prevent hallucinations, though.
- Developers: Temperature is one of several sampling parameters (such as top-p); some reasoning models fix it.