# Chain of thought (2022)

> Show the model worked examples that reason step by step, and it starts reasoning step by step too.

Page: https://mralbu.github.io/ai-datasets/p/chain-of-thought

## Key facts

- Title: Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Authors: Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou
- Venue: NeurIPS 2022
- Category: LLMs
- Paper: https://www.alphaxiv.org/abs/2201.11903

## Why it matters

A change to the prompt alone unlocked multi-step math and logic, and the gain appeared only in the largest models. The idea of spending more computation on writing out reasoning before answering led directly to the reasoning models trained with reinforcement learning, such as OpenAI o1 and DeepSeek-R1.

## The idea

In a few-shot prompt, write out the intermediate reasoning for each example answer, not just the answer. The model imitates the format and works through new problems one step at a time.

## The result

With eight such examples, the 540-billion-parameter PaLM reached state-of-the-art accuracy on GSM8K, beating a fine-tuned GPT-3 with a verifier. Smaller models gained little.

## The data

- [GSM8K (2021)](https://mralbu.github.io/ai-datasets/d/gsm8k.md): 8.5k grade-school math word problems with step-by-step solutions.

## Builds on

- [GPT-3 (2020)](https://mralbu.github.io/ai-datasets/p/gpt-3.md)

## Led to

- [ReAct (2022)](https://mralbu.github.io/ai-datasets/p/react.md)
- [Self-consistency (2022)](https://mralbu.github.io/ai-datasets/p/self-consistency.md)
- [DeepSeek-R1 (2025)](https://mralbu.github.io/ai-datasets/p/deepseek-r1.md)

## Part of

- [Reasoning models](https://mralbu.github.io/ai-datasets/t/llm-reasoning.md) (step 2 of 5)
