1. Define what the assistant may know.

Retrieval-augmented generation, usually shortened to RAG, combines document search with text generation. The system retrieves relevant material and supplies it to a language model alongside the question. This can help ground an answer in an organisation’s information, but it does not guarantee that the retrieved material is relevant or that the generated answer follows it faithfully.

Start with a defined collection: approved policy files in SharePoint, product manuals or internal operating guidance. Assign an owner to each collection and decide how superseded documents are handled. Record titles, effective dates and source locations. An assistant built over an uncurated folder can present an old instruction as though it were the correct one.

2. Match the search method to the questions.

Keyword search is useful for exact terms, reference numbers and distinctive names. Vector search compares numerical representations of meaning, called embeddings, and can retrieve passages that use different wording from the question. Hybrid search combines these approaches. It can be helpful when staff ask natural-language questions but still need exact identifiers to survive retrieval.

Services such as Azure AI Search and search software such as Elasticsearch provide relevant search building blocks. Compare indexing controls, access filtering, deployment arrangements and operational requirements. The right choice depends on the documents and infrastructure, not on a general preference for vector search.

Split documents into passages that preserve useful context. A heading without its explanation is rarely enough; an entire manual may contain too much unrelated material. Keep section titles, page references and table relationships where possible. Test retrieval independently of generation so that an answer problem is not mistaken for a prompt problem when the necessary passage was never found.

3. Apply access controls before retrieval.

The assistant should not reveal a document that the user cannot access through the original system. Preserve permission information during indexing and filter results using the authenticated user’s rights. Hiding a citation after generation is too late: the answer may already contain restricted information. Changes to permissions also need to reach the index promptly through an agreed update process.

Treat retrieved text as data, not instructions. A document can contain wording that asks the model to ignore its rules or disclose other material. This is a form of prompt injection. Limit the assistant’s tools, keep action-taking separate from answering and test with hostile text. Avoid giving a document-search assistant unnecessary access to email sending or record modification.

4. Show evidence and uncertainty together.

Place citations beside the claims they support and link to an accessible source location. A list of documents at the bottom does not prove that each statement is supported. Where sources conflict, the assistant should show the conflict or follow an explicit precedence rule. It should not silently combine incompatible instructions into a new policy.

Define how the assistant responds when evidence is missing. A useful response may identify the closest source, explain what remains unanswered and point to the responsible team. Keep factual answers distinct from optional drafting suggestions. Users should be able to inspect the supporting passage without treating the assistant’s wording as the organisation’s authoritative policy.

5. Evaluate retrieval and answers separately.

Build evaluation questions from the collection’s actual information needs. Include exact lookups, questions spanning documents, unsupported requests and permission-sensitive cases. Check whether the correct passage was retrieved, whether the answer used it faithfully and whether citations remain usable. Include changes and deletions so that stale index entries do not escape attention.

Our knowledge-assistant service can cover source preparation, retrieval design, a user interface and handover requirements. Agree who approves new sources and who reviews answer failures. For an initial enquiry, describe the document collection, its access model and the questions users need answered. A small, well-owned collection is often a clearer starting point than every file the organisation holds.

Keep the source authoritative

The assistant is an interface to information. It should make the original document easier to inspect, not replace its ownership or approval process.