AI Workflow Patterns

AI Workflow Patterns

Key jargon

Term Plain-language meaning
Prompt chain A sequence where one model output becomes a later step's input.
Routing Classifying a request and sending it to a specialized path.
Parallelization Running independent subtasks concurrently.
Evaluator-optimizer A loop in which one component critiques and another revises against a stopping rule.

Key concepts

Concept map

flowchart LR
    A["Decompose job"] --> B["Select chain route or parallel pattern"]
    B --> C["Evaluate intermediate artifacts"]
    C --> D["Join and deliver"]
Pattern Use Main risk
Prompt chain Decompose staged transformations Early errors propagate
Router Select specialist/model/tool Misrouting and hidden fallback
Parallel fan-out Independent research or candidate generation Duplicate work and costly synthesis
Evaluator–optimizer Draft and revise against a rubric Evaluator shares the same blind spots
Orchestrator–workers Dynamic task decomposition Unbounded work and conflicting outputs
Map–reduce Process many documents then aggregate Lost cross-document relationships
Human gate Approve risky transition Approval fatigue or vague preview

Design method

For each node define input schema, output schema, owner, model/tool, timeout, retry rule, evidence, and transition condition.

Dumpster lesson

The prompt-chaining research intake found a useful principle: structured intermediate artifacts make failures localizable. Treat the paper’s reported scores as author claims, not universal proof.

Exercise

Design a three-stage research digest: cluster evidence, synthesize each cluster, then reconcile claims. Specify how a failed cluster is represented.