Routing & Composition

Mixture of Experts Routing

Route each request to one or more domain-expert agents, where each expert holds deep capability in a narrow area.

Problem

A generalist agent ends up shallow in every domain: it knows enough legal language to sound competent but misses important distinctions a tax specialist would catch, and the same is true on the medical side. Users in specialist domains feel under-served and the team cannot improve any one domain without bloating the shared prompt with material that hurts the others. Adding more general examples does not fix the depth problem because the model is forced to flatten its expertise across the whole surface.

Solution

Define experts (specialised system prompts, tool palettes, possibly fine-tuned models). A router classifies queries by domain. Route to one expert (top-1) or to multiple experts whose outputs are aggregated. Distinct from standard routing by emphasising deep specialisation per expert.

When to use

  • Users in specialist domains feel under-served by a generalist agent.
  • Domain experts can be defined with their own prompts, tools, or fine-tuned models.
  • A router can classify queries by domain reliably enough to dispatch.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related