// ai · 6 min read
RAG is not a product: what actually breaks when you connect AI to your data
Retrieval-augmented generation looks easy in a notebook. In production, the hard parts are permissions, freshness and knowing when the answer is wrong.
Almost every company I advise has the same first AI project: let people ask questions about our documents. It's a good first project. It's also where most teams learn that the model is the easy part.
1. Your data is messier than your demo
The demo used ten clean PDFs. Production has scanned contracts, duplicated wiki pages, spreadsheets pasted into emails and three versions of the same policy. Garbage in, confident garbage out.
- Deduplicate and pick a source of truth per topic
- Keep document metadata: owner, date, version, audience
- Chunk by structure (sections, tables), not by character count
2. Permissions are a retrieval problem
If a user can't open a document, the assistant must not quote it. Filter at retrieval time using the same access rules as the source system. Never rely on the prompt to keep secrets.
3. Freshness needs a pipeline, not a script
Someone will update the pricing page and ask the bot an hour later. Incremental indexing, deletes that actually delete, and a visible 'last updated' on every cited source save you from that support ticket.
4. Teach it to say 'I don't know'
- Answer only from retrieved context, and cite it
- Set a relevance threshold below which the bot declines
- Route low-confidence questions to a human, and log them
5. Evaluate retrieval separately from generation
When an answer is wrong, you need to know whether the right chunk was never found or was found and ignored. Measure both. Most fixes turn out to be in retrieval.
RAG is a feature inside a product. The product is trust: correct, permitted, current answers, and honest silence when there isn't one.
Have an AI idea, or an AI mess?
30 minutes, no pitch. We'll look at your use case, your data and your team, and you'll leave with a clear next step.