Foundations

What Is Temperature (AI Parameter)?

Temperature is a setting that controls how creative or predictable an AI model's responses are — lower values produce more focused, consistent outputs while higher values produce more varied, creative results.

The Plain-English Explanation

When an AI model generates text, it calculates probabilities for every possible next word. Temperature controls how it chooses from these probabilities. At low temperature (close to 0), the model almost always picks the most likely word — producing consistent, predictable, "safe" responses. At high temperature (close to 1 or higher), it gives more weight to less likely options — producing more varied, surprising, and sometimes creative outputs.

Think of it like a musician. At temperature 0, they play the song exactly as written every time. At temperature 0.7, they add some personal flair and improvisation. At temperature 1.5, they go full jazz — exciting but occasionally chaotic.

Why It Matters

Knowing about temperature helps you understand why AI responses vary and how to control them. For tasks requiring accuracy (data extraction, code generation, factual answers), use low temperature. For creative tasks (brainstorming, writing, ideation), use higher temperature. Most chat interfaces set temperature automatically, but API users and advanced tool users can fine-tune this setting.

Examples in Practice

Common Misconceptions

Myth: Higher temperature means better quality.

Reality: Higher temperature means more variety, not more quality. For factual or technical tasks, high temperature introduces errors. The "best" temperature depends entirely on the task.

Myth: Temperature controls how smart the AI is.

Reality: Temperature only affects randomness in word selection. It doesn't change the model's knowledge or reasoning ability. A model at temperature 0 knows just as much as at temperature 1.

Myth: You can't control temperature in ChatGPT.

Reality: The chat interface doesn't expose temperature directly, but Custom GPTs and the API allow you to set it. Understanding the concept still helps you evaluate and adjust your results.

Related Terms

Further Reading

Learn Temperature (AI Parameter) in Depth

Module 3 of AI Fundamentals explains temperature and other model parameters — giving you the knowledge to fine-tune AI outputs for any task.

Explore AI Fundamentals

Frequently Asked Questions

What temperature should I use?
For factual tasks, code, or data extraction: 0–0.3. For general conversation and writing: 0.5–0.7. For creative brainstorming and idea generation: 0.7–1.0. Start in the middle and adjust based on results.
Does temperature affect hallucination risk?
Yes. Higher temperature increases the chance of hallucinations because the model is more likely to choose less probable (and potentially incorrect) words. For accuracy-critical tasks, keep temperature low.
What's the default temperature in ChatGPT?
OpenAI uses a moderate default (roughly 0.7) that balances creativity and accuracy. This works well for most casual use. For specialised tasks, adjusting temperature through the API or Custom GPTs gives you more control.
Back to AI Glossary