agentleFS
Goodnight77Goodnight77/rag-skills/skills/evaluation-metrics/rag-evaluation-frameworks/SKILL.md

rag-evaluation-frameworks

Skill8 starsChanged 7 months agoMITView on GitHub

Choose and wire up a RAG evaluation framework and turn it into a CI regression gate.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the framework on the golden set in CI and fail the build when scores regress past a threshold.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

This skill covers the tooling layer of RAG evaluation: which framework to adopt, how to structure a golden set, and how to run evaluation automatically on every change so quality regressions are blocked before they ship.

Problem Statement

Metrics are only useful if they run consistently. Teams compute scores once in a notebook, never automate them, and lose the baseline. Ad hoc evaluation cannot catch the slow regressions that come from data drift, prompt edits, or model swaps.

Key Concepts

  • Evaluation framework: A library that computes retrieval and generation metrics from a dataset of questions, contexts, and answers.
  • Golden set: Version-controlled questions with reference answers and relevant contexts.
  • Reference-free vs reference-based: Whether a metric needs ground-truth answers or judges quality directly.
  • Regression gate: A CI job that fails when metrics drop below the baseline.

Implementation Guide

Step 1: Choose a Framework by Fit

Pick the framework that matches your stack rather than the most popular one.

Why: Each tool has a different data model and integration story, and switching later is costly.

Default mapping:

  • Metric-first RAG scoring with minimal setup: favor RAGAS
  • Unit-test-style assertions and CI integration: favor DeepEval
  • Live instrumentation and dashboards for running apps: favor TruLens
  • Prompt and provider comparison matrices: favor promptfoo

Step 2: Build a Versioned Golden Set

Curate representative questions with reference answers and relevant contexts, and commit it to the repository.

Why: A fixed, version-controlled dataset makes scores comparable across runs and contributors.

Step 3: Wire Evaluation into CI

Run the framework on the golden set in CI and fail the build when scores regress past a threshold.

Why: An automated gate turns evaluation from a one-time report into a standing guardrail.

When to Use This Skill

  • Standing up a repeatable evaluation pipeline for the first time
  • Adding an automated quality gate to a RAG project
  • Comparing tools before committing to one evaluation stack

When NOT to Use This Skill

  • You only need the definition of a single metric, not tooling
  • The project is a throwaway prototype with no regression risk
  • There is no golden set and none can be created yet

Related Skills

  • Retrieval Evaluation Metrics - Metrics these tools compute
  • Generation Evaluation Metrics - Answer-quality metrics
  • Production RAG Deployment - Gate deployments on scores
  • Optimize Retrieval Latency - Balance quality against speed

Metrics & Success Criteria

  • Reproducibility: Same golden set yields comparable scores across runs
  • Coverage: Golden set spans the real query distribution
  • Automation: Evaluation runs in CI on every relevant change
  • Actionability: A failing gate points to the layer that regressed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.