Best-of-n
Also called Best-of-N Sampling
Generate several answers and return only the one a scorer likes best — better output for more compute.
Think of it like
Asking three people to draft the same email and sending only the strongest one.
Example
For a tricky query, the system samples five completions, ranks them with a reward model, and shows the top-ranked reply.
How it actually works
Best-of-n trades inference compute for quality: sample n candidates, score them with a reward or verifier, output the winner. It reliably lifts quality but with diminishing returns and n-times the cost. It is closely tied to rejection sampling — same generate-and-filter idea — and its scores can be distilled back into the model so you get the benefit without paying at serve time.
For product teams
A dial to buy better answers with more compute, useful when quality matters more than latency.
For engineers
Sample n outputs, rank with a scorer, return the argmax; quality rises sublinearly with n.
Related
- Rejection sampling — The training-data version of the same idea.
- Reward model — The scorer that picks the winner.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome