Definition
Temperature is a parameter in language model inference that controls the probability distribution over the next token prediction. At temperature 0, the model always selects the most probable token, producing deterministic and repetitive outputs. As temperature increases toward 1.0 and beyond, the model distributes probability more evenly across tokens, producing more varied, creative, and sometimes surprising outputs.
Mathematically, temperature scales the logits (raw prediction scores) before they are converted to probabilities via the softmax function. A lower temperature sharpens the distribution, concentrating probability on the top choices. A higher temperature flattens it, giving less likely tokens a better chance of being selected. Most APIs allow temperature values between 0 and 2, with 1.0 as the default.
Why It Matters for Product Managers
Temperature is one of the most accessible and impactful parameters PMs can tune to control AI feature behavior. For factual tasks like answering support questions, extracting data, or generating structured outputs, low temperature (0.0 to 0.3) ensures consistent, reliable results. For creative tasks like brainstorming, writing marketing copy, or generating diverse suggestions, higher temperature (0.7 to 1.0) produces more varied and interesting outputs.
Choosing the wrong temperature creates immediate user experience problems. Too low on a creative feature and users see repetitive, boring suggestions. Too high on a factual feature and users get inconsistent or incorrect answers. PMs should treat temperature as a product design decision that gets tested and iterated on, not a technical detail left to engineering defaults.
How It Works in Practice
Common Pitfalls
Related Concepts
Temperature is an inference parameter of Large Language Models (LLMs) that works alongside Prompt Engineering to shape output behavior. Higher temperature settings increase the risk of Hallucination by allowing less probable tokens, making temperature tuning critical for factual use cases.