H-07Best-of-N / Search

/harnesses/best-of-n

Sample several independent attempts in parallel and keep the one a judge scores highest.

Step-by-step walkthrough4 steps
  1. One prompt, N independent samples — in parallel.
  2. Attempts vary: temperature, seeds, even different models.
  3. The judge compares all candidates side by side.
  4. B wins. You paid 4× inference for one better answer.
Key insight

When attempts are cheap and judging is easier than generating, N tries plus a selector beats one careful try.

Failure mode

The judge is the ceiling: if it can’t tell good from bad, you pay N× inference to select noise.

Elsewhere in the atlas