rag-evaluator

rag-evaluator is a skill for Claude Code, Codex from chandrudp29/skillhub. It costs 44 tokens per session (1,167 once invoked), scanned A, original, MIT.

A testing framework for retrieval-augmented generation (RAG), a system that finds information in documents before asking an AI model to answer.

In plain words
What is it for?
Use it to test document retrieval, answer accuracy, relevance, hallucinations, and questions whose answers are missing from the documents.
Why use it?
It helps identify whether wrong answers come from finding the wrong documents, misusing the right documents, or poorly prepared context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to test document retrieval, answer accuracy, relevance, hallucinations, and questions whose answers are missing from the documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chandrudp29/skillhub/rag-evaluator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chandrudp29/skillhub/rag-evaluator
Any agent
npx skills add chandrudp29/skillhub --skill rag-evaluator
Clone the repo
git clone --depth 1 https://github.com/chandrudp29/skillhub

Made for: Claude Code, Codex.

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-evaluator

README.md
[![agentmods](https://agentmods.dev/badge/skills/chandrudp29/skillhub/rag-evaluator.svg)](https://agentmods.dev/skills/chandrudp29/skillhub/rag-evaluator)
Your own site
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/rag-evaluator"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/rag-evaluator.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,167 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.00044 $0.01167
Opus 5 $0.00022 $0.00583
Sonnet 5 $0.00009 $0.00233
Haiku 4.5 $0.00004 $0.00117

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

Security

Grade A, and why

rag-evaluator 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-evaluator/SKILL.md · 124 lines

How it starts

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

RAG Evaluator

A systematic evaluation framework for Retrieval-Augmented Generation pipelines. Finds where your RAG breaks before your users do.

When to Use

  • "Is my RAG system giving correct answers?"
  • "My RAG is hallucinating — help me find where"
  • "Evaluate my retrieval quality"
  • "My RAG answers are vague / not using the documents"
  • Before deploying a RAG system to production

The Three Failure Modes

Retrieval failure: Right question, wrong chunks retrieved. The answer exists in the corpus but wasn't found.

Generation failure: Right chunks retrieved, but the LLM ignored them, hallucinated, or answered a different question.

Context failure: Chunks retrieved but they're too long, poorly formatted, or overlap confusingly — LLM gets lost.

Most RAG problems are retrieval failures. Check retrieval first.

Evaluation Workflow

Step 1 — Build a test set

Minimum 20 question-answer pairs. Include:

  • Questions whose answers are clearly in the corpus (should always pass)
  • Questions whose answers are NOT in the corpus (should return "I don't know")
  • Multi-hop questions requiring synthesis across chunks
  • Edge cases: short answers, numerical facts, recent events

Without a test set, you're evaluating by vibes. Build it first.

Step 2 — Evaluate retrieval independently

For each test question:

  1. Run retrieval only (no generation)
  2. Check: is the answer in the top-k chunks?
  3. Check: is the most relevant chunk ranked #1?

Compute:

  • Recall@k: % of questions where answer chunk is in top-k
  • MRR (Mean Reciprocal Rank): average of 1/rank of first relevant chunk

Target: Recall@5 > 0.85 before touching generation.

Step 3 — Evaluate generation independently

Feed the oracle chunks (the correct ones) directly to the LLM. Ask it to answer using only those chunks. If it still fails, the problem is generation, not retrieval.

Step 4 — Run the full pipeline evaluation

For each question in test set:

Faithfulness — Does the answer only use information from the retrieved chunks?

  • LLM-as-judge: "Given these chunks and this answer, does the answer contain any claims not supported by the chunks? Yes/No and cite specific claims."
  • Target: > 0.90

Read the full file on GitHub · 124 lines

Files

What ships with it

1 file 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 · 124 lines · 44 tokens per session scan A 81183f91cc28

Subscribe to this mod's changes

rag-evaluator is a skill published in the GitHub repository chandrudp29/skillhub (13 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 1,167 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-eval

NVIDIA RAG Blueprint evaluation guidance for measuring retrieval and answer quality with stable datasets, baselines, and reproducible scoring workflows.

PracticalSwan/agent-skills · 30 tokens

rag-evaluation

Use this skill to evaluate the quality of a RAG pipeline on faithfulness, answer relevancy, context precision, context recall, and hallucination rate. Activates after a RAG system is implemented or when retrieval quality is in question. Produces a structured evaluation report with measurable results.

karthikrshet/aiskills · 63 tokens

generate-rag-dataset

Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.

langwatch/langwatch · 51 tokens

molecular-rag

Retrieve structurally similar compounds with known properties from ChEMBL/ZINC to ground predictions and inform optimization. Based on MolRAG (Xian 2025, ACL).

synthetic-sciences/openscience · 40 tokens

golden-dataset

Golden dataset lifecycle patterns for curation, versioning, quality validation, and CI integration. Use when building evaluation datasets, managing dataset versions, validating quality scores, or integrating golden tests into pipelines.

yonatangross/orchestkit · 44 tokens

evaluating-llms-harness

Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag). Use when benchmarking model quality, comparing models, reporting academic results, or tracking training progress. Industry standard used by EleutherAI, HuggingFace, and major labs. Supports HuggingFace, vLLM, APIs.

davila7/claude-code-templates · 85 tokens