Home/hodan.ai

RAG Evaluation Harness

A grading rig for retrieval agents, and what it found when pointed at itself.

The method

Measure before you tune.

A retrieval agent answers questions over public incident response guidance. Ten questions, each with a reference answer copied from the source, each run twice so variance is measured rather than assumed. One question is a control the corpus cannot answer, to see whether the agent declines or invents. A judge grades every answer and flags anything the reference does not support. Every run is appended to an audit log with the tool query, the passages it was given with their scores, the tokens and the latency.

Corpus

Public guidance only

Grading

Judge vs verbatim reference

Control

One unanswerable question

Evidence

Per-run audit log

Seven runs

Every change, measured.

Twenty graded answers per run. Added is the share of answers asserting something the reference does not support. Agree is how often the same question got the same verdict on both runs. Trap is the control question.

RunChangeCorrectPartialWrongCitesAddedAgreeTrap
BaselineStock chunking, stock prompt51140.800.850.501 / 2
v1Section chunking, keyword channel, strict rules7670.200.650.602 / 2
v2Chunking regression repaired13520.400.450.802 / 2
v3Citation rule made mandatory9740.850.500.600 / 2
v4Not-covered case carved out of the citation rule13430.850.400.502 / 2
v4 repeatIdentical configuration, nothing changed10730.750.500.802 / 2
v5Reference answers corrected14420.550.300.802 / 2

The correction

I reported that the agent invents things. It did not.

The most alarming example looked decisive. Asked how long incident evidence should be kept, the agent cited General Records Schedule 24 and a three year retention period. A specific, official sounding records requirement, apparently conjured.

Checking the source first turned that on its head. GRS 24 is stated in plain text in NIST SP 800-61r2, section 3.4.3. The agent read it correctly. The reference answer had left it out. Three of ten references were defective in the same direction, all too narrow.

Correcting them and changing nothing else moved the score further than any prompt or chunking change had: fourteen correct, unsupported additions down to 0.30, and both questions previously cited as failures correct on both runs.

In a harness judged by a model, everyone tunes the prompt and the chunking. Nobody audits the answer key. It was the largest single source of error here.

What broke

Four failures worth stealing.

The answer key, not the model

The dominant flag was answers adding material the reference did not contain, peaking at 85 percent. Three of ten reference answers turned out to be too narrow, and the agent was being marked down for being more complete than the key.

Fix. Audit the reference answers against the source before trusting a single verdict.

Chunking that erased a list

Section-aware chunking consumed each heading as a label and dropped it from the body. A four phase list in an unnumbered document fell under the minimum chunk length and vanished from the index. The agent then answered with phases from a different document.

Fix. Keep the heading in the body text and pack short sections up to the chunk window.

Two rules in conflict

Making citations mandatory raised the cite rate from 0.40 to 0.85 and simultaneously broke the control question. Told to always name a source, the agent stopped saying a question was uncovered and started naming the nearest document instead.

Fix. Exempt the not-covered case from the citation requirement, explicitly.

The noise floor

An identical configuration run twice scored 13 and then 10 out of 20. The spread of the instrument is the same size as most of the differences between versions, so small gains are not distinguishable from variance.

Fix. Run the eval twice with nothing changed. That gap is the smallest result you may claim.

Limits

Twenty graded answers cannot resolve a two answer difference, as the repeat run shows. The reference answers are written by hand and are the ceiling on grading quality. The corpus is public guidance, so the agent cannot answer questions about any particular organisation's environment. Numbers on this page are read back from the harness output, not estimated.

hodan.ai — Security tooling