Inference and generation

Prompt chaining

stable definition

Definition

Prompt chaining connects multiple model calls so the output of one stage becomes input or context for the next.

Distinguish it from nearby terms

A single long prompt asks one call to do everything; an agent loop may dynamically choose actions, while a chain usually follows predefined stages.

Check your understanding

Identify each stage's contract and how errors are detected before they propagate.