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 cost of that is obvious; the latency cost is the one people miss.

This system decides per query, through a three-layer cascade, and was evaluated on 1,500 labeled cases across two eval sets.

The three layers

Feature engineering

The router does not embed the raw query. Each query is rewritten into a tag-augmented string before vectorization: length bands (LEN_SHORT at ≤8 words, LEN_MEDIUM, LEN_LONG above 40), a code-presence flag, and related signals. Giving the linear model explicit categorical features is what lets something as small as TF-IDF plus logistic regression hold 92.6%: the hard part of the decision is encoded rather than 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