Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Prompt chaining

Topic: Agents

Definition

Splitting a task into a fixed sequence of model calls where each call works on the output of the previous one, with checks in between.

In more detail

Instead of one large prompt that outlines, drafts and translates a document, a chain runs three smaller calls, each with a focused prompt. You can add checks between steps, for example validating the outline before drafting, and stop early if a step fails.

Chaining trades a little latency for accuracy and debuggability, because each step is simple and its output can be inspected. Anthropic's guide to building effective agents lists it as the first of several workflow patterns, alongside routing, parallelisation, orchestrator-workers and evaluator-optimizer.

  • Agentic workflow

    A mostly predefined sequence of LLM calls and tool steps, where the developer fixes the path and the model fills in each step.

  • Evaluator-optimizer

    A loop where one model call writes an answer and another grades it against criteria, sending feedback until the answer passes.

  • Parallelisation (agent pattern)

    A workflow pattern that runs several model calls at once, on parts or copies of one task, and combines their outputs in code.

  • Routing (agent pattern)

    A workflow pattern where a first step classifies the input and sends it on to a specialised prompt, tool or model for that type.

  • Workflows vs agents: start with the simplest thing that works

    Most LLM features should be a fixed workflow, not an agent. How to tell which one you need, when an agent earns its cost, and the useful patterns in between.

    Article

  • Prompt engineering

    Writing clear, testable instructions for models and checking them on real inputs.

    SkillBeginner

  • Agentic workflow

    A mostly predefined sequence of LLM calls and tool steps, where the developer fixes the path and the model fills in each step.

    Glossary