In plain English
Think of temperature as a creativity dial for your AI. A low temperature makes the output predictable, formal, and factual like a textbook, while a high temperature makes the AI bold, imaginative, and occasionally unpredictable like a creative writer.
Real-world example
Setting temperature to 0.0 for precise code generation and 0.8 for creative storytelling.
Technical definition
Sampling temperature is a scaling factor applied to logits before the softmax normalization function during LLM text generation. A lower temperature sharpens the probability distribution, favoring high-probability tokens and yielding deterministic responses. Conversely, a higher temperature flattens the distribution, increasing the likelihood of selecting diverse, lower-probability tokens.