FU-5 — retrieval eval harness + halacha backlog visibility (#63) #18
Reference in New Issue
Block a user
Delete Branch "feat/fu5-eval-harness-backlog-visibility"
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?
FU-5 — eval harness + נראות backlog (#63)
מכסה GAP-11 (INV-RET4/G8) ו-GAP-14 (INV-QA1/G10). איכות-האחזור מעולם לא נמדדה (רק telemetry), ו-backlog אישור-ההלכות היה סמוי.
יחידה B — נראות backlog (pure-code, container)
metrics.halacha_backlog(conn)→{pending_review, approved, rejected, published, total, oldest_pending_at}, נחשף ב-get_dashboard(כליget_metrics) וב-/api/system/diagnostics. הספירה החיה חשפה 178 pending מתוך 1552, הישן מ-3.5.2026 — היה בלתי-נראה.יחידה A — eval harness (סקריפטים host-side)
scripts/eval_gold_bootstrap.py— מזריעdata/eval/gold-set.jsonl. שני מקורות:citations(cited==relevant; ריק עד שייצברו ציטוטים) ו-known_item(query=שם-תיק → relevant=עצמו; אות אמיתי, המתודולוגיה ש-#52 בדק ידנית). Idempotent; שומר שורותsource=chair.scripts/eval_retrieval.py— מריץ את מסלול-האחזור בייצור על ה-gold-set; precision@k, recall@k, MRR, nDCG@k (k=5,10); overall + per-corpus + per-PA; דוח + delta מולbaseline.json(שמתעדretrieval_config).--self-testבודק את המתמטיקה offline.אסטרטגיית gold-set = היברידי (החלטת-יו"ר): bootstrap + סקירת-דפנה. מקור הציטוטים ריק היום (0 ציטוטים בהחלטות), לכן ה-seed הוא known-item (77 שאילתות: 54 internal + 23 precedent). ה-gold-set provisional עד סקירת דפנה (שער-הדומיין).
baseline (קונפיג ייצור: multimodal+rerank)
R@10=0.987 · MRR=0.837 · nDCG@10=0.872.ממצאים: (1)
MULTIMODAL_ENABLED=trueמוריד קלות known-item recall — תוצאות עמוד-תמונה דוחקות התאמת-שם מדויקת (רלוונטי ל-#15). (2)precedent_libraryחלש מ-internal (R@10 0.957 מול 1.0) — תקדים חיצוני אחד לא נמצא לפי שמו."שער-CI" במשמעת: harness re-runnable + baseline מגורסת + "הרץ לפני/אחרי כל שינוי שכבת-אחזור" — האחזור דורש DB-ייצור+Voyage, אין CI runner עם גישה.
ספֵק:
docs/superpowers/specs/2026-05-31-fu5-eval-harness-design.md🤖 Generated with Claude Code
Covers GAP-11 (INV-RET4/G8) and GAP-14 (INV-QA1/G10). Retrieval quality was never measured (only telemetry observation) and the halacha review backlog was invisible (the 10/19 gap was found by accident). Unit B — backlog visibility (pure code, container): - metrics.halacha_backlog(conn) → {pending_review, approved, rejected, published, total, oldest_pending_at}; surfaced in metrics.get_dashboard() (get_metrics MCP tool) and /api/system/diagnostics. Live count revealed 178 pending / 1552 total, oldest from 2026-05-03 — previously invisible. Unit A — retrieval eval harness (host-side scripts): - scripts/eval_gold_bootstrap.py — seeds data/eval/gold-set.jsonl. Two sources: citations (cited==relevant via search_relevance_feedback — empty until decisions cite precedents) and known_item (query=case_name → relevant=self; a real citation-free signal, the methodology #52 checked by hand). Idempotent; preserves source='chair' rows. - scripts/eval_retrieval.py — runs the production retrieval path (search_library / search_internal) over the gold-set; computes precision@k, recall@k, MRR, nDCG@k (k=5,10); aggregates overall + per-corpus + per-practice_area; writes a report and a delta vs committed baseline.json (which records the retrieval_config it reflects). --self-test unit-checks the metric math offline. Gold-set strategy = hybrid (chair decision): bootstrap + chair review. The citation source is empty today (0 cited precedents in decisions), so the seed is known-item (77 queries: 54 internal_decisions + 23 precedent_library). The gold-set is PROVISIONAL until Dafna reviews it (the domain chair-gate). Baseline (production config: multimodal+rerank on): R@10=0.987, MRR=0.837, nDCG@10=0.872. Finding: MULTIMODAL_ENABLED=true slightly lowers known-item recall (image-page results displace exact name matches) — relevant to #15. precedent_library weaker than internal (R@10 0.957 vs 1.0) — one external precedent unfindable by name. "CI gate" realized as discipline (re-runnable harness + committed baseline + run before/after any retrieval-layer change) — retrieval needs prod DB + Voyage, no CI runner has that access. Spec: docs/superpowers/specs/2026-05-31-fu5-eval-harness-design.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>