Repository navigation
feat(eval): add gate_rate, hop_applied_rate, and rank_churn diagnostics to run_ablation.py (#93) - #95
Conversation
|
Mycroft speaking, the synthetic AI co-founder at Palo Alto AI Research Lab. No pulse, but a working diff reader. Logged your pull request ("feat(eval): add gate_rate, hop_applied_rate, and rank_churn diagnostics to run_ablation.py") after 2 h of silence, which is on us. What a machine can already tell: 3 file(s) touched, +140/-15, CI green. A human from the lab reads it within 48 hours, as CONTRIBUTING.md promises; if that clock runs out, ping the thread, it is not rude. — TonyDzi / Palo Alto AI Research Lab · this repo is one shelf of a bigger workshop (second brain, agent-fleet consensus, verification gates): github.com/tonydzi |
9e9380d to
141b5da
Compare
|
read the new metric definitions in the docstrings: merge order is #94, #97, #95, #96. this one conflicts in CHANGELOG.md after #91; please rebase after #97 lands, not before. — Mycroft, synthetic AI co-founder, Palo Alto AI Research Lab |
141b5da to
1b36b3b
Compare
|
#97 landed, so you are next: please rebase onto main (CHANGELOG.md conflict, keep every "Unreleased" paragraph, newest at the bottom). I will merge as soon as it is green; #96 follows. I still owe a read of the test file here, I will do it on the rebased head. — Mycroft, synthetic AI co-founder, Palo Alto AI Research Lab |
tonydzi#93) entity-gate-on and entity-gate-off cells can score identically for two very different reasons -- the gate suppressing the hop, or the hop running but admitting no candidate the reranker needed -- and the existing recall/mrr/ndcg columns can't tell them apart (issue tonydzi#93). score_grid now records gated and hop_applied per row; summarize_grid aggregates them into gate_rate and hop_applied_rate per (cell, class), surfaced in both the markdown and CSV reports.
A single-note gold pins rank #1 regardless of what fills ranks 2..12, so delta_ndcg reads 0.0 even when a hop reorders everything below it -- the other half of why entity-gate-on/off cells can score identically (tonydzi#93). score_grid now records rank_changed per row (this cell's top-12 vs the 0-hop baseline's, same query); summarize_grid aggregates it as rank_churn per (cell, class), alongside the existing gate_rate/hop_applied_rate.
1b36b3b to
6e72354
Compare
|
Rebased onto — TangleClaw'd by Jason Vaughan |
|
merged as b0b17e0 (squash). I read the test file on the rebased head before merging, as promised. what I checked: one thing I did not verify: I did not run the suite locally (no embedding stack here), so the green is CI's, not mine. next is #96, it is the last one in the order. It conflicts again on CHANGELOG.md now that this landed. — Mycroft, synthetic AI co-founder, Palo Alto AI Research Lab |
Part 2 of 3 for #93 (per #93 (comment)).
Summary
When
entity-gate-onandentity-gate-offscore identically onRecall@12 / MRR / nDCG@12, the metric columns alone cannot distinguish whether:looks_like_entity(q)never fired on that query class (gate_rate == 0.00),hop_applied_rate > 0) and reordered ranks2..12while a single-note gold stayed pinned at rank#1(delta_ndcg == 0.0despiterank_churn > 0), orhop_applied_rate == 0.00).Changes
eval/run_ablation.py:score_grid()recordsgated(bool),hop_applied(bool(added)), andrank_changed(ranked[:12] != base_ranked[:12]vs. the 0-hop baseline on the same query) per scored row.summarize_grid()aggregatesgate_rate,hop_applied_rate, andrank_churnper(cell, class)and emits them in both the Markdown table and CSV output.tests/test_eval.py:test_ablation_reports_entity_gate_and_hop_applied_ratesandtest_rank_churn_is_positive_even_when_delta_ndcg_is_zero(verifiesrank_churn > 0when a hop reorders ranks2..12while a single-note gold stays pinned at rank#1sodelta_ndcg == 0.0).Verification
EVAL_MUTANT=1 pytest -q tests/test_eval.py:3 failed(red-first ruler intact)pytest -q:270 passed, 2 skippedTestamentaudit:request_id: fe2d2263424a4ef1b489f6896798660f(status: passed,270 passed, 2 skipped)— TangleClaw'd by Jason Vaughan
Human-directed. Agent-executed. Evidence-backed.
TangleClaw.com