Last updated:

Self-Consistency Improves Chain of Thought Reasoning in LLMs

Xuezhi Wang et al.

In collections: Reasoning Hallucinations & reliability

Strategies from the report

  • Self-Consistency: The model generates many different paths leading to a solution and picks the final result by voting for the most frequent answer. This draws on the human intuition that many correct lines of thought should lead to the same conclusion.

  • Greedy Decoding Replacement: Instead of always choosing the "most probable" next word (which promotes formulaic output), the model samples different paths and produces unique analyses of the same problem.

  • Path Marginalization: A strategy of separating the "thinking process" from the final answer in order to count statistical agreement. The model ignores differences in how it arrived at the result and focuses only on whether the number or fact at the end converges.

Best practices:

  • Combining with Chain-of-Thought (CoT Synergy): The self-consistency method was designed to amplify the power of "step by step" prompting. Always combine the two techniques for the best results.



  • Using it for tasks with one specific answer (Fixed-answer tasks): The technique works best in areas where the final result can be unambiguously extracted and mathematically counted (e.g. math, advanced logic, closed true/false questions).



  • Scaling the sampling for harder tasks (Scaling samples): Research shows that the harder and more complex the problem, the more paths you should have the model generate. Generating a dozen or so variants increases the chance of filtering out hallucinations.

What to avoid

  • Excessive use of computational resources (Overcomputing): Do not ask the model to generate a dozen lines of thought for simple, trivial factual questions. It needlessly burns tokens and your time (and budget).

  • Using the technique for open-ended text generation (Open-ended tasks): Avoid forcing self-consistency on creative writing, generating poems or essays, because there is no consistent, closed solution there for the model to clearly "vote" on.

  • Blind trust in a single path (Single-path reliance): If the task has a large margin of error inside the AI, avoid relying on the first and only answer the model generates. Greedy algorithms can easily "get stuck" in a bad line of thought.

Video description

Support this project by buying me a coffee ;)