Thinking Step-by-Step
LLMs often struggle with complex logic or math if they try to answer immediately. Chain of Thought (CoT) prompting forces the model to break down the problem.
The Magic Phrase
"Let's think step by step."
Comparison
โ Standard Prompt
Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many does he have now?
A: The answer is 11.
(Model might guess wrong)
โ CoT Prompt
Q: [Same Question]. Let's think step by step.
A: Roger started with 5 balls.
2 cans ร 3 balls/can = 6 balls.
5 + 6 = 11.
The answer is 11.
When to Use CoT
- Math and logic problems
- Multi-step reasoning
- Code debugging
- Complex analysis
๐ Key Takeaway: For complex problems, always ask the model to "think step by step" or "show your reasoning."