Chain-of-thought prompting
Definition
Chain-of-thought prompting is asking an AI model to work through a problem step by step before giving its final answer. Writing out the steps improves accuracy on multi-step tasks like math and logic problems, and shows the working so you can check it.
By Ronan Liedmeier, fractional head of growth and course author · Published 17 October 2026 · Last updated 17 October 2026
Also called: CoT, step-by-step prompting
It helps where a quick answer would skip a step, such as a discount calculation or a decision with several conditions. It also gives you something to audit, because a wrong step is easier to spot than a wrong final number.
How it works
Wei and colleagues showed in 2022 that putting worked examples with step-by-step reasoning into the prompt made large models much better at math word problems and other multi-step reasoning tasks. Later that year Kojima and colleagues found a version that needs no examples: adding "Let's think step by step" before the answer improved results on its own.
Reasoning models now do this internally, so with them you rarely need to ask. With standard models the instruction still helps on multi-step work. Ask for the reasoning in one section and the final answer in another, so an automation can read only the answer.
Example
An operations analyst asks how many extra warehouse staff a holiday peak will need, given the order forecast and the site's shift pattern. She adds "work through this step by step, then give the final number on its own line." The working shows the model assumed eight-hour shifts where the site runs ten, so she corrects that one input and reruns it.
Common mistake
People paste "think step by step" into every prompt. On simple tasks like classification it makes replies slower and longer with no gain in accuracy. Use it where the task has several dependent steps, and test with and without it on your own examples.
Learn it in AI Academy
- Prompt Engineering at Production QualityExpert · 8 min
- Advanced Prompting in 2026Expert · 7 min
Related terms
- Reasoning model
- A reasoning model is an AI language model trained to work through a problem step by step before it gives a final answer. The extra thinking makes it slower and more expensive per answer, and noticeably better at math, coding and other multi-step tasks.
- Few-shot prompting
- Few-shot prompting is giving an AI model a few examples of the input and output you want, right inside the prompt, so it follows the pattern. The model picks up the format and style from the examples on the spot, with no retraining.
- Prompt engineering
- Prompt engineering is the practice of writing and testing the instructions you give an AI model so it produces reliable, useful output. For everyday users it means writing clear briefs; for teams running AI in production it means treating prompts like versioned, tested code.