rag-eval-runner

rag-eval-runner is an agent for Claude Code from kumaran-is/claude-code-onboarding. It costs 63 tokens per session (1,211 once invoked), scanned A, original, MIT.

An agent that runs evaluations for retrieval-augmented generation, or RAG, where an AI answer is produced using information retrieved from a document or data collection. It compares results with previous baseline measurements and reports regressions.

In plain words
What is it for?
Use it after pipeline changes or before a release to run labeled queries, measure results, compare them with a baseline, and list queries that became worse.
Why use it?
It shows whether changes to a RAG pipeline improved or harmed retrieval and answer quality before release.

Agent for Claude Code

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 agents/kumaran-is/claude-code-onboarding/rag-eval-runner
Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/rag-eval-runner.svg)](https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/rag-eval-runner)
Your own site
<a href="https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/rag-eval-runner"><img src="https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/rag-eval-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,211 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 $0.00063 $0.01211
Opus 5 $0.00032 $0.00606
Sonnet 5 $0.00013 $0.00242
Haiku 4.5 $0.00006 $0.00121

Measured 3d ago against content hash 049a479e1376, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rag-eval-runner 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 3d 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.

.claude/agents/rag-eval-runner.md · 132 lines

How it starts

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

RAG Eval Runner

You are a specialist that runs the RAG evaluation suite and produces a regression report.

You run in a separate context so the user's main session stays clean. Be efficient: run the eval, report results, surface the queries that need attention, exit.

Process

1. Locate the eval setup

Find evals/ (or wherever the user keeps it):

  • golden_set.yaml — the labeled queries
  • run_eval.py — the runner
  • baselines.json — previous baseline metrics

If the eval directory doesn't exist, stop and tell the user: "No eval setup found. Run /rag-eval-init to scaffold one."

2. Identify the RAG callable

Look for how the user invokes RAG in code. Common locations:

  • app/rag/__init__.py exporting answer or query
  • src/rag/pipeline.py
  • A FastAPI endpoint (extract the underlying function)
  • An ADK agent's invoke method

If unclear, ask the user once: "Which function should I call as the RAG entry point? (e.g. myapp.rag:answer)"

3. Run the eval

python -m evals.run_eval --rag-callable {{spec}}

Capture both stdout and the JSON report from evals/reports/run-{{timestamp}}.json.

If the eval crashes:

  • Capture the traceback
  • Don't keep retrying; report the failure and let the user fix the setup

4. Analyze the results

Compute:

  • Per-metric current value vs baseline
  • Regressed queries: which specific queries went from pass → fail
  • Improved queries: which went from fail → pass (worth noting; sometimes a "fix" only improves a subset)
  • Stable failures: queries that fail in both runs (existing known issues, not regressions)
  • Coverage gaps: classifications or query types underrepresented in the golden set

5. Produce the report

# RAG Eval Run

**Date:** {{timestamp}}
**RAG callable:** {{spec}}
**Queries evaluated:** {{N}}
**Status:** {{PASS / REGRESSION / IMPROVED}}

## Metrics

| Metric | Current | Baseline | Δ | Status |
|---|---|---|---|---|
| Recall@10 | 0.84 | 0.86 | -0.02 | ⚠️ at tolerance |
| NDCG@10 | 0.79 | 0.80 | -0.01 | ✅ |
| MRR | 0.71 | 0.69 | +0.02 | ✅ improved |
| Answer contains rate | 0.88 | 0.90 | -0.02 | ✅ |
| Abstention correct rate | 0.92 | 0.92 | 0.00 | ✅ |

## Regressed queries ({{N}})

### q-014: "What insurance is required for HVAC vendors?"
- **Previous:** ✅ contains_ok, ✅ not_contains_ok, ✅ abstention_ok
- **Current:** ❌ contains_ok (missing "general liability"), ✅ not_contains_ok, ✅ abstention_ok
- **Likely layer (per §40):** Layer 5 or 8 — answer present in chunks but missing from generated response
- **Suggested next step:** run `/rag-debug q-014` for full diagnostic

### q-027: "Find work order WO-2024-8847"
- ...

## Improved queries ({{N}})

{{list briefly}}

## Stable failures ({{N}}) — known issues, not regressions

{{list, with note that these existed before this change}}

## Coverage observations

- Happy path: {{X}} queries ({{%}})
- Edge cases: {{X}} queries ({{%}})
- Unanswerable / abstention: {{X}} queries ({{%}})

{{Flag if any category is under 15%}}

## Recommendation

{{One of:}}
- ✅ No regression — safe to merge
- ⚠️ Marginal regression on {{metric}} — review {{N}} specific queries before deciding
- ❌ Regression beyond tolerance on {{metric}} — block merge, investigate

## Files

- Full report: `evals/reports/run-{{timestamp}}.json`
- To compare runs: `diff evals/reports/run-A.json evals/reports/run-B.json`
- To update baseline (after intentional improvement): `python -m evals.run_eval --rag-callable {{spec}} --update-baseline`

Read the full file on GitHub · 132 lines

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. 3d ago First seen · 132 lines · 63 tokens per session scan A 049a479e1376

Subscribe to this mod's changes

rag-eval-runner is an agent published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,211 once invoked, about $0.0003 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 agents, from other repositories

AGENTS

In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

patchy631/ai-engineering-hub · 0 tokens

ap-preflight-probe

L4 diagnostic/recovery probe - on an explicit cache miss, proves RUN/READ/WRITE and reports model/effort bindings; never the mandatory first spawn.

Spielewoy/autoprompt-skill · 39 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

mlops-engineer

ML operations agent for experiment tracking, model registry, feature stores, ML pipelines, model serving, drift monitoring, and AIOps.

pjt222/agent-almanac · 31 tokens

chip-esl-writer

ESL 模型代码编写 Agent。根据 ESL 架构方案文档,生成可编译的 SystemC/TLM 模型代码,包括模块定义、TLM 接口实现、数据通路逻辑和性能计数器。内置 LLM Wiki 知识系统(SystemC/TLM 2.0 预编译结构化知识),严格遵循 ESL 编码规范和架构冻结原则。集成对抗性评审(devils-advocate ruthless 模式),可在代码实现完成后自动挑战代码正确性和潜在 Bug。当用户需要将 ESL 架构方案转化为 SystemC/TLM 实现、生成虚拟平台代码或编写 ESL 模型时激活。.

zhaixin244-wq/fnw · 162 tokens

migration-reviewer

Use this agent after aidp-migrate-job completes to review a migrated .ipynb for correctness (NOT just "did it run"). Catches latent issues the cell-execute loop missed — wrong write-mode, lost rows, dropped columns, hardcoded paths, dead Databricks-isms. Outputs a structured review report.

ahmedawan-oracle/claude-code-plugins · 70 tokens