Start studying
Module 7 · Prompt Engineering Module contents
Module 7  ·  Card 9 / 17intermediate

Chain of Thought

Chain of thought asks the model to work through its reasoning before it answers.

Each step it writes becomes part of the context the next step is predicted from.

That spreads a multi-step problem over many predictions instead of one.

Arithmetic, logic and word problems gain the most; simple lookups gain nothing.

The written steps are a plausible account, not a guaranteed record of the real computation.

Learn in depth ↓
Module 07 · Prompt Engineering · 17 concepts
In depth  /  15 lines

Chain of Thought, in more detail

Chain of thought asks the model to reason through a problem before giving an answer.

The instruction can be as short as think step by step.

It works because a model generating one token has one forward pass to do it in.

A hard problem does not fit into one pass, so the answer is a guess dressed as fluent text.

Writing the steps out spreads the work across many passes.

Each step it writes becomes context that the next step is conditioned on.

The model is effectively using its own output as a scratchpad.

Arithmetic, logic puzzles, planning and multi-step word problems benefit most.

Simple lookups gain nothing and are just made slower and more expensive.

Few-shot chain of thought, showing worked reasoning in the examples, is stronger still.

Self-consistency samples several reasonings and takes the majority answer.

The written steps are a plausible account rather than a transcript of the real computation.

A model can produce sound-looking reasoning and then state an answer that does not follow.

So the reasoning is a debugging aid, not a proof.

Reasoning models now do this internally, which is why they are slower and better at hard problems.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Why does asking for the reasoning first help on a multi-step problem?
Prompt Engineering

17 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close