AI engineering glossary · Agents tools MCP
What is Best-of-N sampling?
Best-of-N sampling: Generating several candidate answers or action paths for one task and choosing the best using a scoring method such as a verifier or reward model. It trades extra compute for higher quality, and is often used with agents when checks are automatic.
Best-of-N sampling: an example
An agent writes five candidate fixes, runs the tests on each, and submits the one that passes.
Related terms
More Agents tools MCP terms
- Browser agent
- Code agent
- Code interpreter tool
- Computer use
- Confused deputy problem
- Context compaction
- Conversation summary
- CrewAI
Where you learn it
Best-of-N sampling is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.