Ask the same model the same question twice and you may get two different answers. Temperature is the main dial that controls how much the output varies. For most business tasks, such as extracting fields from an invoice or classifying an email, consistency matters more than flair, so builders keep temperature low. For brainstorming, marketing copy or varied replies, they turn it up. It is a small setting with a visible effect on how an AI feature feels.
How it works
At each step of generation, a model works out a probability for every possible next token. It then has to pick one. Temperature changes how that choice is made:
- Low temperature sharpens the probabilities, so the most likely token wins almost every time. Output becomes close to repeatable.
- Higher temperature flattens them, so less likely tokens get picked more often. Output becomes more varied and sometimes more surprising.
Most APIs expose related settings too, such as top-p, which restricts the choice to the most likely tokens that together cover a set share of the probability. Builders usually adjust one or the other rather than both.
Some newer models, particularly reasoning models, fix or limit these settings, so the dial is not always available. Even at the lowest setting, outputs are not always identical across runs, because of how requests are processed on the provider's hardware.
A product description generator is a useful example. At a low setting it writes nearly the same description each time it sees the same product data. At a higher setting it produces fresh variations, which helps when a shop wants several options to choose from.
What it means for cost
Temperature itself costs nothing to change, but it affects how much testing and checking a build needs. Higher values make outputs harder to test, because the same input can give different results, and they can raise the rate of odd or invented content, which is a form of hallucination. For workflows where software reads the model's answer, a low setting combined with structured output makes the system more predictable and cheaper to maintain.
Ask a builder what temperature each step of the build uses and why. A sensible answer names different settings for different steps, not one value for everything.
Common questions
Does a temperature of zero make a model always correct?
No. It makes the model pick its most likely answer, which reduces variation but does not make that answer true. A model can be consistently wrong at low temperature.
What temperature should a customer support bot use?
Usually low to moderate. Answers should be consistent with policy and the help articles, with only enough variation to avoid sounding robotic. The right value is found by testing on real conversations rather than chosen in advance.
Why do I get different answers even at the lowest setting?
Providers process requests on shared hardware in ways that can introduce tiny numerical differences, and some models do not support fully deterministic output. Builds that need exact repeatability should store results rather than regenerate them.