Chain-of-Thought Prompting Elicits Reasoning in Large Language Models

Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, Denny Zhou

By simply adding a few examples of intermediate reasoning steps to a prompt—a technique called Chain-of-Thought (CoT) prompting—researchers have significantly boosted the ability of Large Language Models (LLMs) to solve complex arithmetic, commonsense, and symbolic tasks. This emergent ability allows a 540B parameter model to outperform fine-tuned systems on challenging math benchmarks without any additional training.

The "Reasoning Gap" in LLMs

While Large Language Models like GPT-3 have shown incredible prowess in generating text and following instructions, they historically struggle with multi-step reasoning. If you ask a standard model a complex math word problem, it often jumps straight to a (frequently wrong) numerical answer.

Scaling up model size alone hasn't been enough to bridge this reasoning gap. Previous attempts to fix this involved fine-tuning models on massive datasets of "rationales" or explanations, which is incredibly expensive and time-consuming to produce. The authors ask: Can we elicit this reasoning behavior using only the model’s existing knowledge via clever prompting?

Methods: Chain-of-Thought Prompting

The authors introduce Chain-of-Thought (CoT) Prompting. Unlike standard few-shot prompting, where you provide a few examples of Input -> Output pairs, CoT prompting provides Input -> Chain of Thought -> Output triples.

Standard vs. Chain-of-Thought Prompting

The "Chain of Thought" is a series of intermediate natural language reasoning steps that lead to the final answer. For example, instead of just saying the answer to a math problem is "11," the prompt exemplar would show the step-by-step math. Crucially, this is a prompting-only approach. No model weights are updated, and the model is not fine-tuned on the specific task.

Evaluated Datasets

The researchers evaluated CoT prompting across three broad categories of reasoning:

  • Arithmetic Reasoning: GSM8K (math word problems), SVAMP, ASDiv, AQuA, and MAWPS.
  • Commonsense Reasoning: CSQA (CommonsenseQA), StrategyQA, Date Understanding, Sports Understanding, and SayCan (robotics task planning).
  • Symbolic Reasoning: Last letter concatenation and Coin Flip tracking.

Key Insights and Ideas

  • An "Emergent" Property: Perhaps the most striking finding is that CoT prompting does not work for small models. In fact, it can actually hurt performance for models under ~10B parameters. The ability to generate and benefit from a chain of thought only "emerges" at the scale of 100B+ parameters.
  • Decomposition is Key: CoT allows the model to allocate more "compute" (in the form of tokens) to harder problems by breaking them down into manageable sub-steps.
  • Interpretability: Because the model writes out its logic, researchers can look at the output and see exactly where the reasoning went wrong (e.g., a simple calculation error vs. a total misunderstanding of the question).
  • Length Generalization: In symbolic tasks, CoT prompting allows models to solve problems longer than those seen in the prompt, a feat standard prompting fails at.

Key Results

The empirical gains from this simple prompting tweak are striking, particularly on arithmetic reasoning tasks.

Performance on GSM8K Benchmark
  • State-of-the-Art on GSM8K: Using PaLM 540B with just eight CoT exemplars, the model achieved 57% accuracy on the GSM8K benchmark. This surpassed the previous state-of-the-art (55%), which was a GPT-3 model specifically fine-tuned on the dataset with a verifier.
  • Massive Gains Over Standard Prompting: On the same GSM8K benchmark, standard prompting with PaLM 540B yielded only 18% accuracy. CoT prompting more than tripled that performance.
  • Commonsense & Symbolic Improvements: CoT improved performance across almost all benchmarks. On StrategyQA, PaLM 540B reached 75.6% accuracy, and on "Sports Understanding," it outperformed an unaided human enthusiast (95.4% vs 84%).

Limitations and Future Work

While highly effective, CoT prompting has limitations. There is no guarantee of correctness; the model can still "hallucinate" incorrect reasoning steps that lead to a wrong conclusion. Additionally, generating a chain of thought requires more output tokens, which increases the inference cost and latency. Finally, the chains of thought in the prompts are currently manually written by humans, making the automation of these exemplars a major area for future research. Inducing this kind of reasoning in smaller, more efficient models also remains an open challenge.

Summary updated

BibTeX
@inproceedings{wei2022chain,
  author = {Jason Wei and Xuezhi Wang and Dale Schuurmans and Maarten Bosma and Brian Ichter and Fei Xia and Ed H. Chi and Quoc V. Le and Denny Zhou},
  title = {{Chain-of-Thought Prompting Elicits Reasoning in Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=zlN_QvIlNxV},
}
Figure