
A language model can give different answers to the same question. Self-consistency samples several reasoning paths from one model and selects the most frequent final answer. A hypothetical stock calculation and published arithmetic benchmarks illustrate both the method and its limits.
1. Why one model produces different answers
Consider goods being allocated to three branches. A stock notice lists incoming boxes, quantities already allocated and a reserve for exchanges. To calculate what can ship now, a model must identify the numbers and decide which quantities to add or subtract. Reading the figures correctly does not ensure that their roles are understood.
A language model assigns probabilities to possible next tokens based on the preceding context. Selecting the highest-probability token at every step produces one response. Sampling among probable tokens can produce different calculation sequences and, sometimes, different final answers to the same question.
Wang and colleagues used this variation in their ICLR 2023 paper. Instead of accepting the endpoint of a single solution, they generated multiple responses with the same model and counted recurring final values. The method changes generation and answer selection without retraining the model.
2. Extracting and counting final answers
The experiments used chain-of-thought prompting: examples containing a question, intermediate reasoning and a final answer precede a new problem. The baseline used comparable examples but selected the highest-probability token at every generation step. This rule is called greedy decoding.
Self-consistency samples multiple reasoning paths from the model’s output distribution. Each is a fresh sample for the same problem, rather than a continuation of a previous response. The final number or answer choice is extracted according to the task and counted by value.
For outputs 12, 12, 11, 12 and 13, the value 12 receives three votes, while 11 and 13 receive one each. The paper’s basic aggregation gives each sample equal weight and returns 12. Explanations need not match word for word: different calculation orders count together when they produce the same final answer.
Aggregation reduces the chance that an error confined to one reasoning path determines the result. However, responses from the same model and evidence can share a misreading or arithmetic error. Frequency measures agreement within the sample, rather than establishing that an answer is true.
3. A hypothetical five-response stock calculation
Suppose a warehouse notice records 18 incoming boxes, four already allocated and two reserved for exchanges. The available quantity for new orders is 18 minus four minus two, or 12 boxes. The reference answer is fixed from the example’s stated figures and allocation rules.
Responses of “12 boxes”, “12”, “11 boxes”, “12 cartons” and “13” can be normalised to the requested box count, giving 12 three votes. If responses also contain dates or order numbers, a designated final-answer field makes extraction and comparison easier.
If four of five responses instead treat the exchange reserve as already included in the allocated quantity, 14 boxes could win. Voting does not consult the warehouse to determine whether quantities overlap. A reference-answer test must use the ledger and allocation rules to assess correctness independently.
Units also matter. If the input establishes ten items per box, 12 boxes and 120 items represent the same quantity and may be grouped. Combining numbers with missing or unconfirmed units would change what the vote measures.
4. What the arithmetic results show
Table 2 in the final paper compares PaLM-540B on GSM8K, a collection of grade-school arithmetic word problems. Accuracy rises from 56.5% with greedy chain-of-thought decoding to 74.4% with self-consistency, a difference of 17.9 percentage points.
The reported self-consistency results average ten runs. Each run independently samples 40 outputs per problem. For PaLM-540B, temperature is 0.7 and top-k sampling considers the 40 highest-probability tokens at each step. The two occurrences of 40 refer to different things: complete responses and token candidates.
On SVAMP, the same table reports PaLM-540B accuracy increasing from 79.0% to 86.6%, or 7.6 percentage points. Gains differ by dataset. These observations depend on the paper’s models, prompts, sample counts and scoring rules.
5. Short, well-defined answers are easier to compare
Box counts, fixed classification codes and multiple-choice answers have comparable output formats. Free-text summaries are harder: different sentences may convey the same point, while similar sentences can differ in an exception. The authors identify the need for a way to assess agreement or contradiction when extending the method to free-form answers.
More candidates require more generated output than a single response. Parallel requests can reduce elapsed time, but the benefit depends on concurrency and model throughput. Recording generated output volume, total response time and accuracy against reference answers helps assess whether the added cost is justified.
Split votes or conflicting inputs can trigger a separate review step before operational use. Five responses split 2–2–1 do not yield a unique most frequent answer. Tie handling and missing units therefore need explicit workflow rules beyond the generation procedure.
6. What a development team should record
Start with problems that have verifiable reference answers, and document assumptions and units. Compare one-response and multi-response selection using the same model and inputs, then vary the candidate count. This separates the effect of sampling more responses from the effect of replacing the model.
Record extraction failures, unit-conversion rules, tie frequency and repeated wrong answers alongside final accuracy. These observations locate weaknesses in particular processing stages. Timing and generation volume measured under comparable conditions complete the assessment of outcome and cost.
Document the sequence from candidate generation and answer extraction to tie handling and human review. For example, specify which source record a reviewer should check if votes remain divided after unit normalisation. This makes application-specific processing steps and their effects concrete.
The original figure labels and forms are preserved; the text explains the source material.
The stock example is hypothetical. Reported accuracy belongs to the paper’s specific models, prompts and experimental conditions; agreement among answers does not guarantee correctness.
Self-consistency paper: full HTML text
Paper abstract and version history
ICLR 2023 paper page on OpenReview
FrugalGPT: use answer scores to decide when another model is worth calling
Explore IPLEX’s AI analysis and consultation materials for patent review of answer-generation, extraction and selection technology.
Explore our AI and patent practice
