THIS EXPLANATION
THE ROOM
CDA·197 Computing, Data & AI 6 MIN · 8 STATIONS

Self-consistency

A Socratic walk-through of self-consistency — reasoned out one step at a time, not lectured.

abcdefgh
a

The question we started with

THE QUESTION #

Why does asking the same question five times and taking the most common answer beat asking once carefully?

Here is a procedure that sounds like giving up. Instead of crafting one careful prompt and reading the answer, ask the same question five times with randomness turned on, throw away the reasoning, and keep whichever final answer appeared most often.

It works. On multi-step arithmetic and commonsense reasoning it works substantially better than the single careful attempt, which is the result Wang and colleagues reported in 2022 under the name self-consistency. The puzzle is why. Nothing new was told to the model, no better prompt was written, and four fifths of the work was discarded. So where did the extra accuracy come from?

b

Reasoning it through

REASONING #

First we need to see why one attempt is fragile. A multi-step reasoning problem is solved as a chain: set up the quantities, do one operation, carry the result, do another, state the answer. Ask what happens if a single link is wrong. The rest of the chain proceeds faithfully from the error, and the final answer is confidently, fluently wrong. There is no internal alarm, because nothing about producing a wrong intermediate value feels different from producing a right one.

Now ask a second question, about the space of possible chains. For most problems, is there one route to the answer or many? Usually many — you can set up the algebra differently, work in a different order, use a different intermediate quantity. And here is the asymmetry that everything rests on: all correct routes must arrive at the same number, while incorrect routes have nowhere in particular to land. One slip gives 27, a different slip gives 34, a third gives 18.5. Errors scatter; correctness converges.

So imagine sampling forty independent chains rather than one. If, say, half the chains are sound, all twenty of those agree on one value. The other twenty are wrong in twenty different ways and split across a dozen values, none of which collects more than a handful. Which value has the most votes? The correct one — and notice it can win a plurality even though a full half of the attempts were wrong. That is the whole mechanism, and it is genuinely a statistical argument rather than anything about intelligence.

That also explains something that trips people up. Why does self-consistency need the randomness — why not just ask five times at temperature zero? Because deterministic decoding gives you the same chain five times. Sampling is not noise being tolerated; it is the instrument. It is what produces the diverse routes whose agreement carries the information.

And it explains the discarding. The reasoning text is not the output being averaged; the answer is. The technique marginalises over reasoning paths — it asks which final answer is most probable once you sum across all the ways of reaching it — rather than asking which single path is most probable. Those are different quantities, and the second one, which is what a single greedy pass approximates, turns out to be the worse estimator.

Now the honest limits, which matter more than the mechanism because they decide when to use it. Majority voting rescues you from diverse errors. It does nothing whatever about systematic ones. If the model has a consistent misconception — misreads the question the same way each time, or has learned a wrong fact — then all forty chains make the same mistake, agree perfectly, and the vote returns a wrong answer with high apparent confidence. The agreement is not evidence of truth; it is evidence only of convergence, and convergence has two possible causes.

Two more constraints. The answer must be comparable: you need to be able to say two samples gave the same answer, which is easy for a number and awkward for a paragraph, so the technique fits arithmetic, multiple choice and extraction far better than open-ended writing. And the cost is linear in the samples, so the question is always whether the gain is worth that multiple.

One useful side effect: the spread of the votes is itself a signal. Thirty-eight of forty agreeing and fourteen of forty agreeing are very different situations, and that dispersion is a rough confidence estimate you get for free — rough, because a confident consensus can be confidently wrong.

c

The analogy

THE ANALOGY #
THE FIGURE

Think of asking a large room of people to estimate the number of beans in a jar. The individual guesses are poor. But the errors point in every direction — some far too high, some far too low — so they cancel, and the aggregate lands close to the truth even though almost nobody in the room was close.

WHERE IT BREAKS DOWN

in the jar case the guesses come from genuinely different people with independent information, whereas the samples here all come from one model with one set of learned tendencies — so the independence that makes the room's errors cancel is only partial, and any bias the model holds is present in every sample and survives the vote intact.

