Temperature
Also called sampling temperature, randomness
A setting that controls how random or predictable an AI model’s word choices are.
Temperature is a number, usually between 0 and 1 or 0 and 2, that controls randomness when a model picks each next token. At each step the model calculates a probability for every possible token. A low temperature sharpens those probabilities so the most likely tokens almost always win. A high temperature flattens them so less likely tokens get picked more often.
Low temperatures (around 0 to 0.3) give consistent, focused output and suit tasks with a right answer: data extraction, classification, code, factual Q&A. Higher temperatures (around 0.7 to 1) give more varied wording and suit brainstorming, creative writing and generating several alternatives.
Temperature is set in APIs and developer tools; most consumer chat apps choose it for you. Even at temperature 0, outputs are not always identical between runs, because of how models are served. Some reasoning models fix temperature or ignore it entirely, so check your provider's documentation.
Example
Asked for a product name at temperature 0.2, a model suggests "SwiftNote" three times in a row. At temperature 1.0 it suggests "SwiftNote", "Inkwell" and "Margin", which is more useful for brainstorming.
Common mistake
Raising temperature to make answers "smarter" or more detailed. Temperature only changes randomness. High values can increase factual errors and incoherent text. If answers are too short or shallow, change the prompt instead.