liveBook · Manning

Best-of-N

Best-of-N is a technique that generates or evaluates multiple candidates and selects one according to a scoring or quality criterion.

How 2 Manning books explain it

LLM Evaluation and Alignment, The Foundational Ideas

Best-of-N reranking is a selection method that scores multiple candidate solutions and retains the highest-scoring candidate.

How it is used
Uses a trained reward model to improve inference outputs or substitute more cheaply for a full PPO run.
How deep it goes
Explains sampling, scoring, selection, linear compute cost, KL drift, and reward-model calibration risk.
Examples
Uses BoN@4 and BoN@64 comparisons, plus MATH reranking with process and outcome reward models.
What you can do after
Apply it via a trained reward model by sampling, scoring, and selecting candidates under a chosen N budget.

Read how LLM Evaluation and Alignment, The Foundational Ideas explains best-of-N →

Prompt Engineering in Practice

Best-of-N is a sampling technique that generates multiple complete candidate responses and selects the strongest candidate.

How it is used
Selects one complete response when meaningful quality differences justify rubric-based comparison.
How deep it goes
Generates complete candidates under identical requirements, scores them against predefined criteria, selects one, and archives the rubric; it does not average or vote.
Examples
Uses three candidate executive updates about a failed checkout deployment, constrained by length, audience, tone, and required content.
What you can do after
Evaluate complete candidates against predefined criteria and select one final response.

Read how Prompt Engineering in Practice explains best-of-N →

Also covered in

What to know first

Related concepts

Questions about best-of-N

What is best-of-N?

Best-of-N is a technique that generates or evaluates multiple candidates and selects one according to a scoring or quality criterion.

Which Manning books explain best-of-N?

LLM Evaluation and Alignment, The Foundational Ideas and Prompt Engineering in Practice.

What should I know before learning best-of-N?

Manning books that teach best-of-N usually introduce fine-tuning, Kullback–Leibler divergence, reward model and Proximal Policy Optimization first.

What is the difference between best-of-N and mode?

Best-of-N is a technique that generates or evaluates multiple candidates and selects one according to a scoring or quality criterion. The statistical mode is the value or category occurring most frequently in a set of observations or outcomes.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.