Agent skill

RAG Auditor

by Mathews-Tom in Mathews-Tom/armory

Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate).

MITAuto-check passedAI & LLM Engineering

Install RAG Auditor

skills CLI
$ npx skills add Mathews-Tom/armory --skill rag-auditor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory rag-auditor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rag-auditor .claude/skills/rag-auditor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rag-auditor
GitHub stars
328
Token cost
~2.4k tokens
SKILL.md length
728 words
Files
6 (incl. references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate).

  • Works in 6 steps: Pipeline Inventory → Design Evaluation Queries → Evaluate Retrieval → …
  • : audit RAG pipeline
  • SKILL.md covers Reference Files, Prerequisites, Workflow and Output Format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

RAG Auditor is an agent skill from Mathews-Tom/armory. Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate). Triggers on: "audit RAG pipeline", "RAG quality", "hallucination detection", "why is RAG failing", "grounding check". NOT for general architecture audits, use architecture-reviewer.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `evals/cases.yaml`, `references/diagnostic-queries.md` and `references/failure-taxonomy.md`).

It sits in AI & LLM Engineering, covering Retrieval-augmented generation. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • : audit RAG pipeline
  • Hallucination detection
  • Why is RAG failing
  • Grounding check

Example prompts

  • “audit RAG pipeline”
  • “RAG quality”
  • “hallucination detection”
  • “/rag-auditor”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pipeline Inventory
  2. Design Evaluation Queries
  3. Evaluate Retrieval
  4. Evaluate Generation
  5. Diagnose Failures
  6. Recommendations

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

RAG Auditor loads about 2.4k tokens when it runs, and up to ~7.6k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 728 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 728 words, ~2,380 tokens.

Download SKILL.mdSave it as .claude/skills/rag-auditor/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
rag-auditor
description
Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate). Triggers on: "audit RAG pipeline", "RAG quality", "hallucination detection", "why is RAG failing", "grounding check". NOT for general architecture audits, use architecture-reviewer.
metadata.version
1.1.1
metadata.category
review
metadata.tags
rag, retrieval, hallucination, grounding
metadata.difficulty
advanced
metadata.phase
build

RAG Auditor

Systematic RAG pipeline evaluation across the full retrieval-generation chain: designs evaluation query sets, measures retrieval metrics (Precision@K, Recall@K, MRR), evaluates generation quality (groundedness, completeness, hallucination rate), diagnoses component-level failures, and recommends targeted improvements.

Reference Files

FileContentsLoad When
references/retrieval-metrics.mdPrecision@K, Recall@K, MRR, NDCG definitions and calculationAlways
references/generation-metrics.mdGroundedness, completeness, hallucination detection methodsGeneration evaluation needed
references/failure-taxonomy.mdRAG failure categories: retrieval, generation, chunking, embeddingFailure diagnosis needed
references/diagnostic-queries.mdDesigning evaluation query sets, known-answer questions, difficulty levelsEvaluation setup

Prerequisites

  • Access to the RAG pipeline (or its outputs for post-hoc evaluation)
  • A set of test queries with known-correct answers
  • Understanding of the pipeline components (embedding model, retriever, generator)

Workflow

Phase 1: Pipeline Inventory

Document the RAG pipeline configuration:

  1. Document source — What documents are indexed? Format, count, size.
  2. Chunking — Strategy (fixed-size, semantic, paragraph), chunk size, overlap.
  3. Embedding — Model name and version, dimensionality.
  4. Vector store — Type (FAISS, Pinecone, Chroma, pgvector), index type.
  5. Retrieval — Method (similarity, hybrid, reranking), top-K parameter.
  6. Generation — Model, prompt template, context window usage.
Phase 2: Design Evaluation Queries

Create a diverse set of test queries:

Query TypePurposeCount
Known-answer (factoid)Measure retrieval + generation accuracy10+
Multi-hopRequire combining info from multiple chunks5+
UnanswerableNot in the corpus — should abstain3+
AmbiguousMultiple valid interpretations3+
Recent/updatedTest freshness2+

For each query, document the expected answer and the source chunk(s).

Phase 3: Evaluate Retrieval

