Definition
Top-P (also called nucleus sampling) is a sampling parameter that limits the model's next-token choices to the smallest set whose cumulative probability is at or below P. Top-P 0.9 means the model considers only tokens that together account for 90% of probability mass. Top-P interacts with temperature; in practice most users tune temperature and leave top-p at default (typically 0.95-1.0).
Example
Top-P 0.5 produces tighter, more predictable output. Top-P 1.0 considers all tokens, giving maximum variety.
When to use
Tune when temperature alone doesn't give the variation control you need. Most users leave at default.
Also known as
nucleus sampling