feat(goldset): interactive gold-set tagging page (#81.7/#81.8) #101
Reference in New Issue
Block a user
Delete Branch "worktree-goldset-tagging-ui"
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?
מה ולמה
מחליף את עריכת-ה-CSV בדף-תיוג באפליקציה — היו"ר/דפנה מתייגים את gold-set איכות-החילוץ בלחיצות, ורואים precision/recall של הוולידטורים בזמן-אמת.
halacha_goldset— batch מרובד מתויג-אנושית (is_holding/correct_type/quote_complete, NULL עד תיוג).goldset_create_sample(round-robin מרובד לפי פסק×סוג, idempotent),goldset_list(פריטים + תוכן ההלכה + תווי-המכונה),goldset_tag(חלקי — שדה בכל פעם לתיוג-מקלדת),goldset_score(פורט של ה-P/R/F1 מהסקריפט — כל ולידטור נמדד כגלאי "לא-הלכה" מול התיוג; קלט #81.8).lib/api/goldset.ts;goldset-panel.tsx— כרטיס-לכל-פריט, keyboard-first (J/K ניווט, H/N הלכה, C/X ציטוט), מד-התקדמות, טוגל הסתר-מתויגים, וטבלת-ציון חיה הניתנת להרחבה;app/goldset/page.tsx+ קישור-ניווט "מדגם-זהב" תחת ידע ולמידה.הגנה מתודולוגית מפורשת ב-UI ובתיעוד: התיוג הוא אמת-מידה אנושית, ללא תיוג-AI מקדים (הטיה מעגלית). אוכלס batch של 150 פריטים מרובד.
Invariants — הצהרה
halacha_qualityשהמחלץ מריץ — אין לוגיקת-ניקוד מקבילה).אימות
tsc --noEmitexit 0;py_compileok.🤖 Generated with Claude Code
Replaces the CSV-edit workflow with an in-app tagging page so the chair/Dafna can label the extraction-quality gold-set by clicking, and see validator precision/recall live. Schema (V29): halacha_goldset — a stratified, human-tagged evaluation batch (is_holding / correct_type / quote_complete, NULL until tagged). db.py: - goldset_create_sample (stratified round-robin over case×rule_type, idempotent), - goldset_list (items + halacha content + the machine's own labels), - goldset_tag (partial — one field at a time for keyboard tagging), - goldset_score (ports the script's P/R/F1: each validator scored as a not-a-holding detector against the human tags — the #81.8 input). API: GET /api/goldset, POST /api/goldset/sample, GET /api/goldset/score, PATCH /api/goldset/{id}. web-ui: - lib/api/goldset.ts (hooks), - components/goldset/goldset-panel.tsx — card-per-item, keyboard-first (J/K nav, H/N holding, C/X quote), progress bar, hide-tagged toggle, and a collapsible live score table, - app/goldset/page.tsx + nav link "מדגם-זהב" under ידע ולמידה. Methodology guard kept explicit in UI + docstrings: tags are HUMAN ground truth, no AI pre-fill (circular bias). Populated a 150-item stratified batch. Verified: backend create/list/tag/score against the live DB; tsc --noEmit 0; py_compile ok. (Local Turbopack build blocked by worktree symlink — CI builds clean.) Invariants: G1 (eval set modeled at source in its own table); G2 (reuses the same halacha_quality validators the extractor runs — no parallel scoring logic). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>