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
FAQ
What is the difference between Self Consistency and Chain-of-Thought?
How many reasoning paths should be generated for Self Consistency to be effective?
Does Self Consistency work for all types of tasks?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- 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
Semantic Cache: Definition and Examples
A semantic cache is a caching system that stores and retrieves AI model responses based on the semantic similarity of queries, rather than exact word matches.
Synthetic Media: Definition and Examples
Synthetic media refers to any content — text, image, audio, or video — generated or manipulated by artificial intelligence algorithms, particularly through
System Prompt: Definition and Examples
The system prompt is an initial hidden instruction, defined by the developer, that configures the behavior, tone, and limits of an AI model before
Temperature (AI): Definition and Examples
Temperature is a parameter that controls the degree of randomness and creativity in AI responses.
Test Time Compute: Definition and Examples
Test Time Compute refers to the computing power used by an AI model during inference (response generation), as opposed to the resources consumed during training.
Text Classification: Definition and Examples
Text classification is a natural language processing (NLP) technique that assigns one or more categories to a given text.
Get new prompts every week
Join our newsletter.