📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Prompt Engineering Chain-of-Thought Prompting

Chain-of-Thought Prompting

6 min read Quiz at the end
Chain-of-thought forces step-by-step reasoning, dramatically improving accuracy on math and logic tasks.

Chain-of-Thought (CoT) Prompting

CoT asks the model to reason step-by-step before answering, dramatically improving accuracy on complex tasks.

# Without CoT (wrong)
Q: A train travels 120km in 1.5 hours, then 80km in 1 hour.
   What is the average speed for the whole journey?
A: 100 km/h  (INCORRECT)

# With CoT (correct)
Q: [same question] Let's think step by step.
A: Step 1: Total distance = 120 + 80 = 200 km
   Step 2: Total time = 1.5 + 1 = 2.5 hours
   Step 3: Average speed = 200 / 2.5 = 80 km/h
   Answer: 80 km/h

# Zero-Shot CoT triggers:
'Let us think step by step.'
'Think through this carefully before answering.'
'Show your reasoning then give the final answer.'
'Walk me through the solution.'

# When CoT helps most:
# Math word problems
# Multi-step logic
# Commonsense reasoning
# Code debugging
Topic Quiz · 2 questions

Test your understanding before moving on

1. What phrase triggers Zero-Shot Chain-of-Thought?
💡 'Let us think step by step' triggers the model to reason through the problem before answering.
2. Chain-of-Thought prompting improves which type of tasks most?
💡 CoT most dramatically improves accuracy on math word problems and multi-step logical reasoning.