Workflows and company knowledge5 min read · Updated: 2026-10-18

RAG for company knowledge: AI search with sources and access rules

How does a question about internal documents become an answer with sources? One example follows the information through retrieval, access controls and the language model.

PP
Editorial responsibility: Peak Pioneers
Practical guidance with supporting sources
About Peak Pioneers

At a glance

  • RAG combines searching approved documents with drafting an answer from the results.
  • Only sources the person asking is allowed to access may be used to answer.
  • Check separately: the right passage, a faithful answer and an up-to-date document.

Follow one question through the system

Fictional example using an internal IT handbook and a collection-point notice.

An employee asks
“How do I reserve a loan laptop for a business trip, and where do I collect it?” The employee is signed in and can access both documents.
Retrieved reservation passage
IT handbook, version 3, “Loan devices”: “Reserve loan laptops through the IT ticket form at least five working days before departure. Include your travel dates.”
Retrieved collection passage
Collection-point notice, version 2, “Device collection”: “Collect confirmed loan devices at the IT desk in Building B. Collection hours are Monday to Friday, 9 am–4 pm.”
Answer drafted from these passages
“Reserve your laptop through the IT ticket form at least five working days before departure and include your travel dates [IT handbook v3, Loan devices]. Once confirmed, collect it at the IT desk in Building B; collection hours are Monday to Friday, 9 am–4 pm [Collection-point notice v2, Device collection].”
Follow-up without sufficient evidence
“Can I make an exception and collect it on Sunday?” Expected response: “The source only lists Monday to Friday. I cannot find a rule covering Sunday exceptions. Please check with the IT desk.” The assistant must not invent an exception from general assumptions.

What RAG adds to search

Retrieval-augmented generation (RAG) means finding relevant document passages and giving them to a language model as the basis for an answer. Ordinary search returns results for you to read and combine. In this example, the assistant combines a reservation rule with a collection location from another document. Both source passages must remain accessible from the answer.

RAG does not retrain the model on company documents for this purpose. It provides the retrieved text when each question is asked. The benefit is a readable combined answer; the model can still omit information or connect it incorrectly. Someone looking for a familiar form may not need this extra step.

Before the question: make documents searchable

The system reads approved documents and splits longer texts into searchable passages. Each passage needs a link to its title, version, original location and access rights. In our example, the reservation deadline must be retrievable together with the instruction to use the ticket form. If splitting the text breaks this connection, the answer may miss a condition.

The search index is a processed view of the documents. When version 3 of the IT handbook is replaced, that index must also be updated. Decide who handles changes, deleted documents and changed permissions, and how to check that old content no longer appears as a valid basis for answers.

At question time: apply access controls before supplying context

The application needs to identify the signed-in person and respect which sources they may access. For our employee, both general IT documents may be used as answer context. A pricing agreement restricted to purchasing must not reach the model as a text extract or appear as a search result or source reference.

This boundary needs technical enforcement. Telling the language model “Do not show confidential information” does not replace access control. The original document link also needs the appropriate permissions. Test the same question with two accounts that have different access rights and inspect which passages were actually passed to the model.

When answering: stay within what the sources support

The model drafts an answer from the permitted search results and connects statements to their source passages. In the example, the deadline and collection hours are supported. Neither document says whether a laptop is actually available on the requested date: that would require an authorised query of the current device inventory.

For the Sunday question, the source does not establish an exception. The system should state that gap. If two current documents give different collection hours, it should show the conflict and refer to the responsible team instead of choosing one time. Incorrect answers remain possible even with citations; the cited passage must actually support the statement.

Find errors before releasing the assistant

Ask the document owner or a subject-matter expert to record the expected source passage and a correct answer for recurring questions. Use the example for three separate checks:

  • Wrong source: does retrieval return an old reservation deadline? Check versions, document preparation and result selection.
  • Wrong wording: does the system find “five working days” but answer “five days”? Information was lost when drafting the answer.
  • Missing evidence: does it invent a Sunday exception or device availability? These questions must remain visibly unanswered.

When the additional setup is worthwhile

Compare the same typical questions using your existing search and the assistant. Can employees find the correct answer more easily and check it against the original? The table below helps you choose an approach. An extract from a handbook cannot establish authoritative current figures.

The work includes document preparation, technical implementation, permission checks and subject-matter testing. Depending on the solution, running costs include hosting, model usage and maintenance. Also appoint a document owner and provide a simple way to report incorrect answers. Adding a chat interface does not resolve outdated or conflicting documents.

Which approach fits the knowledge need?

Scroll the table sideways if needed.

SituationFirst comparisonAdditional work
A few familiar documentsExisting search and clear folder structureNaming and maintenance
Recurring questions across many textsSource-based assistant against existing searchPreparation, retrieval quality and test cases
Authoritative current figuresDirect access to the system of recordAuthorised structured query rather than text estimation

Questions about this topic

Does RAG prevent incorrect AI answers?

No. It can provide relevant sources but guarantees neither the right retrieval result nor an accurate summary. Assess retrieval and answers separately and explicitly allow no answer when evidence is missing.

Do we need a new knowledge database?

Not necessarily. First assess existing search, storage and permissions. An additional solution must demonstrate value over that baseline and include ongoing content maintenance.

Sources and technical background

These sources explain the underlying principles. Our recommendations provide practical guidance and do not promise a particular project result. Editorial review: 18 October 2026.

Map the information flow for your question

Bring a recurring question, the relevant documents and the user roles involved to the conversation. These help establish whether better search is enough or an answer assistant would be useful.

Discuss your knowledge question