← Timeline

June–July 2026

DocQAGroundingEval

DocQAGroundingEval is an open-source evaluation harness that tests how AI models behave when the document they are given is wrong, incomplete or fine. I built it between June and July 2026, straight after the takeoff case study.

Why I built it

The takeoff work left me with a question I could not shake. My extractor failed because the information it needed was not in the drawings, but nobody had told me that. I only found out by building a test that could prove me wrong. I wanted to know how often AI systems are trusted to do something nobody has actually checked.

Documents are the obvious place to look. Businesses and governments are wiring AI into workflows that run on licences, contracts and reports, and those documents contain errors. When a model reads a document with a mistake in it, what should it do? Repeat it, because it was told to stick to the source? Or flag it, and risk reaching for outside knowledge it was told not to use?

It was also how I learnt Python. I wrote the first version by hand, from my first print("hello") to a tested, version-controlled harness, before building the full experiment with AI. I designed the experiments, chose what to measure and checked the results.

What I built

The harness runs five OpenAI and Anthropic models (GPT-4o mini, GPT-5.4 nano, GPT-5.6 Terra, Claude Haiku 4.5 and Claude Sonnet 5) over three real Australian regulatory documents: a NSW development consent, an environment protection licence and a liquor licence. The variable is the system instruction, the standing rules a company gives the model, tested across five versions from strict ("answer using ONLY the passage") to ones that invite the model to flag anything implausible.

Each model faces three situations:

  • The document is wrong. A value is changed, on a ladder from subtle to absurd, to see whether the model flags it or repeats it.
  • The answer is not there. The model should say so instead of filling the gap from what it already knows.
  • The document is fine. A model that flags everything is not careful, it is noisy, so the false-alarm rate is measured too.

Scoring is done by AI judges, so the judges had to be checked first. Each one was certified against a hand-labelled set of answers, and had to agree with them strongly (Cohen's kappa of at least 0.80) before it was used. The analysis was written down before the runs, 219 tests cover the scoring logic, and every published number can be regenerated from the saved results without calling a model.

What I found

Under the strict instruction that is standard in real deployments, four of the five models repeated physically impossible values without comment: grass mowed to 500 metres, one toilet per 1,000,000 workers. Only Haiku 4.5 ever flagged one, 8% of the time. Under an instruction that invites flagging, every model catches them once they are absurd enough, and Sonnet 5 catches changes as small as 3.3 times the real value. The instruction, not the model's ability, decided whether those errors got caught.

Inviting the model to flag errors had its own failure. Sonnet 5 repeatedly vouched for the changed values, citing outside authorities to back up a number I had made up. The instruction that combined both, stick to the source but flag anything implausible, came closest to the best of both: almost no outside knowledge leaking in and few false endorsements, at the cost of flagging a little less.

Where it stands

The harness, the judge certification data and the analysis code are public under the MIT licence. Its limits are stated in the repository: three documents from one domain, two model providers, and every result tied to an explicit system instruction. The practical lesson for anyone deploying AI on documents is that the same model, on the same document, behaves very differently depending on one paragraph of instructions.