chore(#57): re-chunk+re-embed legacy precedents (pre-#55 remediation) #43
Reference in New Issue
Block a user
Delete Branch "chore/57-rechunk-legacy-precedents"
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?
סוגר את #57 — רמדיאציה מלאה של פסיקה שהוטמעה לפני תיקון ה-chunker (#55).
מה
סקריפט
scripts/rechunk_legacy_precedents.py: בוחר כלcase_lawעם chunk זעיר (content<50— טביעת-האצבע של ה-chunker הישן) ומריץingest.reindex_case_law(re-chunk+re-embed מ-full_textשמור בלבד — ללא re-OCR/LLM,feedback_no_reocr_retrofit; idempotent).תוצאת הרצה (2026-06-03)
precedent_chunks: 5019 → 3115 (fragments מוזגו)4 השאריות
כותרות-סעיף מבודדות ("דיון", "טענות המשיבים"...) שה-chunker הנוכחי מייצר — לא שאריות legacy — ומסוננות ב-query-time (≥50, #55). קצה-מקרה מינורי, מועמד ל-follow-up של #55.
מיגרציית ה-DB כבר הוחלה על prod; ה-PR הוא הסקריפט + SCRIPTS.md בלבד (אין שינוי קוד-אפליקציה, אין deploy).
🤖 Generated with Claude Code
Adds scripts/rechunk_legacy_precedents.py: selects every case_law with a tiny chunk (content<50 — the pre-fix chunker fingerprint) and runs ingest.reindex_case_law (re-chunk+re-embed from stored full_text only, no re-OCR/LLM, idempotent). Batch-idempotent (re-queries the affected set). Run result (2026-06-03): 73 precedents reindexed, 0 failed. Tiny chunks 483 -> 4 (99.2%); total precedent_chunks 5019 -> 3115 (fragments merged). Search verified healthy (substantial coherent passages, no errors). The 4 residual tiny chunks are isolated section headings ('דיון', 'טענות המשיבים', ...) emitted by the CURRENT (fixed) chunker — not legacy fragments — and are already filtered at query time (>=50, #55). Minor chunker edge case, candidate #55 follow-up. The DB chunk migration is already applied to prod; this commit is the script + SCRIPTS.md entry only (no app code change, no deploy needed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>