Skip to content

Guided evaluation of RAG retrieval and generation quality, with separate metrics for each stage.

CCM score
79 of 100
skills.sh installs
876
GitHub stars
1.7K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers error analysis on end-to-end traces, retrieval metrics (Recall@k, Precision@k, MRR, NDCG@k), chunking optimization, and generation faithfulness and relevance
  • Includes a synthetic QA prompt template, adversarial question construction, and a metric-selection table keyed to query type
  • Enforces a fix-retrieval-first order: chunking is grid-searched before generation is tuned
  • Designed for teams diagnosing whether a retrieval-augmented pipeline fails in retrieval, generation, or both

Install

$ npx -y skills add hamelsmu/evals-skills --skill evaluate-rag -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Evaluate RAG

Overview

  1. Do error analysis on end-to-end traces first. Determine whether failures come from retrieval, generation, or both.
  2. Build a retrieval evaluation dataset: queries paired with relevant document chunks.
  3. Measure retrieval quality with Recall@k (most important for first-pass retrieval).
  4. Evaluate generation separately: faithfulness (grounded in context?) and relevance (answers the query?).
  5. If retrieval is the bottleneck, optimize chunking via grid search before tuning generation.

Prerequisites

Complete error analysis on RAG pipeline traces before selecting metrics. Inspect what was retrieved vs. what the model needed. Determine whether the problem is retrieval, generation, or both. Fix retrieval first.

Core Instructions

Evaluate Retrieval and Generation Separately

Measure each component independently. Use the appropriate metric for each retrieval stage:

  • First-pass retrieval: Optimize for Recall@k. Include all relevant documents, even at the cost of noise.
  • Reranking: Optimize for Precision@k, MRR, or NDCG@k. Rank the most relevant documents first.

Building a Retrieval Evaluation Dataset

Details

Repository
github.com/hamelsmu/evals-skills
Categories
AI Agents & LLM Apps, Testing & QA
First seen
Jun 3, 2026

Questions

What does the evaluate-rag skill do?

The evaluate-rag skill guides evaluation of retrieval-augmented generation pipelines, covering both retrieval quality and generation quality. It walks through error analysis on traces, building retrieval evaluation datasets, measuring Recall@k, MRR and NDCG, and optimizing chunking with grid search.

How do I install the evaluate-rag skill?

Run npx -y skills add hamelsmu/evals-skills --skill evaluate-rag -y in your project. This installs the evaluate-rag skill so your coding agent can use its RAG evaluation guidance.

Who should use the evaluate-rag skill?

The skill is for developers evaluating a retrieval-augmented generation system who want to measure retrieval quality, assess generation faithfulness and relevance, generate synthetic QA pairs for retrieval testing, or tune chunking strategies. It is listed in the AI Agents and LLM Apps category.

How does evaluate-rag compare with other skills in its category?

It sits in the AI Agents and LLM Apps category alongside microsoft-foundry, azure-ai and several Google agents skills. What sets evaluate-rag apart is its focus on separating retrieval measurement from generation measurement in RAG pipelines.

More from hamelsmu/evals-skills

All 7

Similar to Evaluate Rag

More AI Agents & LLM Apps