AI
AI Certified
Professional AI Certification
Get Started
39lesson.complete • 7/18
Courses›AI Prompt Engineer›Advanced Techniques
📖 Advanced Techniques

Chain-of-Thought and Step-by-Step Reasoning

⏱ 12 min·Lesson 7 of 18FREE

Chain-of-Thought and Step-by-Step Reasoning

The Power of Explicit Reasoning

Large language models produce dramatically better results on complex tasks when they reason through problems step-by-step rather than jumping directly to answers. This technique — Chain-of-Thought (CoT) prompting — was formalized in a 2022 Google Brain paper and has since become one of the most impactful prompting techniques discovered.

The intuition: just as humans solve hard problems by "thinking out loud," models produce more accurate outputs when forced to show their work.

Zero-Shot Chain-of-Thought

Simply append "Let's think step by step." to almost any reasoning prompt:

code
Problem: A retailer buys widgets for $8 each and sells them for $15. 
They sold 340 widgets this month and had $1,200 in overhead costs. 
What was their net profit?

Without CoT: "$1,380" (possibly wrong)
With CoT: "Let's think step by step.
1. Revenue: 340 × $15 = $5,100
2. Cost of goods: 340 × $8 = $2,720
3. Gross profit: $5,100 - $2,720 = $2,380
4. Net profit: $2,380 - $1,200 = $1,180
The net profit was $1,180."

This simple addition has been shown to improve accuracy by 10-40% on math and logical reasoning benchmarks.

Structured CoT Templates

For consistent results, specify the reasoning structure:

code
Analyze this business decision using the following framework:
1. **Situation**: What is the current state?
2. **Complications**: What problems or tensions exist?
3. **Question**: What decision needs to be made?
4. **Analysis**: What are the key considerations?
5. **Recommendation**: What should be done and why?

When CoT Helps Most

CoT provides the greatest benefit for:

  • Multi-step math problems
  • Logical reasoning and deduction
  • Complex planning tasks
  • Causal analysis
  • Code debugging

CoT provides less benefit for:

  • Simple factual recall
  • Single-step tasks
  • Tasks requiring creativity over logic

CoT with Self-Verification

Ask the model to verify its own reasoning:

code
Solve this problem step by step. After reaching your answer, 
check your work by solving it a different way or plugging your answer back in.

The Scratchpad Pattern

Give the model explicit space to reason:

code
<scratchpad>
Use this space to think through the problem before giving your final answer.
</scratchpad>

<answer>
Your final, concise answer here.
</answer>

Chain-of-thought prompting is one of the highest-ROI techniques in your toolkit — it costs only a few extra tokens but can dramatically improve reasoning quality.

🎓

Enjoyed this lesson?

Unlock all 18 lessons for a one-time payment.

Get Full Access — £29 →