Chain-of-Thought › A Worked Example: Tracing a Reasoning Chain Step by Step
Language AI HandbookAll chapters Chain-of-Thought › A Worked Example: Tracing a Reasoning Chain Step by StepOne section · Sections in this chapter13 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
To make the mechanics concrete, let's trace exactly what happens during few-shot CoT on a moderately complex problem. Consider this question:
A conference has 480 attendees. 40% attend the morning session, and 30% of those also attend the afternoon session. How many people attend both sessions?
A model conditioned on few-shot CoT exemplars would generate something like the following chain:
Step 1 (reading comprehension): The question asks for the number of people who attend both sessions.
Step 2 (first operation): 40% of 480 attend the morning session: people.
Step 3 (second operation): 30% of those 192 also attend the afternoon session: people.
Step 4 (rounding): Since we are counting people, we round to 58.
Answer: 58.
Notice what happens at each step. When the model generates Step 2, the context contains both the question and Step 1. When it generates Step 3, the context contains the question plus Steps 1 and 2, including the computed intermediate value 192. Step 3 can treat 192 as a known quantity rather than re-computing it. If the model had simply been asked to produce the answer token, it would need to hold both percentage computations in its representations simultaneously and output 57.6 or 58 directly. Writing out 192 as an intermediate result reduces the per-step computation and provides a verifiable checkpoint that subsequent reasoning can anchor to.
You can also see how errors propagate. If Step 2 computed 190 instead of 192 (a small error), Step 3 would produce 57 instead of 57.6, and the final answer would be off. Error propagation is a real concern for long chains, but it is also the property that makes chains interpretable: you can find the error and know exactly what it affected.
This example also illustrates the value of explicit intermediate naming. The value 192 is contextually anchored to "number of people who attend the morning session." When Step 3 uses it, the model has access to both the number and its meaning, reducing the risk that it treats 192 as an arbitrary operand rather than as the count of morning attendees.