RAG Golden Set & Retrieval Eval Gate

    by Vijay Kumar

    1

    Teams change a chunk size, swap an embedding model or add a reranker, try five queries by hand, and ship.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+23 more

    What it does

    • Guides you through writing 15 to 50 real fixtures with stable ids, hard cases and unanswerable questions
    • Scores Recall@k, nDCG@k, citation hit rate, prompt tokens and abstention, split by difficulty
    • Labels each miss by stage (retrieval, rerank drop or packer drop) when your run includes stage lists
    • Compares a candidate against a baseline with a paired bootstrap interval, so noise is not mistaken for gains
    • Applies a pass or fail gate covering quality, tokens, latency and abstention, with exit codes for CI
    • Scores code-review bots and linters too, with expected, tolerated and clean-repo false-positive checks

    Who it's for

    AI founders and product owners

    Stop guessing if your AI search is getting better and prove it with real numbers.

    Try asking: “Build a golden test set for my customer support RAG system.”

    Software engineers building AI features

    Add a quality gate to your code so poor search results never make it to production.

    Try asking: “Compare these two embedding models using my retrieval test suite.”

    Data analysts and researchers

    Find exactly which part of your data pipeline is losing the right information.

    Try asking: “Show me why the retriever missed the document about refund policies.”

    RAG Golden Set & Retrieval Eval Gate

    Example session with this skill installed

    I replaced my chunker with a smaller one and a faster reranker. Compare the new run to the baseline on our golden set and tell me if I can ship it. Files: suite.example.json, run_baseline.json, run_candidate.json.

    • Read your context and instructions
    • Compiled the rag golden set

    (bundled synthetic demo data)

    $ python3 scripts/score.py compare examples/suite.example.json examples/run_baseline.json examples/run_candidate.json
    Suite: support-docs-demo (14 fixtures, k=10)   baseline -> candidate
    Recall@10                      0.750       0.917   +0.167
    nDCG@10                        0.321       0.549   +0.227
    Citation hit rate              0.750       0.917   +0.167
    Prompt tokens (mean)             658         298   -55%
    Latency ms (mean)                300         180   -40%
    Abstains when it should         0.50        1.00   +0.500
    Recall delta 95% bootstrap interval: +0.000 to +0.417 (n=12)
    Gate: PASS
    Note: the recall change is inside bootstrap noise; the gain is probably in cost/latency, not quality.
    

    Agent report: Ship it, with one caveat. The gate passes: recall and nDCG did not drop, prompt tokens fell 55% and latency fell 40%. With only 12 answerable fixtures the recall gain (+0.167) is inside the bootstrap interval, so claim the cost and latency win, not a quality win, and add 15 more fixtures from real failures before the next change. Baseline misses were: one recall miss, one rerank drop, one packer drop (labelled from your stage lists); the candidate fixed the first two.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    "It feels better" is not a result. Teams change a chunk size, swap an embedding model or add a reranker, try five queries by hand, and ship. Weeks later quality is worse and nobody knows which change did it.

    RAG Golden Set & Retrieval Eval Gate teaches your agent a repeatable way to measure retrieval. It first helps you write a small golden set from real questions: stable document ids instead of chunk UUIDs, a mix of easy and hard questions, and a few questions the corpus cannot answer, so you can see whether the system admits it does not know. You run your own retriever and save the results as JSON.

    The bundled scorer then reports Recall@k, nDCG@k, citation hit rate, prompt tokens, latency and abstention, per difficulty level. When your run includes the output of each stage, it names where every miss happened: nothing retrieved, a reranker that pushed the answer out, or a token budget that cut it from the prompt. To judge a change, it compares candidate and baseline, shows a bootstrap interval so you know whether a gain is real on a small suite, and applies a gate: no more than 5% relative loss in recall or nDCG, no more than 2 points of recall lost, and some real gain in quality, tokens or latency.

    The same scorer also evaluates finding-style systems, such as code-review bots, with expected findings, tolerated false positives and a clean repo that must stay silent.

    You end up with a golden set, a baseline run, and a one-line pass or fail for every future change.

    Only measures if documents were found, not the quality of the written answer. Requires you to provide stable IDs for your documents.

    Files: `SKILL.md`, `README.md`, `scripts/score.py` (about 10 KB, standard library only, commands `retrieval`, `compare`, `findings`), `references/building-a-golden-set.md`, `examples/` (suite, two runs, findings suite and run). JSON inputs; YAML works only if PyYAML is already installed. Permissions to expect in the scan: file read only, no network.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    This skill helps you move away from guessing if your AI search is better after a change. It uses a small set of proven questions and answers to calculate real accuracy scores and pinpoint exactly where a search system is failing, such as during the initial lookup or the final ranking step.

    You need to provide a list of questions and the specific document IDs that the AI should find for each one. You also need to run your own search system and save those results into a simple data file that the skill can read and analyze.

    The skill identifies whether a failure happened because the right information was never found, was found but ranked too low, or was found but cut out of the final summary. This helps you decide if you need a better search model, different keyword settings, or more space for text.

    You will get a report showing standard industry scores like Recall and nDCG, which measure how many right answers were found and how high they appeared in the list. When comparing two versions, it provides a pass or fail result based on whether the new version is truly better or just creating more noise.

    This skill focuses on whether the right documents were found, not on how well the AI wrote the final response or if the summary is grammatically correct. It also requires your document IDs to stay consistent to accurately track improvements over time.

    You can ask your agent to evaluate your RAG, build a golden set, or compare two retrievers. You can also ask it to check if a specific change helped your retrieval quality or to run a regression test for search.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.