CSE Roadmap

Core tier · about 4 hours · 12 parts

Part 2 of 12 · 3 min read

A router can't say yes to a ticket that needs two specialists

Sending a request to exactly one specialist is cheap right up until the request needed two.

Think of a receptionist who sends every visitor to exactly one department. That is fine when each visitor has one need. But a visitor who needs both billing and legal help is stuck the moment they're routed to just one desk.

In plain words: an orchestration shape is the structure that decides which agent acts next and what it sees. A router is a shape where a classifier sends the whole task to exactly one agent. This works well when every request truly belongs to one domain. It fails completely on any request that needs more than one, because there is structurally no way for a single specialist's answer to cover a second domain it was never shown.

A worked example. On the module's ticket task (each ticket needs one or two of billing, tech, legal), routing scores 0.76 accuracy on single-domain tickets. That beats a single generalist agent's 0.70 on the same tickets, because a specialist in its own domain (0.85 accuracy) beats a generalist (0.70). But on tickets needing two domains, routing scores exactly 0.00: a route sends the ticket to one specialist, who can at best resolve the one domain they received, never both.

The key lines. From code/mini-shapes/shapes.py:

# from code/mini-shapes/shapes.py
def route(r, p, need):
    pick = need[0] if r.random() < p.router_acc else r.choice([d for d in DOMAINS if d != need[0]])
    ok = len(need) == 1 and pick == need[0] and r.random() < p.spec_acc      # a routed ticket gets one specialist: composites cannot be completed, a wrong route is wrong
    t = (p.system + p.ticket + 20) + (p.system + p.ticket + p.brief)
    return {"ok": ok, "calls": 2, "tokens": t, "path": 2, "capped": False, "loop": False}

Read it as: the ok condition starts with len(need) == 1. A two-domain ticket is marked wrong before the routing accuracy or the specialist's own accuracy are even checked. The shape itself cannot produce a correct outcome for a request it can only send to one place.

Orchestration shape, workflow pattern, autonomous pattern, router

An orchestration shape is the structure that decides which agent acts next and what it sees. A workflow pattern fixes the path in code (sequential, conditional, parallel). An autonomous pattern lets agents choose the path at run time (plan-based orchestration, handoff, group chat). A router classifies the task and sends it to one agent.

Example: routing is a conditional workflow pattern. The path, meaning which specialist gets the ticket, is decided by a classifier. But the classifier's decision itself, not the developer's code, is what autonomy exists here. The 0.00 score on two-domain tickets is what happens when that one decision is structurally incapable of covering the whole task.