Prompt Chaining
Passing the output of one model call as the input to a subsequent call to complete complex tasks.
Full Definition
Prompt chaining decomposes a complex task into sequential steps, where each step is handled by a separate model call and the output is passed forward as input to the next. This breaks tasks too large or complex for a single prompt into manageable pieces, enables specialisation (each step can use a different system prompt or model), and makes the pipeline easier to debug — you can inspect and correct outputs between steps. Chaining is foundational to agentic workflows and is used in document summarisation pipelines, multi-stage data extraction, and content generation systems.
Examples
Step 1: extract key facts from a long document → Step 2: draft a report from those facts → Step 3: edit the draft for tone.
Step 1: classify a customer email by intent → Step 2: route to the correct response template → Step 3: personalise the template using the customer's name and history.
Apply this in your prompts
PromptItIn automatically uses techniques like Prompt Chaining to build better prompts for you.
You might also like