RAG that doesn't make things up: building enterprise knowledge AI people trust
Why retrieval-augmented generation demos fail in production, the five layers that make enterprise knowledge AI accurate and permission-aware, and how to measure it before anyone relies on it.
Shyam Prabahar · · 4 min read

Retrieval-augmented generation is the most common way companies put their own knowledge into AI, and the most common source of disappointment. The demo answers ten questions beautifully. In production, it cites the wrong policy version, invents a clause, or shows someone a document they were never allowed to read.
None of that is inevitable. It comes from treating RAG as a model problem when it is mostly an information problem.
Why RAG demos fail in production
A demo uses a handful of clean documents and questions written by the people who built it. Production brings thousands of documents in mixed formats, several versions of the same policy, tables and scanned PDFs, and questions phrased the way busy people actually ask them.
When retrieval doesn't surface the right passage, a model asked to be helpful will often fill the gap with something plausible. That's the hallucination users notice. The fix is rarely a better model; it's better retrieval and a model that is allowed to say "I don't know".
The five layers of trustworthy knowledge AI
1. Ingestion and chunking
Content has to arrive clean and in meaningful pieces. That means extracting text from PDFs, slides and scans properly, keeping tables intact, splitting documents along their real structure (sections, clauses, steps) rather than arbitrary lengths, and attaching the heading path so every chunk knows where it came from.
2. Metadata and permissions
Each chunk should carry its source, owner, version, date and, critically, who is allowed to see it. Stale and superseded content should be marked or removed, otherwise the system will happily quote last year's policy.
Watch out · Permissions are not a prompt
Never ask the model to hide information from certain users. Filter retrieval by the user's access rights so restricted content never reaches the model in the first place.
3. Retrieval and ranking
Pure vector search misses exact terms like product codes, clause numbers and names. Production systems usually combine keyword and semantic search (hybrid retrieval), then re-rank the top results with a model that judges relevance more carefully. Query rewriting helps when people ask vague or multi-part questions.
4. Grounded generation
The model is instructed to answer only from the retrieved passages, cite them, and refuse when the evidence isn't there. Answers should show their sources so users can check them in one click. For high-stakes domains, the system can quote the relevant text directly rather than paraphrase it.
5. Evaluation
You can't improve what you don't measure, and you shouldn't launch what you haven't measured.
How to measure a RAG system
Build a test set of real questions from the people who will use the system, each with the source that contains the answer and what a correct answer looks like. Include questions whose answer is not in your content, so you can test refusal. Then measure four things separately:
| Measure | Question it answers |
|---|---|
| Retrieval recall | Did the right passage appear in what was retrieved? |
| Faithfulness | Is every claim in the answer supported by the retrieved text? |
| Answer correctness | Is the answer actually right and complete? |
| Appropriate refusal | When the answer isn't there, does the system say so? |
Measuring retrieval and generation separately tells you where to fix things. If recall is low, no prompt will save you. If recall is high but faithfulness is low, the generation step needs work.
Tip · Keep a living test set
Every question users mark as wrong in production should be reviewed and, where useful, added to the test set. It becomes your regression suite for every future change.
Keeping it fresh
Knowledge changes daily. Ingestion should run continuously or on a schedule, detect updated and deleted documents, and re-index them. Each answer should be traceable to a specific document version, so when someone asks "why did it say that?", you can show exactly what it read.
RAG, fine-tuning, or both?
RAG is the right tool for facts that change: policies, prices, product details, procedures. Fine-tuning is the right tool for behaviour: formats, terminology, tone and task skill. Many mature systems combine them, using a model fine-tuned on your domain that reads retrieved context at answer time.
A launch checklist
- Sources, owners and access rules mapped and agreed
- Clean ingestion with structure-aware chunking and version metadata
- Permission filtering enforced at retrieval time
- Hybrid retrieval with re-ranking
- Answers grounded, cited and allowed to refuse
- A test set of real questions, with retrieval and faithfulness measured
- Feedback in the interface, logs for every answer, and an owner for quality
Get those right and you have something people can rely on, which is the only kind of knowledge AI worth building.
Work with us
Enterprise Knowledge AI by Zaiphr Labs
Retrieval-augmented (RAG) applications that let teams and customers query your documents, systems and data, accurately and with citations.

Written by
Shyam Prabahar · Founder & CEO, Zaiphr Labs
Twelve years building and scaling products, including at a FAANG company, a world-leading premium automaker and a Fortune 500 multinational, and 350+ brands since. Now building private models, agents and platforms companies own.
Questions people ask
RAG is a pattern where an AI system first retrieves relevant passages from your own documents and data, then writes an answer based on them, ideally with citations. It lets a general-purpose model answer questions about your business without being retrained.
No system eliminates them entirely, but good RAG reduces them sharply: the model is instructed to answer only from retrieved sources, shows those sources, and says so when the answer isn't in your content. Measuring faithfulness on a test set tells you how well it's working.
Carry the access rules from your source systems into the search index, and filter retrieval by the user's permissions before anything reaches the model. Never rely on the model itself to withhold information.
A focused first version over a well-defined set of sources can be live with a pilot group in weeks. The work that takes time is understanding your content, permissions and the questions people really ask, not the model.
Keep reading
All insights →
AI for Business · 4 min read ·
Choosing your first AI use case: a scorecard for leaders
How to pick the AI use case most likely to reach production and pay back: where to look, five questions to score each idea, the traps to avoid, and how to frame the business case.

AI for Business · 5 min read ·
How to evaluate an AI system before your business relies on it
Why vibe checks fail, how to build an evaluation set from real work, which measures matter for generative AI, when to use model graders, and how evaluation keeps running after launch.

AI for Business · 5 min read ·
Private model or API? How to decide when to train on your own data
When a general-purpose model API is enough, when a model fine-tuned on your own data earns its keep, and what a private-model project actually involves, from evaluation set to deployment in your cloud.