Temperature.
A parameter controlling the randomness of model outputs — lower values produce more focused, deterministic responses; higher values produce more creative, varied text.
Temperature is a scalar applied to the model's output logits (raw prediction scores) before converting them to probabilities. A temperature of 1.0 leaves the distribution unchanged. Values below 1.0 (e.g. 0.2) sharpen the distribution, making high-probability tokens much more likely to be selected. Values above 1.0 flatten the distribution, increasing randomness.
At temperature 0, the model always selects the highest-probability token (greedy decoding), producing completely deterministic outputs. This is useful for code generation, factual Q&A, and structured data extraction. At temperature 1.5 or higher, the model may produce creative but sometimes incoherent text as low-probability tokens are frequently sampled.
Most users interact with temperature at its default setting (usually 0.7–1.0) without adjustment. API users can tune it for specific applications: low temperature for data extraction and reasoning tasks, higher temperature for brainstorming, creative writing, and generating diverse options. Temperature interacts with top-p and top-k to produce the final sampling behavior.