AI-agent skill · Claude Code · Codex · Cursor · Gemini CLI

Is your chatbot making things up?

RAG Eval Kit lets your AI coding agent test a chatbot or RAG system that answers from your documents. It writes a test set from your own documents (including questions the documents cannot answer), scores retrieval, and checks every sentence of every answer against the sources the system retrieved. Every "supported" or "contradicted" verdict must carry a word-for-word quote, and a script checks that the quote, every number, every name and every calculation is really there. You get a report with confidence intervals, the exact wrong answers with proof, and a paired comparison between two versions.

Get it on Agensi · $12.60 ↗Blind testReal chatbot testGitHub ↗

Blind test on answers it had never seen

RAGTruth (MIT licence) is a public dataset of chatbot answers in which humans marked every made-up or wrong statement. I froze version 1.0.0, took 120 answers from its test split (40 that humans marked as containing made-up details and 80 they marked clean), and gave them to 3 fresh AI agents that saw only the skill and the chatbot log. Scored once against the human labels, no changes afterwards. (Versions 1.0.1 and 1.0.2 later fixed checker bugs found in this test and in the chatbot test below, such as "Aug" vs "August"; all 120 verdicts pass them unchanged, so these numbers still hold.)

34 / 40answers with made-up details caught (85%)
26 / 80clean answers wrongly flagged (32.5%)
5,000 / 5,000retrieval scores identical to the ranx library (random cases)
6 / 6errors planted in a real chatbot's answers caught
Per part and what the false alarms are
Part (40 answers each)Made-up answers caughtClean answers flagged
A11 / 139 / 27
B9 / 1113 / 29
C14 / 164 / 24

The skill is stricter than the human labellers: it flags any detail that is not in the retrieved passages, even when it may be true in real life. Some flagged "clean" answers do contain real errors that the labels missed. In one, the passage says "T-Bone steaks and Porterhouse steaks are the same", while the answer says sirloin and porterhouse may be the same thing. They still count as false alarms here. At RAGTruth's natural rate of 18% made-up answers, about 36% of flagged answers would match a human label. Every verdict, quote and label is published in results/ragtruth_blind/.

Free first pass: quickcheck (no AI, instant) flags answers containing numbers or names that appear in none of their sources. On all 900 RAGTruth QA test answers it flagged 89, of which 46 had human-labelled made-up details (false alarms on 5.8% of clean answers). It misses most made-up details (46 of 160 caught): it is a quick screen, the AI judge does the real work.

A real chatbot: two versions compared

A small "chat with the docs" app over the real httpx documentation (21 files, TF-IDF retrieval). Old version: 2 small chunks and a "be helpful" prompt. New version: 5 bigger chunks and an "only from the context, otherwise say you don't know" prompt. A fresh agent wrote the 40-question test set with the skill; two fresh agents judged the versions. I wrote down the expected results before running.

MeasureOldNew
Correct vs reference answer86.8%86.8%
Answers with made-up or wrong details95.0%12.8%
Faithfulness (claims backed by the sources)33.6%90.2%
Correct refusals on 6 unanswerable questions1 / 66 / 6
Retrieval: evidence in the top 561.8%85.3%

The lesson: both versions were 86.8% correct, so a correctness check alone would call them equal. But the old version's answers were mostly not backed by its sources: it answered from the model's memory and changed or invented details. The paired comparison calls the drop in made-up answers a real change (−82.1 points, 95% interval −92.3 to −69.2). Before judging, 6 errors were planted in the old answers (a number, a yes/no flip, a behaviour flip, a version, a parameter name, an invented function), hidden from the judge: all 6 were caught. See examples/httpx-chatbot/ for the full reports.

What your agent does with it

  1. Asks where the documents are and how to get answers (a command it can call, or a log of questions, retrieved chunks and answers).
  2. Chunks the documents and writes a test set with you: real-user wording, multi-hop questions, 10–20% questions the documents cannot answer. A checker rejects quotes that are not word for word and reference answers with numbers that are not in the evidence.
  3. Collects the answers, then splits each one into claims and flags numbers and names that appear in no source.
  4. Judges every claim: supported, contradicted, not found, a generic add-on, or a wrong refusal, each with a quote. The script verifies quotes, numbers, names and calculations and sends back anything that does not hold.
  5. Reports faithfulness, made-up answers, correctness, refusals, hit@k, recall@k, MRR, nDCG and context precision with 95% intervals, a diagnosis per answer (retrieval miss vs model invention vs wrong refusal) and the problem answers with proof.
  6. Compares two versions on the same questions with a paired test, so you know if a change is real or noise.

Good to know

Who it is for

Teams whose chatbot or RAG feature gives wrong answers and who need proof, a regression test, or a fair A/B between prompts, chunking, retrievers or models.

No API key

Your own coding agent is the judge; one Python script (standard library, Python 3.10+) does the checking. Nothing is sent anywhere.

Proof, not scores

Each verdict comes with the quote that proves it, checked mechanically, so you can see exactly why an answer was flagged.

Honest limits

It is strict: true but unsourced details count as unsupported. The judge is an AI; spot-check 10 verdicts before big decisions. Small test sets give wide intervals.

Get it on Agensi · $12.60 ↗GitHub ↗

Made by Muhammad Shahmeer · Data Science MSc, University of Naples Federico II · © 2026, all rights reserved. RAGTruth is © its authors (MIT licence). httpx documentation © Encode OSS Ltd (BSD licence). Not affiliated with either.