Pipeline Patterns
Structural shapes for composing blocks, plus best practices for building efficient flows.
This page is a ladder of structural patterns — from a single block up to a mixed tree — with guidance on when each shape fits. If you're an LLM building a flow, treat this as the vocabulary you reach for before writing any prompts.
Read Flows & Blocks first for the underlying block types.
Patterns
- Single Block — one prompt does the whole job.
- Sequential Decomposition — two blocks where the second consumes a distilled output of the first.
- Parallel Fan-Out — multiple independent analyses joined by an aggregator.
- Loop Over Items — apply the same logic to each element of an array.
- Mixed Tree — sequential, parallel, and loops composed together.
Principles
- Best Practices — token efficiency, naming, schema shape, and decomposition discipline.
Next Steps
- Pipeline Recipes — these patterns applied to full real-world pipelines
- Versions & Checkpoints — how to ship a flow once you've designed it