Workflowscore
Routing
Classify the input, then send it to a specialised prompt, model or pipeline.
What it is and why it exists
A router (rules, a classifier or a small LLM) decides the category — refund vs bug vs sales, easy vs hard — so each path can be optimised. Routing by difficulty to a cheaper model is one of the biggest cost levers.
Quick prototype
if 'refund' in text: …
In production, at scale
A small model or fine-tuned classifier with confidence scores, a fallback route for low confidence, router accuracy measured on labelled traffic, and per-route metrics.
Vendors and tools
| Semantic Router / RouteLLM | Routing libraries |
|---|---|
| Not Diamond / Martian | Model routing services |
On AWS: Bedrock Intelligent Prompt Routing between models in a family.
How it fails
- Misroutes nobody measures
- Router as slow and expensive as the model it saves
What the interviewer asks next
How do you evaluate a router?
Labelled inputs → confusion matrix per route, plus the downstream effect: quality and cost per route, and what misroutes cost.