Elffuss BraidHub

utopia-ia/elffuss public

perf(mmr): off by default — measured at zero contribution, twice

MMR earned its place with +2.4 points. That was before the elastic window
and before the word splitter was fixed. Re-measured across 3 projects and
8 seeds:

    budget  3,000    94.9% with MMR    94.9% without
    budget 16,000   100.0% with MMR   100.0% without

It still changes the output in a third of requests and never once changes
the outcome. On the dialogue benchmark it fires and decides nothing there
either.

The cause is upstream: the elastic window only admits relevant material
now, and the fixed splitter finds more of it, so a diversity penalty has
nothing left to arbitrate.

A mechanism that justified itself with a number, stopped justifying
itself when something above it changed, and nobody re-checked. That is
the fifth time today the same shape has turned up, and the first time in
our own code.

Kept behind the flag rather than deleted: the day it earns its keep
again, the evidence should be a measurement and not a memory. It also
stops doing per-request work that decides nothing.
Changesetf25b8a5d72bf52c7f095180a9d395e111e59d2acbea6085b2fb677219a4f1e49
AuthorKikoCis <kikocisneros@gmail.com> · 2026-08-09 16:58 +02:00
CommitterKikoCis <kikocisneros@gmail.com> · 2026-08-09 16:58 +02:00
Parents7668ad741842

Browse the files at this changeset

2 files changed

modified core/context.js +5 −1
@@ -614,13 +614,17 @@
614614 // is the only thing that measures above plain BM25 — and not by much:
615615 // +2.4 points at full scale. A 3-seed smoke test said +8.9 and that was
616616 // seed noise; the header carries the honest figure.
617+ // MMR is off: measured at zero contribution on both benchmarks (94.9% with
618+ // and without at a 3,000 budget, 100.0% and 100.0% at 16,000). It earned its
619+ // +2.4 before the elastic window and the splitter fix; those removed its job.
620+ const MMR_ON = false;
617621 const lambda = Math.max(0.15, Math.min(0.8, 2 * measureRedundancy(pool)));
618622 const nCand = Math.max(400, Math.min(8000, Math.round(budgetTokens / 6)));
619623 const cand = pool.slice(0, nCand);
620624 const tok = new Map(cand.map(it => [idOf(it), simTokens(it.line)]));
621625 const maxSim = new Map(cand.map(it => [idOf(it), 0]));
622626 const byId = new Map(cand.map(it => [idOf(it), it]));
623- const remaining = new Set(cand.map(idOf));
627+ const remaining = new Set(MMR_ON ? cand.map(idOf) : []);
624628 while (remaining.size && used < budgetTokens) {
625629 let best = null, bestVal = -Infinity;
626630 for (const id of remaining) {
added max +0 −0