AI Agent Design Patterns: Prompt Chaining, Routing, Orchestrator-Workers and More

The core patterns for building LLM systems: prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer and autonomous agents.

Published December 1, 2026

Most successful LLM applications are not single giant prompts or fully autonomous agents. They are compositions of a few simple patterns. Knowing these patterns lets you pick the least complex design that solves your problem and add autonomy only where it pays off.

The concept

The patterns sit on a spectrum from predictable to flexible. At one end, prompt chaining runs fixed steps in sequence. Routing classifies an input and sends it down a specialised path. Parallelization runs independent calls at once, either splitting work (sectioning) or asking the same question several times and aggregating (voting).

Further along, an orchestrator model breaks a task into subtasks at runtime and delegates them to worker calls. An evaluator-optimizer loop has one call generate and another critique until quality criteria are met. At the far end, a fully autonomous agent decides everything itself. Each step right adds flexibility and adds cost, latency and unpredictability.

The patterns

PatternHow it worksUse when
Prompt chainingStep A output feeds step B, with checks betweenTask splits into clear fixed stages
RoutingClassify input, dispatch to specialised prompt/modelDistinct input types need different handling
ParallelizationRun subtasks or votes concurrently, then combineIndependent work or need for confidence
Orchestrator-workersPlanner creates subtasks dynamically for workersSubtasks not known in advance
Evaluator-optimizerGenerate, critique, refine in a loopClear quality criteria exist
Autonomous agentModel plans and acts with tools until doneOpen-ended tasks with good feedback signals

Routing

Support ticketRouterclassify intentBilling promptsmall fast modelTechnical promptlarge model + docsRefund flowworkflow + approvalHumanlow confidence
Routing sends each input to the cheapest path that can handle it.

Orchestrator-workers

OrchestratorWorker AWorker BSynthesiserplan subtasksresearch API changesfind affected filesfindingsfile listcombined plan
An orchestrator creating and delegating subtasks at runtime.

Practical examples

Prompt chain with a gate

Check intermediate output before continuing.

outline = llm("Write an outline for a blog post about: " + topic)
if not passes_outline_checks(outline):          # e.g. has 4-8 sections, mentions keywords
    outline = llm("Fix this outline: ...\n" + outline)
draft = llm("Write the post following this outline:\n" + outline)

Parallel voting for a risky classification

Ask several times and require agreement.

import asyncio
votes = await asyncio.gather(*[llm_async(f"Is this content policy-violating? Answer YES or NO.\n{text}") for _ in range(3)])
flagged = sum(v.strip().upper().startswith("YES") for v in votes) >= 2

Evaluator-optimizer loop

Stop when the critic is satisfied or after N rounds.

draft = llm(task)
for _ in range(3):
    critique = llm(f"Critique against the rubric. Reply PASS if it meets all criteria.\n{rubric}\n{draft}")
    if critique.startswith("PASS"): break
    draft = llm(f"Improve the draft using this critique:\n{critique}\n\n{draft}")

Common mistakes

  • Starting with a multi-agent framework before trying a single well-designed prompt.
  • Chaining without validation, so early errors cascade.
  • Evaluator loops with no stopping condition.
  • Routing everything to the most expensive model.

Key takeaways

  • Most LLM apps are compositions of a few simple patterns.
  • Move from chaining to agents only as task flexibility demands it.
  • Add gates, budgets and stopping conditions to every loop.
  • Route to cheaper models where quality allows.

FAQ

Is multi-agent always better?

No. Multiple agents add coordination overhead and failure modes. Use them when subtasks are genuinely independent or need different context.

Which pattern is most common in production?

Prompt chaining and routing, because they are predictable, testable and cheap.

Can patterns be combined?

Yes. A router might send complex requests to an orchestrator whose workers use evaluator loops.

More AI articles