← Back to Glossary

Temperature

Techniques

A setting that controls how creative or predictable an AI model's responses are -- lower means more focused, higher means more random and creative.

Think of temperature like the dial between a strict librarian and a wild jazz musician. At temperature 0, the librarian gives you the single most correct answer every time. At temperature 1, the jazz musician riffs freely, giving you creative and surprising responses that might be brilliant or might be a little off.

Temperature is a setting you can adjust when using AI models that controls the randomness of the output. It is usually a number between 0 and 2, and it fundamentally changes the character of the responses you get.

At a low temperature (like 0 or 0.1), the model almost always picks the most likely next word. This makes responses very predictable, focused, and consistent. If you ask the same question twice with temperature 0, you will get nearly identical answers. Low temperature is great for factual tasks, code generation, math problems, and any situation where you want accuracy and reliability.

At a high temperature (like 0.8 to 1.5), the model is more willing to pick less likely words, which introduces variety and surprise. Responses become more creative, diverse, and occasionally unexpected. High temperature is useful for brainstorming, creative writing, generating varied marketing copy, or any task where you want fresh, different ideas.

The name "temperature" comes from physics. In thermodynamics, higher temperature means particles move more randomly. In AI, higher temperature means the model's word choices are more random. Most AI platforms let you adjust temperature in their settings or API. If you have ever noticed that an AI chatbot sometimes gives you predictably safe answers and other times goes off on creative tangents, temperature (or a similar setting) is often the reason.

Real-World Examples

  • *Setting temperature to 0 when asking ChatGPT to extract data from a document for consistent results
  • *Setting temperature to 1.0 in Claude when brainstorming creative story ideas
  • *GitHub Copilot using low temperature for code suggestions to prioritize correctness

Tools That Use This

ChatGPTFreemiumClaudeFreemium

Related Terms

Top-P (Nucleus Sampling)InferenceTokensPrompt Engineering