Sample N reasoning paths at temperature > 0, take the majority vote on the final answer; without temperature there is no diversity and voting collapses.
Imagine you have a friend who is mostly right but sometimes makes silly mistakes. If you ask them the same hard question once, you might catch them on a bad guess. If you ask them five times in slightly different ways and they say the same answer four out of five times, you trust the four. Self-consistency does that with a language model. It asks the model to solve the same problem several times, lets the reasoning wander a little each run, and takes the answer that shows up most often. The trick that makes the runs differ is temperature. At temperature zero the model always says exactly the same thing, so all your runs collapse into one and the voting does nothing.
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 is one of the cleanest and most well-replicated lifts on top of Chain-of-Thought reasoning. The mechanism is simple to state and slightly counter-intuitive in practice: sample multiple reasoning paths at temperature greater than zero, vote on the answer, take the majority. The lift on multi-step reasoning benchmarks is real, large, and reproducible.
This deep dive walks through what the mechanism actually does, why temperature is the load-bearing parameter, what the empirical gains look like on standard benchmarks, where the cost curve flattens, and where the technique stops fitting the task. The goal is a senior-level understanding that an interviewer can probe along multiple axes.
The punchline is that self-consistency is a sampling-variance amplifier for reasoning, not a magic accuracy lever. It works because correct reasoning paths converge while incorrect paths scatter, and the vote captures that asymmetry. Take away the diversity (T=0) and the asymmetry disappears.
The mechanism: sample, diverge, vote
The procedure is mechanical. Take a prompt that elicits Chain-of-Thought reasoning ('Let's think step by step'). Run the model N times at temperature greater than zero, getting N independent reasoning paths and N final answers. Apply a final-answer extractor (regex on the last number, parser for the classification label, whatever fits the task). Tally the answer counts. Pick the answer with the highest count.
The voting formula is exactly the argmax over answer frequencies across the N samples. Each sample contributes one vote; the answer that appears most often wins. Tie-breaking rules vary; the published default picks the first-encountered tied answer.
The key property that makes this work is asymmetric convergence. When the model can reach the correct answer at all, it tends to reach it via multiple plausible reasoning paths. When the model is wrong, the failure modes diverge: arithmetic slips, wrong intermediate values, misread conditions, each leading to a different wrong final answer. The vote concentrates the signal where the asymmetry favors the correct answer.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Math-tutoring routes in production LLM apps run N=5 to N=10 self-consistency at temperature 0.7 to catch arithmetic slips that single-pass CoT misses.
- Anthropic Claude Opus 4.7 with extended thinking and OpenAI o-series models internalize some of the self-consistency mechanism at the model layer via sampling within the reasoning trace.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does the marginal accuracy gain flatten past roughly N=10?
The majority answer stabilizes quickly when reasoning paths concentrate; additional samples mostly reinforce the existing consensus rather than discovering new correct paths.
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.
Running self-consistency at temperature zero for reproducibility; the deterministic sampling kills diversity and the N samples collapse to one with zero voting signal.
60 second bullets to scan on the way to the call.
Why majority voting beats single-pass CoT on multi-step reasoning
Why temperature greater than zero is the prerequisite
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.