Learning AI · Practical guide
RAG for company documents: when it helps and how to check it
Distinguish search, retrieval and generation using conflicting documents, permissions and evidence-backed answers.

01The idea in one sentence
RAG combines information retrieval with answer generation. Google Cloud documentation describes this approach for supplying external context to a model. It does not guarantee that retrieval finds the right passage or that generation interprets it correctly. This guide proposes assessing those two stages separately.
Reference [1]: Google Cloud
02Start with three fictional documents
Imagine a January support manual specifying a 48-hour response, a March update changing it to 24 hours and an unapproved draft proposing 12 hours. The test question is “Which deadline should we communicate?” Before using AI, establish which document has authority, from when and for which service.
Keeping versions does not make all of them current. Include status, effective date, owner and permitted audience. If metadata cannot tell you which document governs, a stronger search engine will not solve the problem. You need a document policy.
03Check retrieval first
Try equivalent questions about response deadline, maximum reply time and support commitment. Record the retrieved passages before drafting an answer. A passing test retrieves the applicable update with its context. Returning only the draft, or cutting away a service exclusion, fails.
Include a question not answered by the documents. Missing evidence is a useful outcome: the system must be able to ask for help. Do not fill your test set only with questions you already know work.
04Then evaluate the answer
Request a short answer naming the document, section and effective date. Check whether each claim is supported by the retrieved passage. A real citation that does not support the sentence is not evidence. Conflicting sources should be explained or escalated under your document policy.
05Respect access during retrieval
Create two test profiles with different permissions and repeat a question about a restricted document. The source must not enter an unauthorised user’s context. Hiding its link after generating an answer is too late if the text already contains restricted information.
06Decide whether you need RAG now
A small, stable collection may be served by a maintained FAQ. Exact record lookup may be easier to verify with field-based search. Consider RAG when natural-language questions offer a concrete advantage and you can maintain sources, permissions and evaluation. This article proposes a test design, not a completed implementation.
Sources and further reading
These references expand on the concepts indicated. The examples and exercises are original editorial material.
[1] Google Cloud
RAG Engine overview · Google Cloud ↗
Concept reference; the document scenario is fictional.
Back to the related section
Keep reading
Learning AI
How to summarise a document with AI and check the evidence ↗
Prepare a summary that preserves conditions, exceptions and missing information. Practise with a fictional notice and a review checklist.
Learning AI
AI project template: from a problem to a reviewable trial ↗
Download an Eric Muriel workbook with questions, acceptance criteria, a test log and links for further learning.
Learning AI
How to check an AI assistant’s answers before using it ↗
Build a simple test with questions, evidence and acceptance criteria. Use a worked exercise to find unsupported answers before relying on an assistant.