Prompt Chaining
Definition
Breaking a task down into consecutive model steps.
Prompt chaining uses the result of one model call as input for another call, often with different subtasks.
Simply explained
Like an assembly line: each step processes the result of the previous one.
Why it matters in practice
Complex processes can be reviewed more transparently and improved more precisely.
Example from business
A hypothetical process extracts data, checks mandatory fields, and then formulates a summary.
Limits and pitfalls
- Errors can propagate; additional calls increase runtime and costs.
Origin & history
The pattern combines workflow orchestration with language model calls.
Use in mid-sized companies
- Define input and output formats as well as termination conditions for each stage.
Frequently asked questions
Is a longer chain always better?
No, unnecessary steps create additional points of failure.
Sources
Editorially reviewed on: