JEEKSSHIRE 24

An AI assistant for your company knowledge base: how RAG works and why models make things up

An AI knowledge base assistant answers employees or customers from your company’s documents: policies, instructions, contracts, product descriptions. It works on the RAG pattern: first it finds suitable fragments in your sources, then a language model writes an answer based only on them and shows where it came from. The model is not retrained. Errors and invented facts never disappear entirely, but they can be reduced substantially: answering only from found sources, the right to say “not found”, a clean knowledge base and testing on real questions.

Open the software development page

What an AI knowledge base assistant is

Every company accumulates documents that employees constantly search for answers: how to process a return, what a customer on a given plan is entitled to, which clause of a contract governs deadlines. Usually some colleague knows the answer and gets interrupted ten times a day.

An AI assistant takes these questions over. An employee or customer asks in their own words, the assistant finds the right place in the documents, answers briefly and links to the source. The person can open the document and check instead of taking it on trust.

A knowledge base assistant is a specific and the most straightforward case of an AI agent. If the helper must not only answer but also carry out steps in your systems, it is an agent; the difference is explained in the guide AI agent for business.

How RAG works in plain words

RAG stands for retrieval-augmented generation — producing an answer based on data that has been found. The pattern has two halves: search and answer.

  1. Preparation. Documents are split into meaningful fragments — sections, clauses, paragraphs with headings. For each fragment a numerical representation of its meaning is computed, which is later used to find similar texts.
  2. Search. When a question arrives, the system looks for fragments close to it in meaning, even if the words in the question and the document differ. Semantic search is often combined with ordinary keyword search, which finds numbers, item codes and names more precisely.
  3. Answer. The model receives the question, the fragments found and an instruction: answer only from them and cite the source. If the answer is not in what was found, the assistant says so.
  4. Log. The question, the fragments found and the answer are saved — errors are analysed from them.

The main advantage of this pattern is that the model does not need to be retrained on your documents. Update the knowledge base and the assistant starts answering from the new version of the policy. That is how our approach works too: answers rely on current materials and show the source.

Why language models “hallucinate”

A language model does not store facts the way a database does. It continues text in the most plausible way. Without grounding, a plausible answer can turn out to be invented: a contract clause that does not exist, a wrong figure, a confident reference to something that is not there.

Typical reasons a knowledge base assistant gets things wrong:

Note that most of these causes have to do not with the model but with data and search. That is where errors should be fought first.

How to reduce AI hallucinations

TechniqueWhat it gives
Answer only from found fragmentsThe model does not rely on general knowledge where your rules are needed
Mandatory source linkA person checks the answer in seconds, and an error is visible immediately
The right to answer “not found”The assistant hands the question to a person instead of inventing
Good document splittingFragments keep their heading and context, so exceptions are not lost
Semantic search plus keyword searchFinds both paraphrased questions and exact numbers and names
One current version of each documentNo conflict between old and new policies
Calculations by a separate toolA program computes the numbers, the model only explains the result
A set of test questionsQuality is measured before launch and after every change

For important answers — those that go to a customer or affect money — human review is added. The assistant prepares a draft with links and an employee confirms it. As the log shows stable quality, review can be narrowed to difficult cases.

What to prepare before launch

What you give the assistant affects quality the most. Before work starts, it is worth collecting:

A perfect document structure is not required, but headings, version dates and clear file names help search considerably.

Where the assistant works

The assistant is built into the places where people already ask questions:

The same assistant can work across several channels so a customer gets the same answers everywhere. It hands difficult questions to a person together with the conversation history.

How to check answer quality

Assistant quality is checked not by impressions but against a set of questions with known correct answers. For each question three things are checked:

  1. Whether the answer is correct in substance.
  2. Whether the right source is cited.
  3. Whether the assistant said “not found” when the answer really is not in the base.

The set is run before launch and after every change — a new version of documents, an edited instruction, a different model. That shows whether an improvement in one place broke something elsewhere. In the first weeks, questions from the log that the assistant got wrong are added to the set.

How to set up such a pilot and which numbers to record before starting is covered in AI implementation in business.

The same principle in our product

In JEEKSSHIRE 24 Legal the AI lawyer answers questions about a document and opens the relevant section instead of retelling the text in its own words. This is the same principle as in a good knowledge base assistant: the answer is tied to a specific place in the source, and the person immediately sees the clause it relies on. The decision stays with the person.

How to maintain the knowledge base after launch

An assistant is only as good as its knowledge base is current. Work does not end at launch; it becomes regular and small in scope:

This maintenance can be done in-house or handed to a contractor. How we work across all areas is described on the page about custom software development.

When a knowledge base assistant is not enough

Frequently asked questions

What is RAG?

Retrieval-augmented generation is a pattern in which the system first finds suitable fragments in your documents, and the language model writes an answer based only on them and shows the source.

Do we need to train the model on our documents?

Usually not. The assistant is given semantic search over the knowledge base, so updating the documents is enough — the model does not need retraining.

Can hallucinations be eliminated completely?

Not completely. But they are reduced substantially: answers only from found fragments, a mandatory source link, the right to say “not found”, a clean base and human review for important answers.

Which documents suit a knowledge base?

Policies, instructions, contracts, product descriptions, support answers. What matters is that the base holds one current version of each document and that someone is responsible for it.

How does the assistant separate access?

By rules the company sets: a customer assistant sees only public materials, an internal one sees its own department’s documents. Every request and the sources found are written to a log.

IP geolocation by DB-IP