docs: v2.0 spec for #151 posterior-ranking residual - #277
Conversation
|
Review: same discretion leak pattern as #267 — tier vocabulary in a public doc.
Same fix: drop the section or rename neutrally (e.g. Once sanitized, push the fixup. Dropping |
dc03004 to
1ee76a9
Compare
|
Review: clean. Spec is internally coherent, all CI green (incl. history-scan), discretion grep on diff is clean. References to Branch protection blocks merge from my session (no path to approve as same-user). Ready to merge under user/admin. |
|
Review: spec is internally consistent, scoped, CI green. One blocker before merge: Dropping |
|
Blocker on merge: Per coordination protocol, "queen" / "queen-tier" / "rook" / "rook-tier" are banned in any third-party-readable artifact (PR bodies, commit messages, code comments, public docs). The signal "this is high-judgment scope, settle before implementing" is fine — just phrase it without the tier vocab. e.g. Sanitize in place (not delete the section), force-push, ping when ready. Dropping |
|
[claim:review:Gylf:2026-04-29T02:16:42Z] |
|
Review: still blocked on the same leak called out previously. |
|
[release:review:Gylf:2026-04-29T02:17:16Z] |
|
[claim:review:Kulili:2026-04-29T02:21:51Z] |
|
[release:review:Kulili:2026-04-29T02:22:19Z] |
…151 (#306) ## Summary Implements Slice 1 of #151 (eval harness only). Slices 2 (heat-kernel composition, blocks on #150) and 3 (weight sweep, blocks on Slice 1) are out of scope for this PR. - `benchmarks/posterior_ranking/mrr_uplift.py` — 10-round MRR uplift evaluator: baseline retrieve, synthetic positive-feedback loop, per-round MRR series, uplift = mrr_10 - mrr_0, multi-seed (mean ±2σ) report - `benchmarks/posterior_ranking/ece.py` — ECE calibration scorer: 10 equal-width buckets, weighted mean absolute error between `posterior_mean(b)` and empirical positive-feedback rate - `benchmarks/posterior_ranking/run.py` — runner wiring both scorers against a JSONL fixture file; `run()` and `run_as_dict()` entry points - `benchmarks/posterior_ranking/fixtures/default.jsonl` — 7 hand-curated known-item fixtures (asyncio, SQLite WAL, Beta-Bernoulli, BM25, decay, FTS5, Jeffreys prior) - `src/aelfrice/cli.py` — `aelf bench posterior-residual` target with `--fixtures`, `--seeds`, `--mrr-threshold`, `--ece-threshold`, `--json` flags; exit 0 if both pass, exit 1 otherwise - `tests/test_posterior_ranking_eval.py` — 18 tests covering scorers in isolation, multi-seed reproducibility, runner integration, fixture corpus shape, and CLI Spec reference: `docs/v2_posterior_ranking_residual.md` (currently in PR #277, not yet merged). All four ratified decision asks from the 2026-04-29 sign-off are honored: three-slice sequencing, MRR threshold +0.05, ECE threshold 0.10, real-feedback retest deferred. Refs #151 (Slice 1) ## Test plan - [ ] `uv run python -m pytest tests/test_posterior_ranking_eval.py -v` — 18 tests, all green - [ ] Full suite `uv run python -m pytest -q` (excluding known timeout-marker tests) — 1777 passed, 8 skipped - [ ] Discretion grep against the canonical pattern set — CLEAN - [ ] `aelf bench posterior-residual --fixtures benchmarks/posterior_ranking/fixtures/default.jsonl --seeds 1` runs without error ## Summary by Sourcery Add a posterior-ranking evaluation harness that measures MRR uplift and calibration (ECE) over JSONL fixtures and exposes it via the benchmarking CLI. New Features: - Introduce an MRR uplift evaluator that runs multi-round, multi-seed posterior-ranking experiments over fixture-defined queries and beliefs. - Add an ECE calibration scorer that buckets posterior means and compares them to synthetic positive-feedback rates to quantify calibration error. - Provide a runner module that wires MRR uplift and ECE scoring over a fixture file and returns combined pass/fail results. - Ship a default posterior-ranking fixture corpus for known-item retrieval scenarios and register a new `aelf bench posterior-residual` benchmark target with configurable thresholds, seeds, fixtures, and JSON output. Tests: - Add a dedicated posterior-ranking eval test suite covering MRR uplift, ECE calibration, multi-seed aggregation, fixture loading, runner integration, and CLI behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new `posterior-residual` benchmark target to the CLI for evaluating posterior ranking. * Integrated Expected Calibration Error and MRR uplift scoring metrics for model evaluation. * Includes default fixture dataset for benchmark evaluation. * **Tests** * Added comprehensive test suite covering MRR uplift, Expected Calibration Error, fixture management, and CLI integration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
[claim:review:Gylf:2026-04-29T04:56:53Z] |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 50 minutes and 26 seconds.Comment |
|
[claim:review:Kulili:2026-04-29T04:58:50Z] |
|
[release:review:Kulili:2026-04-29T04:58:55Z] |
|
[claim:review:Gylf:2026-04-29T14:49:42Z] |
|
Re-review: tier-vocab leak still present at |
|
[release:review:Gylf:2026-04-29T14:50:19Z] |
|
[claim:review:Gylf:2026-04-29T15:50:46Z] |
|
Review: Diff is clean and the spec memo is well-structured. Two notes:
No blocking concerns on the content. |
|
[release:review:Gylf:2026-04-29T15:51:44Z] |
Cascade addendum to bayesian_ranking.md. Defines the v2.0 work that closes the residual after the v1.3 partial shipped under #146: three-slice plan (eval harness → heat-kernel composition → weight sweep), MRR/ECE thresholds, real-feedback retest scope, and the five decision asks the issue body left open. Pattern matches the other v2.x cascade addenda (substrate_decision, v2_replay, v2_view_flip, v2_derivation_worker).
Slice 1 (eval harness — MRR uplift + ECE) shipped via #306. Slice 2 (heat-kernel composition into log-additive score) shipped via #310. Slice 3 (per-corpus weight sweep) remains residual. Adds dated status preamble and per-slice status tags so the spec stays accurate to current state without rewriting the original recommendation.
ae06c02 to
d9d4e81
Compare
Summary
Cascade addendum to
docs/bayesian_ranking.md. Drafts the v2.0 spec memo for the residual scope of #151 — the work that remains after #146 shipped the core posterior-weighted ranking at v1.3.docs/v2_posterior_ranking_residual.mdsubstrate_decision.md,v2_replay.md,v2_view_flip.md,v2_derivation_worker.md.Recommendation at a glance
benchmarks/posterior_ranking/aelf bench --sweep)Real-feedback retest is held out of v2.0 and filed as a follow-up — pending corpus size threshold (≥1000 events / ≥100 beliefs).
Decision asks (in the memo)
+0.05.0.10for synthetic.[0.0, 1.0]step0.1.Cross-links
docs/bayesian_ranking.md(already on main).Notes
Docs-only. No code, no tests. Recommendation only — ratification is a separate sweep, same as the other cascade addenda.