What is temperature in AI chat settings?
Updated
Temperature is a sampler setting that controls how random a language model's word choices are. At low values the model almost always picks its most likely next word, so replies are safe and predictable; at higher values less likely words get a real chance, so replies are more varied and surprising but can lose the thread. For roleplay, about 0.8 to 1.0 is a common starting point.
Try it now, free, no account neededStart a story with YukiAncient fox spirit. Strong opinions on your snacks.What it does under the hood
For every token, the model produces a score for each possible next token. Those scores are turned into probabilities, and the app picks one. Temperature divides the scores before that step:
- Below 1, the gap between likely and unlikely tokens grows, so the top choices win more often.
- At 1, probabilities are left as the model produced them.
- Above 1, the gaps shrink, so unlikely tokens are picked more often.
- At 0, most services simply take the single most likely token every time.
In an API request it is just a number: "temperature": 0.9.
How it feels in a story
Ask Yuki, an ancient fox spirit with opinions about your snacks, what she thinks of your dinner. At 0.3 she gives a sensible, slightly flat complaint and gives a similar one every time you swipe. At 0.9 she might accuse the noodles of disrespect and demand an offering. At 1.6 she might drift into a poem about the moon and forget the noodles entirely, or produce odd word choices. The right setting is where the character surprises you without losing the plot.
Suggested ranges
- 0.6 to 0.8: steadier replies, good for mysteries and stories with lots of facts to keep straight.
- 0.8 to 1.0: a balanced default for most roleplay.
- 1.0 to 1.2: more colourful, good for comedy and chaotic characters, especially paired with min_p.
- Above 1.3: usually only useful with strong filtering samplers such as min_p.
These are starting points, not rules. Models differ, so change it in small steps and swipe a few times to judge.
Common mistakes
- Raising temperature to fix repetition. It can help a little, but repeated phrases usually need repetition penalty or a better card.
- Changing several samplers at once, so you cannot tell which one helped.
- Copying extreme presets made for a different model.
- Expecting temperature to fix memory or logic. It only changes word choice.
Temperature in UnsavedAI and other apps
The UnsavedAI website picks sampler settings for you. With an API key you can set temperature in SillyTavern, JanitorAI or your own code; UnsavedAI accepts any value of 0 or more and passes it to the model. Our JanitorAI guide suggests 0.8 to 1.0, and roleplay sampler settings covers how it combines with the others.
Questions people ask
Does a higher temperature make the AI smarter?
No. It makes word choices more varied, which can feel more creative, but it does not add knowledge or reasoning.
Why do my replies turn into nonsense?
Temperature is probably too high for the other sampler settings. Lower it, or add min_p around 0.05 to filter out unlikely words.

