fix(proficiency): exposure-bias fix + backlog fold — empirical-Bayes scoring, pooled peer_rate, exploration live #62
Reference in New Issue
Block a user
Delete Branch "exploration-bias-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Landing the FINAL plan
plans/proficiency-exposure-bias-and-exploration.md(exposure bias #1 + self-sealing exclusions #2). Reconciliation confirmed most of §6 had already shipped independently; this branch adds the one un-landed code fix and executes the irreversible backlog spend.This branch
fix(proficiency): peer_rate is the sample-weighted pooled rate per plan §2recompute_categorywas taking the unweighted mean of per-model outcome rates, letting a 1-sample 100% model dominate the category prior as much as a 95-sample 81% model. NowΣ(n·rate)/Σnover the trafficked set (the §2 contract formula).debuggingprior un-distorts by 0.18.Already landed on main (reconciled, not re-implemented)
proficiency.outcome_score/outcome_samples,route_decisions.request_id/exploration(both live-DB-migrated).proficiency.expected_success_rate+"outcome_prior"/"outcome_blended"sources,proficiency_store.proficiency_outcome.add_outcome/recompute_category,leaderboardrecompute hook.feedback.py: client outcomes →add_outcome;FAILURE_VERDICTS = ("failed",)(structural/local_llm are diagnostics-only).exploration.choosewired after rank, before flex;exploration:block enabled: true in config.yaml.data-model.md,routing.md,admin-portal.md, newadmin/frontend/proficiency.html(already rendersoutcome_blended/outcome_prior).Executed (DB mutations, backed up first)
router.dbbacked up to/tmp/opencode/router-pre-fold-20260908.db(33MB, integrity ok) before the fold.python -m feedbackfolded 1,139 client-outcome samples across 31 (model, category) cells through the newadd_outcomepath. 0 rows unapplied post-fold.kimi-k2.7-code/coding_general0.746 over 460 samples;deepseek-v4-flash/debugging0.701 over 42).z-ai/glm-5.3-flash,nemotron...:free) is now ingested, so only the behavior (not the absolutes) transfers.Not done (hard constraint respected)
feedback.pywas NOT run against the backlog until the scoring fix was implemented AND tested — the exact failure the plan exists to prevent.config/config.local.yamluntouched (gitignored, unrecoverable).Follow-up for the operator
systemctl --user restart llm-router.service, non-/routetraffic) to pick up the pooled fix; the fold data is already in place and routing picks it up on the next recompute.baseline_report.pyweekly; watchdeepseek-v4-flash/tool_use_agentic(explorer now feeds it).