92.6% routing accuracy, up from 88.2%
85.3% of queries routed at zero API cost
0.922 F1 on the 1,000-case eval

Overview

Most LLM applications send every query to the most expensive model available, including “hi” and “what is 2+2”. The dollar cost is obvious; the latency cost is the one people miss.

This system decides per query through a three-layer cascade. It was evaluated on 1,500 labeled cases across two eval sets, and on the 1,000-case set it reaches 92.6% routing accuracy at a 14.7% cascade rate.

The three layers

Feature engineering

The router does not vectorize the raw query. Each query is first rewritten into a tag-augmented string: length bands (LEN_SHORT at ≤8 words, LEN_MEDIUM, LEN_LONG above 40), a code-presence flag, and related signals. Explicit categorical features are what let a model as small as TF-IDF plus logistic regression reach 92.6%: the hard part of the decision is encoded, not learned.

Personalization on both paths

Measured results

Stack

Next: Agentic Research Assistant
Multi-agent research loop with memory that survives across sessions
All projects
The full set, thirteen projects across agents, vision, and full-stack