ModelRefs / Prompt Chaining — AI Glossary
Prompt Chaining — AI Glossary
Passing the output of one LLM call as input to the next, breaking complex tasks into sequential steps. Error propagation is the main risk.
Overview
Prompt chaining enables tasks too long or complex for a single prompt: translate → summarize → classify. Each step can use a different model, temperature, or output parser. Error propagation is the main risk.
Reference details
| Topic | prompting |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
How it works
- The sequence is written in code, so the same steps run in the same order on every input.
- Each step gets its own prompt and may use a different model, temperature or output parser, which is what allows a cheap model on an easy step.
- The output of one step is parsed into structured form before the next receives it, since passing raw prose forward propagates formatting noise as well as content.
- A failing step is handled locally — retry, fall back, or abort — rather than being discovered at the end of the chain.
- Errors compound multiplicatively down the chain, which is why per-step reliability matters more than the number of steps feels like it should.
Example: Why per-step reliability compounds
A four-step chain with each step correct 95% of the time ends correct 0.95⁴ ≈ 81% of the time — a 19% failure rate from steps that each look reliable. Raise each step to 99% and the chain reaches 0.99⁴ ≈ 96%. Adding a fifth step at 95% instead drops it to about 77%. The arithmetic argues for fewer, more reliable steps rather than finer decomposition, which is the opposite of the instinct that smaller steps are safer.
Commonly confused with
A chain is fixed: you decided the steps in advance and the sequence runs the same way every time. An agent chooses its next step at runtime. The distinction is worth holding because a chain is testable end to end and its cost is knowable before it runs, and most tasks described as needing an agent are chains that have not been written down yet.
When to use it
Reach for it when:
- The task decomposes the same way every time and the steps can be fixed in code.
- Different steps genuinely warrant different models or settings.
- A failure must be attributable to a stage rather than to the whole run.
Reach for something else when:
- The right sequence depends on what earlier steps discover, which needs an agent.
- A single call handles it, where chaining adds latency and compounding failure for nothing.
- Steps cannot be made individually reliable, since the product of their rates sets the ceiling.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Prompt Chaining — AI Glossary.
Frequently asked questions
What is Prompt Chaining?
Passing the output of one LLM call as input to the next, breaking complex tasks into sequential steps.
What concepts are related to Prompt Chaining?
Closely related concepts include agent workflow, prompt engineering.