Chain-of-Thought
Ask the model to reason step by step for harder problems.
- ✓What chain-of-thought prompting is
- ✓When it helps (and when it is overkill)
- ✓How to combine it with format instructions
Explanation
For multi-step problems — maths, logic, planning — asking the model to reason step by step before answering improves accuracy. The phrase 'Let's work through this step by step' is a classic trigger.
The idea is that forcing intermediate steps gives the model 'room to think', reducing careless jumps to a wrong final answer.
For simple lookups it is unnecessary and just adds length. A practical combo: ask it to reason, then give the final answer in a clearly labelled, structured format.
Code Example
| 1 | |
| 2 | |
Analysts use chain-of-thought to make models show their working, which makes answers easier to trust and check.
- • Using chain-of-thought for trivial questions, which wastes tokens and time.
Give the model a word problem twice — once plainly, once with 'think step by step' — and compare the answers.
1. Chain-of-thought prompting helps most with...