Skip to index

GLOSSARY

Sampling Parameters

The dials beyond temperature (top-p, top-k, penalties) that shape which words a model picks — tuning output variety, focus and repetitiveness.

A model outputs a probability for every possible next token; sampling parameters decide how those probabilities become a choice. Top-p (nucleus) keeps only the most probable tokens whose cumulative probability reaches p, cutting the absurd tail; top-k keeps a fixed number of candidates; repetition and presence penalties discourage loops and overused phrases.

In practice most products hide these, and defaults are fine for chat. They matter when you build: creative writing tolerates looser settings, while extraction and code want temperature near zero and tight top-p — the difference between a model that surprises you and one you can ship.

Related terms

Tools that use this

Related categories