This walks you through evaluating RAG systems by separating retrieval from generation, which is the right approach but easy to skip when you're just trying to ship. It pushes you to do error analysis on traces first, then build eval datasets with synthetic QA pairs or manual curation. The chunking optimization grid search is genuinely useful since chunk size and overlap can swing your Recall@k by 10+ points on the same retriever. The faithfulness versus relevance breakdown for generation eval is clear, and the anti-pattern list (don't use ROUGE, don't skip traces) will save you from common mistakes. Good for when your RAG pipeline works sometimes but you need systematic measurement to find the actual bottleneck.

skills.sh installs
850
GitHub stars
1.7K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/hamelsmu/evals-skills
Categories
Testing & QA, DevOps & CI/CD, Code Review & Quality, AI & Agent Building, Automation & Workflows, Sales & Marketing
First seen
Jun 3, 2026

More from hamelsmu/evals-skills

All 7
1dimillian avatarreview-swarmdimillian/skillsParallel read-only multi-agent review of a current git diff or explicit file scope to find behavioral regressions, security or privacy risks, performance or rel789skills.sh installs
2github avatarsalesforce-component-standardsgithub/awesome-copilotQuality standards for Salesforce Lightning Web Components (LWC), Aura components, and Visualforce pages. Covers SLDS 2 compliance, accessibility (WCAG 2.1 AA), 770skills.sh installs
3davila7 avatarbrowser-automationdavila7/claude-code-templatesBrowser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understand753skills.sh installs
4github avatarreact18-enzyme-to-rtlgithub/awesome-copilotProvides exact Enzyme → React Testing Library migration patterns for React 18 upgrades. Use this skill whenever Enzyme tests need to be rewritten - shallow, mou742skills.sh installs
5mindrally avatarrspecmindrally/skillsRSpec testing best practices for Ruby and Rails applications, covering test organization, data management, and isolation patterns.734skills.sh installs
6ruvnet avatarsparc-refineruvnet/rufloRun the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation730skills.sh installs