PrepGenAICerts

The Five Workflow Composition Patterns

Core

Decide between a workflow and an agent architecture · Difficulty 2/5

0%
prompt-chainingroutingparallelizationorchestrator-workersevaluator-optimizer

Explanation

The Five Patterns

PatternStructureFits
Prompt chainingA fixed sequence of steps, each an LLM call on the previous output, optionally with programmatic "gate" checks between stepsTasks that decompose cleanly into known, ordered subtasks
RoutingClassify an input, then direct it to a specialized follow-up prompt or modelInputs that fall into distinct categories needing different handling
ParallelizationRun subtasks concurrently: sectioning (split into independent parts, known in advance) or voting (run the same task multiple times and aggregate)Independent subtasks, or tasks that benefit from redundancy/consensus
Orchestrator-workersA central LLM dynamically breaks a task into subtasks at runtime and delegates to worker LLMsTasks whose subtask breakdown can't be fully known in advance -- this is where a workflow starts to shade into an agent
Evaluator-optimizerOne LLM generates, another critiques, and the result is sent back to improveTasks where a generate-then-critique loop measurably improves quality

All five patterns are still workflows: the code path that wires the LLM calls together is fixed, even though the content of each call is generated dynamically. The exception that blurs the line is orchestrator-workers, where the subtask breakdown itself is decided at runtime by the LLM rather than fixed by the developer in advance.

Choosing Among Them

Match the pattern to the task's shape: a strictly ordered pipeline calls for chaining; distinct input categories call for routing; independent, parallelizable work calls for sectioning or voting; a task whose subtasks can't be enumerated ahead of time calls for orchestrator-workers; and a task with a clear quality bar that benefits from iteration calls for evaluator-optimizer.

Common exam traps

  • Confusing orchestrator-workers (subtasks decided dynamically at runtime) with parallelization sectioning (subtasks known in advance and split up front). The dividing line is *who decides the subtasks and when* -- a developer at design time (sectioning) or the LLM at run time (orchestrator-workers).
  • Treating any multi-step LLM pipeline as automatically "an agent" just because it has several stages -- prompt chaining, routing, and parallelization are all still workflows with a fixed code path.

Key Takeaways

  • Prompt chaining = fixed sequence of LLM calls, optionally gated between steps
  • Routing = classify then dispatch to a specialized prompt/model
  • Parallelization = sectioning (independent parts known in advance) or voting (repeat and aggregate)
  • Orchestrator-workers = a central LLM decides subtasks dynamically at runtime and delegates them -- the pattern closest to an agent
  • Evaluator-optimizer = one LLM generates, another critiques, and the loop repeats to improve quality

Glossary Terms

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.