Zenaique

Explain why self-consistency requires temperature > 0 and quantify the gain it produces over single pass CoT on math benchmarks.

Short answer·Hard·4.0 · 0·~3 min·Asked atAutodeskDeepseekPhonepe·Relevant atAnthropicOpenAI
Attempt it

A teammate is implementing self-consistency: 'I'll sample N=10 CoT reasoning paths and vote on the final answer. I'm running temperature=0 for reproducibility.' Walk them through why this doesn't work, what temperature to use instead, and the empirical gain they should expect on GSM8K style math benchmarks. Be specific about the mechanism and the numbers.

Free · 2 AI evals / day
TL;DR

Temperature zero produces identical samples, so the vote does nothing; switch to T around 0.7 with N=5 to 10 and expect 10 to 20 points on GSM8K-class benchmarks.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine you ask the same friend to solve a hard puzzle ten times, but you tell them to give the exact same answer every time. You will get ten identical answers. Voting on ten identical answers tells you nothing new. That is what temperature zero does to a language model. Now tell the friend to think about the puzzle freshly each time, allowing their reasoning to wander a little. You will get a mix of answers, with the correct one usually winning the count. Self-consistency only works in the second mode. Forcing it into the first mode by running at temperature zero gives you all the cost of ten attempts with the answer quality of one.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Self-consistency is a clean and well-replicated lift on top of Chain-of-Thought reasoning. The mechanism is straightforward: sample N reasoning paths at temperature greater than zero, vote on the answer, take the majority. The lift on multi-step reasoning benchmarks is real, large, and reproducible across model families.

The teammate's plan in this question, however, breaks the mechanism. Running N samples at temperature zero gives N identical outputs, which means the vote does nothing. This deep dive walks through why that is, what temperature to use instead, what the empirical gain on GSM8K-class benchmarks looks like, where the cost curve flattens, and how to think about the reproducibility tension that often drives teams to T=0 in the first place.

The punchline is that sampling variance is the load-bearing input to self-consistency. Temperature controls the variance. Removing the variance removes the lift. The right move is to pick the route based on whether you need deterministic reproducibility or sampling-amplified accuracy; both are valid choices, but they are not the same call.

Why temperature zero breaks the mechanism

Language models produce tokens by sampling from a distribution over the vocabulary. The model's logits are converted to a categorical distribution via softmax, optionally reshaped by a temperature factor: p(token) = softmax(logits / T). At T=0 the softmax collapses to an argmax; the most-likely token is always chosen; there is no randomness.

The practical consequence is deterministic decoding. Two runs of the same prompt at T=0 produce exactly the same token sequence. N runs produce N identical sequences. The voting step in self-consistency has nothing to do because all N final answers are the same. The N times cost is paid in full; the accuracy lift is zero.

This is the trap the teammate is in. The intuition that more samples should always help is correct in general but only when the samples actually differ. Self-consistency does not amplify accuracy; it amplifies sampling variance into a vote. Without variance there is nothing to amplify.

The temperature that makes it work
What the empirical gain on math benchmarks looks like
The N curve and the production sweet spot
The reproducibility tension and how to resolve it
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Math-tutoring routes in production agentic apps run N=5 to N=10 self-consistency at temperature 0.7 to catch arithmetic slips that single-pass CoT misses.
  • Anthropic Claude Opus 4.7 with extended thinking and OpenAI o-series models internalize part of the self-consistency mechanism via sampling inside the reasoning trace.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you adapt self-consistency for tasks without a clean discrete answer?
A

Extract structured features (key claims, classification labels) from each sample and vote on those; or rank the N candidates with a verifier model rather than vote.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Setting temperature=0 for reproducibility and then wondering why N=10 self-consistency gives identical accuracy to N=1 at ten times the cost.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why temperature zero breaks self-consistency

  • The role of sampling variance as the load-bearing input

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Spot the error in this explanation of temperature.
Spot the error·Easy