Beyond the Prompt

Module 2 — Prompt Engineering

Lesson 5: Chain of Thought and Prompt Chaining

Last updated: 2026-10-09

Chain of thought makes the model reason step by step. Prompt chaining splits a complex job into separate prompts you can debug independently.

Lesson 5: Chain of Thought and Prompt Chaining

Blackboard

Think step by step, build step by step

10 min
Concept 1

Chain of thought

Chain of thought prompting asks the model to reason step by step before giving a final answer. Adding 'let's think step by step' to a prompt can measurably improve accuracy on reasoning tasks. It is one of the most popular techniques in production AI systems.

Concept 2

Prompt chaining separates steps

Instead of one long prompt with multiple instructions, you break the task into a chain: prompt 1 extracts key issues, its output feeds into prompt 2 which drafts an outline, which feeds into prompt 3 which writes the final response. Each link does one thing.

Concept 3

Chaining enables debugging

The biggest advantage of chaining is not performance — it is control. If the final email is bad, you can check each intermediate step and find exactly where the chain broke. With a single prompt, everything is mixed together and you cannot trace the failure.

Concept 4

The latency trade-off

Chains add latency because each step waits for the previous one. For real-time applications like search, short chains or single prompts may be necessary. For slower workflows like report generation, the debugging advantage of chaining usually wins.

Pause and Think

Think of a task that requires multiple steps. What would go wrong if you tried to do it all in one prompt?

Flashcards

Key Terms

Click or press Enter to flip a card. Review these before the practice question.

Additional Resources
Practice Question

A customer support email workflow produces poor results. You want to find out which step is failing. What approach helps most?

Does not count for certificate
Choose one answer, use the hint if needed, then check your answer.
Use the hint before checking if you need a nudge.