The Problem: A Single Reasoning Chain Can Fail
A single Chain-of-Thought, even well-structured, can be wrong. The model can make a calculation error, skip a step, or head in the wrong direction. A single reasoning chain is like a single dice roll: sometimes it lands right, sometimes it doesn't.
But here's the elegant idea behind self-consistency: ask the same question 10 times and see what the majority says. If 8 out of 10 answers say "42" and 2 say "37," the correct answer is probably "42." Random errors scatter, truth converges.
It's the principle of the wisdom of crowds, applied to a single model.
Self-Consistency Improves Chain of Thought Reasoning in Language Models (Wang et al., 2022)Instead of generating a single answer (greedy decoding, temperature 0), generate N independent answers with temperature (> 0). Each answer takes a different reasoning path, but correct paths converge to the same destination. You select the most frequent answer.
How It Works in Practice
Step 1: Generate N Reasoning Chains
With a temperature of 0.5 to 0.7 (enough randomness to diversify without descending into chaos), you generate 10 or 20 independent CoT reasoning chains.
Each one will take a slightly different path. One might start by calculating the unit price, another by setting up a ratio, a third by using proportionality. But if the problem has a unique solution, the correct paths converge to the same final answer.
Step 2: Extract the Answers
From each reasoning chain, you extract the final answer. A structured format ("Answer: X") makes this step much easier. Without reliable extraction, everything else falls apart.
Step 3: Majority Vote
You count: which answer comes up most often? That's the one you keep. Simple, effective, mathematically grounded.
Concrete Example
Q: 3 apples cost 6 euros. How much do 5 apples cost?
Answer 1: , so , so → 10 euros Answer 2: Price/apple . → 10 euros Answer 3: → 10 euros Answer 4: 3 apples , so → 10 euros Answer 5: /apple, → 10 euros
Vote: 10 euros (5/5) → Final answer: 10 euros
Five different paths, same destination. That's the strength of self-consistency: the diversity of reasoning chains reinforces confidence in the answer.
Impressive Gains
On GSM8K (elementary/middle school math problems):
| Model | CoT alone | Self-consistency (N=40) | Gain |
|---|---|---|---|
| PaLM 540B | 56.5% | 74.4% | +17.9 points |
(The 56.5% starting point is Wang et al.'s own measurement; the CoT lesson quotes 56.9% from the Wei et al. paper, same model, slightly different re-evaluation.)
Nearly 18 points of improvement just by asking multiple times and voting (the +17.9-point gain on GSM8K is the one announced in the abstract of the Wang et al. paper). No new training, no additional model, just intelligent redundancy.
These two ways of measuring a model have names you will meet throughout this module. pass@1: generate one answer and check whether it is correct, the "first try" score. maj@N (also written cons@N, for majority or consensus): generate N answers and count the majority answer as the model's, which is exactly the self-consistency of this page. The same model on the same benchmark can therefore show two very different scores depending on the protocol; a score quoted without its protocol means nothing.
Self-consistency improves performance on all tested reasoning benchmarks. The gains are particularly significant on math and logic tasks, where different reasoning paths naturally converge toward the correct answer. It's one of the most reliable techniques for improving an LLM without retraining it.
The Parameters That Change Everything
How Many Samples (N)?
| N | Effect |
|---|---|
| 5 | Already visible and significant improvement |
| 10-20 | Sweet spot for cost/quality in most use cases |
| 40 | Strongly diminishing returns |
| > 100 | Almost no measurable improvement |
The gains follow a logarithmic curve: the first doubling (from 1 to 2 samples) brings a huge gain. The fifth doubling (from 16 to 32) brings very little. This is important for calibrating the budget.

Temperature (T)
| Temperature | Effect |
|---|---|
| The sweet spot: enough diversity to explore different paths, enough coherence to stay logical | |
| Answers too similar to each other, voting serves no purpose | |
| Too much chaos, answers become nonsensical |
The balance is crucial: enough randomness for each sample to explore a genuinely different path, but not so much that each path becomes nonsensical.

Answer Extraction
The often underestimated link: how do you extract the final answer from each reasoning chain?
Common techniques:
- Parse the last line containing a number
- Enforced structured format ("Answer: X")
- Regex on the expected pattern
Bad extraction makes the entire vote useless. If you extract "10 euros" from one chain and "10" from another, the vote will count them as two different answers. Normalize your answers.
Advanced Variants
Weighted Self-Consistency
Instead of giving each answer an equal vote, you weight by the probability of the reasoning chain. A reasoning chain that the model generates with high confidence (high log-likelihood) weighs more than a hesitant one. This uses information that's free (the probabilities are already computed).
Universal Self-Consistency (USC)
For free-text answers (not a simple number), raw voting doesn't work. USC uses an LLM to compare and aggregate the answers: "Here are 10 answers to the same question. What is the consensus answer?" It's more expensive but extends self-consistency to open-ended tasks.

Self-Consistency + Verification
You can combine voting with a verification step: after identifying the majority answer, you ask the model to explicitly verify it. Belt and suspenders.
Start with N=5. The gains diminish quickly beyond that. For a critical task, go up to N=10 or N=20, but rarely more. Important point: a small model with many samples can beat a large model with a single sample, which changes the economic calculus, that is the subject of the test-time compute lesson.
When to Use Self-Consistency
Ideal Use Cases
- Unique verifiable answer: math, logic, code with precise output
- Critical reliability: diagnostics, compliance, financial decisions
- Inconsistent results with CoT alone: if the model gives a different answer each time, voting stabilizes it
Use Cases to Avoid
- Creative answers: there is no "right" answer, voting doesn't make sense
- Simple classification: CoT alone suffices, no need for redundancy
- Tight token budget: N=5 means 5 times the cost, it needs to be worth it
Self-consistency relies on the assumption that errors are random and independent. If the model has a systematic bias (it always confuses two concepts, it always applies the wrong formula), voting doesn't correct the bias, it reinforces it. 10 answers wrong in the same way give a unanimous vote... for the wrong answer.
Self-consistency eliminates random noise, not systematic bias. That's a crucial distinction.
The Historical Impact
Self-consistency was the first concrete step toward test-time compute scaling. Instead of improving the model itself, you improve its results by investing more computation at query time. This seemingly modest idea directly inspired reasoning models like o1 and DeepSeek-R1, which push the concept much further: not just voting among multiple answers, but truly thinking longer and deeper.
1. A model generates 10 independent reasoning chains and all 10 arrive at the same answer. The vote is unanimous. Can you be certain the answer is correct?
2. Why not generate the N answers with greedy decoding (temperature 0), since that is the setting that picks the most probable token at every step?
3. Two papers report very different scores for the same model on the same math benchmark. What is the most likely explanation according to this page?
4. During the vote, three reasoning chains end respectively with '10 euros', '10' and '10.00'. What is the risk?