For each test query, measure:

  1. Precision@K — Of the K retrieved chunks, how many are relevant?
  2. Recall@K — Of all relevant chunks in the corpus, how many were retrieved?
  3. MRR (Mean Reciprocal Rank) — How high is the first relevant chunk ranked?
  4. Chunk relevance — Score each retrieved chunk: Relevant, Partially Relevant, Irrelevant.
Phase 4: Evaluate Generation

For each test query with retrieved context:

  1. Groundedness — Is every claim in the response supported by the retrieved context? Score: 0 (hallucinated) to 1 (fully grounded).
  2. Completeness — Does the response use all relevant information from the context? Score: 0 (ignored context) to 1 (complete).
  3. Hallucination detection — Identify specific claims not supported by context.
  4. Abstention — For unanswerable queries, does the model correctly say "I don't know"?
Phase 5: Diagnose Failures

For every incorrect or low-quality response, classify the root cause:

Failure TypeDiagnosisIndicator
Retrieval failureRelevant chunks not retrievedLow Recall@K
Ranking failureRelevant chunk retrieved but ranked lowLow MRR, high Recall
Chunk boundary issueAnswer split across chunk boundariesPartial matches in multiple chunks
Embedding mismatchQuery semantics don't match chunk embeddingsRelevant chunk has low similarity score
Generation failureCorrect context but wrong answerHigh retrieval scores, low groundedness
HallucinationModel invents facts not in contextClaims not traceable to any chunk
Over-abstentionModel refuses to answer when context is sufficientUnanswered with relevant context present
Show full SKILL.md (263 more words)Show less
Phase 6: Recommendations

Based on failure analysis, recommend specific improvements:

Failure PatternRecommendation
Chunk boundary issuesIncrease overlap, try semantic chunking
Low Precision@KReduce K, add reranking stage
Low Recall@KIncrease K, try hybrid search
Embedding mismatchTry different embedding model, add query expansion
HallucinationStrengthen grounding instruction in prompt, reduce temperature
Over-abstentionSoften abstention criteria in prompt

Output Format

text
## RAG Audit Report

### Pipeline Configuration
| Component | Value |
|-----------|-------|
| Documents | {N} ({format}) |
| Chunking | {strategy}, {size} tokens, {overlap}% overlap |
| Embedding | {model} ({dimensions}d) |
| Retrieval | {method}, K={N} |
| Generation | {model}, temperature={T} |

### Evaluation Dataset
- **Total queries:** {N}
- **Known-answer:** {N}
- **Multi-hop:** {N}
- **Unanswerable:** {N}

### Retrieval Quality

| Metric | Score | Target | Status |
|--------|-------|--------|--------|
| Precision@{K} | {score} | {target} | {Pass/Fail} |
| Recall@{K} | {score} | {target} | {Pass/Fail} |
| MRR | {score} | {target} | {Pass/Fail} |

### Generation Quality

| Metric | Score | Target | Status |
|--------|-------|--------|--------|
| Groundedness | {score} | {target} | {Pass/Fail} |
| Completeness | {score} | {target} | {Pass/Fail} |
| Hallucination rate | {score} | {target} | {Pass/Fail} |
| Abstention accuracy | {score} | {target} | {Pass/Fail} |

### Failure Analysis

| # | Query | Failure Type | Root Cause | Recommendation |
|---|-------|-------------|------------|----------------|
| 1 | {query} | {type} | {cause} | {fix} |

### Recommendations (Priority Order)
1. **{Recommendation}** — addresses {N} failures, expected impact: {description}
2. **{Recommendation}** — addresses {N} failures, expected impact: {description}

### Sample Failures

#### Query: "{query}"
- **Expected:** {answer}
- **Retrieved chunks:** {chunk summaries with relevance scores}
- **Generated:** {response}
- **Issue:** {diagnosis}

Calibration Rules

  1. Component isolation. Evaluate retrieval and generation independently. A great retriever with a bad generator looks like retrieval failure if you only check end output.
  2. Known answers first. Start with factoid questions where the correct answer is unambiguous. Multi-hop and ambiguous queries are harder to evaluate.
  3. Quantify, don't qualify. "Retrieval is bad" is not a finding. "Precision@5 is 0.3 (target: 0.8) with 70% of failures due to chunk boundary splits" is actionable.
  4. Sample failures deeply. Aggregate metrics identify WHERE the problem is. Individual failure analysis identifies WHY.

