Chaining and routing
By the end: Apply prompt chaining and routing, and say which problems each fits.
Two of the most useful patterns are not agents at all. Both are workflows, both are cheaper and more predictable than an agent, and between them they cover a great deal of real work.
Chaining breaks a task into fixed steps, each feeding the next. Draft, then critique, then revise. Extract fields, then validate them, then format. Each call gets a smaller, clearer job than the whole task would be, which raises accuracy on every one. You can put a check between steps — a gate that stops the chain if the intermediate result is wrong — which is much harder to do inside a single call.
Routing classifies the input first, then sends it down a path built for that class. Refund requests get the refund prompt and the refund tools; technical questions get the docs and a different tone. Routing lets each path be specialised without every path paying for the others, and it lets you send easy classes to a cheaper model.
- Route: classify the ticket into billing, shipping, technical or other.
- Chain (shipping): fetch the order → fetch tracking → draft a reply → check the draft names a real tracking number.
- Neither step needed autonomy: the shape was known before the ticket arrived.

