Identify the source of the assistant's uncertainty
Retrieval-augmented generation, often called RAG, supplies selected source material to an assistant when it prepares an answer. It is a candidate when the answer depends on information outside the model's general knowledge: current product instructions, approved company policies or project documentation. It is not a substitute for fixing an unclear question or an unreliable business process.
First ask where a competent human would look. If the answer lives in a small set of maintained documents, retrieval may fit. If the answer requires a live account balance, a database query or an action in another system, a controlled tool integration may be more appropriate. Some workflows need both; distinguish finding explanatory evidence from reading authoritative transaction data.
Design the evidence path before the chat interface
| Stage | Design decision | Failure to test |
|---|---|---|
| Source selection | Which documents are authoritative? | Obsolete policy retrieved as current |
| Access control | Which sources may this user see? | Restricted text enters the answer context |
| Retrieval | How are relevant passages selected? | Similar wording but wrong product version |
| Answering | How must claims relate to evidence? | Unsupported details added to a correct citation |
| Maintenance | How do edits and deletions propagate? | Removed guidance remains in an index |
Apply authorization before content reaches the model. A filter that hides an answer after generation does not undo exposure of restricted source material. Treat instructions inside documents as untrusted content. The OWASP GenAI risk resources provide background on these classes of application risk.
Worked example: a product support knowledge base
Imagine two versions of an installation guide that use similar language but require different configuration settings. A question mentions the product but omits the version. A naive search may return the newest-looking passage and produce a confident answer. A better workflow asks for the version when it matters, filters sources accordingly and provides a link to the relevant section.
Preserve document title, version, owner and update date during ingestion. Split content so that a procedure remains connected to prerequisites and warnings. A passage containing only the final command may be incomplete even when it matches the question. Test tables and scanned files separately because extraction errors can alter the relationships between values.
Build evaluation cases with expected supporting passages, not merely preferred answer wording. Measure whether the correct evidence was retrieved before scoring tone or fluency. This makes it possible to distinguish a search problem from an answer-generation problem.
Define what happens when evidence is missing
The assistant should explain the gap and offer a useful next step: ask a clarifying question, identify an unresolved conflict or route the case to a responsible person. Avoid requiring a complete answer to every question. That requirement encourages confident guesses exactly when restraint is needed.
Launch with a bounded source collection and a documented refresh process. Record failures without collecting unnecessary confidential content. Review whether the source itself needs correction before adjusting prompts. Expanding the collection is useful only when it improves coverage without weakening authority and permissions.
Continue with retrieval evaluation, document permissions and unanswered-question handling.
A practical starting point
Work through these checks in order. Use the results to decide what needs to change in your own workflow.
- Identify questions that require organization-specific facts.
- Connect only authorized, maintained sources.
- Evaluate whether the retrieved material actually supports the answer.
A policy assistant needs the current policy text more than a generic model's memory of similar policies.
A mistake to avoid
Do not assume adding a document store eliminates unsupported answers.
How to check progress
Measure source relevance and answer support separately.
Your action checklist
Use this checklist while reviewing your own setup. Checkmarks are temporary and stay in this open page.
Further reading
Official background resources for this topic. The workflow above is general guidance, not a guarantee of a particular result.
AI-assisted editorial content. Examples are illustrative, not client case studies. Read our editorial policy or report a correction.