Error Handling

ProblemResolution
No known-answer queries availableHelp design them from the document corpus. Pick 10 facts and formulate questions.
Pipeline access not availableWork from recorded inputs/outputs. Post-hoc evaluation is possible with query-context-response triples.
Corpus is too large to reviewSample-based evaluation. Select representative documents and generate queries from them.
Multiple failure types co-existAddress retrieval failures first. Generation quality cannot exceed retrieval quality.

When NOT to Audit

Push back if:

  • The pipeline hasn't been built yet — design it first, audit after
  • The corpus has fewer than 10 documents — too small for meaningful retrieval evaluation
  • The user wants to compare embedding models — that's a benchmark task, not an audit

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/rag-auditor of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml
  • references/diagnostic-queries.md
  • references/failure-taxonomy.md
  • references/generation-metrics.md
  • references/retrieval-metrics.md

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

RAG Auditor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

RAG Auditor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
RAG Auditor this skillMathews-Tom/armory328—~2.4kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
MCP Local RAGshinpr/mcp-local-rag411—~4.4kAutomated safety check: PassMIT
Ms Agent Framework RAGshuyu-labs/WebCode278—~1.1kAutomated safety check: PassCustom licence
Local RAG Searchnkapila6/mcp-local-rag1341 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • MCP Local RAG

    shinpr/mcp-local-rag

    Searches, saves, and maintains a local document index through a local RAG MCP server.

    411 GitHub stars~4.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Ms Agent Framework RAG

    shuyu-labs/WebCode

    Comprehensive guide for building Agentic RAG systems using Microsoft Agent Framework in C.

    278 GitHub stars~1.1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Local RAG Search

    nkapila6/mcp-local-rag

    Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking.

    134 GitHub starsUsed in 1 repo~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Blockify Integration

    iternal-technologies-partners/blockify-agentic-data-optimization

    Process documents with Blockify API to create optimized IdeaBlocks for RAG.

    315 GitHub stars~6.2k tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check: notes

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    328 GitHub stars~4.6k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    328 GitHub stars~2.6k tokensUpdated 3 days ago
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    328 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    328 GitHub stars~4.9k tokensUpdated 3 days ago
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    328 GitHub stars~2.7k tokensUpdated 3 days ago
    Auto-check passed

Questions about RAG Auditor

What does RAG Auditor do?

Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate). RAG Auditor is an agent skill from Mathews-Tom/armory. Evaluates RAG pipeline quality across retrieval (precision, recall, MRR) and generation (groundedness, hallucination rate).

When should I use RAG Auditor?

RAG Auditor fits situations like: : audit RAG pipeline; hallucination detection; why is RAG failing; grounding check.

How do I install RAG Auditor in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill rag-auditor -a claude-code`. Or copy the skill folder (skills/rag-auditor in Mathews-Tom/armory) into .claude/skills/rag-auditor in your project. Claude Code loads it when a task matches its description.

How do I install RAG Auditor in Codex?

Run `npx skills add Mathews-Tom/armory --skill rag-auditor -a codex`. Or copy the skill folder (skills/rag-auditor in Mathews-Tom/armory) into .agents/skills/rag-auditor in your project. Codex loads it when a task matches its description.

Can I use RAG Auditor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill rag-auditor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rag-auditor, .gemini/skills/rag-auditor, .github/skills/rag-auditor and .opencode/skills/rag-auditor in your project.

What does RAG Auditor need to run?

SKILL.md names no scripts, command-line tools or credentials: RAG Auditor is instructions for the agent only.

Does RAG Auditor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is RAG Auditor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does RAG Auditor use?

RAG Auditor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does RAG Auditor use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.2k tokens, read only when the agent opens those files.

What are the alternatives to RAG Auditor?

Skills that share tags, products or a category with RAG Auditor: Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars), MCP Local RAG (shinpr/mcp-local-rag, 411 stars) and Ms Agent Framework RAG (shuyu-labs/WebCode, 278 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains RAG Auditor?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 328 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.