Definition

Prompt chaining breaks a task into multiple model calls, passing the output from one step as input into a later prompt. Each step uses its own instructions. The application or orchestration layer controls the sequence and can check or modify an intermediate result before passing it to the next step.

These calls can use the same model or different models. Their input and output dependencies form the chain.

Simple example

Suppose an application turns incident notes into a status update. The first prompt asks a model to extract the affected service and confirmed recovery actions, including supporting excerpts. The second prompt takes that extraction and asks a model to write a short customer update.

If the extraction lists the wrong service, the final update can repeat that error. The application can check the extracted service against the incident record before running the second step.

Why it matters

Using separate prompts lets you inspect intermediate results and change one step without rewriting the entire task. In the incident example, you can evaluate the extraction separately from the update wording.

Use chaining when a task has clear dependent steps and you need an intermediate check. Avoid extra calls if a single prompt already meets your quality needs. Each dependent call adds latency, and passing intermediate text into another model call can increase token cost.

One important nuance

A predefined chain uses steps chosen by the application. In an agent loop, the model helps choose the next action based on the goal and observed results, within runtime constraints. An agent can use a prompt chain for part of its work. These mechanisms can coexist.

Prompt chaining passes results between separate model calls. Chain-of-thought refers to intermediate reasoning steps generated by a model. These steps may be visible or hidden, depending on the model and runtime.