Abstract
We explore how generating a chain of thought -- a series of intermediate reasoning steps -- significantly improves the ability of large language models to perform complex reasoning. In particular, we show how such reasoning abilities emerge naturally in sufficiently large language models via a simple method called chain of thought prompting, where a few chain of thought demonstrations are provided as exemplars in prompting. Experiments on three large language models show that chain of thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks. The empirical gains can be striking. For instance, prompting a 540B-parameter language model with just eight chain of thought exemplars achieves state of the art accuracy on the GSM8K benchmark of math word problems, surpassing even finetuned GPT-3 with a verifier.
Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing. However, they have historically struggled with tasks requiring multi-step reasoning, such as arithmetic word problems or symbolic logic. Even as models scaled in size, a "reasoning ceiling" often persisted. Previous attempts to bridge this gap involved fine-tuning models on specialized datasets of step-by-step rationales, which is both computationally expensive and often results in narrow task-specific performance. This paper investigates whether reasoning can be elicited simply through prompting, without additional training.
Methods: Chain-of-Thought Prompting
The authors introduce Chain-of-Thought (CoT) prompting, a simple yet effective technique where the model is provided with a few examples of a problem solved via intermediate reasoning steps. In traditional few-shot prompting, the model is shown Input -> Output pairs. In contrast, CoT prompting provides Input -> Reasoning Chain -> Output.
This approach requires no gradient updates or fine-tuning. It leverages the model's pre-existing knowledge by encouraging it to "think out loud" before arriving at a final answer. By generating these intermediate steps, the model effectively allocates more "test-time compute" to the problem, breaking down complex tasks into manageable sub-steps.
Evaluation and Datasets
The researchers evaluated CoT prompting across three broad categories of reasoning:
- Arithmetic Reasoning: Benchmarks like GSM8K (grade school math), SVAMP, ASDiv, AQuA, and MAWPS.
- Commonsense Reasoning: Tasks including CSQA (CommonsenseQA), StrategyQA, and specialized BIG-bench tasks like Date and Sports Understanding.
- Symbolic Reasoning: Tasks such as "Last Letter Concatenation" and tracking state in "Coin Flip" scenarios.
Key Insights
- Reasoning as an Emergent Property: CoT prompting is only effective for models of sufficient scale (typically 100B+ parameters). For smaller models (under 10B), this technique can actually degrade performance, suggesting that the ability to generate coherent logic is an emergent property of scale.
- Interpretability: Unlike standard prompting, CoT provides a transparent window into the model's logic. If a model produces an incorrect answer, the reasoning chain allows researchers to identify exactly where the logic failed.
- Robustness: The technique is robust to variations in prompt engineering, such as the specific individual writing the examples or the order in which they are presented.
Results
The empirical gains from CoT prompting are significant. On the GSM8K benchmark, standard prompting for the PaLM 540B model yielded only 17.9% accuracy. By adding chain-of-thought exemplars, performance tripled to 57%, surpassing a GPT-3 model that had been specifically fine-tuned for the task.
Furthermore, in symbolic tasks, CoT allowed models to generalize to longer sequences than those seen in the prompts, demonstrating a level of structural understanding beyond simple pattern matching.
Limitations and Future Work
Despite its success, CoT prompting has limitations. It is currently only effective for massive, computationally expensive models. Additionally, while the logic may be sound, models can still "hallucinate" incorrect facts within the reasoning chain, leading to wrong answers. The authors also note that while the output mimics human reasoning, it does not necessarily imply that the model's internal processes are identical to human thought. Future research will focus on automating the generation of these reasoning chains to reduce the need for manual prompt engineering.
Summary updated