Chain-of-thought prompting, often abbreviated CoT, is a way of asking a language model to produce intermediate reasoning steps before giving the final answer.
It is used to improve performance on tasks that benefit from multi-step reasoning, such as arithmetic, logic, and some question-answering problems. In practice, teams reach for CoT when a direct one-line answer is more likely to be wrong than a stepwise solution.
It can also make model behavior easier to inspect: if the model shows its working, you can often see where the reasoning goes off track.
The basic idea is simple: instead of prompting only for the final answer, you prompt the model to “think step by step” or provide intermediate reasoning.
There are a few common forms:
Explicit instruction in the prompt
Example: “Solve this step by step.”
Few-shot prompting with examples
You show the model a couple of worked examples that include reasoning, then ask it to solve a new problem in the same style.
Zero-shot chain-of-thought
A direct instruction such as “Let’s think step by step” can sometimes improve results without examples.
The original chain-of-thought idea is associated with prompting methods that elicit intermediate reasoning from large language models, especially on reasoning benchmarks. One practical note: the “reasoning” text is not a guarantee of correctness; it is just the model’s generated explanation path.
Prompt:
“Three boxes each contain 4 apples. How many apples are there in total? Solve step by step.”
Possible model response:
“Each box has 4 apples. There are 3 boxes. So 3 × 4 = 12. The total is 12 apples.”