From d4046c2fbd16042bd228ec4327b6ff63150b9e3e Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 3 Jun 2026 07:58:54 +0000 Subject: [PATCH] =?UTF-8?q?chore(tasks):=20#79=20=E2=80=94=20#55=20follow-?= =?UTF-8?q?up=20for=20isolated=20section-heading=20chunks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Discovered closing #57: the current chunker still emits 4 tiny chunks that are standalone section headings ('דיון', 'טענות המשיבים', ...). Low priority — filtered at query time, search unaffected. Proposed fix: anchor a short isolated heading forward into the following section. Co-Authored-By: Claude Opus 4.8 (1M context) --- .taskmaster/tasks/tasks.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.taskmaster/tasks/tasks.json b/.taskmaster/tasks/tasks.json index 4141ebf..ac894ff 100644 --- a/.taskmaster/tasks/tasks.json +++ b/.taskmaster/tasks/tasks.json @@ -1979,7 +1979,7 @@ "id": "57", "title": "[Retrieval #55 follow-up] re-chunk+re-embed של פסיקה שהוטמעה לפני תיקון ה-chunker", "description": "משימה 55 תיקנה את ה-chunker (עיגון כותרות + מיזוג) ומסננת את 484 הפרגמנטים בזמן query. הרמדיאציה המלאה: re-chunk מ-full_text השמור (ללא re-OCR — תואם feedback_no_reocr_retrofit) + re-embed, כדי שהתוכן יהיה נכון ולא רק מוסתר. נדחה כי זו מיגרציית-נתונים עם עלות Voyage API על ~13+ תיקים — דורש אישור עלות מ-chaim לפני הרצה. לבדוק כמה תיקים מושפעים (יש להם chunk<50) ולהריץ בקבוצות.", - "status": "pending", + "status": "done", "priority": "low", "dependencies": [ "55" @@ -1987,7 +1987,7 @@ "details": "מקור: case_law.full_text קיים. נתיב: chunker.chunk_document(_hierarchical) → embeddings → החלפת precedent_chunks לתיק. למחוק chunks ישנים של התיק לפני הוספה. אחרי הרצה — ניתן להסיר את פילטר ה->=50 query (אופציונלי). תיקים מושפעים: SELECT DISTINCT case_law_id WHERE length(trim(content))<50.\n\n[קישור 2026-05-30] קשור ל-FU-3 (task 61, GAP-09 re-index). #57 = מיגרציה חד-פעמית של העבר (re-chunk legacy); FU-3 = ה-invariant הקדמי. נשמרים בנפרד במכוון.", "testStrategy": "אחרי re-chunk לתיק לדוגמה: 0 chunks<50 לאותו case_law_id; search_internal_decisions עדיין מחזיר את התיק; ספירת chunks סבירה.", "subtasks": [], - "updatedAt": "2026-05-30T11:19:06.142606+00:00" + "updatedAt": "2026-06-03T07:56:21.688Z" }, { "id": "58", @@ -2517,13 +2517,27 @@ "priority": "high", "subtasks": [], "updatedAt": "2026-06-02T12:07:22.194Z" + }, + { + "id": "79", + "title": "[#55 follow-up] chunker — כותרות-סעיף מבודדות נשארות chunks זעירים (<50)", + "description": "ה-chunker ההיררכי הנוכחי (אחרי תיקון #55) עדיין פולט מדי פעם chunk זעיר שהוא כותרת-סעיף בודדת שלא מוזגה קדימה לתוכן שאחריה. התגלה בסגירת #57 (re-chunk legacy): מתוך 73 תקדימים שעברו reindex, נשארו 4 chunks זעירים — כולם כותרות מבודדות: 'דיון' (ע\"א 5138/04, len=4), 'טענות המשיבים' (בג\"ץ 6525/15, len=13), 'העובדות וההליכים' (בר\"מ 2340/02, len=16), ושבר-ציטוט 'כלל התושבים\". (ע' 13 להחלטה)' (403-17, len=32). לא שאריות legacy — אלה פלט דטרמיניסטי של ה-chunker הנוכחי.", + "details": "השפעה: נמוכה — chunks אלה כבר מסוננים ב-query-time (פילטר length>=50 שנוסף ב-#55), אז החיפוש לא מושפע; זו בעיית-איכות-chunking ולא בעיית-אחזור. מיקום: chunker ההיררכי ב-mcp-server (chunk_document_hierarchical / מדיניות מיזוג הכותרות שב-#55). התיקון הצפוי: כשכותרת/heading קצרה (<50, או section_type שמתחיל סעיף) נותרת כ-chunk עצמאי ללא גוף — למזג אותה קדימה אל ה-chunk הבא (anchor-forward), או אחורה אם אין הבא. לשים לב ל-section boundaries: 'דיון'/'טענות המשיבים' הן תחילת סעיף — המיזוג צריך לצרף את הכותרת לראש הסעיף שאחריה, לא לזנב הקודם. אימות: להריץ scripts/rechunk_legacy_precedents.py אחרי התיקון — אמור להגיע ל-0 chunks<50 (או רק שברי-ציטוט לגיטימיים נדירים). תלוי ב-#55. ראה גם feedback_no_reocr_retrofit (re-chunk מ-full_text בלבד).", + "testStrategy": "אחרי תיקון ה-chunker: reindex של 4 התיקים (ע\"א 5138/04, בג\"ץ 6525/15, בר\"מ 2340/02, 403-17) → 0 chunks<50 בהם; SELECT count(*) FROM precedent_chunks WHERE length(trim(content))<50 → 0 (או רק שברי-ציטוט). ללא רגרסיה: search_precedent_library עדיין מחזיר את התיקים.", + "status": "pending", + "dependencies": [ + "55" + ], + "priority": "low", + "subtasks": [], + "updatedAt": "2026-06-03T00:00:00.000Z" } ], "metadata": { "version": "1.0.0", - "lastModified": "2026-06-02T12:17:44.302Z", + "lastModified": "2026-06-03T07:56:21.688Z", "taskCount": 78, - "completedCount": 70, + "completedCount": 71, "tags": [ "legal-ai" ] -- 2.49.1