d

Clarifying the model

THE MODEL #

Three refinements.

First, a common misreading: that self-consistency makes the model reason better. It does not touch the reasoning at all. Each individual chain is exactly as good, or as bad, as it was before. What changed is the selection rule applied afterwards — and the gain is entirely a property of aggregating over a distribution rather than sampling one point from it.

Second, the relationship to prompting carefully is additive, not competitive. Self-consistency was introduced on top of chain-of-thought prompting and depends on it: you need the model to produce varied intermediate reasoning for there to be diverse routes to sample. A better prompt raises the accuracy of every individual chain, which raises the fraction of votes that are correct, which makes the majority more reliable. Do both.

Third, the number of samples has diminishing returns. Going from one sample to five buys a great deal; going from twenty to forty buys very little, because once the correct answer is already the plurality winner, more votes only sharpen a decision already made.

e

A picture of it

THE PICTURE #
Self-consistency
Self-consistency The widths are illustrative, not measured, and the point is their shape. Read left to right: forty sampled chains split into sound and flawed reasoning, and notice what happens next. The sound half stays together, because every correct route must produce the same value, so it arrives as one thick ribbon at a single answer. The flawed half fans out into five thin ribbons, because there is no agreement among ways of being wrong. The final column shows why plurality voting works even when half the attempts failed -- and it also shows the failure case, since a bias shared by all forty chains would merge the two ribbons at the very first split and send one confident, wrong stream all the way through. {"generator":"mermaid-svg-renderer@3.2.1","source":"../Socrates/.diagram-cache/_src/self-consistency.md","sourceIndex":1,"sourceLine":4,"sourceHash":"0719229fc0e2ce4ed677c43e72312dfeaa0b84b456f277f2ffc8053b8a19c6ac","diagramType":"sankey","layoutVariant":"source","repairedDuplicateIds":[],"motion":"entrance-with-reduced-motion-fallback","presentation":"editorial","attempt":1,"viewBox":{"x":0,"y":0,"width":720,"height":562},"qa":{"passed":true,"findings":[]}} Fortychains · 40 Soundroute · 20 Flawedroute · 20 Answer18 · 20 Answer27 · 6 Answer34 · 5 Answer12 · 4 Answer9 · 3 Answer45 · 2 Majoritywinner · 20 Discarded · 20

How to readThe widths are illustrative, not measured, and the point is their shape. Read left to right: forty sampled chains split into sound and flawed reasoning, and notice what happens next. The sound half stays together, because every correct route must produce the same value, so it arrives as one thick ribbon at a single answer. The flawed half fans out into five thin ribbons, because there is no agreement among ways of being wrong. The final column shows why plurality voting works even when half the attempts failed — and it also shows the failure case, since a bias shared by all forty chains would merge the two ribbons at the very first split and send one confident, wrong stream all the way through.

f

What became clearer

WHAT CLEARED #
WHAT CLEARED

Self-consistency is not a way of thinking harder; it is a way of exploiting an asymmetry that was there all along — right answers agree with each other and wrong ones do not. The randomness that looks like sloppiness is what generates the diverse attempts, and the vote is a cheap estimator of the answer's total probability rather than of any one route to it. Its power ends exactly where the errors stop being diverse.

g

Where to go next

ONWARD #
  • Chain-of-thought prompting, which self-consistency is layered on top of and depends on.
  • Weighted voting and verifier models, which score samples rather than merely counting them.
  • Ensembling in classical machine learning, and how far the analogy to bagging actually carries.
h

Key terms

TERMS #
TermWhat it means
Self-consistencysampling several reasoning chains for one question and returning the most frequent final answer, introduced by Wang and colleagues in 2022.
Temperaturethe sampling parameter controlling randomness; at zero the model always takes its most probable continuation, which makes repeated asks identical.
Marginalising over reasoning pathssumming the probability of an answer across all the routes that reach it, instead of taking the single most probable route.
Correlated errora mistake shared by every sample, which voting cannot detect because the samples agree.

Every term the collection defines is gathered in the glossary.

Nearby on the shelf

4