Explain self-consistency. When is it worth the cost?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Self-consistency (Wang et al., 2022) replaces greedy single-pass CoT with: sample k independent reasoning chains at temperature > 0, extract each chain's final answer, and return the majority vote. The intuition - complex problems admit multiple valid reasoning paths that converge on the correct answer, while errors tend to be diverse and uncorrelated - so marginalizing over paths beats trusting any single one. It produced large gains on arithmetic and commonsense benchmarks (double-digit point improvements on GSM8K-class tasks in the original paper).
Full worked answer with diagram
Self-consistency (Wang et al., 2022) replaces greedy single-pass CoT with: sample k independent reasoning chains at temperature > 0, extract each chain's final answer, and return the majority vote. The intuition - complex problems admit multiple valid reasoning paths that converge on the correct answer, while errors tend to be diverse and uncorrelated - so marginalizing over paths beats trusting any single one. It produced large gains on arithmetic and commonsense benchmarks (double-digit point improvements on GSM8K-class tasks in the original paper).
Requirements and mechanics:
- The final answer must be short and comparable - a number, a label, a multiple-choice option - or votes can't be counted. For free-form outputs you need a variant: cluster semantically-equivalent answers, or have a judge/verifier select among candidates (best-of-n with a reward model or unit tests is the same family).
- Temperature must be high enough to diversify paths; k of 5-40 was typical in the literature, with returns diminishing well before 40.
- Agreement rate doubles as a free confidence signal: 9/10 agreement is trustworthy; a 4/3/3 split is a flag to escalate to a human or a stronger model.
Cost analysis is where interviewers separate candidates: it's a linear k× multiplier on generation cost and, unless you parallelize, latency. Sensible uses: offline evaluation, batch pipelines, generating training data for distillation, high-stakes low-volume decisions. Rarely sensible: interactive chat, high-QPS endpoints. Mitigations: sample in parallel; share the cached prompt prefix so you pay k× only on output tokens; early-exit when the first m samples already agree (adaptive consistency).
The 2026 framing: self-consistency is the simplest form of test-time compute scaling - the same axis as reasoning models' long internal deliberation, best-of-n with verifiers, and MCTS-style search. Reasoning models have internalised much of the benefit, so the marginal gain from external voting on top of them is smaller - measure before paying k×.
Worth sketching. The fan-out draws the k-times cost for free, and the vote split doubles as the confidence signal you can route on.
flowchart LR
A["One prompt,<br/>temperature above 0"] --> B["Chain 1"]
A --> C["Chain 2"]
A --> D["Chain k"]
B --> E["Extract short answer"]
C --> E
D --> E
E --> F{"Vote spread"}
F -->|"9 of 10 agree"| G["Return with<br/>high confidence"]
F -->|"4 / 3 / 3 split"| H["Escalate to human<br/>or stronger model"]
What a good answer covers
- Self-consistency (Wang et al., 2022) replaces greedy single-pass CoT with
- The intuition - complex problems admit multiple valid reasoning paths that converge on the correct…
- It produced large gains on arithmetic and commonsense benchmarks (double-digit point improvements on…
- The final answer must be short and comparable - a number, a label, a multiple-choice option - or votes…
- Temperature must be high enough to diversify paths; k of 5-40 was typical in the literature, with…
Key terms: short and comparable · confidence signal · test-time compute scaling
In the glossary: Self-consistency · Best-of-N · Reward model · Distillation · Test-time compute · Reasoning model
Interviewer follow-ups to expect
How would you apply the idea to code generation where outputs are long?
Design an adaptive scheme that spends more samples only on hard inputs. Why do errors tend to be uncorrelated across samples - and when would that assumption break?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep