LLM Routing in Production: Balancing Cost and Quality with Model Cascades
A practical guide to LLM routing for ML engineers: building an embedding-based classifier router that adds under 15ms latency, generating training labels via model-agreement scoring with an LLM judge, implementing a cascade router that tries the cheap model first and escalates on low confidence, calibrating the routing threshold empirically from a quality-cost tradeoff curve, tracking cost savings versus counterfactual all-expensive routing, and deciding between a trained classifier versus cascade based on query distribution stability and labelling budget.