Repository navigation
Description
Overview
The shipped routing eval (scripts/eval/fixtures/routing.ts) cannot see one third of Stage 1's decision surface, and two of its 15 scenario labels are arguable. Both found while measuring something else; both would matter regardless.
1. No route_multi coverage at all
Stage 1 offers exactly three tools — route_query, route_clarify, route_multi (routing.rs:154, stage1_tool_definitions). The fixture's expectation model has three kinds, and none of them is multi:
5 kind: "clarify"
6 kind: "search" ─┐ both mean route_query at Stage 1
7 kind: "skill" ─┘
Verified: zero occurrences of route_multi or "multi" in the fixture. So the eval scores two of the three routing outcomes and is structurally blind to the third.
That matters more than a coverage percentage suggests. route_multi is the outcome with the most prose devoted to steering it away from the other two — its tool description carries "Do NOT use this for a single intent, however it's phrased, and do NOT use this in place of route_clarify when a single intent is itself ambiguous", and STAGE1_SYSTEM_PROMPT adds "ONLY if the request contains two or more distinct, unambiguous things to do — not one thing phrased at length." Two separate guard clauses exist because it is the easy outcome to over-select. Nothing measures whether they work.
A regression that made the model split single intents into multi would pass this eval cleanly today.
2. Two scenario labels are arguable
Neither is obviously wrong, but both are worth a deliberate decision rather than inheritance.
out-of-scope-weather — "What's the weather like in Tokyo today?", labelled clarify.
This request is perfectly clear. It is not ambiguous; it is out of scope — NodeSpace cannot answer it at all. The router has no "decline" channel, so refusal is currently expressed through route_clarify, and the fixture encodes that workaround as the correct answer. That conflates two different judgments ("I cannot tell what you mean" vs "I understand you and cannot help") under one label, and it means a model that correctly identifies the request as clear-but-unanswerable is scored wrong.
Either the label is right and the conflation should be documented as intentional, or Stage 1 is missing a decline outcome. Worth deciding.
clarification-then-fallthrough — "just show me what I have", labelled search, sits oddly beside ambiguous-manage-projects — "help me manage my projects", labelled clarify. The first is arguably the vaguer of the two, yet it is the one expected to resolve rather than clarify. The scenario id suggests the intent is to test the fall-through path rather than the initial judgment, but as scored it reads as an inconsistency.
Why file this now
Found while running a decision-model probe against these 15 scenarios as ground truth. The probe's result is irrelevant here — what it exposed is that the fixture's own coverage and labelling have gaps that affect any measurement taken against it, including the locked model's own routing accuracy.
Note also that collapsing skill and search into route_query (correct for Stage-1 purposes — Stage 1 decides describability; skill-vs-search is Stage 2's job) makes the distribution 11 query / 4 clarify. Any Stage-1 accuracy figure from this fixture is therefore measured against a 73.3% constant-answer baseline, which is worth stating whenever such a figure is quoted.
Acceptance Criteria
- The expectation model covers
route_multi, and scenarios exercise it — including at least one negative case (a single intent phrased at length, which must NOT route multi) since that is what the guard clauses defend against - A decision is recorded on
out-of-scope-weather: either the clarify-as-decline conflation is intentional and documented, or Stage 1 needs a distinct decline outcome -
clarification-then-fallthroughvsambiguous-manage-projectsis either justified in a comment or relabelled - The fixture header states the constant-answer baseline for its own distribution, so an accuracy figure cannot be read as better than it is
- Tests pass (
bun run test:all), code passesbun run quality:fix
Technical Specifications
Reference Files
scripts/eval/fixtures/routing.ts— the 15 scenarios and theExpectedOutcomeunion that has no multi variantpackages/agent/src/local_agent/routing.rs:154—stage1_tool_definitions, the three tools actually offeredpackages/agent/src/local_agent/agent_loop.rs:60—STAGE1_SYSTEM_PROMPTand its multi guardpackages/agent/src/local_agent/routing.rs:243—parse_route_decision, which already rejects aroute_multicarrying fewer than 2 queries; that rejection path is also unmeasured
Related
- ADR-038 — the two-stage routing design; its Risks section names the routing eval as "the Set up Tauri + Svelte project structure #1 regression guard", which is the reason a blind third of the surface is worth closing
Activity
malibio commentedon Sep 23, 2026
Frontend baseline: 262 files / 5264 tests passed
malibio commentedon Sep 23, 2026
out-of-scope-weather: take option 1, but assert on the turn outcome rather than the Stage-1 toolOption 1 is the right call. Its stated expectation needs one correction before it is built, and there is a prior decision that makes this a labelling error rather than a missing capability.
ADR-038 already covers this case
ADR-038's clarification contract:
A weather question routing to search, matching nothing above the score bar, and the model answering "I have nothing about that" is already the designed behaviour. Nothing is missing from the architecture. What is wrong is that the fixture labels that path
clarify, so a model doing exactly what the ADR specifies scores as failing.That reframes the fix: this is correcting a label against an existing contract, not adding a capability.
The correction to option 1's expectation
Option 1 says "Stage 1 is expected to route_query (the request can be described)." Do not assert that.
Two reasons:
route_queryfor an out-of-scope request is a routing choice that could legitimately change — a future improvement that recognised the request as unanswerable earlier would break a test that was measuring the wrong thing.So the
declineexpectation should assert on turn outcome:route_clarify— the request is not ambiguous, and asking "did you mean X or Y?" about the Tokyo weather is the failure this scenario exists to catchStage 1's tool choice stays unasserted.
Against option 3 (a fourth
route_declinetool)Two independent arguments, and I would not pursue it without new evidence against both.
It asks the model to make a distinction a purpose-built classifier cannot. A fourth outcome requires separating "I cannot describe this" from "I can describe it and we cannot help." Round 3's measurement (see #2825) found a 421M encoder trained for typed decisions had no rank signal at all on the closely-related ambiguity axis — AUC 0.36-0.57 against chance 0.50, and zero
route_clarifypredictions across 66 calls in three configurations. That is not evidence Gemma would fail at this specific split, but it is evidence the axis is harder than it looks.It contradicts ADR-038's own scaling argument. That ADR's core claim is that enumeration degrades small-model selection as option count grows. Stage 1 is currently a 3-way choice measured against a 73.3% constant-answer baseline on the shipped fixture; adding a fourth option is as likely to make routing worse as better, and nothing currently measures the regression it would cause — which is the other half of this issue.
If it is ever revisited, it needs its own issue and route_multi coverage landing first, so the regression is visible.
On option 2
Cheapest, and better than option 3 — but it leaves the defect in place. A model that correctly reads the request as clear-but-unanswerable still scores wrong, which means the eval penalises the correct behaviour. That is the shape of thing that later gets "fixed" by making the model worse, and it is worth 20 minutes to avoid.
Summary
declineasserting turn outcome, not Stage-1 tool choicemalibio commentedon Sep 23, 2026
Post-merge routing eval run: failing scenarios
Run conditions:
gemma-4-e4b-q4km, n_ctx 32768, eval commitb0be6446(clean tree), 3 reps. The run used a separate test daemon (NODESPACE_HOME) whose database was purged and restarted between reps.Overall:
multi-task-and-searchandmulti-schema-and-search: Stage 1 returnedmulti, and the turn acted on both intents.single-intent-long-taskandsingle-intent-long-search: Stage 1 returnedquery.multi_rejectednever appeared.out-of-scope-weather: Stage 1 returnedquery, the turn made no tool call, and it declined.The failures below were already in the fixture before this change. Stage 1 returned
queryin every one of them. None involveroute_multi.indirect-schema-money-owedindirect-schema-freelanceinstance-not-schema-invoicecreate_nodes_from_markdown: an import error in rep 1 and a stray node in rep 2. Rep 3 failed on invalidsearch_nodesarguments.clarification-then-fallthroughclarify_suppressedguard never sees it.ambiguous-client-contactsPattern:
clarification-then-fallthroughis a contract gap. The at-most-one-clarification rule only holds when the second clarification goes throughroute_clarify.Results file:
/tmp/nodespaced-2877/routing-e4b.json(local, not persisted).