ワンクリックで
ai-evaluation-framework
Expert reference for evaluating LLM systems, RAG pipelines, and AI features in production
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Expert reference for evaluating LLM systems, RAG pipelines, and AI features in production
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Expert reference for application security — OWASP Top 10 mitigations, auth/authz, secrets management, cryptography, input validation, dependency hygiene, and secure-by-default code patterns
Expert reference for token counting, prompt compression, cost estimation, and quality preservation when optimizing prompts for Claude models
Experimentation design and A/B testing standards for product teams
Expert reference for digital accessibility — WCAG conformance, ARIA, and inclusive design patterns
Authoritative reference for agent architecture selection, multi-agent orchestration, tool design, memory systems, and failure mode prevention
Machine learning engineering patterns for model selection, feature engineering, training pipelines, evaluation, and production deployment.
| name | ai-evaluation-framework |
| description | Expert reference for evaluating LLM systems, RAG pipelines, and AI features in production |
| version | 1 |
If evaluating a RAG system → use RAGAS metrics as baseline: faithfulness >0.8, answer relevancy >0.85, context precision >0.75, context recall >0.7. Scores below threshold require root-cause analysis before deployment.
If running LLM-as-judge → use GPT-4o or Claude Opus as judge; define a rubric with 3-5 criteria each scored 1-5; run pairwise comparison (A vs B) for preference evals, pointwise for absolute quality. Agreement with human raters must be measured and >0.8 before trusting the judge.
If eval dataset has <50 examples → it is a prototype, not a production eval. Minimum 50 examples for a domain-specific task, 100+ for a general capability, 200+ for safety/guardrail evals.
If a prompt change causes >2% regression on any passing metric → block deployment and investigate. Regressions are not acceptable collateral damage from improvements.
If building a benchmark for a new task type → construct examples from four categories: (1) typical inputs, (2) edge cases, (3) adversarial inputs, (4) inputs representing known failure modes. Equal representation across categories.
If evaluating in production → use shadow mode first: run new prompt/model alongside existing, compare outputs offline before cutover. Never A/B test safety-critical changes.
If hallucination is the primary concern → use NLI-based faithfulness scoring (check if each claim in the output is entailed by the source context) + citation accuracy (% of cited sources that actually support the claim).
Never use perplexity as a proxy for output quality — it measures fluency, not correctness or helpfulness.
Never report only average scores — always report p10, p50, p90 and failure rate (% below threshold). Averages hide tail failures.
Never use the training data as the eval set — data leakage produces scores that are meaningless.
The Evaluation Pyramid
Level 3: Human Eval (ground truth, expensive, slow)
↓ calibrate
Level 2: LLM-as-Judge (scalable, cheap, proxy — needs calibration)
↓ monitor
Level 1: Automated Metrics (RAGAS, BLEU, exact match — fast, limited)
↓ detect anomalies
Level 0: Production Signals (correction rate, regeneration, thumbs down)
Each level informs the one above. Production signals tell you where to look. Automated metrics give you fast feedback. LLM-as-judge scales human judgment. Human eval provides ground truth.
The Eval Coverage Matrix Every eval suite must cover:
Input Type | Expected | Edge Case | Adversarial | OOD
--------------------|----------|-----------|-------------|-----
Typical domain | ✓ | ✓ | ✓ | ✓
High-stakes output | ✓ | ✓ | ✓ | ✓
Known failure modes | ✓ | ✓ | ✓ | ✓
The Change Impact Decision Tree
Prompt/model change proposed
↓
Run full eval suite
↓
Any regression >2%? ── Yes ──→ Block. Root cause. Fix or revert.
│
No
↓
Any improvement >2%? ── No ──→ Change is neutral. Ship only if cost/latency benefit.
│
Yes
↓
Shadow mode in production (1-5% traffic) for 48h
↓
Production signals confirm improvement? ── Yes ──→ Full rollout
No ──→ Revert, investigate distribution shift
| Term | Precise Meaning |
|---|---|
| Faithfulness | % of claims in the generated answer that are supported by the retrieved context |
| Answer relevancy | How well the generated answer addresses the actual question asked |
| Context precision | % of retrieved context chunks that are relevant to the query |
| Context recall | % of required information that is present in the retrieved context |
| LLM-as-judge | Using a capable LLM to score outputs against a rubric — requires human calibration |
| Golden dataset | A versioned, locked set of labeled input/output pairs used for regression testing |
| Shadow mode | Running a new system in parallel with the existing one, comparing offline — no user impact |
| Pairwise eval | Presenting two outputs (A vs B) and asking which is better — reduces position bias |
| Pointwise eval | Scoring a single output against a rubric — faster but higher variance |
| Hallucination | A claim in the output that is not supported by the source context or ground truth |
| RAGAS | Retrieval-Augmented Generation Assessment — framework with faithfulness, relevancy, precision, recall metrics |
| Error budget | The acceptable failure rate; e.g., 5% of evals can fail before blocking deployment |
Mistake 1: Shipping on vibes
Mistake 2: Eval set contamination
Mistake 3: LLM judge with no calibration
Mistake 4: Average-only reporting
Mistake 5: No production feedback loop
BAD eval report:
"Tested the new prompt on some examples. Looks better than before. Accuracy improved. Deploying to production."
GOOD eval report:
Prompt Change: extract_entities_v4 → v5
Dataset: entities_golden_set_v2 (n=120, 20% adversarial)
Metric | v4 (baseline) | v5 | Delta
--------------------|---------------|-----------|-------
Precision | 0.847 | 0.891 | +5.2% ✓
Recall | 0.812 | 0.834 | +2.7% ✓
F1 | 0.829 | 0.862 | +4.0% ✓
Adversarial pass % | 61% | 68% | +7pp ✓
Latency p50 (ms) | 340 | 410 | +20% ⚠
Regressions: None (0 previously passing examples now failing)
Recommendation: SHIP — improvement is significant; latency increase acceptable
Shadow mode: 48h at 5% traffic before full rollout