P

Self Consistency: Definition and Examples

Prompting technique that consists of generating multiple independent reasoning paths for the same question, then selecting the most frequent answer by majority vote, improving the reliability of results.

Full definition

Self Consistency is an advanced prompting method introduced by Wang et al. in 2022. It relies on a simple but powerful principle: rather than relying on a single response generated by a language model, it asks the model to produce several different reasoning chains for the same problem, then retains the answer that appears most often.

This approach is based on the intuition that if multiple independent reasoning paths converge to the same conclusion, that conclusion is likely correct. It is comparable to asking multiple experts: if the majority arrives at the same answer via different routes, it can be trusted more.

Concretely, Self Consistency works in three steps. First, a Chain-of-Thought type prompt is used to encourage step-by-step reasoning. Second, several responses are generated by increasing the temperature parameter to introduce diversity in reasoning. Third, a majority vote is applied on the final answers to determine the most consistent one.

This technique is particularly effective for mathematical reasoning, logical reasoning, and common sense tasks, where it significantly outperforms standard Chain-of-Thought. It reduces random errors due to a poor reasoning path, without requiring additional model training.

Etymology

The term "Self Consistency" comes from the research paper "Self-Consistency Improves Chain of Thought Reasoning in Language Models" published by Xuezhi Wang et al. in 2022. The name reflects the core idea of the method: verifying the model's internal consistency with itself by comparing multiple of its own reasoning paths.

Concrete examples

Solving a complex math problem

Solve this problem step by step: A store offers a 25% discount on an item costing €80, then applies an additional 10% off. What is the final price? Generate 5 different reasoning paths and give the most frequent answer.

Logical reasoning question with ambiguity

Reason in 3 different ways to answer: If all bloops are razzies and all razzies are lazzies, are all bloops lazzies? Give your final answer based on consensus.

Sentiment classification on an ambiguous text

Analyze the sentiment of this sentence in 5 different ways considering various angles of interpretation: 'This restaurant is not bad, but I'm not sure I'd go back.' What is the majority classification?

Practical usage

To apply Self Consistency, set a high temperature (0.7-1.0) and ask the model to generate 5 to 10 independent responses with explicit reasoning. Then count which final answer appears most often. This technique is ideal for factual or mathematical questions where a single response might be erroneous, but it increases the token cost proportionally to the number of generations.

Related concepts

Chain-of-ThoughtTree of ThoughtsEnsemble LearningMajority Vote

FAQ

What is the difference between Self Consistency and Chain-of-Thought?
Chain-of-Thought generates a single step-by-step reasoning, while Self Consistency generates multiple independent Chain-of-Thought reasoning paths and selects the majority answer. Self Consistency is an extension of Chain-of-Thought that improves its reliability by aggregating multiple responses.
How many reasoning paths should be generated for Self Consistency to be effective?
Research shows that 5 to 10 reasoning paths provide a good balance between improved accuracy and token cost. Beyond 20 samples, marginal gains become small. For simple problems, 5 suffice; for complex problems, 10 to 15 may be needed.
Does Self Consistency work for all types of tasks?
Self Consistency is mostly effective for tasks with a precise, verifiable answer: mathematics, logic, factual questions. It is less suited for creative or open-ended tasks (writing, brainstorming) where there is no single correct answer and diversity of responses is actually desired.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.