---
title: Chain-of-Thought Prompting: Showing the Steps | Large Programs
description: Asking a language model to show intermediate steps can improve its answers to hard problems. What the research found and how it is like showing your working in maths.
canonical: https://www.largeprograms.com/chain-of-thought-prompting-showing-your-working/
---

[Home](/) / [How LLMs Work](/category/how-llms-work/)

How LLMs Work

# Chain-of-Thought Prompting: Showing the Steps

Asking a language model to show intermediate steps can improve its answers to hard problems. What the research found and how it is like showing your working in maths.

27 November 2026 · 1 min read

In maths class you are told to "show your working". Writing the steps helps you avoid mistakes. A similar idea works for language models.

![A question solved in three written steps.](/img/chain-of-thought.svg)

## What a chain of thought is

A **chain of thought** is a series of intermediate steps that lead to an answer. In 2022 researchers explored what happens when a model generates such a chain before it gives its final answer. They found that this **significantly improves a large language model's ability to do complex reasoning**.

## How the method works

The method is called **chain-of-thought prompting**. In the prompt, you give the model a few examples (exemplars) that show the steps being worked through. The model then tends to write out similar steps for the new problem.

The researchers report that these reasoning abilities emerge naturally in **sufficiently large** language models.

## One technique among many

Chain-of-thought is listed among common prompting techniques alongside few-shot prompting (giving several examples) and role assignment (telling the model what role to play). See [how to write a good prompt](/what-is-prompt-engineering-for-beginners/).

## An example to try

Ask a chatbot with a grown-up: "A box has 3 red pens and twice as many blue pens. How many pens are there? Show each step." Then ask it again without "Show each step". Compare. This is not a scientific test. Different chatbots behave differently.

## Limits

Written steps do not prove that the answer is right. Check the working yourself. For more on why models slip on sums, see [why AI makes maths mistakes](/why-ai-makes-math-mistakes/).

## Sources

- [https://arxiv.org/abs/2201.11903](https://arxiv.org/abs/2201.11903)
- [https://en.wikipedia.org/wiki/Prompt_engineering](https://en.wikipedia.org/wiki/Prompt_engineering)

[Read this page as Markdown (.md)](/chain-of-thought-prompting-showing-your-working.md)

## Keep reading

[![](/img/hero/art-ai-art-and-music-basics.svg)](/ai-art-and-music-basics/)

How LLMs Work

### [How AI Makes Music: A Beginner's Look](/ai-art-and-music-basics/)

Models can generate melodies and songs by learning patterns in sound. What that means for musicians.

[![](/img/hero/art-backpropagation-how-neural-networks-learn-from-mistakes.svg)](/backpropagation-how-neural-networks-learn-from-mistakes/)

How LLMs Work

### [Backpropagation: How a Network Learns From Its Mistakes](/backpropagation-how-neural-networks-learn-from-mistakes/)

Backpropagation is the method that works out how to adjust each weight in a neural network after it makes an error. A simple explanation with a team analogy.

[![](/img/hero/art-computer-vision-how-computers-see.svg)](/computer-vision-how-computers-see/)

How LLMs Work

### [Computer Vision: How Computers Make Sense of Pictures](/computer-vision-how-computers-see/)

Computer vision is the field that teaches computers to get useful information from images and video. Tasks, examples and a reminder that a computer does not see like you.
