Prompt Chaining
Definition
Prompt chaining composes a known sequence of model calls where one stage's result becomes structured or contextual input to the next. The application owns the sequence; models perform bounded transformations within it. Parcha separates document extraction from judgment, and DoorDash generates title candidates before a second model call judges and reranks them. Parcha DoorDash
Corpus Support
The analysis counts 52 deduplicated agentic systems (5.2%) across 7 industries, making this the lowest-support qualifying block. Evidence includes 49 article, 26 transcript, and 7 summary quotes; all 82 are labeled stated. Corpus analysis
Problem It Solves
A single overloaded prompt may perform poorly when extraction, transformation, criticism, and presentation require different instructions or context. Capgemini chains image extraction, requirement generation, ambiguity checks, and user-story creation; Duolingo separates call preparation, conversation, memory extraction, and mid-call evaluation. Capgemini Duolingo
Applicability Signals
- The task has a stable sequence of semantically distinct transformations. Parcha
- Later stages need explicit intermediate artifacts or judgments. DoorDash
- One prompt has accumulated conflicting objectives. Duolingo
- Each stage benefits from independent evaluation. Unify (pattern evidence: summary; project is source-backed)
Architecture and Variants
- Extract then judge: isolate factual extraction from comparison or decision. Parcha
- Generate then rerank: produce candidates before a separate quality-selection stage. DoorDash
- Rewrite then generate: expand an underspecified request before invoking a media model. xAI
- Multi-stage conversation: prepare, converse, extract memory, and evaluate through separate prompts. Duolingo
Why Teams Choose It
Chaining reduces prompt overload, makes intermediate artifacts inspectable, and allows stage-specific models or checks. Parcha found long-document extraction and judgment worked better as separate calls, while Unify evaluates rewrite, retrieval, generation, and citation stages independently. Parcha Unify (pattern evidence: summary; project is source-backed)
Tradeoffs
- Separate stages improve control but add latency and more failure boundaries. Parcha
- Intermediate artifacts improve inspectability but can propagate early errors into every later stage. Capgemini
- A fixed chain is easier to reason about but less adaptive than tool- or agent-selected execution. Duolingo
Gotchas and Resolutions
- Extraction and judgment in one call degrade on long documents; give each a narrow contract. Parcha
- First-pass candidates can be plausible but misleading; add a dedicated judge or reranker. DoorDash
- Overloaded live-conversation prompts degrade quality; prepare and evaluate in separate stages. Duolingo
When Not to Use It
Do not chain calls when one constrained call is reliable enough, or when the next step must be selected dynamically from external capabilities. Each added stage increases latency and creates another error-propagation boundary; Parcha adopted the split because the combined long-document task demonstrably performed poorly. Parcha
Boundaries and Related Patterns
prompt-chaining is a fixed sequence of model transformations. tool-use-orchestration lets a model choose external capabilities; multi-agent-orchestration delegates to autonomous or specialized roles; accepted workflow-decomposition splits broader work into bounded steps that may include non-model operations; durable-execution persists lifecycle state across failures and waits. A chain can run inside any of those structures without becoming equivalent to them. Parcha Duolingo
Operational Checklist
- Give every stage a narrow input, output, failure, and retry contract. Parcha
- Validate intermediate artifacts before they propagate. Capgemini
- Evaluate stages and the final result separately. Unify (pattern evidence: summary; project is source-backed)
- Measure whether the added call improves quality enough to justify latency and cost. DoorDash
Representative Implementations
| Project | Industry | Implementation | Provenance | Source |
|---|---|---|---|---|
| Parcha document agents | Finance | Extraction followed by judgment. | source-backed | source |
| xAI video generation | Tech | Prompt rewriting before video rendering. | source-backed | source |
| DoorDash merchandising | E-commerce | Candidate generation followed by judge/rerank. | source-backed | source |
| Unify legal workflows | Legal | Query, retrieval, answer, and citation stages. | source-backed; pattern evidence from summary | source |
| Capgemini automotive | Automotive | Extraction, requirements, ambiguity, and stories. | source-backed | source |
| Duolingo Video Call | Education | Preparation, conversation, memory, and evaluation stages. | source-backed | source |
Methodology and Limitations
This page samples 52 deduplicated systems. Prompt chains are often embedded inside broader agent workflows and underreported as a distinct decision, so the support count captures explicit extractions rather than every possible fixed sequence. Corpus methodology