RAG stands for retrieval-augmented generation. A RAG system looks up material relevant to a question, gives selected passages to a language model, and asks the model to use that evidence in its answer. It can answer from an updated handbook without retraining the model every time a policy changes. But it can still miss the right passage or misread one it finds. To evaluate RAG, check both what the system retrieved and what it said.
1. What retrieval adds to an AI answer
A plain chat model can explain what library renewals usually mean. It cannot reliably tell you whether a particular library lets you renew a reserved book unless it has access to that library’s rules. A RAG system searches an approved collection, such as a set of help pages, and passes likely matches to the model with the question.
This is not the same as training the model on every document. The retrieved text is supplied for the current answer; it does not necessarily become part of the model’s learned parameters. Updating the source can help future answers only after the system can retrieve the updated version. The original RAG paper explores combining knowledge from a trained model with information retrieved from an external collection.
2. How a typical RAG system finds and uses evidence
First, choose the sources that should count. A team might index current policies, product manuals and troubleshooting pages. Many systems split long documents into smaller passages, keeping the title, section, version and access information with each passage. Those details help readers trace an answer back to the right place.
Next, the system looks for matches. Keyword search can help with exact identifiers such as E-317; semantic search can help match “extend my loan” with “renew a borrowed item.” Some tools combine the two. A system can then rank the results and send only the most promising passages to the model. Microsoft’s RAG overview explains the role of source indexes in that process.
Finally, the model drafts a response from the selected passages. An interface may display a source link next to the answer. A link makes verification easier, but its presence does not show that the linked text supports every claim. A system may cite a real document and still state the wrong number.
3. Worked example: a library renewal with an exception
Suppose a library assistant receives these two synthetic passages:
- Current Loan Policy, §3: Most books can be renewed twice unless another reader has reserved the item.
- Device Loans, §2: Loaned laptops cannot be renewed.
The question is: “Can I renew my book a second time if someone has reserved it?” A supported answer is: “No. A reservation prevents another renewal, even if you have not used both renewals. Source: Current Loan Policy, §3.” The laptop policy is irrelevant, even though it includes the word “renewed.”
Try this instruction with the two passages above, either in a system that shows retrieved sources or in an ordinary chat with the passages pasted in. The latter tests how well the model uses supplied evidence, not how well a search index retrieves it.
Use only the supplied passages. Answer in two sentences or fewer. Name the document and section that support the answer. If a passage gives a general rule and an exception, apply the exception to this case. If a required fact is missing, say what is missing instead of guessing.
4. Why a RAG answer can still be wrong
The evidence never arrived. A scanned PDF may have unusable text, a newer policy may not be indexed yet, or search may prefer a general page over an exception. If the right passage is absent from the results, investigate source coverage, extraction or retrieval before rewriting the prompt.
The evidence arrived, but the answer got it wrong. The model may skip “unless,” merge different policies, or use an outdated number even when a current one is present. Open the cited section and compare the exact claim, scope and date. If the system does not show what it retrieved, say the failure stage is unknown rather than assuming it searched correctly.
Access is a separate question. A source connected to a system is not automatically appropriate for every reader. Keep permission information with source documents and enforce access before sending retrieved text to the model.
5. Test it with three questions before relying on it
Build a small answer key from sources you can open yourself. Ask for an ordinary rule, an exception and a fact that the collection does not contain. For the library example, ask how many times an unreserved book can be renewed, whether a reserved book can be renewed, and what overdue fines cost. The expected results are “twice for most books,” “no,” and “the provided passages do not say.” Track whether the right passage was retrieved, whether the conclusion follows from it, and whether the citation points to the exact source. Those checks tell you more than a fluent answer alone.



