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

evaluation-metrics

Skill8 starsChanged 7 months agoMITView on GitHub

Route RAG evaluation work across retrieval metrics, generation quality, and end-to-end evaluation frameworks.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Use this parent skill when the main RAG problem is measuring quality, detecting regressions, or proving that a change actually helped.

    line 16
  2. Distinctive:

    Use retrieval metrics when the right chunks are missing or mis-ranked, and generation metrics when context is good but answers are wrong, …

    line 33
  3. Distinctive:

    Every RAG change is compared against a fixed golden-set baseline

    line 55

≈ “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

Evaluation Metrics

Overview

Use this parent skill when the main RAG problem is measuring quality, detecting regressions, or proving that a change actually helped. Route to the child skill that matches whether the failure is in retrieval, in generation, or in the evaluation harness itself.

Problem Statement

Teams ship RAG changes with no baseline, tune on vibes, and cannot tell whether a new chunker, embedding model, or prompt made things better or worse. Without metrics, retrieval and generation regressions ship silently and are only caught by users.

Key Concepts

  • Retrieval metrics: Whether the right chunks were fetched (recall@k, precision@k, MRR, nDCG, context precision/recall).
  • Generation metrics: Whether the answer is grounded and useful (faithfulness, answer relevancy, correctness).
  • Golden set: A labeled question-and-answer set used as the fixed baseline for comparison.
  • Regression harness: An automated evaluation run on every change, wired into CI.

Implementation Guide

Step 1: Isolate the Layer That Fails

Measure retrieval and generation separately. Bad answers from good context are a generation problem; good answers are impossible from bad context.

Step 2: Pick Metrics for That Layer

Use retrieval metrics when the right chunks are missing or mis-ranked, and generation metrics when context is good but answers are wrong, unsupported, or off-topic.

Step 3: Automate as a Regression Gate

Build a golden set, run the metrics on every change, and block merges that regress the baseline instead of evaluating manually.

When to Use This Skill

  • Choosing which metrics to track for a new or existing RAG pipeline
  • Proving whether a chunking, embedding, or prompt change helped
  • Setting up an automated evaluation gate before deployment

When NOT to Use This Skill

  • The pipeline is not yet built and there is nothing to measure
  • The bottleneck is a known implementation bug, not quality measurement
  • You already have a metrics suite and the problem is retrieval or generation design

Related Skills

  • Retrieval Evaluation Metrics
  • Generation Evaluation Metrics
  • RAG Evaluation Frameworks
  • Self-RAG

Metrics & Success Criteria

  • Every RAG change is compared against a fixed golden-set baseline
  • Retrieval and generation quality are tracked as separate numbers
  • Regressions are caught in CI instead of by users

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.