V2-CH6-003 — מעקב דיוק ו-Feedback Loop
כרך 2 · פרק 6 · משימה 003 · השוואת confidence לתוצאה בפועל, עדכון reliability_profile
v1.0 Review · 12.8.2026
מטרת המסמך
הגדרת Feedback Loop: השוואת confidence לתוצאה בפועל לאחר T+7 ימים. שמירת target_price בעת יצירת המלצה, קריאת מחיר נוכחי לאחר 7 ימים, קביעת actual_outcome (hit/miss), חישוב calibration_error, ועדכון reliability_profile (hit_rate, avg_confidence, last_evaluated). סוגר את פער G10.
Feedback Loop (8 שלבים)
| שלב | פעולה | תיאור | טריגר | תזמון |
|---|---|---|---|---|
| 1 | יצירת המלצה | סוכן יוצר AnalysisOutput עם conclusion (BUY/SELL) + confidence (0-10). נשמר עם data_as_of ו-snapshot של מחיר. | runAgentScan | T+0 |
| 2 | שמירת target_price | אם BUY: target = current_price × 1.05. אם SELL: target = current_price × 0.95. נשמר ב-AnaysisOutput (שדה חדש: target_price). | adaptAgentOutput | T+0 |
| 3 | המתנה (T+7) | המתנה של 7 ימים מ-data_as_of. תפוגה מאפשרת הערכת תוצאה. | calibrationWorkflow (חדש) | T+7 |
| 4 | קריאת מחיר נוכחי | fetch current_price מ-MarketData/CanonicalMarketData. אם אינו זמין — דחייה. | calibrationService.ts | T+7 |
| 5 | קביעת actual_outcome | BUY: actual_hit = (current_price ≥ target_price). SELL: actual_hit = (current_price ≤ target_price). | calibrationService.ts | T+7 |
| 6 | חישוב calibration_error | error = |confidence/10 - actual_hit|. error נמוך = כיול טוב. | calibrationService.ts | T+7 |
| 7 | עדכון reliability_profile | hit_rate = (Σ actual_hit) / (Σ recommendations). avg_confidence = avg(confidence). last_evaluated = now(). | calibrationService.ts | T+7 |
| 8 | AuditEvent | CALIBRATION_UPDATED: agent_id, old_hit_rate, new_hit_rate, samples_count, calibration_level. | auditEventLogger.ts | T+7 |
קריטריוני קבלה
| מזהה | קריטריון | תוצאה |
|---|---|---|
| FL1 | 8 שלבי feedback loop: יצירה → target → המתנה T+7 → קריאת מחיר → actual → error → עדכון profile → audit. | PASS |
| FL2 | target_price: BUY = ×1.05, SELL = ×0.95. נשמר בעת יצירת AnalysisOutput. | PASS |
| FL3 | המתנה T+7 ימים לפני הערכה — מאפשר תנודת מחיר ריאלית. | PASS |
| FL4 | actual_outcome: בוליאני (hit/miss). calibration_error: |confidence/10 - actual_hit|. | PASS |
| FL5 | reliability_profile מתעדכן: hit_rate, avg_confidence, last_evaluated. AuditEvent נרשם. | PASS |
| FL6 | מודול חדש: calibrationService.ts ב-base44/shared/ + workflow "Calibration Sweep" (יומי). | PASS |
מפרט · v1.0 Review · 12.8.2026
חזרה ל-V2-CH6-002