Glossary
What is prompt chaining?
In short
Prompt chaining is a way to split a complex task for an AI model into several requests in a row, where the answer from one step becomes the input of the next.
Prompts · prompt chaining
MMOOZZGG.com editorsChecked: 1 min read
For a child
When a class makes a wall newspaper, the work is shared: one child writes a story, a second checks the spelling, a third draws a picture for the finished text. Each does a small part and passes the sheet on. People do the same with a smart program: they cut a big task into small steps, give them one by one, and take what came out of one step into the next.
In plain words
One long request like “read the contract, find the risks, rate them, and write a letter to the lawyer” often gives a shallow result: the model tries to do everything at once. It is safer to split the work. The first request only lists the liability clauses from the contract. The second gets this list and rates each clause. The third writes the letter from these ratings. Each step is simpler and easy to check on its own: if the letter comes out strange, you can see at which stage the error happened. It works like an assembly line in a factory, where each station has its own operation.
For business
Such chains are needed when AI runs a multi-step process: sorting an incoming request, preparing a sales proposal, checking a supplier’s documents. Each stage can be logged, rated, and handed to a person when needed, so the process is easy to control. Simple stages can go to a cheap model and complex ones to a powerful one, which lowers the token bill. The downsides: there are more calls, the answer comes later, and a miss at the first stage spoils all the next ones. So checks of format and rules sit between the stages. AI agents are built from such chains, and they usually start on one process before they spread to a whole department.
For a specialist
Prompt chaining is a composition of several language model calls, where the output of one call, sometimes after processing in code, goes into the input of the next. Wu, Terry, and Cai (2021) described a set of basic operations for such designs (AI Chains). In a study with 20 participants, they showed that chains improve the quality of the result, and users see and control the model’s work more clearly. The participants tested single links as modules (unit testing) and compared other strategies by their effects. The Anthropic guide notes that with adaptive thinking and subagents, the model solves many multi-step tasks by itself. Explicit splitting into a series of API calls is needed when you must check intermediate results or fix the pipeline structure. The most common pattern is self-correction: a draft, a rating against criteria, and a revision. The links usually exchange structured output, such as JSON. Unlike an agent, the order of steps here is set in code in advance and is not chosen by the model during the work.
Example
A request handling service first asks the model to extract the product, quantity, and dates from a customer’s email as a table. Then a program checks the table against warehouse stock, and a third request writes the customer a reply with the shipping date.
Related terms
Questions and answers
Sources
Where companies use it
Not sure whether your company needs this?
AI solutions map