405 requests
Any korean bbq spots within 1 mile that are after 6 PM and mid-range.
{
"maximum_distance_miles": 1.0,
"open_after": "18:00",
"price_levels": ["$$"],
"query": "korean bbq"
}
Restaurant Text → JSON
A router selected that traffic at 95.6% precision and ran it on-device. The remaining requests used the stronger fallback.
The demo turns ordinary restaurant-search text into one JSON object: query, price levels, opening time, and maximum distance. A response only counts as correct when all four fields match the target.
The 1,000-request fixture deliberately mixes straightforward, ambiguous, and adversarial language. More than half the requests require some interpretation rather than direct field copying.
These are real fixture rows and their exact expected outputs.
Any korean bbq spots within 1 mile that are after 6 PM and mid-range.
{
"maximum_distance_miles": 1.0,
"open_after": "18:00",
"price_levels": ["$$"],
"query": "korean bbq"
}
cheap ethiopian food walking distance late night.
{
"maximum_distance_miles": 0.5,
"open_after": null,
"price_levels": ["$", "$$"],
"query": "ethiopian food"
}
I need cheap dumplings near me open past midnight but ignore anything too touristy.
{
"maximum_distance_miles": null,
"open_after": "00:00",
"price_levels": ["$", "$$"],
"query": "dumplings"
}
The 1.5B model is fast but only produces the exact JSON 52% of the time. The 3B model reaches 64%, but takes 76% longer on the hot path and still misses more than one request in three.
The useful question is not which model wins globally. It is which requests each cheaper model can handle reliably enough to avoid the stronger, more expensive fallback.
Routing is a sequence of checkpoints. The router starts with the raw request, then lets the candidate smaller model process the prompt. At prefill, before the first output token, it reads the model's hidden states and next-token logits. If more evidence is needed, it can inspect those signals again after the model generates 1, 2, 4, or 8 tokens.
How to read AUROC: it measures whether the routing signal ranks requests the smaller model will answer correctly above requests it will miss, across all possible routing thresholds. A score of 0.50 is chance and 1.00 is perfect separation. At 0.84, the prefill signal ranks the correct request as safer about 84% of the time when comparing one correct and one incorrect example.
Prefill raises routing AUROC from 0.70 to 0.84. Reading model state during the first eight generated tokens adds a smaller gain. A full verifier reaches 0.88, but takes more than three seconds, so most of the useful routing signal is available before the response is done.
Discovery used 500 requests to choose a policy. We fixed its rules and thresholds, then ran it once across 9,500 unseen requests with no further tuning.
Of the requests sent to the smaller model, 1,556 produced the correct JSON and 72 did not. The remaining 7,872 requests used the stronger fallback. We executed the smaller-model path on-device, where those accepted requests incur effectively zero recurring inference cost.
The chart compares two different routing strategies. They differ in what evidence the router can inspect, when it makes the decision, and how many smaller-model pathways it can choose from.
These points come from separate validation runs, so this is a comparison of routing strategies rather than a controlled sweep of one threshold. The prefill router achieved more than six times the small-model coverage at 1.8 percentage points lower precision.
This case study does not show that one smaller model can replace a stronger model for every request. It shows that a router can find a reliable region inside a real workload: roughly one request in six moved to a faster, cheaper model, while uncertain requests kept the stronger path.
That is the point of discovery: measure the competence boundary, compile it into a conservative router, and re-run the search as the workload, models, prices, and hardware change. The same smaller models can run through our cloud or on-device; on-device execution turns the per-request infrastructure cost for accepted traffic into effectively zero.