Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Self-consistency

Definition

Sampling several reasoning paths for the same question and taking the most common final answer, instead of trusting a single response.

In more detail

Introduced in a 2022 paper by Wang and colleagues, the method runs a chain-of-thought prompt several times at a non-zero temperature and takes a majority vote over the answers. It improved accuracy on maths and reasoning benchmarks because wrong reasoning paths tend to disagree while right ones converge.

It multiplies cost by the number of samples and only works when answers can be compared, such as numbers, labels or short facts. The agreement rate is also a useful confidence signal: if five samples give five answers, flag the case for review.

  • Chain-of-thought

    Having a model work through intermediate reasoning steps before it gives a final answer, either by prompting or by training.

  • Temperature

    A sampling setting that controls randomness: lower values favour the most likely tokens, higher values spread probability more evenly.

  • Test-time compute

    Computation a model spends while answering, such as longer reasoning or multiple samples, used to improve answers without retraining.

  • Parallelisation (agent pattern)

    A workflow pattern that runs several model calls at once, on parts or copies of one task, and combines their outputs in code.

  • pass@k

    The probability that at least one of k generated solutions passes the tests, used to score code generation and other checkable tasks.

  • Prompt engineering

    Writing clear, testable instructions for models and checking them on real inputs.

    SkillBeginner

  • Prompt patterns cheat sheet

    Copyable prompt patterns for Claude, ChatGPT and Gemini: briefing, examples, output formats, long documents, checking the work and avoiding made-up answers.

    Article

  • Chain-of-thought

    Having a model work through intermediate reasoning steps before it gives a final answer, either by prompting or by training.

    Glossary