Skip to the page
Tecyfy

Agents interview question · medium

What are the common workflow patterns for LLM systems, and when would you pick each over a full agent?

The short answerAnthropic's "Building effective agents" names five workflow patterns, where your code decides the steps: prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer.

The full answer

Anthropic's "Building effective agents" names five workflow patterns, where your code decides the steps: prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer. A full agent lets the model decide its own steps. Pick a workflow when you can draw the steps in advance. Pick an agent only when you cannot, because agents cost more, are slower and are harder to test.

The five patterns

PatternHow it worksGood for
Prompt chainingEach call works on the previous call's output, with checks in code between stepsTasks that split into fixed stages: outline, check, then write
RoutingA first step classifies the input and sends it to a specialised prompt or modelMixed traffic: refunds, technical questions and complaints each get their own prompt; easy questions go to a smaller model
ParallelizationIndependent calls run at once. Sectioning splits a task into parts; voting runs the same task several timesChecking a text for several issues at once; more confident answers by majority
Orchestrator-workersA central model breaks the task down at run time, hands parts to workers, and combines their resultsTasks whose subtasks cannot be known in advance, such as changes across many files
Evaluator-optimizerOne call writes, another grades against clear criteria, and they loopTranslation or writing where feedback measurably improves the result

When an agent is the right answer

An agent is a model using tools in a loop, deciding the next step from each result. It fits open-ended problems where the number and order of steps cannot be fixed: debugging, research, work across a codebase. It needs a sandbox, limits and good tools, because its path changes every run.

How to choose in practice

  1. Try a single well-written call, with retrieval or a few examples.
  2. If quality is not enough, add structure your code controls: a chain, a router, or a parallel step.
  3. Move to an agent only for the part of the task that truly needs open-ended steps, and measure that it beats the workflow on your evaluation set.

Why interviewers ask this

Many teams build an agentic workflow or a multi-agent system where a router and two prompts would do. Showing you know the simpler patterns, and when each pays, signals that you will build systems that are cheaper, faster and easier to debug.

A concrete example

A support assistant: a router sends billing questions to a prompt with billing documents and tools, and general questions to a smaller model. Long replies go through an evaluator step that checks tone and policy. Only the "investigate this account issue" path is a real agent, with read-only tools and a turn limit.

Last updated 16 October 2026

Sources

Where each fact comes from

  1. 1Building effective agents