Chain of Thought (CoT): Breaking down complex problems for AI
Reading time: approx. 8 min
What you will learn
In this lesson, you will learn about Chain of Thought (CoT) prompting, a technique that significantly improves AI models' ability to reason by generating intermediate reasoning steps. This helps AI produce more accurate responses, especially on complex tasks that require multiple logical steps.
The basics
Traditionally, AI models can sometimes fail to solve mathematical problems or reasoning tasks correctly because they are trained on text and do not necessarily "understand" logic in the same way as humans. CoT prompting addresses this by asking AI to "think step by step".
Important aspects of CoT prompting:
- Intermediate steps: AI is prompted to explicitly generate the steps it takes to arrive at a solution
- Improved accuracy: By forcing AI to reason through the problem in small steps, the likelihood of a correct end result increases
- Interpretability: You can see AI's reasoning process, which is valuable for troubleshooting and understanding
- Combinable: CoT can be combined with few-shot prompting for even better results
Practical examples
Example 1: Mathematics - Problem solving with step-by-step guidance
A classic task where AI can often fail if not forced to reason.
Prompt (without CoT):
When I was 3 years old, my partner was 3 times my age. Now I am 20 years old. How old is my partner?
AI response (without CoT, often incorrect): 63 years old
Prompt (with CoT):
When I was 3 years old, my partner was 3 times my age. Now I am 20 years old. How old is my partner? Let's think step by step.
AI response (with CoT, correct):
- When I was 3 years old, my partner's age was 3 × 3 = 9 years
- Now I am 20 years old, which means 20 - 3 = 17 years have passed
- Since 17 years have passed for me, the same time has passed for my partner
- My partner's current age is therefore 9 + 17 = 26 years
Benefits: By instructing AI to present each step, the final answer becomes correct and you can follow AI's logic.
Example 2: Explain complex processes in biology
You want AI to explain cellular respiration and present the steps.
Prompt (with CoT):
Explain the process of cellular respiration step by step, focusing on what happens in each main phase.
AI output (example):
Glycolysis: This first step occurs in the cell's cytoplasm. The glucose molecule is broken down into two pyruvate molecules. The energy released is used to form two ATP molecules and two NADH molecules.
Pyruvate oxidation: If oxygen is available, the pyruvate molecules are transported into the mitochondrial matrix. Here each pyruvate molecule is converted to acetyl-CoA, whereby carbon dioxide and additional NADH are formed.
Citric acid cycle: Acetyl-CoA enters the citric acid cycle in the mitochondrial matrix. During this cycle, acetyl-CoA undergoes a series of reactions that release carbon dioxide and generate more NADH and FADH2.
Electron transport chain: This final step takes place in the inner membrane of the mitochondria. NADH and FADH2 donate electrons to a chain of protein complexes, which drives the synthesis of a large amount of ATP.
Benefits: The step-by-step explanation makes a complex process easier to understand for both you and your students.
Implementation in the classroom
Student aid: Teach students to use "Let's think step by step" when they encounter mathematical problems or complex questions.
Concept explanations: Use CoT to get AI to break down difficult concepts into manageable parts, which facilitates understanding.
Code generation: CoT can be used to generate code by breaking down a request into multiple steps, which are then mapped to specific lines of code.
Next steps
Chain of Thought is a fantastic technique for getting AI to reason. In the next lesson, we will build on this by getting AI to generate several different reasoning paths and then choose the most consistent answer.

