rag-eval

rag-eval is a skill for Claude Code from NVIDIA-AI-Blueprints/rag. It costs 48 tokens per session (2,343 once invoked), scanned A, original, Apache-2.0.

A benchmark guide for evaluating a file-based retrieval-augmented generation system. It uses a document collection, question-and-answer training data, and RAGAS, a framework for scoring answer quality.

In plain words
What is it for?
Use it to prepare benchmark files, run the RAG evaluator, adjust retrieval or generation settings, and interpret quality results.
Why use it?
It gives a defined way to compare retrieval and answer quality and helps diagnose empty results, service errors, and mismatched collections.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run --project scripts/eval python scripts/eval/evaluate_rag.py \.

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/NVIDIA-AI-Blueprints/rag
agentmods
npx agentmods add skills/nvidia-ai-blueprints/rag/rag-eval

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rag-eval

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia-ai-blueprints/rag/rag-eval.svg)](https://agentmods.dev/skills/nvidia-ai-blueprints/rag/rag-eval)
Your own site
<a href="https://agentmods.dev/skills/nvidia-ai-blueprints/rag/rag-eval"><img src="https://agentmods.dev/badge/skills/nvidia-ai-blueprints/rag/rag-eval.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,343 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.02343
Opus 5 $0.00024 $0.01171
Sonnet 5 $0.00010 $0.00469
Haiku 4.5 $0.00005 $0.00234

Measured 6d ago against content hash 572126a6a3e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rag-eval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rag-eval/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

On-disk RAG evaluation (corpus/ + train.json)

Purpose

Guide agents through NVIDIA RAG Blueprint filesystem benchmarks: preparing corpus/ and train.json, running scripts/eval/evaluate_rag.py, tuning retrieval and generation flags for quality comparisons, interpreting RAGAS JSON outputs, and triaging failures (HTTP/stream errors, empty contexts, collection mismatch, judge API).

For latency, throughput, and load testing, use the rag-perf skill (scripts/rag-perf, docs/performance-benchmarking.md) — not this skill.

When not to use

Do not use this skill for: deploying or repairing services (use rag-blueprint); evaluating APIs without the corpus/ + train.json layout; general ML experimentation unrelated to this evaluator; production monitoring/alerting; or latency/throughput benchmarking (use rag-perf).

Prerequisites

  • Repo cloned; run commands from repo root (imports and paths assume this).
  • Python 3.11+ and uv; eval deps: uv sync --project scripts/eval.
  • Reachable RAG server and ingestor (defaults often localhost:8081 / 8082).
  • NVIDIA_API_KEY for RAGAS (see credential hygiene); optional RAG_EVAL_JUDGE_MODEL.
  • Dataset roots passed to --dataset-paths each contain corpus/ and train.json.

Instructions

  1. Prepare data — Ensure each dataset directory matches the layout and train.json rules in references/dataset-and-conversion.md. When sources arrive as public links (sites or dataset pages), materialize documents under corpus/—prefer PDF for multimodal content so images stay embedded; convert CSV/JSONL/etc. using the patterns there.
  2. Run evaluv run --project scripts/eval python scripts/eval/evaluate_rag.py with --dataset-paths, --host, and --port. See references/benchmark-execution.md for command examples, outputs, and errors. Use references/evaluate-rag-cli.md for flag-level detail.
  3. Tune quality — Adjust --top_k / --vdb_top_k, reranker and query-rewriting toggles, and generation overrides (--temperature, --top-p, --max-tokens) as documented in references/benchmark-execution.md when comparing retrieval/generation configs for RAGAS scores.
  4. Analyze results — Use references/result-analysis.md for scripts; scan rag_*_evaluation_summary.json for headline RAGAS metrics.
  5. Triage errors — Use the error signal table and the Troubleshooting section below.

Read the full file on GitHub · 131 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 131 lines · 48 tokens per session scan A 572126a6a3e1

Subscribe to this mod's changes

rag-eval is a skill published in the GitHub repository NVIDIA-AI-Blueprints/rag (757 stars, last pushed 3d ago), licensed Apache-2.0. It adds 48 tokens to every session and 2,343 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

rag-evaluate-quality

Periodically measure the retrieval quality of the knowledge base using evaluateretrieval (MRR@5, Recall@5, Precision@5) plus getindexstats for health metrics. Run weekly, after significant reindex activity, or when the user reports declining answer quality. Prevents silent index rot and grounds "should we tune X"…

lyonzin/knowledge-rag · 78 tokens

rag-index-decisions

After making a non-obvious architectural decision, solving a novel bug, agreeing on a coding standard, or reaching a conclusion worth remembering, index it back into the knowledge base so the next occurrence is one search away. Uses adddocument or addfromurl. Closes the feedback loop that makes a RAG-backed team…

lyonzin/knowledge-rag · 72 tokens

rag-code-review

When performing code review on a PR, diff, snippet, or "look at this change" request, first consult the corpus for related ADRs, coding standards, prior patterns, and similar files. Grounds review comments in the team's actual decisions instead of generic best practices. Trigger on any review-style request — "review"…

lyonzin/knowledge-rag · 83 tokens

rag-deep-dive

Three-step multi-tool workflow — search the corpus, fetch the most relevant document in full, then find similar documents. Use when a single searchknowledge hit is not enough because the user asked a "how does X work end to end" or "explain the pattern" or "give me the full picture" question. Prevents shallow answers…

lyonzin/knowledge-rag · 79 tokens

rag-check-first

Before answering any technical question, code request, architecture decision, or factual claim, call searchknowledge to check the local corpus. Trigger on any query that could be answered with prior work, indexed docs, ADRs, runbooks, or team context. Prevents hallucination and forces reliance on the indexed knowledge…

lyonzin/knowledge-rag · 68 tokens

rag-cite-sources

Every technical claim drawn from the local corpus must ship with a source citation formatted as path:line or path:section. Trigger whenever the response quotes, paraphrases, or acts on knowledge that came from a searchknowledge or getdocument call. Makes answers auditable and lets the user jump to source in one click.

lyonzin/knowledge-rag · 70 tokens