Your AI assistant drafts the same response five times. Three are boring. One is perfect. One is completely wrong.
You cannot figure out why. Same prompt, same context, same everything.
Some days it nails the tone. Some days it sounds like a corporate press release.
The randomness dial was set wrong for the job.
INTERMEDIATE - Requires basic understanding of AI text generation.
When AI generates text, it predicts the next word from thousands of possibilities. Temperature controls how it picks. Low temperature means it almost always picks the most likely word. High temperature means it takes more chances on less likely options.
Temperature 0 gives you the same output every time. The AI always picks its best guess. Reliable but potentially boring. Temperature 1+ introduces randomness. The AI might pick unexpected words. Creative but potentially incoherent.
Sampling strategies go deeper. Top-p (nucleus sampling) only considers words that make up a certain probability mass. Top-k only considers the k most likely words. Both let you fine-tune how much variety you get without going off the rails.
Temperature is not a quality dial. It is a creativity vs. consistency dial. Different tasks need different settings.
The right amount of randomness depends on what you need: consistency for structured tasks, creativity for open-ended ones.
Match randomness to task requirements. Data extraction needs near-zero randomness. Brainstorming needs more. Adjust based on how much variation you can tolerate.
Drag the slider to change temperature. Click "Regenerate" to see different outputs at the same setting.
"Write a one-sentence summary of the quarterly productivity report showing 12% improvement."
The quarterly report reveals a notable 12% uptick in how productive our team has been.
Natural variation. Good for internal communications.
The quarterly report reveals a notable 12% uptick in how productive our team has been.
We saw team productivity climb 12% this quarter, which is encouraging.
This quarter brought a solid 12% productivity gain across the team.
The main randomness dial
Scales the probability distribution before sampling. Low values sharpen probabilities (top choices become more likely). High values flatten them (everything becomes more equal).
Dynamic vocabulary filtering
Only considers words whose cumulative probability adds up to p. If top-p is 0.9, it ignores the bottom 10% of unlikely words. Adapts automatically to how confident the model is.
Fixed vocabulary filtering
Only considers the k most likely words at each step. Top-k of 40 means the model picks from its top 40 guesses only. Simple cutoff regardless of probability distribution.
Your team uses AI to draft internal communications. Some come out polished, others feel off. By setting temperature correctly for each task type, you get predictable quality without losing natural variation.
Hover over any component to see what it does and why it's neededTap any component to see what it does and why it's needed
Animated lines show direct connections · Hover for detailsTap for details · Click to learn more
You asked the AI to pull dates and names from documents. Temperature at 0.8. Half the outputs have slightly different formats. Some dates are wrong. The AI got "creative" where you needed precision.
Instead: Set temperature to 0 for extraction tasks. You want identical output format every time.
You wanted the AI to suggest 10 different approaches to a problem. Temperature at 0. It gave you the same answer rephrased 10 times. No variety, no unexpected ideas.
Instead: Use temperature 0.7 to 1.0 for brainstorming. Accept that some suggestions will be duds.
The AI drafts sound generic so you set temperature to 1.2. Now they sound unhinged. Random tangents, weird word choices, occasional nonsense. You traded boring for broken.
Instead: Temperature above 1.0 rarely helps. Fix boring output with better prompts, not more randomness.
You know how to control AI randomness. The natural next step is learning how to enforce specific output formats so you get structured, predictable data every time.