Module 3: Advanced techniques and accuracy · 9 min
Step-by-step reasoning
For maths, logic or planning, ask the model to work in steps before giving the final answer. This is called chain-of-thought prompting. Writing out the steps gives the model room to avoid simple mistakes.
A shop sells pens at 45 rupees each. I buy 7 pens and pay with a 500 rupee note.
Work step by step, then give the change on the last line as 'Change: <amount>'.
Newer 'reasoning' models do much of this on their own. Even so, asking for a short plan or for the steps to be shown makes the answer easier for you to check.
← Control the format and length | Iterate and chain prompts →