How to — make your docs findable by an AI assistant

Share
How to — make your docs findable by an AI assistant

Your assistant answers from last year's pricing page, or insists a policy that has been on your site for months does not exist. Nine times out of ten the model is fine and the documents are not: retrieval hands it a few hundred words, cut out of the middle of a page, and that slice has to make sense on its own. This is the authoring job that fixes it.

The mechanism behind the cut is covered in AI 101 — What is RAG?, and if you have not established whether retrieval or generation is the weak link, run the checks in How to — know if RAG is actually doing anything first. Everything below assumes you already know your documentation is what the retriever is missing.

1. Build the question list before you touch a page

Write down twenty-five to thirty questions real people ask — from your support inbox, your site search log, the questions sales gets on calls. Phrase them the way the asker phrased them, slang and typos included.

That list is your specification. "Is the export limit per workspace or per user?" tells you exactly which page has to answer, at what level of detail, with the subject named. Rewriting documentation without one produces a tidier corpus that still misses the same questions, because nobody wrote down what "working" meant.

You are not aiming for complete documentation. You are aiming for documentation where those twenty-five questions get answered from the right page — and chasing completeness is how you end up with three pages that each half-answer the same one.

2. Make every section survive on its own

Retrieval does not deal in pages. It deals in passages, and the model usually reads the top handful of them, so a section that only makes sense after three paragraphs of preamble arrives as noise.

Three habits carry most of the weight. Name the subject in the section's first sentence instead of relying on the page title ("Billing exports are capped at 50,000 rows per workspace", not "They are capped at 50,000"). Put one idea in each section, so a cut cannot separate a rule from its exception. And drop the bridges that point off-chunk — "as noted above", "see the previous step" — because elsewhere is exactly where the chunk no longer reaches.

This is the same problem Anthropic attacked on the retrieval side: instead of embedding a bare chunk, they prepended a short explanation of where the chunk sits in the document, which cut failed retrievals by 49% on their benchmark, and by 67% once reranking was added. You can buy that at query time, or write sections that arrive carrying their own context. Do both; the second is free.

3. Write headings as the question, in the reader's words

Headings are the cheapest relevance signal you control, and the most common mistake is writing them for the internal org chart ("Entitlements › Tiering") rather than for the person asking ("What counts against my export limit?").

Then put the vocabulary in the body, not just the heading: the feature's old name, the competitor's term customers keep using, the exact error string from the product, the API field name, the abbreviation and its expansion. Reason: retrieval is usually two mechanisms stitched together — semantic similarity plus plain keyword matching — and the keyword half only finds the strings that literally appear. Anthropic's own example is an error code: a search for "TS-999" is invisible to an embedding model that has never seen the token, and trivially easy for keyword matching.

Practical version: an "also called" line in the first paragraph of a page, and error codes inside fenced-off text rather than inside a screenshot.

4. Delete the stale duplicate, and stamp what is left

Two pages about the same thing is a retrieval bug you wrote yourself. The retriever scores them almost identically and picks one; if that one is the 2024 page, you get a confident wrong answer and a support ticket.

One canonical page per question. Delete, redirect, or unpublish the rest. Where a page genuinely has a history, keep one current version and put the date or version at the top, in text, so a reader — and a retriever — can tell which is live. Docs that were never retired are the number one source of "the assistant made up an old price", and no amount of prompt engineering recovers from it.

5. Keep the answer as text, and keep the tables small

If the number a customer needs lives in a screenshot of a dashboard, or the setup steps are a video, that answer does not exist as far as retrieval is concerned. The same goes for a scanned PDF and for text baked into an image caption.

Tables are the subtler version. A table is often the right container for a comparison, but big ones get split across chunks and arrive as rows without headers. Keep the table small enough to travel whole, put the column meanings in the caption, and repeat the subject in a sentence before it. Anything about layout that a human would find fussy, a chunker finds fatal — Chroma's token-level evaluation of chunking strategies found the choice of strategy changed retrieval accuracy materially, and that popular defaults performed poorly out of the box.

6. Test the passage, not the reply

Run your twenty-five questions through the assistant, but read the retrieved passages alongside the answer. Two different failures look identical from the outside: the answer was never in the corpus, or it was there and did not come back. Only the retrieved text tells you which one you have.

When a passage is missing, the question to ask is not "how do I sharpen the model" but "which page should have answered this, and what does that section look like as a 300-word slice". Fix that section. Then re-run the list, because the fixes interact — a section split in two changes what its neighbour retrieves.

One shortcut worth knowing: if your whole corpus is under about 200,000 tokens — roughly 500 pages — skip retrieval and put all of it in the prompt. Anthropic says as much in the same post, and it is faster and more accurate than tuning a small index. Retrieval becomes the right tool when the corpus outgrows the window, and then the writing rules above are the whole game.

Don't do this

Don't rewrite your documentation for a crawler. Stuffing keywords, repeating the product name four times a paragraph, and splitting pages by search phrase all make the corpus worse — the semantic half of retrieval reads the prose, and padding it with keywords blunts the meaning it was matching on. Write for the person with the question, name the subject, and keep the words they actually type in the text. That is also what makes the page good for a human reader, which is not a coincidence.

How you'll know it worked

For most of your twenty-five questions, the passage containing the answer appears in the retrieved set, and you can see it. Ask a question whose answer legitimately changed last quarter and get the current answer without hedging. And when something still fails, you can name both halves: the question, and the page that should have answered it.

Which document in your own knowledge base do you know is quietly poisoning your assistant's answers? Write to us via our contact page.

Get SiliconNoon in your inbox

One email a day with the AI stories that matter — what happened, the numbers, and why it matters. No spam, unsubscribe in one click.

Read more

How to — tell if an AI model has quietly changed

How to — tell if an AI model has quietly changed

The model you call today is not necessarily the model you tested. Providers update the served system in place — a fine-tune, a new safety classifier, a rewritten system prompt, a different route — and your request still returns 200 with a perfectly normal-looking answer. You can catch that on your own inputs, in about an afternoon of setup and a few minutes a week, so a provider update shows up as a dated event in your logs instead of a support ticket three weeks later. The change is not…

How to — stop an agent before it burns your budget

How to — stop an agent before it burns your budget

An agent that runs unattended fails in a way a chat window never does: it fails expensively. The job here is to make the worst case of any run a number you know before you press go — and to have the run stop itself the moment it stops making progress. Most teams discover this the hard way. A task that should take twelve steps takes four hundred, half of them re-asking the same question in slightly different words, and the invoice arrives two days after the incident.

How to — review AI-written code before you merge it

How to — review AI-written code before you merge it

You want to merge AI-written code without reading every line of it — and still be able to say, out loud, what it does and what happens when it breaks. That is a review job, and it is mostly about reading the right parts in the right order. Cockroach Labs ran its codebase like a teaching hospital for five months and reports merging well over a million lines of code with seven total reverts — a run where no agent's plan moved without a human-signed review first (we covered Coding agents as a…