Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Evaluate retrieval and generation quality in RAG pipelines. Separate scoring for retrieval (recall, precision, MRR) and generation (faithfulness, relevance, completeness). End-to-end pipeline assessment with bottleneck identification. Triggers on: "eval rag", "rag evaluation", "retrieval evaluation", "rag quality", "rag metrics"
.claude/skills/miosa-osa-eval-rag/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 1862% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 1077% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -46% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 988% | 0% |
> Evaluate retrieval + generation quality in RAG pipelines.
Assess a Retrieval-Augmented Generation pipeline by evaluating retrieval and generation independently, then measuring end-to-end quality. Retrieval scoring checks if the right documents are fetched (recall, precision, MRR, NDCG). Generation scoring checks if the answer is faithful to retrieved context (no hallucination), relevant to the question, and complete. Identifies whether failures originate in retrieval, generation, or both, so you know where to invest improvement effort.
bash# Full RAG evaluation /eval-rag --pipeline rag/ --queries eval/queries.jsonl --golden eval/golden.jsonl # Evaluate retrieval only /eval-rag --pipeline rag/ --queries eval/queries.jsonl --golden eval/golden.jsonl --stage retrieval # Evaluate generation only (with pre-fetched contexts) /eval-rag --contexts retrieved.jsonl --queries eval/queries.jsonl --golden eval/golden.jsonl --stage generation # Custom retrieval depth /eval-rag --pipeline rag/ --queries eval/queries.jsonl --golden eval/golden.jsonl --k 10 # Compare two retrieval configurations /eval-rag --pipeline rag-v1/ --pipeline-b rag-v2/ --queries eval/queries.jsonl --golden eval/golden.jsonl
| Flag | Type | Default | Description | |------|------|---------|-------------| | --pipeline | string | required | Path to RAG pipeline configuration or directory | | --pipeline-b | string | — | Second pipeline for A/B comparison | | --queries | string | required | Path to evaluation queries (JSONL) | | --golden | string | required | Path to golden answers with relevant doc IDs (JSONL) | | --contexts | string | — | Pre-retrieved contexts (skips retrieval stage) | | --stage | enum | both | Evaluate: retrieval, generation, both | | --k | int | 5 | Retrieval depth (top-K documents) | | --output | string | stdout | Write report to file | | --format | enum | markdown | Output format: markdown, json | | --faithfulness-judge | string | built-in | Custom judge prompt for faithfulness scoring | | --sample | int | all | Sample size from query set |
--pipeline-b is provided, run both pipelines and produce a side-by-side comparison with statistical significance tests./eval-rag --pipeline rag/ --queries eval/queries.jsonl --golden eval/golden.jsonl --k 5
## RAG Evaluation Report
### Retrieval Metrics (K=5)
| Metric | Score |
|--------|-------|
| Recall@5 | 0.78 |
| Precision@5 | 0.41 |
| MRR | 0.72 |
| NDCG@5 | 0.68 |
| Hit Rate | 0.89 |
### Generation Metrics
| Metric | Score |
|--------|-------|
| Faithfulness | 0.91 |
| Relevance | 0.85 |
| Completeness | 0.67 |
| Conciseness | 0.88 |
### Bottleneck Analysis
| Failure Type | Count | % of Failures |
|-------------|-------|---------------|
| Retrieval failure | 31 | 58.5% |
| Generation failure | 14 | 26.4% |
| Compound failure | 8 | 15.1% |
### Recommendation
Primary bottleneck is retrieval (58.5% of failures). Focus on:
1. Improve chunking strategy — current chunks miss relevant context
2. Add hybrid search (keyword + semantic) — 12 queries failed on keyword-dependent lookups
3. Increase K to 10 for complex queries — recall jumps to 0.89 at K=10markdown## RAG Evaluation Report ### Pipeline: <path> ### Queries: N evaluated ### Retrieval Metrics | Metric | Score | CI | |--------|-------|----| ### Generation Metrics | Metric | Score | CI | |--------|-------|----| ### Bottleneck Analysis | Type | Count | % | |------|-------|----| ### Per-Query Breakdown (worst N) | Query | Retrieval | Generation | Failure Type | ### Recommendations 1. ... ### Comparison (if --pipeline-b) | Metric | Pipeline A | Pipeline B | Delta | Significant? |
/judge-prompt — For custom faithfulness judges/eval-audit — Upstream pipeline health check/error-analysis — Deep-dive on failure patterns| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | pass→pass | 13,936 | 12,620 | -9% | 1 | 1 | 0% | 2,837 | 3,990 | +41% | 0 | 0 | — |
case-06 | pass→pass | 14,165 | 17,429 | +23% | 1 | 1 | 0% | 2,807 | 5,070 | +81% | 0 | 0 | — |
case-07 | fail→pass | 3,986 | 10,927 | +174% | 1 | 1 | 0% | 178 | 3,493 | +1862% | 0 | 0 | — |
case-01 | fail→pass | 4,829 | 9,232 | +91% | 1 | 1 | 0% | 287 | 3,379 | +1077% | 0 | 0 | — |
case-02 | fail→fail | 19,074 | 13,152 | -31% | 1 | 1 | 0% | 3,527 | 4,009 | +14% | 0 | 0 | — |
case-03 | fail→pass | 31,252 | 12,444 | -60% | 1 | 1 | 0% | 6,620 | 3,558 | -46% | 0 | 0 | — |
case-04 | pass→pass | 18,895 | 19,317 | +2% | 1 | 1 | 0% | 3,921 | 5,087 | +30% | 0 | 0 | — |
case-08 | fail→pass | 8,156 | 4,170 | -49% | 1 | 1 | 0% | 1,602 | 2,245 | +40% | 0 | 0 | — |
case-09 | fail→pass | 3,730 | 7,191 | +93% | 1 | 1 | 0% | 272 | 2,959 | +988% | 0 | 0 | — |
case-10 | fail→pass | 10,959 | 1,970 | -82% | 1 | 1 | 0% | 1,898 | 1,715 | -10% | 0 | 0 | — |
case-11 | fail→pass | 11,271 | 2,733 | -76% | 1 | 1 | 0% | 1,953 | 2,038 | +4% | 0 | 0 | — |
case-16 | pass→pass | 7,841 | 3,041 | -61% | 1 | 1 | 0% | 1,132 | 1,953 | +73% | 0 | 0 | — |
case-12 | pass→pass | 10,677 | 9,159 | -14% | 1 | 1 | 0% | 1,812 | 3,021 | +67% | 0 | 0 | — |
case-13 | pass→pass | 9,311 | 6,782 | -27% | 1 | 1 | 0% | 1,547 | 2,598 | +68% | 0 | 0 | — |
case-14 | pass→pass | 7,771 | 4,312 | -45% | 1 | 1 | 0% | 1,284 | 2,192 | +71% | 0 | 0 | — |
case-15 | pass→pass | 14,228 | 14,396 | +1% | 1 | 1 | 0% | 2,471 | 3,930 | +59% | 0 | 0 | — |
case-17 | pass→pass | 8,848 | 2,940 | -67% | 1 | 1 | 0% | 1,484 | 1,884 | +27% | 0 | 0 | — |
case-18 | pass→pass | 6,934 | 3,216 | -54% | 1 | 1 | 0% | 1,130 | 2,016 | +78% | 0 | 0 | — |
case-19 | pass→pass | 7,283 | 5,232 | -28% | 1 | 1 | 0% | 1,228 | 2,426 | +98% | 0 | 0 | — |
case-20 | pass→pass | 14,468 | 5,090 | -65% | 1 | 1 | 0% | 2,660 | 2,514 | -5% | 0 | 0 | — |
case-21 | pass→pass | 4,832 | 3,506 | -27% | 1 | 1 | 0% | 730 | 2,087 | +186% | 0 | 0 | — |
case-22 | fail→pass | 4,580 | 12,170 | +166% | 1 | 1 | 0% | 257 | 3,893 | +1415% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 18 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.