Loading patternsโฆ
Self-Consistency(SC)
Samples multiple diverse chain-of-thought paths at nonzero temperature, then aggregates their final answers by majority or confidence-weighted vote. Because a correct answer tends to be reached by many different reasoning paths while individual mistakes scatter, the consensus answer is far more reliable than any single greedy decode.
In 30 seconds
- What
- Samples multiple reasoning paths at nonzero temperature, then selects the final answer by majority vote or confidence weighting.
- When to use
- Problems with verifiable correct answers where diverse reasoning paths exist and errors scatter across samples.
- Watch out
- Requires N times more inference cost; majority vote fails if most paths converge on the same wrong answer.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Self-Consistency: Overview
Samples multiple diverse chain-of-thought paths at nonzero temperature, then aggregates their final answers by majority or confidence-weighted vote. Because a correct answer tends to be reached by many different reasoning paths while individual mistakes scatter, the consensus answer is far more reliable than any single greedy decode.
- Samples N independent reasoning paths at nonzero temperature
- Marginalizes over reasoning by voting on final answers only
- Majority or confidence-weighted aggregation of candidates
- Correct answers converge while sporadic errors are outvoted
- Foundation of best-of-N test-time compute scaling
- Universal Self-Consistency extends voting to free-form outputs
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
โฌ750 instead of โฌ1,500, one week, written report and walkthrough call, until 30 September