rag-eval

rag-eval is a skill for Claude Code, Codex from agentscope-ai/OpenJudge. It costs 86 tokens per session (2,320 once invoked), scanned A, original, Apache-2.0.

A testing and diagnosis tool for RAG systems, which retrieve documents and then use them to generate answers. It checks the document search and answer generation separately, including whether answers are supported by the retrieved material.

In plain words
What is it for?
Use it to measure retrieval quality, detect unsupported or hallucinated answers, compare chunking changes, and produce a matrix of retrieval and generation problems.
Why use it?
One overall accuracy score cannot show whether a failure came from finding the wrong documents or using the right documents badly. Separating these problems makes the cause easier to locate.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to measure retrieval quality, detect unsupported or hallucinated answers, compare chunking changes, and produce a matrix of retrieval and generation problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentscope-ai/openjudge/05-rag-eval
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.

Any agent
npx skills add agentscope-ai/OpenJudge --skill 05-rag-eval
Clone the repo
git clone --depth 1 https://github.com/agentscope-ai/OpenJudge

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentscope-ai/openjudge/05-rag-eval/github.svg)](https://agentmods.dev/skills/agentscope-ai/openjudge/05-rag-eval)
Your own site
<a href="https://agentmods.dev/skills/agentscope-ai/openjudge/05-rag-eval"><img src="https://agentmods.dev/badge/skills/agentscope-ai/openjudge/05-rag-eval/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rag-eval

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentscope-ai/openjudge/05-rag-eval"><img src="https://agentmods.dev/badge/skills/agentscope-ai/openjudge/05-rag-eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,320 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 26
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00086 $0.02320
Opus 5 $0.00043 $0.01160
Sonnet 5 $0.00017 $0.00464
Haiku 4.5 $0.00009 $0.00232

Measured 10d ago against content hash fead7ab1ca83, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/rag_diagnostic.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/eval_pipeline/05-rag-eval/SKILL.md · 249 lines

How it starts

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

RAG Eval

Evaluate RAG systems by diagnosing retrieval and generation separately. A single "RAG accuracy" number hides whether the problem is finding the right documents or using them correctly. This skill separates them so you know what to fix.

When to Activate

  • User has a RAG pipeline (retriever + generator) with traces
  • User wants to know if their RAG system hallucinates
  • User is optimizing chunking strategy and needs before/after comparison
  • User wants to build a RAG evaluation dataset

Checklist

You MUST create a task for each item and complete them in order:

  1. Load RAG traces — validate query + context + answer triples
  2. Separate retrieval vs generation — determine which layers to evaluate
  3. Run faithfulness evaluation — is the answer grounded in retrieved docs?
  4. Run retrieval evaluation — are the right documents retrieved?
  5. Build diagnostic matrix — cross-tabulate to find root cause
  6. Output findings — prioritized issues with concrete fixes

Fast path: run the bundled script

Once each trace has a faithfulness judgment (and ideally a retrieval signal), build the retrieval-vs-generation diagnostic matrix with the bundled, tested script (scripts/rag_diagnostic.py, standard library only, no OpenJudge dependency):

python scripts/rag_diagnostic.py --traces traces.jsonl

Trace rows: {"faithful":bool} or {"faithfulness_score":1-5} (>= 4 = faithful), plus an optional retrieval signal {"retrieval_good":bool} or {"recall_at_k":0-1} (>= 0.5 = good). It prints the generation faithful/hallucinating split, the 2×2 matrix when a retrieval signal is present, and the primary issue (retrieval vs generation). --self-test to verify it.

Steps below explain how to separate the layers and produce the faithfulness/retrieval signals (with OpenJudge graders or any judge).

Step 1: Load RAG Traces

The minimum data needed per trace:

# Each trace must contain:
trace = {
    "query": "What is the return policy?",
    # retrieved_docs are dicts with id + text (the id is required for retrieval
    # metrics like Recall@k; the text is required for the faithfulness check).
    "retrieved_docs": [
        {"id": "doc_1", "text": "Returns are accepted within 30 days..."},
        {"id": "doc_2", "text": "Refunds are issued to the original..."},
    ],
    "answer": "You can return items within 30 days for a full refund.",
    "reference_answer": "Our 30-day return policy allows full refunds.",  # optional
    "gold_doc_ids": ["doc_1", "doc_3"],  # optional — which docs should have been retrieved
}

Read the full file on GitHub · 249 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. 10d ago First seen · 249 lines · 86 tokens per session scan A fead7ab1ca83

Subscribe to this mod's changes

rag-eval is a skill published in the GitHub repository agentscope-ai/OpenJudge (824 stars, last pushed 2d ago), licensed Apache-2.0. It adds 86 tokens to every session and 2,320 once invoked, about $0.0004 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

llm-as-judge-evaluation

Evaluate LLM outputs using frontier models as judges. Use for pairwise model comparison, quality scoring with custom rubrics, and automated evaluation pipelines. Covers position bias mitigation, statistical significance, and generating preference data for DPO/RLHF.

synthetic-sciences/openscience · 56 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

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

fetch-llm-papers

Workflow for updating the LLM landscape paper pool (section/xllmpapers.md) using fetchllmpapers.py. Covers full re-fetch, resume from checkpoint, and adding new topics. USE FOR: Refreshing citation counts, expanding topic coverage. DO NOT USE FOR: Adding hand-curated entries to section files (use…

kimtth/azure-openai-llm-notes · 101 tokens

rag-evaluator

Evaluate RAG pipeline quality across faithfulness, relevance, and hallucination metrics. Use when user asks to test, benchmark, or improve a RAG system, or when RAG outputs look wrong.

chandrudp29/skillhub · 44 tokens

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program.

ranbot-ai/awesome-skills · 28 tokens