Dictionary term
Top-p / Nucleus Sampling
Also called nucleus sampling
Top-p is a sampling method where the model only chooses from the smallest set of next tokens whose combined probability exceeds a threshold p, trimming off unlikely options.
In plain English
Top-p tells the AI to pick its next word only from the most likely options, ignoring long shots. Like temperature, it is disappearing from the newest hosted models.
Analogy
Like only picking from the most likely answers that together make up 90% of the odds, ignoring the long-shot rest.
Why it matters
It is an alternative to temperature for tuning how predictable output is, and providers that still offer both (such as OpenAI's Responses API) recommend changing one, not both. Anthropic's API version 2026-10-21 removed top_p along with temperature and top_k (sending any of them returns a 400 error), and Google says its newest Gemini models ignore it, so on those models you steer output with prompting and structured outputs. It remains a standard setting when you self-host open-weight models.
In practice
In a self-hosted vLLM deployment, a top-p of 0.9 makes the model sample only from the tokens that together cover 90% of the probability. The same setting sent to a current Claude model is rejected.
Related terms
Sources
Browse all terms →Last verified
