Temperature

A sampling setting that controls how much randomness goes into choosing each next token.

At temperature 0 the model takes the most likely token every time, so the same input gives close to the same output. As temperature rises, less likely tokens get a real chance, and the text becomes more varied and less predictable.

Use low values - 0 to 0.3 - for extraction, classification, code and anything you will run twice and want to match. Use middle values around 0.7 for drafting and brainstorming. High values above 1 mostly produce noise rather than creativity; if the output feels stale, a better prompt beats a higher temperature.

Temperature interacts with top-p, and changing both at once makes results hard to reason about. Pick one to tune.

Where this comes up

Prompts, configs and tutorials in the library that touch this term.