Reasoning & Prompting

Chain-of-thought, prompting techniques, reasoning architectures, and test-time compute for stronger LLM reasoning.

Self-Consistency: Sample Many Reasoning Paths, Then Take the Majority Vote

Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E. H., Narang, S., Chowdhery, A., Zhou, D. (Google Research, Brain Team)

ICLR 2023 · arXiv 2203.11171

An engineering dissection of Self-Consistency — a decoding strategy that replaces greedy chain-of-thought with sampling many diverse reasoning paths and marginalizing over them by majority vote on the final answer. Covers the sample-and-marginalize procedure, the marginalization math and why unweighted majority vote matches the normalized-weighted variant, why diversity (sampling) beats beam search and sample-and-rank, the large accuracy gains on GSM8K/AQuA/SVAMP/StrategyQA, robustness to sampling parameters and imperfect prompts, the consistency-as-confidence signal, and the honest limits: it only works for fixed-answer tasks and multiplies inference cost.

  • Replaces greedy decoding in chain-of-thought with a sample-and-marginalize procedure: draw many diverse reasoning paths, then pick the answer most of them agree on — no training, no verifier, no extra annotation
  • A plain unweighted majority vote over final answers matches the more elaborate normalized-probability-weighted aggregation, because the model rates its diverse-but-correct paths as near-equally likely
  • Diversity is the active ingredient: sampling beats beam search and sample-and-rank at the same compute budget, and gains grow with the number of sampled paths (1 to 40)
  • Large, scale-dependent gains — GSM8K +17.9%, AQuA +12.2%, SVAMP +11.0%, StrategyQA +6.4% — and the fraction of paths that agree doubles as a calibrated confidence signal
Self-Consistency Chain-of-Thought Reasoning Test-Time Compute Decoding Majority Vote Sampling Prompting LLM Engineering
Chain-of-Thought Prompting: How Eight Examples Changed the Future of AI Reasoning

Chain-of-Thought Prompting: How Eight Examples Changed the Future of AI Reasoning

Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E. H., Le, Q. V., Zhou, D.

NeurIPS 2022

The foundational discovery that inserting step-by-step reasoning traces into few-shot prompts unlocks emergent multi-step reasoning in large language models — without any fine-tuning, specialized datasets, or model changes. This single prompting technique became the intellectual ancestor of every modern agent architecture: ReAct, Tree-of-Thoughts, LLMCompiler, and structured planning systems.

  • Eight manually written reasoning exemplars unlock emergent multi-step reasoning at 100B+ parameter scale
  • PaLM 540B jumps from 17.9% to 56.9% on GSM8K math benchmark — surpassing fine-tuned GPT-3 with a verifier
  • Reasoning before the answer is causally necessary — post-hoc reasoning provides zero improvement
  • Emergent phase transition around 100B parameters — smaller models generate fluent but logically incorrect chains
  • Zero training cost, zero infrastructure changes — purely a prompting technique applicable to any sufficiently large LLM
Chain-of-Thought Prompting Reasoning Emergent Abilities Few-Shot Learning LLM Engineering AI Agents Foundational