Retrieval-augmented generation, or RAG, is an approach that fetches external material and uses it in a generative model’s answer. Adding retrieval alone does not eliminate fabricated information or incorrect citations.
1. Where the pipeline can fail
Collect documents, divide them into suitable units and store them in a searchable form. Retrieve relevant material for a question and generate an answer from the selected material. A document that was never ingested, a relevant passage that was missed and material that was found but misinterpreted are three different problems.
2. Evaluating with the same set of questions
Prepare both questions with known answers and supporting documents and questions that the material cannot answer. At the retrieval stage, check whether the system found the supporting passages. At the answering stage, check whether those passages actually support the claims and citations. A single score cannot establish that the answers are safe for every task.
3. Document access and freshness
Retrieval results must include only material the person asking the question can access. Decide how updates and deletions are reflected in the index and how outdated material is identified. Separate inputs so that instructions embedded in external documents are not executed as system instructions. When changing chunk size or retrieval methods, record document types and examples of errors and compare the effects.
4. Choosing retrieval units with a travel-policy question
Suppose a fictional travel policy states, “Domestic lodging is reimbursed at actual cost, subject to regional limits,” and lists regional amounts in a separate table. The question is, “Will my lodging for a business trip to Busan be reimbursed in full?” Retrieving just the sentence reveals the cap but does not give its amount. Retrieving just the table can miss who qualifies and what the exceptions are. That is why it helps to see how far the conditions needed to answer the question extend before splitting a document at fixed character counts.
Associate each chunk with the original document ID, title, section location, effective date and access information. Separating the text that conveys the meaning from metadata used as search filters makes the material easier to manage. If you store a table row separately, retain its column names and units. The value “15” on its own could be an amount or a period. Extra context adds to the cost, so also compare approaches that add only the necessary neighboring sections.
Retrieval methods have different strengths and weaknesses depending on the question. Keywords matter when looking for an exact name such as “Article 7 of the travel policy.” Semantic retrieval can help with a rephrased question about “the cost of staying overnight.” Dense Passage Retrieval is a research example that uses dense representations of questions and passages for retrieval. It is no guarantee of beating keyword search on a particular company’s documents, so compare the evidence each method misses on real questions.
5. Checking evidence retrieval and evidence use separately
Have a person mark the correct supporting sections for the evaluation questions. If evidence is retrieved for eight of ten questions but only six final answers are correct, for example, at least one other error remains between retrieval and generation. These numbers are illustrative. To know what to fix, check whether an answer omitted a condition despite having the evidence, mixed material with different effective dates or misread a table’s units.
For citations, it is insufficient to confirm that a document link exists. If a claim says “reimbursed in full” beside a link to a policy on regional caps, read the policy to see whether it actually supports the claim. If the answer makes multiple claims, check the extent of support for each. A figure that is absent from the documents should be marked as unverified, with directions to the responsible department or the original source, rather than supplied from the model’s prior knowledge.
Plan how to handle ambiguous questions, too. If an answer changes depending on whether the trip is domestic or abroad or on the effective date, have the system first determine whether it needs more information. Always asking follow-up questions can also make work harder. Separate the conditions you can answer in general from those that depend on the user’s choice. An “I don’t know” answer can be the intended response when the evidence is insufficient, rather than a way to hide a failure.
6. Where updates, deletions and access control meet
When a new travel policy takes effect, replacing the source file alone may not suffice. Track where parsing results, chunks, embeddings, search caches and answer caches persist. Linking document versions through identifiers makes old evidence easier to find and replace. If you store a policy that is due to take effect in the future alongside the current one, specify which version applies at the time of the question.
Mixing a human-resources-only exception into every employee’s retrieval results and then asking the model to hide it in the answer is too late. Apply access restrictions during retrieval, before unauthorized material reaches the generative model as input. Check too that old search cache entries do not remain visible after permissions change. One useful check is to ask the same question from two test accounts with different permissions and compare their evidence lists as well as their answers.
When starting a small RAG service, organize the frequent questions, applicable policy versions, supporting sections and questions with no answer instead of blindly increasing document count. If retrieval quality is poor, fix ingestion, parsing or query handling. If retrieval is sound and the answer still fails, improve the evidence-use rules and the output. Record which stage changed so you can trace causes again after switching models or expanding the document set.
Search ranking is also different from authority ranking. If a frequently repeated notice and the official policy are both retrieved, repetition in the notices can dominate the answer. Label document types and whether they are in force, and agree with the responsible staff on which sources take priority when they conflict. Merely asking the model to “choose the most trustworthy document” leaves it to guess the criteria for authority. Surface conflicts between documents alongside their evidence for review.
Revisit the retrieval query as the conversation continues. If the first question was about “a business trip to Busan” and the follow-up asks, “Is it the same abroad?”, do not automatically keep the previous location condition. Record which conditions carry over from context and which the new question changes. Check that rewriting the query preserves the user’s original meaning. Even with good retrieval, a misunderstood question can apply the right document to the wrong situation.
Record cost and latency by stage. Ingestion takes place when documents are updated, retrieval and reranking happen for each question, and generation is affected by the length of the selected context. Shortening the answer does not shorten retrieval time. Knowing which stage is slow lets you decide whether to reduce unnecessary chunks, adjust search requests or improve the status message users can see first.
In addition to the answer, the service interface needs a path back to the supporting documents. Users can review policy interpretations more easily if they can open the relevant original section and check its effective date. Include cases where links persist after a document is deleted or permissions change in your operational scenarios. RAG helps people read material. It does not automatically transfer authorship responsibility or the final decision at work.