An AI chatbot trained on your documents: how it works.

Bonbay6 min read

Trained doesn’t mean retrained.

The phrase is misleading. People imagine the AI has learnt your documents by heart. It has not, and that is good news: retraining a model is a heavy undertaking, and it would have to be redone with every update.

The technique has a name: retrieval-augmented generation, often shortened to RAG. The idea is simple. The model can read and write. At the moment of the question, it is given the pages it needs.

It’s the principle of an open-book exam. The candidate hasn’t memorised everything. They know how to look things up in the manual and frame an answer.

What happens when you ask a question.

Beforehand, your documents are split into passages and stored in an index that finds a text by its meaning, not just its words. A question about leave finds the passage on absences, even if the word isn’t there.

Then everything happens in a few moments for each question.

  • The person asks their question in plain language
  • The system finds the closest passages in the index
  • It passes the question and these passages to the model
  • The model drafts an answer from those passages alone
  • The answer is displayed with a link to the source documents

Documents determine quality.

If two procedures contradict each other, the chatbot will sometimes give one, sometimes the other. If an out-of-date price list is lying around in a folder, it will end up being quoted. The tool doesn’t sort out what is valid for you.

The preparation work therefore consists of choosing sources: which are authoritative, which are up to date, which should be left out. This sorting takes time, and it benefits the whole business, even without a chatbot.

You also need to plan for updates. A document that changes has to be re-indexed. We automate this, and name one person responsible for each source.

Limits to be aware of.

The chatbot can still get things wrong. It can misread a passage, mix up two similar cases or answer when the information does not exist. We reduce this risk by requiring it to cite its sources and to say when it cannot find something.

It struggles with some content: complex tables, drawings, poor-quality scans. And it does not reason across your whole knowledge base in one go. A question that means cross-checking fifty documents suits it less well than a specific one.

Finally, access rights must be respected. If an employee isn’t allowed to read a file, the chatbot mustn’t summarise it for them. This is settled at the design stage, not afterwards.

Set up your own.

Start with a narrow scope: one department, one type of question, one clean set of documents. Internal use is a good first testing ground, because an imperfect answer has few consequences there.

Test it with real questions, the ones your team already asks by e-mail or in the corridor. Have the answers judged by people who know the subject. Fix the sources before you fix the tool: that is often where the problem lies.

Once it is live, look at the questions left unanswered. They show which documents are missing. That is how the chatbot improves week by week, and how you decide whether it can be opened to customers.

Further reading.

Bonbay. Published 5 November 2026.

Share this articleSend by e-mail

In short, your questions.

Are our documents used to train the provider’s model?

With a properly chosen business plan, in principle no. It’s a contract point to check for each provider before you upload a single file.

Which document formats can it read?

Common office formats, PDFs and web pages are handled well. Poor-quality scans and complex tables need preparation.

Can it answer our customers on the website?

Yes, after a period of internal use and with safeguards: limited sources, a clear statement that it is an AI, and handover to a person when the question falls outside its scope.

What happens when a document changes?

It has to be re-indexed for the chatbot to take it into account. We automate this update and remove old versions, otherwise both coexist.

Do you need lots of documents for it to work?

No. A few dozen reliable pages are worth more than a mass of disorganised files. We start small and add sources once the first ones are validated.

Shall we talk it over?

30 minutes to apply this to your business.