Skip to main content

Pipeline

Tasks are decomposed into a fixed, linear sequence of steps. The output of step N becomes the input of step N+1. Each step can have its own prompt, model, tools, or validation logic. The sequence is determined at design time, not runtime.

Anthropic calls this prompt chaining and recommends it as the starting point before moving to agentic patterns.


Structure

Gates between steps validate intermediate output. If validation fails, the step retries or the pipeline halts with a clear error. Each step is independently testable.


How It Works

  1. Define steps — each step has a clear input, output, and responsibility
  2. Chain outputs — step N's output is formatted as step N+1's input
  3. Gate between steps — validate intermediate results before continuing
  4. Fail fast — if a gate fails, stop early rather than propagating bad data
  5. No branching — the path is linear and deterministic

Key Characteristics

  • Predictable — same input always follows the same path
  • Debuggable — inspect any step's input/output independently
  • Composable — steps can be reused across different pipelines
  • No dynamic routing — the sequence is fixed at design time
  • Latency adds up — total time = sum of all steps (sequential execution)

When to Use

  • The task naturally decomposes into sequential phases (extract → transform → generate)
  • Each step is simple enough for a single LLM call
  • You need deterministic, reproducible workflows
  • Intermediate validation is important (gates between steps)
  • You're starting out and want the simplest multi-step pattern before going agentic