Self-Consistency Prompting: How Majority Voting Over Reasoning Paths Gets Better Answers
2026-07-11
Chain-of-thought prompting asks a model to show its reasoning before answering. That is a real improvement over a one-shot guess. But it still relies on a single reasoning path, and any single path can contain an error that snowballs into a wrong final answer. Self-consistency prompting fixes that by running the prompt multiple times, collecting many independent reasoning traces, and then voting on the final answer. The idea is simple, the gains are large, and it requires no model changes, no fine-tuning, and no extra data.
The problem with greedy decoding
When a language model generates a chain of thought, the default strategy is greedy decoding: at each step, the model picks the single highest-probability token. Greedy decoding is fast and deterministic, but it has a blind spot. Once the model commits to an early token choice, later tokens are conditioned on that choice. A small slip in step two can cascade into a wrong answer by step five. There is no way to recover from that error within a single greedy pass.
The alternative is to use temperature sampling, which introduces controlled randomness into the generation process. With a positive temperature, the model does not always pick the top-probability token. Instead, it draws from a distribution, so different runs produce different reasoning paths. Self-consistency takes that randomness and uses it productively.
How self-consistency works
The method was introduced in 'Self-Consistency Improves Chain of Thought Reasoning in Language Models' by Xuezhi Wang, Jason Wei, and colleagues at Google, submitted to arXiv in March 2022 (arXiv:2203.11171) and published at ICLR 2023. The procedure has three steps.
- Prompt the model with a chain-of-thought few-shot example set, exactly as you would for standard CoT.
- Sample multiple completions at a nonzero temperature. Each completion produces its own reasoning trace and its own final answer. The paper and follow-up work suggest 5 to 40 samples, with most of the gain appearing in the first 10 to 20.
- Aggregate the final answers by majority vote. Whichever answer appears most often across the sampled paths is returned as the result. The intermediate reasoning traces are discarded; only the final answers matter for voting.
The intuition behind majority voting is that a complex reasoning problem usually has one correct answer, even though there are many different ways to reach it. Two reasoning paths that arrive at the same conclusion through different intermediate steps provide much stronger evidence than one path that arrives there alone. A path that leads to a rare answer is more likely to reflect a reasoning error than a consensus answer reached by independent routes.
What the benchmark numbers show
The Wang et al. paper ran self-consistency against standard chain-of-thought greedy decoding on a range of reasoning benchmarks using large language models. The improvements were consistent and substantial.
- GSM8K (grade school math word problems): plus 17.9 percentage points over greedy CoT.
- SVAMP (math word problems designed to resist simple pattern matching): plus 11.0 percentage points.
- AQuA (algebraic word problems in multiple-choice format): plus 12.2 percentage points.
- StrategyQA (commonsense reasoning requiring implicit multi-step inference): plus 6.4 percentage points.
- ARC-challenge (science questions targeting reasoning rather than recall): plus 3.9 percentage points.
These are not marginal improvements. A 17.9-point gain on GSM8K is the kind of jump that used to require training a larger model or building a dedicated verifier. Self-consistency delivers it purely by changing how the model generates and aggregates its outputs at inference time.
Temperature and sample count
Two parameters control the behavior of self-consistency. The first is temperature. The paper tested values of 0.5, 0.7, and 1.0. Results were robust across this range; a temperature of about 0.7 is a reliable starting point for most tasks. Too low and all paths collapse toward the same greedy answer, defeating the purpose. Too high and the paths become incoherent and unhelpful.
The second parameter is the number of samples. Performance improves as you add more samples and then levels off, typically somewhere around 40. In practice, most of the accuracy gain appears within 10 to 20 samples. For tasks where precision matters and the cost of errors is high, running 20 to 40 samples is reasonable. For exploratory use or budget-sensitive applications, 5 to 10 samples already capture a large fraction of the benefit.
When to use it and when not to
Self-consistency earns its cost on tasks where answers are verifiable and unique: arithmetic, algebra, logic puzzles, classification, structured extraction. These are the cases where majority voting is coherent, because there is a single correct answer that multiple reasoning paths can converge on.
It adds much less value on open-ended tasks. Summarization, creative writing, and opinion generation do not have a single correct answer, so voting across 20 summaries produces a meaningless plurality rather than a better result. For those tasks, a single well-crafted prompt with a clear format instruction will serve you better.
The cost to factor in is token usage. Every sample is a full generation with its own chain of thought. Running 20 samples costs roughly 20 times what a single pass costs. For a batch job or an offline pipeline, this is often acceptable. For a real-time user-facing product, the added latency (and the proportional API bill) may not be. Some teams mitigate this by generating samples in parallel rather than sequentially, which controls latency while preserving accuracy.
How to apply it today
Self-consistency is available without any special tooling. If you have access to a model API that exposes temperature and allows multiple completions, you can implement it directly.
- Write your prompt with chain-of-thought few-shot examples as usual.
- Set temperature to 0.7 and request N completions for the same prompt (5 to 20 for most uses).
- Parse the final answer from each completion. For math problems, extract the last numerical result. For classification, extract the category label.
- Return the answer that appears most often. If there is a tie, pick either arbitrarily or add one more sample to break it.
- If a large fraction of samples agree (say, 80 percent or more), you can treat that as a high-confidence signal. Near-even splits suggest the problem is genuinely ambiguous or the model lacks the knowledge needed to resolve it.
Self-consistency is one of the clearest examples of a prompting technique that requires no new capabilities from the model and no changes to infrastructure, just a change in how you call the model and how you aggregate its output. The underlying insight, that a hard problem has one right answer reachable by many paths, is something any practitioner can put to work today. Find prompts built for reasoning tasks, tested with and without self-consistency across ChatGPT, Claude, and Gemini, in the PromptingIndex library.
Put these ideas to work.
Browse the prompt library