Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder

AI agent glossary

Prompt chaining

Splitting a task into a fixed sequence of model calls, where each call's output becomes input to the next, often with checks in between.

Some tasks are too much for one prompt but follow a predictable order. Prompt chaining breaks them into steps: outline, then draft, then edit; or extract facts, then check them, then write a summary. Each call has a narrow job, which makes it easier to get right.

Because the steps are known in advance, a prompt chain is a workflow rather than an agent. Your code controls the order. You can add programmatic gates between steps, such as validating that the outline has the right sections before drafting begins.

Chaining trades latency and cost for quality and debuggability. Each extra call adds time, but when something goes wrong you can see exactly which step failed and improve that prompt alone.

Example

A blog workflow makes three calls: one turns rough notes into an outline, one writes a draft from the approved outline, and one edits the draft against the style guide.

Learn more in the course

Related terms

Go from definitions to doing

Learn to use and build AI agents in 65 practical lessons.