Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
A few worked reasoning examples in a prompt can help sufficiently large language models solve complex multi-step tasks.
Key takeaway
Chain-of-thought (CoT) prompting adds intermediate reasoning steps to few-shot examples instead of showing only final answers. The model imitates this format on new problems. The paper demonstrates gains in arithmetic, commonsense, and symbolic reasoning, including a strong GSM8K result with PaLM 540B.
Updated on Nov 23, 2026
01
Abstract
What is Chain-of-Thought Prompting?
Chain-of-thought prompting (CoT) is a few-shot prompting method in which examples include both a question and the intermediate reasoning steps leading to its answer. The model is then asked to solve a new problem in the same format. Unlike fine-tuning, the method changes the prompt—not the model parameters.
02
Background
Related Work
This work builds on few-shot in-context learning and language-model scaling. It helped motivate subsequent methods that improve reasoning through prompt decomposition, sampling multiple reasoning paths, and automatically constructing demonstrations.
03
Methodology
The Core Idea
A standard few-shot example provides an input and its final answer. A CoT example also exposes a sequence of intermediate steps. These worked examples teach the model the response pattern needed to decompose a problem before producing its answer.
How the Method Works
The authors construct few-shot exemplars that demonstrate how to reason through a task. They compare prompts with intermediate reasoning against standard prompts that contain only final answers. They evaluate several model families and task categories, and study how model scale affects the gains.
Standard prompting versus chain-of-thought prompting
Both columns use the same model and the same few-shot format: a solved example, then a new question. The only difference is the solved example. In standard prompting (left), the exemplar gives just the answer, "The answer is 11", and the model copies that pattern by jumping straight to an answer, here a wrong one (27). In chain-of-thought prompting (right), the exemplar also shows the intermediate steps in natural language (blue). The model imitates that format, writes out its own steps (green) and reaches the correct answer, 9. No weights change; the whole method lives in the prompt. In the paper, the authors hand-wrote eight such exemplars and reused them across the math benchmarks (AQuA used four from its training set instead). Writing the steps out lets the model split a multi-step problem into pieces and spend more computation on harder questions, and it gives a readable trace of how the answer was reached. The authors note, though, that fully characterizing the computation behind an answer remains an open question.
Figure 1 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
Chains of thought across task types
Each box is one exemplar of the form input, chain of thought, output, with the chain highlighted. The colours mark the three task families the paper tests. Green is arithmetic: free-response and multiple-choice math word problems. Orange is commonsense reasoning, where the chain brings in world knowledge, such as that a pear's density (about 0.6 g/cm^3) is below water's (StrategyQA), that Joao Moutinho plays soccer rather than American football (Sports Understanding), or how to turn a request into a robot plan (SayCan). Blue is symbolic reasoning, where the chain tracks simple state, such as taking the last letter of each word or counting coin flips. The idea is the same in every case: the exemplar shows how to decompose the problem, and the model follows that decomposition on new inputs. The symbolic exemplars use short inputs (two-word names, two flips), so the paper can test whether the model generalizes to longer ones. Full prompts are in Appendix G.
Figure 3 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
04
Architecture
Prompting Workflow
CoT is a prompting strategy rather than a new neural architecture. The same pretrained language model receives a prompt containing worked examples followed by a target question, and generates a reasoning sequence and answer autoregressively.
05
Training
Prompt Design and Robustness
CoT does not introduce a new regularization loss or training objective. Its behavior depends on the demonstrations, their clarity, and the model’s ability to use long in-context patterns. Poor or misleading examples can produce poor reasoning traces.
Compute and Scaling
CoT adds generated tokens because the model emits intermediate steps, increasing inference cost and latency compared with answer-only prompting. The paper reports that benefits become more pronounced with sufficiently large models; the flagship GSM8K result uses PaLM with 540 billion parameters and eight CoT exemplars.
Practical Implementation
Create a few examples in the target task format, making the intermediate steps explicit and easy to follow. Put these demonstrations before the new question and ask the model to solve it using a similar step-by-step format. Validate the final answer independently for high-stakes or exact tasks.
Robustness to who writes the exemplars
A natural worry is that chain of thought only works for one carefully crafted prompt. Section 3.4 tests this on GSM8K and MAWPS with LaMDA 137B. The solid orange bar uses chains written by Annotator A. The patterned bars use chains written independently by two other authors (B and C) for the same exemplars, an intentionally concise version by A, and three sets of eight exemplars sampled at random from the GSM8K training set (alpha, beta, gamma), which already contain reasoning steps. Results vary, as expected for any prompt-based method, but every chain-of-thought variant beats standard prompting (yellow) by a large margin. The practical lesson: the gains do not depend on one annotator's writing style, yet prompt quality still moves results by several points, so it is worth validating more than one set of exemplars.
Figure 6 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
06
Results
Key Results
Across arithmetic, commonsense, and symbolic reasoning tasks, CoT prompting improved performance for the large models studied. A headline result: PaLM 540B with eight chain-of-thought exemplars achieved state-of-the-art GSM8K accuracy at publication time, outperforming fine-tuned GPT-3 with a verifier.
Evidence highlights
- 01Evaluated three large language models
- 02Improved performance across multiple reasoning task types
- 03PaLM 540B + eight CoT exemplars set a strong GSM8K result
How to Evaluate CoT
Compare CoT prompting against answer-only few-shot prompting on the same model, dataset, and example budget. Measure task accuracy and also record output tokens, latency, and cost. Use held-out questions and repeat across prompt exemplars to assess sensitivity.
Result board
Primary metric
exact-match or task-specific accuracy
Operational metrics
latency, generated tokens, and cost
Result
Run multiple prompt-example selections
Result
Inspect reasoning traces for invalid stepsdo not score fluency as correctness
A new state of the art on GSM8K
GSM8K is a benchmark of grade-school math word problems that usually take several steps to solve. With standard prompting, PaLM 540B solves only 18%. Adding chain-of-thought exemplars to the same prompt raises this to 57%, above the previous best of 55% from Cobbe et al. (2021), which fine-tuned GPT-3 on the GSM8K training set and added a separately trained verifier to rank candidate solutions. Fine-tuned GPT-3 175B without the verifier scores 33%. The striking part is the cost as well as the score: the previous best needed a labeled training set and two trained models, while chain-of-thought prompting uses eight hand-written examples and no training at all.
Figure 2 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
Chain of thought is an emergent ability of scale
Each panel shows solve rate against model size for one model family (LaMDA, GPT-3, PaLM) on one math benchmark, comparing standard prompting (black) with chain-of-thought prompting (blue). Orange dashed lines mark the best prior supervised results. Three patterns stand out (Section 3.2). First, chain of thought does not help small models: below roughly 100B parameters it is flat or slightly worse, because smaller models write fluent but illogical chains. Second, the gains are largest on the hardest problems: GSM8K performance more than doubles for the largest GPT and PaLM models, while on SingleOp, the easiest subset of MAWPS with one-step problems, the gain is negative or very small. Third, at the largest scale, prompting alone matches or beats fine-tuned task-specific models: PaLM 540B with chain of thought sets new highs on GSM8K, SVAMP and MAWPS. In a manual review of LaMDA 137B's GSM8K outputs, 48 of 50 correct answers had fully correct reasoning, and 46% of the wrong answers were almost right, with only a minor slip such as a calculator error or one missing step.
Figure 4 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
Commonsense reasoning with PaLM
Section 4 extends the method beyond math to five commonsense benchmarks, shown for PaLM 8B, 62B and 540B. CSQA asks commonsense multiple-choice questions; StrategyQA needs a multi-step strategy to answer yes-or-no questions; Date asks the model to infer a date from context; Sports asks whether a sentence about sport is plausible; SayCan maps a spoken instruction to a sequence of robot actions. The scaling pattern from math repeats: chain of thought (blue) helps most at 540B. There, PaLM reaches 75.6% on StrategyQA, beating the prior best of 69.4%, and 95.4% on Sports Understanding, above the 84% of an unaided sports enthusiast (green line). The exception is CSQA, where the gain is minimal.
Figure 7 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
07
Ablation
What makes chain of thought work?
The ablation study (Section 3.3) tests three simpler explanations for the gains on GSM8K, using LaMDA 137B and PaLM 540B. Equation only: the exemplars give just a math equation before the answer. This barely helps on GSM8K, suggesting the questions are too semantically complex to translate straight into an equation without natural-language steps (it does help on simpler one- or two-step datasets). Variable compute only: the model outputs a row of dots as long as the equation, giving it extra tokens of computation with no reasoning. This performs about the same as the baseline, so extra computation alone is not the cause. Reasoning after answer: the chain of thought comes after the answer, testing whether it only helps the model recall relevant knowledge. This also matches the baseline, so order matters: the steps help because they come before the answer and lead to it. Only full chain-of-thought prompting gives the large jump.
Figure 5 from Wei et al. (2022), supplied by the user. Paper: NeurIPS 2022.
08
Limitations
CoT can increase token use and latency, and its success depends on model capability and prompt examples. A generated reasoning trace can be incomplete, invalid, or merely plausible; a coherent explanation does not prove that the answer is correct or that the trace faithfully reflects the model’s internal computation.
09
Conclusion
Main Contributions
The paper established a simple, parameter-free prompting technique for eliciting multi-step reasoning and showed that its benefits emerge more clearly at large model scales. It also provided a clear experimental comparison between answer-only and reasoning-augmented demonstrations.
Key Takeaways
CoT showed that the format of few-shot demonstrations can materially affect complex-task performance. It is a lightweight way to encourage decomposition, but it trades additional inference tokens for potential accuracy gains and must be evaluated rather than assumed to work.
Frequently Asked Questions
10
References
Source trail
Primary papers, implementation pages, and external source records used to ground this explainer.
Language Models are Few-Shot Learners
NeurIPS 2020
Foundational work on few-shot in-context learning, the prompting paradigm used by CoT.
Self-Consistency Improves Chain of Thought Reasoning in Language Models
ICLR 2023
Follow-up method that samples multiple reasoning paths and aggregates their answers.
Least-to-Most Prompting Enables Complex Reasoning in Large Language Models
ICLR 2023
A decomposition strategy designed to improve generalization to harder compositional problems.
Automatic Chain of Thought Prompting in Large Language Models
2022
Explores automatically generating diverse reasoning demonstrations rather than hand-writing them.
01NeurIPS 2022 paper page02Full paper PDF03arXiv preprint04NeurIPS proceedings record