What is 'prompt chaining' and when is it a useful architectural pattern?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Prompt chaining pipelines complex work: Claude writes an outline → that outline feeds the next call to expand each section → that draft goes to a third call for editing. Each step is focused and reliable.
Full explanation below image
Full Explanation
Prompt chaining (also called LLM pipelines or agentic workflows) decomposes complex tasks into sequential Claude API calls where each step's output feeds into the next. Benefits: each step can be focused and optimized independently, errors can be caught between steps, intermediate outputs can be validated or modified, and the overall quality often exceeds a single massive prompt. Example: document analysis pipeline: (1) extract key entities → (2) classify entities → (3) generate summary incorporating entity analysis. Option A describes parallel multi-model inference. Option C describes multi-turn conversation. Option D is nonsensical.