Skip to content
Back to course

4.5 Chain-of-Thought Prompting

Chain-of-thought prompting means asking the model to reason step by step before giving a final answer. Instead of just "What is the answer?", you add "Let's think step by step" or "Show your reasoning first." Breaking a problem into steps often makes the model's answers more accurate, especially for maths, logic, and multi-step tasks.

promptAI
An LLM can be guided to show intermediate reasoning steps before its final answer.

For example: "A shop sells 3 injera for 25 birr. How much for 12 injera? Think step by step." The model will work out the price of one injera first, then multiply — and is less likely to make a careless mistake than if it tried to answer in one jump.

Scenario

You give the model a word problem with several steps and it keeps getting the wrong total. What should you try?

Check your understanding

1/4 · 40 XP

What does chain-of-thought prompting ask the model to do?