Top-p (Nucleus Sampling)
Also known as: nucleus sampling, top-p sampling.
In plain English
Where temperature reshapes how token probabilities are weighted, top-p decides which tokens are even in the running. The model sorts every candidate token by probability and keeps adding them to the 'nucleus' until their cumulative probability hits p; everything below the cut is discarded, then one token is sampled from what's left. Top-p 1.0 allows every token (no filtering); top-p 0.1 keeps only the safest, most obvious choices. The advantage over a fixed top-k cutoff is that the pool grows and shrinks with the model's confidence: when the model is sure, few tokens clear the bar; when it's uncertain, more do. Top-p is commonly used instead of or alongside temperature — many APIs default to top-p 1.0 and let temperature do the work. Setting both aggressively low can make output repetitive, so most practitioners tune just one.
Example
A model is completing 'The capital of France is ___.' It's overwhelmingly confident in 'Paris,' so at top-p 0.9 the nucleus is basically that one token — the answer stays correct. Later, completing 'My favorite weekend activity is ___,' the model is unsure, so dozens of tokens share the probability and the nucleus is wide, letting the model pick anything from 'hiking' to 'reading.' Same setting, adaptive behavior.
Top-p (Nucleus Sampling) vs Temperature
Top-p and temperature both control randomness but act differently. Top-p (nucleus sampling) restricts the candidate pool to the most-likely tokens summing to probability p, then samples from that set. Temperature rescales the entire probability distribution's sharpness. Top-p changes which tokens are eligible; temperature changes how evenly they're weighted. Adjusting both at once compounds their effects, so most teams pick one.
Top-p (Nucleus Sampling) in Vincony
Vincony abstracts away raw sampling parameters like top-p and picks defaults tuned to each task, so you get reliable output without dialing knobs. Advanced users can compare how different models behave on the same prompt in Compare Lab.
Try Compare LabTry it — 750+ distinct models across 80+ providers on one account
Vincony bundles GPT-5, Claude, Gemini, Perplexity Sonar Pro, DeepSeek, Mistral, and 750+ other models on one $0/month account.