What these sampling settings actually control, in plain language, and when to touch them.
Shared by Parshu · Published Aug 1, 2026
Temperature controls how much randomness goes into picking the next word: low temperature (near 0) makes the model consistently pick its most likely next token, giving repeatable, focused output; high temperature makes it more willing to pick less-likely tokens, giving more varied and creative — and less reliable — output. Top-p (nucleus sampling) does something similar by a different mechanism: it restricts the model to the smallest set of next-token options that together cover a given probability mass, rather than scaling all probabilities like temperature does. In practice, most people never need to touch either: - Leave both at default for general chat and everyday tasks. - Lower temperature toward 0 for anything that needs to be consistent or fact-heavy — extraction, classification, code, math. You want the same input to reliably produce the same output. - Raise temperature for brainstorming, creative writing, or anything where variety across multiple generations is the actual goal. Don't tune both at once — changing temperature and top-p together makes it hard to tell which one caused a change in behavior. Pick one to adjust, leave the other at default, and change it in small steps.