מתי להשתמש
"איך אני בודק איכות של AI", "evals", "AI testing", "regression", "AI quality framework", "RAGAS", "golden dataset".
הוראות עבודה
1. Evals Mindset 2026
LLM הוא non-deterministic — בלי evals אתה עף בעיניים סגורות. כל שינוי (prompt, model, RAG chunk size) חייב לעבור suite אוטומטי לפני production.
3 רמות:
- Unit evals — ספציפיים, פר-feature (50-200 cases).
- Regression evals — לפני כל deploy (~500-2000 cases).
- Production monitoring — sample של 1-5% מ-traffic חי.
2. Frameworks עיקריים
| Framework | חוזק | מחיר | מתי |
|---|---|---|---|
| OpenAI Evals (open-source) | סטנדרטי, GitHub-based | חינם + API costs | OpenAI-centric stacks |
| Anthropic Evals (Console) | מובנה ב-Claude Console, auto-generated test cases | חינם + Claude API | Claude-based products |
| RAGAS | RAG-specific, faithfulness/relevance | חינם | RAG systems |
| Promptfoo | YAML-based, web UI, CI/CD | חינם / $99/mo | Prompt iteration |
| Braintrust | Production-grade, traces + evals | $0/mo עד 1K traces, $249+ | Enterprise |
| LangSmith (LangChain) | trace + eval combo | $39/user/mo | LangChain stacks |
| Humanloop | PM-friendly UI | $500+/mo | Cross-functional teams |
3. Golden Dataset — איך בונים
- אסוף 50-200 input אמיתיים מ-production (או user research).
- כתוב expected output ידנית (gold standard) — יקח 4-8 שעות עבודה.
- תייג: easy / medium / hard / edge case.
- שמור ב-JSON / JSONL / CSV ב-Git.
- עדכן רבעונית לפי failure modes חדשים.
4. מטריקות לפי Use Case
Generation tasks
- Faithfulness — האם הפלט מבוסס על המקור (RAG)?
- Relevance — האם עונה על השאלה?
- Coherence — קריאות.
- Hebrew quality — תחביר, מגדר, שלילה כפולה.
Classification
- Precision / Recall / F1.
- Confusion matrix.
Code generation
- Pass@k — האם הקוד רץ?
- Test coverage — האם עובר טסטים שכתבת?
Agentic
- Task completion rate.
- Tool use accuracy.
- Steps to completion.
5. LLM-as-Judge
שיטה: מודל חזק (Opus/GPT-5) שופט את הפלט של מודל זול (Haiku/Mini).
judge_prompt = """
Compare these two responses to the user query.
Score 1-5 on: relevance, accuracy, helpfulness.
Output JSON only.
Query: {query}
Response: {response}
Expected: {expected}
"""
אזהרה: LLM judges מטים — תמיד ולידציה ידנית של 10% מהציונים.
6. A/B Testing AI Responses
- חלק traffic 50/50 בין prompt v1 ו-v2.
- מדוד: thumbs up rate, conversion, time-on-task.
- 1000+ samples לכל זרוע למובהקות.
- ב-production: feature flags (LaunchDarkly, Statsig).
7. RAGAS למערכות RAG
from ragas import evaluate
from ragas.metrics import faithfulness, answer_relevancy, context_precision
result = evaluate(
dataset=ds,
metrics=[faithfulness, answer_relevancy, context_precision]
)
- Faithfulness < 0.85? יש hallucinations.
- Context precision < 0.7? retrieval גרוע.
8. CI/CD Integration
- כל PR מריץ eval suite (~5-15 דק).
- Block merge אם regression > 5% על golden set.
- GitHub Actions / GitLab CI.
9. Production Monitoring
- Log כל request + response.
- Sample 1-5% ל-LLM-as-judge.
- Alert על drift (success rate נופל מתחת ל-baseline).
- כלים: Datadog LLM, Helicone, Langfuse, Arize.
10. עלויות Evals
- 500 cases × $0.01 = $5/run.
- 10 runs ביום = $50/יום = $1500/חודש.
- חיסכון: prompt caching, Haiku-as-judge במקום Opus.
11. ישראלי context
- Hebrew evals חסרים בכל framework — בנה ידנית.
- בדוק RTL rendering בפלטים.
- מגדר (זכר/נקבה) — failure mode נפוץ.
- Israeli startups: Aporia (LLM observability), Deepchecks (Tel Aviv-based, MLOps testing).
12. Anti-patterns
- "We'll add evals later" — תמיד = never.
- Eval רק על happy path — תמיד תוסיף edge cases.
- מטריקה אחת — תמיד multi-metric.
קלט נדרש
| שדה | תיאור |
|---|---|
| Use case | classification / RAG / agent / generation |
| Volume | requests/יום |
| Stack | Claude / OpenAI / open-source |
| Budget | $/חודש |
| CI/CD | GitHub Actions? GitLab? |
פלט צפוי
| Deliverable | תוכן |
|---|---|
| Framework recommendation | RAGAS / Promptfoo / Braintrust |
| Golden dataset template | 50-100 cases JSONL |
| Metrics definition | per use case |
| CI integration plan | YAML |
| Monitoring setup | tools + thresholds |
כללי עבודה
- פלט בעברית, מונחים מקצועיים באנגלית
- pricing per 1M tokens, per seat/mo
- 2026 state of art — Anthropic Evals, Braintrust dominant
דגלים אדומים
- אין golden set → אסור לזוז ל-production.
- מטריקה אחת בלבד → blind spots.
- LLM judge בלי human validation → bias.
- אין regression suite → כל deploy = הימור.
- Hebrew בלי native validation → איכות נופלת.
הערות חשובות
- Evals = השקעה של 20% מזמן הפיתוח, חוסכת 80% מהבאגים ב-prod.
- Anthropic Console מציע auto-generated evals — נקודת התחלה מצוינת.
- LLM-as-judge חוסך 10x זמן vs human, אבל לא מחליף 100%.
- שמור eval datasets ב-Git, לא ב-DB — version control קריטי.
- Production sampling >> static eval set בלבד.
פרומפט לדוגמה
בנה לי golden dataset של 50 cases ל-RAG על מסמכים משפטיים בעברית.
איזה framework מתאים ל-stack של Claude + LangChain ב-CI/CD?
איך אני מודד אם prompt חדש ל-customer support עדיף מהקיים?
© 2026 AI Expert Pro | גרסה 1.1.0