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

Published
Lab
Google
Citations
24,438

TL;DR

Chain-of-thought prompting adds a few worked reasoning traces as examples in the prompt, so the model writes intermediate steps before the answer. The effect shows up in sufficiently large models.

Read this as a

Why builders care

Editor's note

A simple prompt change improved arithmetic, commonsense and symbolic reasoning. With eight examples, a 540B model reached state of the art on the GSM8K math benchmark, beating even fine-tuned GPT-3 with a verifier.

How to apply it

Editor's note
  1. 1For multi-step tasks, put a few worked examples that show the intermediate steps, not just the final answer, in the prompt.
  2. 2Don't expect the same lift from a small model. The paper says this behaviour emerges in sufficiently large models.
  3. 3Eight exemplars were enough for the GSM8K result. Start with a short set of careful traces rather than a large fine-tune.

Code

Not found

No verified code link yet. We checked the abstract, arXiv comments and Hugging Face; if the authors release code later it will show up here.

Practical notes

AI-generated
  • Include a few worked examples showing intermediate steps rather than just final answers in the prompt.
  • Start with a short set of careful traces like the eight exemplars used in the experiments.
  • Ensure the model is large enough, as the capability emerges naturally in sufficiently large language models.

Key results

From the abstract
  1. 1

    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.

  2. 2

    Experiments on three large language models show that chain of thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks.

  3. 3

    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.

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

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.

Everything on this page is written from this abstract. For methods and full results, read the paper PDF.

Ask the paper

Answers come from the paper summary and abstract.

Ask anything about “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models”, or start with one of these:

Closest matches across the feed and every collection, by shared words in titles, topics and abstracts.