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

Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia and 3 more · arXiv · 2022-1-28

- **Problem** Scaling up a language model alone has not made it reliable on arithmetic, commonsense and symbolic reasoning, and few-shot prompting with bare answers stays weak on those tasks.
- **Method** Adds a short natural-language reasoning chain to each few-shot exemplar and prompts an off-the-shelf model, with no finetuning, so that it writes its own chain before the answer.
- **Results** PaLM 540B reached 56.9 accuracy on GSM8K with chain-of-thought prompting, up from 17.9 with standard prompting.

![Figure 1: Chain-of-thought prompting enables large language models to tackle complex arithmetic, commonsense, and symbolic reasoning tasks. Chain-of-thought re…](https://refivu.com/papers/453dc85c-e794-4846-bb89-b8b678635169/figures/figure-106b43dada32ee66fd9434f201cf34bf.png?thumb=512)

**Figure 1** : Chain-of-thought prompting enables large language models to tackle complex arithmetic, commonsense, and symbolic reasoning tasks. Chain-of-thought reasoning processes are highlighted.

[Original paper](https://arxiv.org/abs/2201.11903v6) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · Original paper figure · Extracted the figure area from page 1 of the original PDF.

## Why scale and plain few-shot prompting fall short

Scaling up language models improves performance and sample efficiency on many tasks, but on arithmetic, commonsense and symbolic reasoning a larger model alone has not been enough. One earlier route trains or finetunes models to write natural-language rationales. That demands a large set of carefully made rationales, which is costly to build.

The other route is few-shot prompting, which needs no finetuning but works poorly on reasoning tasks and often gains little as models grow.

The open question is whether a model can be prompted to produce such rationales itself, without any new training. Each prompt example would then pair an input with a chain of thought and an output, and the model would write a chain for a new question in the same format.

## How chain-of-thought exemplars are built and decoded

A chain of thought is a sequence of intermediate natural-language steps that leads to the final output, and chain-of-thought prompting places such sequences inside the few-shot exemplars. Standard prompting gives only the answer in each exemplar, whereas the chain-of-thought version spells out the steps before the answer, as the figure contrasts.

The authors wrote eight exemplars by hand and used that one set for every benchmark except AQuA, which is multiple choice and uses four exemplars and solutions from its training set. These exemplars were not tuned through prompt engineering, and robustness to other exemplar sets is tested separately.

Models are sampled with greedy decoding, and for LaMDA the reported numbers average five random seeds, each with a different shuffled order of exemplars. A post-hoc external calculator is applied to the equations in a generated chain. A Python eval step recomputes each equation and passes results forward by string matching, which targets arithmetic slips rather than the reasoning steps.

The authors give three reasons for the design: a chain lets a model divide a multi-step problem into parts, so harder problems can receive more intermediate computation; the chain offers a readable trace of how an answer was reached; and the same format can in principle cover any task humans solve through language.

## Arithmetic results on GSM8K and the other benchmarks

The prior best entry in that table is 55, from a finetuned model, so the chain-of-thought result is above it.

Standard prompting already passes the prior best on SVAMP, while PaLM with chain-of-thought prompting comes within 2% of the state of the art on AQuA and ASDiv.

The same comparison holds for other models: GPT-3 175B moves from 15.6 to 46.9 on GSM8K, and Codex moves from 19.7 to 63.1.

Gains are not uniform across difficulty. Table 3 shows that on SingleOp, PaLM 540B scores 94.1 with either prompt, while on MultiArith it rises from 42.2 to 94.7.

## Why the gains appear only at larger scales

For LaMDA 137B, GSM8K accuracy rises from 6.5 to 14.3 with chain-of-thought prompting, while the 68B model goes from 5.7 to 8.2 and the 8B model falls from 3.2 to 1.6.

PaLM follows the same shape: the 8B model moves from 4.9 to 4.1, the 62B model from 9.6 to 29.9, and the 540B model from 17.9 to 56.9.

The authors place the threshold at about 100B parameters, and they report that smaller models wrote fluent but illogical chains that scored below standard prompting.

## Testing alternative explanations: equations, extra tokens and ordering

Three ablations change one aspect of the prompt: equation only asks for a mathematical equation before the answer, variable compute only replaces the steps with a sequence of dots matching the equation's length, and reasoning after answer places the chain after the answer.

The ± values come from five random orders of the few-shot exemplars, so they describe exemplar-order variance only.

The authors read the GSM8K result as showing that its questions are too semantically hard to turn into a single equation without natural-language steps.

Variable compute only and reasoning after answer both stay near the standard baseline on GSM8K, which the authors take to mean that extra tokens and early access to knowledge do not explain the gains; the intermediate natural-language reasoning matters. These ablations were run on LaMDA 137B and PaLM 540B, but the text gives numbers only for LaMDA 137B, so the scores here come from that model alone.

## Sensitivity to annotators and exemplar sets

Two other co-authors wrote their own chains for the same eight exemplars, and Annotator A also wrote a more concise chain in the style of the GSM8K solutions.

The concise style scores below Annotator A's original chain on GSM8K, so annotation style moves the score, but every variant stays well above standard prompting.

Those GSM8K training examples already contain reasoning steps, so they act as an independent source of chain-of-thought exemplars.

The robustness runs use LaMDA 137B, and the ± values reflect exemplar order, not annotator wording.

## Limitations and open questions

Reasoning paths are not guaranteed to be correct, so chain-of-thought prompting can produce both correct and incorrect answers. Among the 50 correct-answer chains checked, all but two were logically and mathematically correct.

Writing exemplar chains costs little in the few-shot setting, but the authors say the annotation cost could be prohibitive for finetuning, which synthetic data or zero-shot generalization might ease. Results also vary with exemplar choice in general, so the robustness runs should be read as a range rather than a guarantee.

The emergence of the effect only at large scales makes serving it costly in real applications, and inducing reasoning in smaller models is left for future work. Whether the network is actually reasoning is left as an open question. Most GPT-3 and PaLM runs use a single exemplar order to save compute, and the additional GPT-3 and PaLM queries were limited and expensive.

## Paper info

- **Authors**: Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou
- **Venue**: arXiv · Preprint
- **First published**: 2022-1-28
- **Added**: 2026-10-20
- **Updated**: 2023-1-10
- **Version**: v6
- **arXiv**: 2201.11903
- **Category**: cs.CL · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2201.11903v6) · [PDF ↗](https://arxiv.org/pdf/2201.11903v6)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## 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.

## Quote from the paper

Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv:2201.11903v6. https://arxiv.org/abs/2201.11903v6

**BibTeX**

```
@misc{wei2022chain,
  title = {{Chain-of-Thought Prompting Elicits Reasoning in Large Language Models}},
  author = {Jason Wei and Xuezhi Wang and Dale Schuurmans and Maarten Bosma and Brian Ichter and Fei Xia and Ed Chi and Quoc Le and Denny Zhou},
  year = {2022},
  eprint = {2201.11903},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.11903v6}
}
```

## Other paper commentary

- [Llama 2: Open Foundation and Fine-Tuned Chat Models](https://refivu.com/en/papers/5c1523c3-cd1c-48ba-8289-86de02d688dd-llama-2-open-foundation-and-fine-tuned-chat.md)
- [PaLM: Scaling Language Modeling with Pathways](https://refivu.com/en/papers/31a94910-97f3-470b-a240-6c8b698de722-palm-scaling-language-modeling-with-pathways.md)
- [Mistral 7B](https://refivu.com/en/papers/9993f1cb-8618-4aeb-9dc5-d4a5aa598381-mistral-7b.md)
- [Scaling Laws for Neural Language Models](https://refivu.com/en/papers/0b00379f-9c4e-4d81-be48-4963190a673b-scaling-laws-for-neural-language-models.md)
- [Language Models are Few-Shot Learners](https://refivu.com/en/papers/82602214-e941-40a1-bc42-5b92c1268a53-language-models-are-few-shot-learners.md)
- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://refivu.com/en/papers/3dc17b50-5c0f-4503-a368-4b0d9e86745c-roberta-a-robustly-optimized-bert-pretraining-approach.md)
- [Denoising Diffusion Probabilistic Models](https://refivu.com/en/papers/3a1faf88-ed3a-4c3a-bf1e-1afc6e7184fa-denoising-diffusion-probabilistic-models.md)
- [Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model](https://refivu.com/en/papers/b99bbef4-e405-4227-881f-01ef69bed080-mastering-atari-go-chess-and-shogi-by-planning.md)
- [Mixtral of Experts](https://refivu.com/en/papers/5e1d3fc2-10c6-4121-ba03-4ef4430aadca-mixtral-of-experts.md)
- [High-Resolution Image Synthesis with Latent Diffusion Models](https://refivu.com/en/papers/33bd1500-c829-47e5-9545-ad078523241e-high-resolution-image-synthesis-with-latent-diffusion-models.md)

## Terms in this paper

- [Accuracy](https://refivu.com/en/terms/1995c0cd6282-accuracy)
- [GSM8K](https://refivu.com/en/terms/e48f0e01064d-gsm8k)
- [greedy decoding](https://refivu.com/en/terms/668f299cabe4-greedy-decoding)
- [Codex](https://refivu.com/en/terms/1afc2735b086-codex)
- [chain-of-thought prompting](https://refivu.com/en/terms/ad375c45ea01-chain-of-thought-prompting)
- [few-shot prompting](https://refivu.com/en/terms/92ad53fb3cd1-few-shot-prompting)
- [chain of thought](https://refivu.com/en/terms/e4274342cf4b-chain-of-thought)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/453dc85c-e794-4846-bb89-b8b678635169-chain-of-thought-prompting-elicits-reasoning-in-large)
