Back

Takeaways: Self-Consistency Improves Chain of Thought Reasoning in LLMs

Strategy

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. Explanation or prompt"Generate 5 different ways to solve this math problem, and then give as the final result the one that appears most often."

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary1/9

Strategy

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.

Setting a somewhat higher temperature value in the API and giving the instruction: "Analyze the delivery problem in three completely different ways, generating alternative calculation scenarios."

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary2/9

Strategy

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.

"For each of the 3 paths you generated, extract only the final amount to be paid, and then point out the sum that repeats most often."

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary3/9

Good practice

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. Explanation or prompt"Think about this task step by step. Generate 3 separate step-by-step lines of reasoning for this problem, and at the end choose the common answer by majority vote."

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary4/9

Good practice

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). Explanation or promptUsing the instruction "calculate this 5 ways and vote" for a task such as "Calculate the annual VAT for the invoice below", where the answer is a specific number.

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary5/9

Good practice

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.

"This is a very hard algorithmic problem. Analyze it in 10 independent ways and write out the paths before you finally pick the one correct solution."

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary6/9

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).

"Write me 10 different deductive analyses of which country Paris is the capital of, and then choose the answer by vote." (A waste of time for an obvious answer.)

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary7/9

Avoid

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.

"Write 5 sci-fi stories, and then pick the one that appears most often as the best." (The task makes no logical sense for this mechanism.)

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary8/9

Avoid

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.

Asking the model to carry out a multi-step accounting audit with the plain instruction "Solve this task", with a naive belief that an instant, single analysis will be flawless.

Self-Consistency Improves Chain of Thought Reasoning in LLMs
Summary9/9