The Learning Router ← sugeerth.github.io

The measurement

Where it wins, and where it doesn't

One number on a landing page is marketing. This is the dial that produced it: move it and the comparison re-runs, including into the regime where the router's advantage disappears entirely.

learning router —
last-write-wins —
never adapts —
ceiling —

 

The sweep

Every consistency level, end to end. The gap is widest where people are genuinely torn and closes to nothing as they become predictable — which is the honest shape of the result, not a caveat buried under it.

Accuracy of each policy as the simulated user becomes more consistent.

Sweeping…

What is being measured

Each trial is 600 asks. The first 100 are unscored warm-up, so neither policy is credited for the period it spends learning — and the router spends part of that period deliberately silent, which would otherwise flatter it.

On every ask the simulated user has a composition they want. A policy "matches" when the axes it opened on are the ones the user wanted, meaning they did not have to touch a slider. That is the thing worth maximizing: not a reward number, but how often the tool was already right.

policywhat it doeswhy it is here
learning router Estimates which composition the user settles on for asks like this one. The thing being tested.
last-write-wins Reopens on whatever they took last in this domain. Not a strawman — this is literally what profile.prefs() did before.
never adapts Always opens on the app default, Guided / Standard. The do-nothing floor. If a policy cannot beat this, it is costing you code for nothing.
ceiling Always offers the user's single most common setting. Unbeatable by construction, because the user is inconsistent. It bounds how much is even available to win.
Read the sweep honestly

At the far right the user always wants the same thing, and last-write-wins gets it right after one observation — there is nothing left to learn, so the gap closes. Every adaptive policy has that regime. The claim is not "always better"; it is "better exactly where people are actually inconsistent", which is most of the time.

Reproduce it

This page and the repository's test are the same experiment. The test is the one that gates CI, and it fails if the gap ever closes at the default setting — so the layer has to keep earning its place:

git clone https://github.com/sugeerth/prompt-agents
cd prompt-agents
node tests/router-eval.js

  last-write-wins (what profile.js does): 61.3%
  learning router:                        66.7%
  ceiling (always offer the mode):        72.5%
  per-seed gap:  6.4, 3.4, 5.6, 5.8, 3.8, 6.4, 5.8, 6.0
  ok: the router opens on the right composition more often than
      last-write-wins, on every one of 8 seeds (8/8)

The assertion is per-seed rather than on the mean, because a mean can be carried by one lucky seed.