Free-form outputs never match exactly, so majority voting degenerates to singletons; replace counting with scoring (judge, reward model, or task verifier) and pick best-of-n by score.
Imagine five friends each tell you the punchline of a joke. If the joke has a one-word punchline, three friends saying the same word is a clear winner. If the joke has a long setup, all five will phrase it differently, so counting who said what gives you five singletons and no winner. Same problem with summaries. You cannot vote because nothing is the same. The fix is to ask a sixth friend to rate each version and pick the best one, instead of trying to count matches.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Self-consistency voting is one of the most-published inference-time techniques for reasoning models, and one of the most-misapplied. It works beautifully on math, code, and other tasks with discrete checkable final answers. It fails silently on free-form prose tasks because the underlying mechanism (exact-match counting on the extracted final answer) assumes a discrete output space that prose does not provide.
This question's correct answer names the structural failure and the natural fix: replace counting with scoring, generalizing self-consistency to best-of-n with a scoring function. The wrong answers each represent a real misdiagnosis worth understanding. This explanation walks the original self-consistency mechanism, why it degenerates on prose, the three production scoring options, and the cost-quality tradeoffs of each.
How self-consistency actually works
Wang et al. 2022 introduced self-consistency as an inference-time technique for chain-of-thought prompting. The mechanism has three steps.
First, sample n reasoning chains for the same prompt, typically with temperature 0.5 to 0.9 to encourage diversity. Each chain produces a long reasoning trace and a final answer.
Second, extract the final answer from each chain. For math problems, this is the last numeric expression; for multiple choice, the chosen letter; for yes/no, the binary verdict. The extraction step is task-specific and depends on the final answer being a small discrete token.
Third, tally the final answers and pick the most common one. The reasoning chains themselves are discarded; only the final answer is voted on. The intuition: correct chains can take many paths but tend to converge on the right final answer, while incorrect chains scatter across many wrong answers. The mode of the distribution over final answers is more likely correct than any single chain's answer.
The technique is highly effective on math benchmarks: published gains of 5 to 20 points on GSM8K, MATH, and AIME at n=8 to 40 samples. The mechanism is well-understood and well-validated.
The assumption hidden in the mechanism: the final answer is a discrete token (or short span) that can be extracted unambiguously and compared by exact match. Math, multiple choice, and yes/no satisfy this; free-form prose does not.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- OpenAI's o-series and Claude Opus 4.7 use internal best-of-n with reward-model scoring on hard reasoning evals; published numbers on AIME and GPQA reflect this.
- Anthropic's Claude evaluation pipeline routinely uses LLM-as-judge with rubric prompts to score free-form summarization and creative tasks.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you design a scoring function for a summarization task that catches faithfulness errors?
Combine a question-answering check (generate questions from the source, verify the summary answers them correctly), an entailment model that scores summary sentences against source spans, and a length and coverage rule; weight the components based on what failure modes matter most for the deployment.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Blaming temperature or sample count when the real issue is that majority voting requires exact-match outputs that prose never produces.
60 second bullets to scan on the way to the call.
Why self-consistency works on discrete final answers
Why exact-match counting degenerates on free-form prose
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.