Skip to content

< CollectionsPaper

Self-Consistency.

Self-Consistency Improves Chain of Thought Reasoning in Language Models

Wang et al. · 2022 · arXiv 2203.11171

Read the paper (opens in a new tab)

Sample several reasoning paths and keep the answer most of them reach.

3 sections · 6 problems

0 of 6 done

Start Next: 01 Sample the Next Token

Fig. 1. One greedy decode (dashed) lands on 26. Sample nine reasoning paths instead, and the answer most of them reach wins the vote.

Section 01

Sample, then vote

0 of 2

The paper: Instead of one greedy decode, sample a diverse set of reasoning paths and take the answer they most agree on.

  1. 01Sample the Next Tokenimplement · medium
  2. 02Ask Five Times, Keep the Majorityimplement · medium

Section 02

Vote on the answer, not the path

0 of 2

The paper: The paths differ, so the vote is over each path's final answer, which has to be read out of free text first.

  1. 03Vote on the Answer, Not the Reasoningimplement · medium
  2. 04Get the JSON Out of a Model's Replyimplement · easy

Section 03

When the vote cannot be counted

0 of 2

Beyond the paper: A majority needs answers that compare exactly; open-ended answers need another way to pick one.

  1. 05Score an Answer with an LLM Judgeimplement · medium
  2. 06Pick the Answer When One Subagent Is Wrongimplement · medium
All collections