All work

Scoring documentation before an AI reads it

A RAG docs auditor I built that checks documentation against 12 failure modes that break AI retrieval. I use it in my everyday writing and projects.

Company
Personal project
Role
Designer and builder
When
2026

Problems that make AI answers wrong are caught at the page and section level, with suggested fixes, before they reach a retrieval pipeline.

  • RAG
  • AI agents
  • Gemini API
  • Docs for AI

What happens when an AI assistant answers a question from your docs, and your docs are ambiguous?

It usually doesn’t ask a follow-up question. It answers anyway, and the answer can sound confident even when it’s wrong. I wanted a way to spot those problems in the docs before an AI tool runs into them.

Twelve ways docs break retrieval

The auditor checks documentation against 12 failure modes that break AI retrieval. Each one maps to how retrieval actually works, through embeddings, chunk boundaries and what the model sees at answer time. A few examples:

  • Ambiguous terms: one word used for two different things lands in the wrong neighborhood when it’s embedded.
  • Split code blocks: a command cut in half by a chunk boundary turns into two useless fragments.
  • Contradictory pages: two pages that disagree mean the AI picks one at random and states it as fact.

How it works

  • Structural checks run directly in the browser: headings, code blocks, page length and links.
  • Semantic checks, such as ambiguity and whether a section can stand on its own once it’s chunked, go to an LLM through the Gemini API.
  • It can audit pasted content, a single URL, or a whole GitHub repository.
  • Results show at section level, so you see exactly which part of a page is the problem, with a suggested fix.

Fetching real documentation sites was its own engineering problem, since many are rendered with JavaScript and block cross-origin requests. The auditor tries a chain of fetchers in turn and tells you plainly when to paste the content instead.

How I use it

It’s part of my everyday writing workflow, alongside AI agents I’ve built to flag gaps and inconsistencies in documentation. The tools point to possible problems, and I review each one and decide on the fix.

Its limits

LLM-based scoring is directional. The score suggests where to look first; it doesn’t prove a page is right or wrong. It’s still a work in progress, and I keep adjusting it as I learn more about how retrieval behaves.