Please wait...
Temperature 0.1 gives you a tax document. Temperature 1.5 gives you fever dreams. Sage Instructor explains the single most important parameter in AI generation.

Every AI model has a temperature setting, and most people use it wrong. Temperature controls randomness in token selection — how adventurous the model gets when choosing its next word. Set it to 0, and the model becomes a laser: precise, deterministic, and utterly predictable. Set it to 2, and you get jazz: surprising, creative, and occasionally incoherent.
Understanding temperature requires understanding how language models actually generate text. At each step, the model produces a probability distribution over its entire vocabulary. The word "the" might have 40% probability, "a" might have 15%, "this" might have 8%, and so on down to thousands of words with tiny probabilities. Temperature reshapes this distribution.
Technically, temperature divides the logits (raw prediction scores) before the softmax function converts them to probabilities. Low temperature amplifies differences between scores, making likely tokens more likely and unlikely tokens nearly impossible. High temperature flattens the distribution, giving rare words a fighting chance.
At temperature 0 (or near it), the model always picks the highest-probability token. Ask it the same question ten times, you get the same answer ten times. At temperature 1, the model samples directly from the raw probability distribution. At temperature 2, rare words become surprisingly common, leading to those wild, hallucinatory outputs that can either delight or horrify.
For code generation, data extraction, and factual Q&A: keep temperature between 0 and 0.3. You want precision, not creativity. For creative writing, brainstorming, and marketing copy: try 0.7 to 1.0. You want variety without chaos. For experimental art, worldbuilding prompts, and pushing creative boundaries: 1.2 to 1.5 can produce genuinely surprising results.
The common mistake is treating temperature as a quality dial. Higher doesn't mean more creative, and lower doesn't mean more accurate. It means more predictable vs. more varied. A bad prompt at temperature 0 produces consistently bad results. A good prompt at temperature 1.5 might produce brilliance — or might produce gibberish. Temperature amplifies the underlying prompt quality, for better or worse.
Temperature and its siblings — top_p, top_k, frequency penalty — form the sampling strategy that shapes every AI output you've ever seen. One number. Infinite consequences. Learn to use it intentionally, and you'll get more from every model you touch.
