03. Pipeline Topology — stage by stage, no shortcuts¶
~10 min read. When work flows in one direction. Each agent transforms and passes forward.
Built on the ELI5 in 00-eli5.md. The org chart — who talks to whom — takes its simplest linear form here. Each department finishes before the next one starts.
1) The picture — a clean assembly line¶
Look. First fix the picture. Then discuss the trade-off.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Research │──→ │ Writer │──→ │ Reviewer │──→ │Publisher │
│ (dept 1) │ │ (dept 2) │ │ (dept 3) │ │ (dept 4) │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
▲ ▲ ▲ ▲
gate 1 gate 2 gate 3 gate 4
See. This is the org chart in its straightest shape. One department finishes its step, then passes forward. The next department waits for the finished packet. Each stage has a clear input shape and output shape. The handoff between stages is the only communication channel. No backward arrows. No skipping. No side chats. If stage 2 wants more detail, the design still says no. That restraint is the whole point of a pipeline.
Research may output facts, citations, and confidence. Writing may output a draft, key claims, and open questions. Review may output defects, approvals, and release notes. Publisher may output a final URL, metadata, and audit logs. That repeated packet shape is the memo format. When the memo format stays clean, each gate stays clear. When the shape becomes messy, the whole line slows down.
2) What makes pipelines powerful¶
Pipelines are boring in a good way. Managers like them because the path is visible. Stakeholders like them because responsibility is visible. Simple, no?
- Very understandable — easy to explain to non-technical stakeholders.
- Natural checkpoint and approval gates — place human review between any two stages.
- Easy to benchmark stage-level quality — isolate where problems start.
- Clear done conditions per stage — each gate has pass or fail.
- Easy to swap one stage without touching others.
Now connect that back to the handoff. If the incoming packet is complete, the stage can stay narrow. If the outgoing packet is clean, the next team starts faster. A legal reviewer can sit between review and publish. A human editor can stop release at gate 3. Because the gates are explicit, governance becomes simple. That is why pipelines reward disciplined the memo format design. They turn fuzzy teamwork into inspectable packets.
3) What makes pipelines fragile¶
Now the other side. A clean line is not a clever line.
- Sequential latency — 4 stages at 3 seconds each means 12 seconds minimum.
- Early mistakes propagate — wrong research poisons writing, review, and publish.
- Rigidity — if writing needs a follow-up, the pipeline says no.
- Backtracking is expensive — you restart from the broken stage.
Users feel that latency very quickly. Teams feel the rigidity during edge cases. A pipeline protects clarity by refusing dialogue. That can be wise. That can also be costly. If stage 1 sends a weak handoff, every later gate works harder. Bad upstream packets create fake downstream productivity. The line looks busy while quality keeps falling. So what to do? Use pipelines when order is real, not decorative.
4) Worked example — latency and error propagation¶
Take a four-stage pipeline. Each stage takes 2.5 seconds. So latency is fully sequential.
- Stage 1 time = 2.5 s
- Stage 2 time = 2.5 s
- Stage 3 time = 2.5 s
- Stage 4 time = 2.5 s
Total latency = 2.5 + 2.5 + 2.5 + 2.5 = 10.0 seconds. There is no shortcut here. If the user waits for the full answer, the user feels all 10 seconds.
Now do reliability. Assume per-stage accuracy is:
- Stage 1 accuracy = 0.95
- Stage 2 accuracy = 0.92
- Stage 3 accuracy = 0.90
- Stage 4 accuracy = 0.95
Multiply stage by stage.
- After stage 1 and stage 2: 0.95 × 0.92 = 0.874
- After stage 3: 0.874 × 0.90 = 0.7866
- After stage 4: 0.7866 × 0.95 = 0.74727
So end-to-end accuracy = 0.74727. Round it to 0.747, or about 74.7%. See the compounding effect. Each stage looked strong alone. The whole line is weaker together.
Now add a validation gate after stage 1. Assume stage 1 fails 5% of the time. That bad research rate is:
- Stage 1 failure rate = 1 - 0.95 = 0.05
Assume the validation gate catches 80% of those bad cases. So caught bad research is:
- Caught bad research = 0.05 × 0.80 = 0.04
Assume caught bad research is fixed before stage 2 starts. Then effective stage 1 accuracy becomes:
- Effective stage 1 accuracy = 0.95 + 0.04 = 0.99
Now multiply again.
- After corrected stage 1 and stage 2: 0.99 × 0.92 = 0.9108
- After stage 3: 0.9108 × 0.90 = 0.81972
- After stage 4: 0.81972 × 0.95 = 0.778734
New end-to-end accuracy = 0.778734. Round it to 0.779, or about 77.9%. Improvement = 0.778734 - 0.74727 = 0.031464. That is about 3.15 percentage points better. One early gate improves the whole line. This is why stage-1 validation is often worth money. If the gate adds 0.5 seconds, total latency becomes 10.5 seconds. So quality rises, but latency also rises. That is the pipeline trade.
5) Pipeline vs orchestrator — the decision¶
When should you keep the straight line? When should you bring back a CEO? Use this table.
| Dimension | Pipeline | Orchestrator-worker |
|---|---|---|
| Control | Distributed across stages | Centralized in CEO |
| Latency | Sequential, predictable | Can parallelize independent tasks |
| Debugging | Easy — check each gate | Harder — must inspect CEO logic |
| Backtracking | Expensive | CEO can re-route |
| Best for | Stable ordered workflows | Dynamic task routing |
Now read the table carefully. A pipeline is simpler to explain. An orchestrator is simpler to adapt. If the order is fixed by policy, use the line. If routing depends on intermediate results, use the CEO. Pipelines love good the memo format design. Bad the handoff choices ruin pipelines fast. That is the key insight.
Where this lives in the wild¶
- Guidewire ClaimCenter at insurance carriers — a claims operations lead expects intake → extract → validate → decision → notify in strict order.
- GitHub Actions or GitLab CI — a release engineer expects lint → build → test → deploy, with each stage gating the next.
- YouTube moderation tooling — a trust and safety analyst expects classify → flag → human review → action, with no skipping.
- Epic-based medical billing flows — a revenue-cycle manager expects OCR → structure → code → bill because regulatory order matters.
- Digital onboarding at banks like Revolut — a risk operations manager expects identity verify → credit check → account create → welcome.
Pause and recall¶
- Why does a pipeline forbid backward arrows, even when that feels inefficient?
- Which stage should usually get the strongest validation gate, and why?
- Why does clean the memo format design matter more in pipelines than in free-form collaboration?
- When does sequential clarity stop helping and start hurting the user experience?
Interview Q&A¶
Q1. Why choose a pipeline over an orchestrator-worker design for a regulated workflow? A. Choose a pipeline when order is fixed, evidence must be auditable, and each gate needs a clear pass rule. Common wrong answer to avoid: "Pipelines are always better because they are simpler."
Q2. Why is stage-level benchmarking easier in pipelines than in peer-to-peer agent systems? A. Pipelines expose one handoff per gate, so you can isolate where defects first appear. Common wrong answer to avoid: "Because pipelines use smaller models."
Q3. Why is early-stage validation often worth more than late-stage review? A. Early errors poison every downstream stage, so catching them early improves the whole line. Common wrong answer to avoid: "Because late review is unnecessary once you trust the system."
Q4. Why not force every multi-agent problem into a pipeline? A. Some tasks need follow-up questions, rerouting, or parallel branches, and a rigid line blocks that flexibility. Common wrong answer to avoid: "You can just add more stages and pipelines become fully dynamic."
Apply now (5 min)¶
Exercise. Pick one workflow you already know well. It can be CI/CD, onboarding, claims, moderation, or billing. Rewrite it as a four-stage pipeline. For each stage, write the input, the output, and the gate rule. Then mark one place where a human should approve.
Sketch from memory.
stage 1: ________ input: ________ output: ________
stage 2: ________ input: ________ output: ________
stage 3: ________ input: ________ output: ________
stage 4: ________ input: ________ output: ________
strongest gate: ________
why here: ________
Bridge. Pipelines flow forward. But sometimes the problem is not sequence — it is confidence. You want two answers, then pick the better one. That is the debate pattern. Disagreement as a feature, not a bug. → 04-debate-critique.md