Actions · Skills · Knowledge+38 095 710 2296info@armonivo.com

Knowledge base · How it works

How an AI assistant finds answers in a company's knowledge base

An assistant can find the relevant instruction and explain it in everyday language. We explore the path from question to answer and why even a document link does not rule out an error.

A selected knowledge base document connected by a line of light to an answer symbol.

From a folder of files to an answer

Consider an example knowledge base with business travel instructions. It shows why document versions should be retained, how search selects passages and what to check before using an answer.

How RAG works: document search with AI

What RAG is and where company information comes from

An employee asks, “Which documents are needed after a business trip?” A language model may give a plausible general explanation, but the question alone does not tell it the company's internal rules. These may include a special report form, different departmental requirements and a revised instruction. This information must be supplied as a source.

One way to work with these materials is RAG, retrieval-augmented generation. The system finds relevant passages in a database external to the model and supplies them with the question. The documents do not have to become part of model training. The knowledge base and language model have different roles: the former holds work materials, while the latter helps formulate an answer from what was found.

How RAG works for one question

First, documents are made searchable. This often involves an index: a prepared representation of texts with titles, passages and additional details. When a question arrives, the search component selects relevant materials. The model receives selected context, not necessarily the whole folder.

In the business trip example, this might include the reporting section, a form appendix and a clause on exceptions. The model composes an explanation, and the interface may show links to the sources used. If search misses the appendix, the answer may be incomplete. Quality therefore depends both on the passages found and on how accurately the model uses them.

How to prepare a knowledge base for AI

Long texts are usually divided into passages that can be found separately. Poor splitting can leave a condition in one passage and its exception in another. “For all other cases” is almost useless without the preceding paragraph. Retain the section heading and the connection to the source document alongside the content.

Tables need special attention. A cell value loses meaning without its row heading, column heading or footnote. Scanned files may contain recognition errors: an omitted negative can change a rule. Before adding a document, check how its text was extracted, whether notes survived and whether the quoted location can be found. Pages with complex layouts are useful for testing, not just a tidy first page.

Keyword and semantic search solve different problems

Someone might ask “how do I report my trip?” while the instruction is titled “Procedure for reporting business travel expenses”. Semantic search helps match different wording. Vector search uses numerical representations of text, called embeddings. Similarity between these representations is a retrieval method, not proof that the retrieved rule is correct.

For an exact form number, surname or product code, matching words can matter more than general similarity. Hybrid search combines full-text and vector approaches. In our example, the phrase about travel helps identify the topic, while the form number narrows down the appendix. Which method works best is tested on real questions and the particular knowledge base's internal terminology.

What a source link actually confirms

A link makes an answer checkable: you can open the original and compare it with the explanation. But an existing document does not substantiate every sentence of an answer. The model may accurately restate the main rule while adding a deadline absent from the selected passage. Sometimes a link concerns the right topic even though the conclusion applies to another situation.

When checking, find the specific clause, its conditions and the current version. It helps if the answer shows the document title, section and passage used. If information comes from several files, distinguish which source supports each conclusion. For decisions with significant consequences, a convincing tone is insufficient: look for support in the material itself.

Currency and access belong to the sources themselves

If a knowledge base retains two versions of an instruction, search may return both. Upload date does not always mean effective date. Give documents a clear status, period of applicability and content owner. After an update, check that the outdated version has disappeared from active results and the new provisions are available.

User permissions must also be considered during search and context transfer. Asking a model “do not show restricted information” cannot replace access restrictions on sources. If permissions are stored in the index, changes in the source system must be reflected promptly. Check both retrieved passages and links: an employee should not receive restricted content through a short paraphrase.

Why AI makes mistakes when working with documents

Start an error investigation with the document. Does it contain the answer, and is it readable after text extraction? Then examine the passages returned by search. If the correct clause was not found, changing the answer style will not solve the problem. If it was found but the explanation contradicts it, check the model's use of context.

Collect questions of varying difficulty: a direct answer in one clause, a condition with a footnote, information from two documents, conflicting revisions and a question with no answer. Record an acceptable conclusion and supporting source for each. Compare preservation of conditions, absence of invented details and checkable links, rather than identical wording. Repeat this set after substantial knowledge base changes.

How to ask a question and assess an answer's limits

Details help search select the right context. Instead of a general travel question, specify the department, expense type and relevant period. You do not have to guess the exact filename: handling natural wording is part of this search's purpose. If a question has several interpretations, clarifying the circumstances is more useful than mixing rules in one confident answer.

A knowledge base does not contain everything colleagues know or remove contradictions in working rules. Where evidence is missing, a correct result may be a statement of insufficient information identifying the limitations found. Repeated unanswered questions reveal missing materials. They can be passed to the documentation owner, the source updated and the same search tested again.

Keep reading

How to check access to work materials

The related article covers user permissions, data transfers and AI assistant privacy questions.

Read about privacy

Discuss your project

Discuss AI assistant implementation

Leave your contact details. We will contact you to discuss the task, necessary connections and a cost estimate.