Act 2 · The Toolbox
5. Reasoning in steps
Act 1 ended on a question: can a language model reason through a problem instead of answering on reflex? In Act 2 we answer it with a toolbox of ways to spend more computation on each answer: think longer in one chain (pages 5 and 6), try many paths and pick the best (pages 7 to 9), search through them (page 10), and finally weigh all of it against simply using a bigger model (page 11). The first tool is the simplest: we have the model write out its steps.
1. Chain-of-Thought (CoT): Reasoning over simple steps
We've previously illustrated what step-by-step reasoning looks like for a couple of real-world problems. Chain-of-thought prompting simulates human reasoning by using each intermediate step as part of the LLM prompt to generate the next intermediate step.reference 1 We can ask a model for one by ending the prompt with “Let's think step by step.”reference 2
Below we show three problems from MATH-500, each with the worked solution that comes with the dataset.reference 3
What is the smallest positive perfect cube that can be written as the sum of three consecutive integers?
The sum of three consecutive integers takes the form (k-1)+(k)+(k+1)=3k and hence is a multiple of 3.
Conversely, if a number n is a multiple of 3, then n/3-1, n/3, and n/3+1 are three consecutive integers that sum to give n.
Therefore, a number is a sum of three consecutive integers if and only if it is a multiple of 3.
The smallest positive perfect cube that is a multiple of 3 is 3³=27.
2. ‘Zero-shot’ versus ‘few-shot CoT prompting’
Another way we can induce reasoning in a model is to give it worked examples at inference time, which is called few-shot prompting. A model may not reason in the style we intended. By providing examples, we can steer it into answering our prompt in the same step-by-step format the examples show.
Let’s look at how zero-shot fares against few-shot on Qwen2.5 base modelsreference 4 of three sizes, when both are told to reason.
- model
- Qwen2.5 base · 1.5B, 3B, 7B
- problems
- MATH-500
- zero-shot
- 10-shot
By providing the step-by-step intermediate logic in the examples, we force the model to generate its own reasoning pathway before committing to a final answer. This prevents the model from hallucinating a final state because it has to calculate the state sequentially.
3. ‘Base model with few-shot CoT prompting’ versus ‘Instruct model’
Few-shot prompting has a running cost: the ten worked examples, about 3,400 tokens, are sent with every question. Post-training pays that cost once. An Instruct model is the base model trained further, with supervised fine-tuning and reinforcement learning, so that it follows instructions and writes out its steps when asked, with no examples in the prompt.reference 5
Below, we compare each base model with ten examples against its Instruct version with none, on MATH-500.
- from: Base model with few-shot CoT prompting (ten examples)· prompt 3,396 tokens
- to: Instruct model (no examples)· prompt 88 tokens
The Instruct model wins at every size, by 30.0, 26.7 and 31.1 points, on a prompt about 40 times shorter (88 tokens against 3,396). The 1.5B Instruct model (56.2%) even beats the 7B base model with examples (43.8%).