I built a RAG tool that says "I don't know" (and checks its own quotes)
Most AI answer tools are built to sound confident. For environmental consultants that's a problem. If a tool says the lead limit for commercial land is 1,500 mg/kg, a wrong number can end up in a report, so the number has to be on a page you can open.
I built Site Data Desk to test one rule: evidence or silence. It answers questions about contaminated land using real, openly licensed standards (the NEPM Schedules and EPA Victoria's PFAS guidance), and every claim comes with a verbatim quote and a link to the exact page.
How it works. A cheap model drafts the answer as separate claims, each with a quote copied from a source passage. Then three things happen:
1. Code checks that the quote really is in that passage and that every number in the claim appears there.
2. A calibrated judge (TypeSafe Jev) scores whether the passage supports the claim.
3. Anything that fails is removed. If too little survives, it tries once more, then says "not found".
The model is allowed to be sloppy because it's never trusted. It runs on DeepSeek through OpenRouter, so a question costs about a tenth of a cent. LangGraph orchestrates the steps with a Postgres checkpointer, and every step is logged to a public trace page. The knowledge lives in an Obsidian vault and is indexed into Supabase with pgvector.
What went wrong first. My first real question, an arsenic limit, returned "not found". The cause was in the PDF: footnote markers stuck to words ("Arsenic2"), so keyword search missed the table. I added a cleaned search copy and split tables into row groups. Another failure: the strict quote check was rejecting good answers over one missing comma, so I switched to a word-exact match and showed the exact source text. A free embedding service I'd built on Supabase stalled for hours, so I deleted it and paid fractions of a cent. Deploying functions in the US while the database sat in Tokyo doubled my latency.
Does it work? On 80 questions I wrote, run against the live site, I have no known failures. Quotes verify, routing is right, prompt-injection attempts fail, and unanswerable questions get "not found". Typical answers take 5 to 7 seconds. I treat that as "no known failures", not "correct", because they're my questions. The next step is having a domain expert write the ones I didn't think of.
Try it at https://site-data-desk.vercel.app, and the code is at https://github.com/alokvjoshi/site-data-desk. Ask it something you know the answer to, then ask it something it shouldn't know.
I built this with an AI coding agent under my direction. The decisions and the failure analysis are mine.