17. Prompt Chaining
Chapter 17 of 25 · 15 min
Prompt chaining connects sequential model calls where each step's output becomes the next step's input. The chain structure addresses problems too complex for single prompts while enabling intermediate verification points.
EXERCISE
Design a three-step chain for summarizing legal documents: (1) extract key terms and dates, (2) categorize clauses by type, (3) generate plain-language summary. Implement in code and test with one legal document, tracing where format inconsistencies appear.