passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 023/032 easy

A team building a customer-support system feeds every incoming user message into a single LLM call that first classifies whether the message is a billing question, a technical support question, or a general inquiry, and then, based on that classification, forwards the message to a separate, specialized prompt written specifically for that category. Which Anthropic 'Building Effective Agents' workflow pattern does this describe, and why is it a good fit here?

  1. Routing -- classifying the input and directing it to a specialized downstream prompt, which fits because the three query types are reliably distinguishable and each benefits from a prompt written specifically for it, avoiding one generalized prompt trying to handle every case well
  2. Prompt chaining -- decomposing a task into a fixed sequence of subtasks that always run one after another, which fits because every support message needs the same sequence of steps regardless of category
  3. Evaluator-optimizer -- having a second LLM call critique and iteratively improve the first call's output, which fits because the classification itself needs repeated revision before it is trusted
  4. Orchestrator-workers -- a lead LLM call dynamically deciding how many parallel worker calls a task needs, which fits because the number of specialized prompts required varies from message to message
Next card → Shuffle