Intermediate Prompting·Lesson 14

Chain-of-Thought Prompting

Make AI show its reasoning step-by-step for better accuracy on complex problems.

Course progress14 / 29

What is Chain-of-Thought?

Chain-of-thought (CoT) prompting asks the AI to show its reasoning process step by step before giving a final answer. This dramatically improves accuracy on math, logic, analysis, and complex reasoning tasks.

Simple addition: "Think step by step" or "Show your reasoning" at the end of a prompt.

Without CoT: "What's 15% of 847?" → Often gives wrong answer directly
With CoT: "What's 15% of 847? Think step by step." → Shows: 10% of 847 = 84.7, 5% = 42.35, total = 127.05

When to Use Chain-of-Thought

CoT is most valuable for:
- Math problems — Any calculation more complex than basic arithmetic

- Logic puzzles — "If A, then B. Given C, what follows?"

- Analysis — "Evaluate this business plan" (forces structured thinking)

- Debugging — "Find the bug in this code" (forces line-by-line review)

- Decision-making — "Should we choose option A or B?" (forces weighing pros/cons)

CoT is less useful for creative tasks, simple lookups, or format conversions.

Practice This

Give ChatGPT a word problem without chain-of-thought, then the same problem with "Think step by step" added. Compare accuracy. Try: "A store has 3 boxes with 12 items each. If 20% of items are defective, how many non-defective items are there?"

Try this on ChatGPT, Claude, or Gemini

Key Takeaways
  • Chain-of-thought forces the AI to reason step by step
  • Dramatically improves accuracy on math, logic, and analysis
  • As simple as adding "Think step by step" to your prompt
  • Most valuable for complex reasoning, least valuable for creative tasks

Test Yourself

Q1How do you activate chain-of-thought prompting?
Add "Think step by step" or "Show your reasoning" to your prompt. For more control, you can also provide a step-by-step example of the reasoning process you want.