With top-p set to 0.9, which tokens can the model sample from at each step?
- Exam domain
- LLM fundamentals
- Difficulty
- Medium
- In this mock
- 6 questions on this domainPractise this domain
Why D is the answer
The smallest set of top tokens whose probabilities add up to 0.9
Top-p, or nucleus sampling, keeps the most likely tokens until their combined probability reaches p, then samples only from that set.
Remember: Top-p is a probability budget.
In detail
- Top-p uses cumulative probability.
- Top-k uses a fixed count.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Only the 9 most likely tokensWrong
A fixed count of tokens is top-k, not top-p.
B. Any token whose own probability is above 0.9Wrong
Rarely does any single token pass 0.9, so this would leave almost nothing.
C. Tokens ranked in the bottom 90%Wrong
Sampling keeps the likely tokens, not the unlikely ones.
D. The smallest set of top tokens whose probabilities add up to 0.9Right
Top-p is a probability budget.
Use case
An illustrative scenario, not a real incident.
Illustrative: a team keeps top-p at 0.9 and lowers temperature to cut odd word choices in product copy.
See it in different ways
flowchart LR S0["Sort tokens by probability"] --> S1["Add until the sum reaches p"] --> S2["Sample from that set"]
How to read this chart
- Read it in order: Sort tokens by probability, then Add until the sum reaches p, then Sample from that set.
flowchart TD
Q{"How do you limit candidates?"}
Q -->|"By total probability"| A0["Top-p"]
Q -->|"By a fixed number"| A1["Top-k"]How to read this chart
- At "How do you limit candidates?": if "By total probability", go to "Top-p"; if "By a fixed number", go to "Top-k".