feat(principles): canonical_statement synthesis service + throttled backfill (Phase E groundwork, #152)
Grounded (INV-AH) multi-instance synthesis with drift guard + chair gate (pending_review, G10). Single path used by backfill, MCP tool, nightly drain. HELD from production run pending the principles-redesign (rename+cull, #152). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -207,6 +207,27 @@ Dimensions for Data Quality* (2013) · ISO 8000 (Data quality) | סטטוס: ver
|
||||
(`lessons.py:355, 309`). עקיבוּת-מקור קושרת ל-[X5-audit-provenance.md](X5-audit-provenance.md).
|
||||
**הפרה ידועה:** —
|
||||
|
||||
### INV-LRN6: סינתזת-עיקרון-קנוני מעוגנת ומגודרת-שער (V41 Phase 4 → G10/INV-AH/G9)
|
||||
**כלל:** סינתזת ה-`canonical_statement` של עיקרון-הלכה קנוני (מיזוג/זיקוק ניסוחי-המופעים
|
||||
לניסוח אחד כללי) חייבת לקיים שלושה תנאים: **(א) עיגון** — הניסוח נובע מ-`supporting_quote`
|
||||
של המופעים בלבד, ללא הוספת דין/סייג/ציטוט-תיק שאינו במקור; חוסר-עיגון → **הימנעות**
|
||||
(`grounded=false`, נשמר הניסוח הקיים) ולא המצאה ([INV-AH](../anti-hallucination-gate.md), AH-1/2/3).
|
||||
**(ב) שער-drift** — הניסוח המסונתז מוטמע-מחדש ומושווה (cosine) לניסוח-המקור; מתחת לרצפה
|
||||
(`HALACHA_CANONICAL_SYNTH_DRIFT_FLOOR`=0.80) הסינתזה **נדחית** (נשמר המקור) — הטמעה
|
||||
מהוזה/סוטה-נושא לא תדרוס עיקרון תקין בשקט. **(ג) שער-יו"ר** — סינתזה אף פעם אינה מאשרת:
|
||||
היא מקדמת `review_status` מ-`pending_synthesis` ל-`pending_review` בלבד; ההכרעה הסופית
|
||||
היא של היו"ר בפאנל ([INV-LRN1](#inv-lrn1-עדכון-ידע-דורש-אישור-יור-ידני--אין-auto-commit-governance-g10)/G10).
|
||||
כל ניסיון-סינתזה (התקבל / נשמר-מקור / נמנע) **מתועד** (CSV ב-`data/audit/` + log), ובהטמעה
|
||||
מתעדכן ה-embedding יחד עם הניסוח כדי ש-lookup-before-insert (cosine) לא יסחף ([INV-G6](00-constitution.md#inv-g6-re-index-בכל-שינוי-תוכן)).
|
||||
**מסלול-יחיד (G2):** כל הקוראים (backfill, כלי-MCP `canonical_synthesize_pending`, דריינר-לילה)
|
||||
עוברים דרך `services/canonical_synthesis.py::synthesize_canonical` — אין נתיב-סינתזה מקביל.
|
||||
**מקורות:** Stanford RegLab/Magesh et al. (JELS 2025 — grounding מול הזיה) · Dhuliawala et al.
|
||||
*Chain-of-Verification* (arXiv:2309.11495, 2023) · RAGAS faithfulness (atomic-claim grounding) | סטטוס: verified
|
||||
**אכיפה:** `services/canonical_synthesis.py` (עיגון בפרומפט, `_new_citations`, שער-drift);
|
||||
`db.apply_canonical_synthesis` (סטטוס→pending_review אטומי + רענון-embedding); הפאנל הקנוני
|
||||
(`/precedents`, PR#300) לאישור-יו"ר; CSV-audit ב-`data/audit/canonical-synthesis-*.csv`.
|
||||
**הפרה ידועה:** — (חדש)
|
||||
|
||||
---
|
||||
|
||||
## 4. הג'ובים המתוזמנים (תמיכת-תשתית ללולאה)
|
||||
|
||||
Reference in New Issue
Block a user