Collection
You decide which documents go in and who is responsible for them: PDFs, texts, internal pages. Scanned documents have to be turned into text first.
Guides · AI
by Salvo De Luca, founder and CEO of Dialogicom · published 5 November 2026
RAG stands for retrieval-augmented generation. First the passages of your documents that relate to the question are found, then they are given to the model together with the question, and the model answers from them. It helps when answers must come from your manuals, contracts or procedures, and not from what the model knows in general.

The problem
A language model knows a lot in general, but it does not know your price list, your procedures or the latest version of a contract. Ask it something it does not know and it will often answer anyway, and make things up.
RAG does not train the model on your documents. It puts them at the model's disposal, question by question. That is why a new document can be used straight away, and a document removed from the archive stops being used.
When it helps
How it is built
You decide which documents go in and who is responsible for them: PDFs, texts, internal pages. Scanned documents have to be turned into text first.
Each document is split into short pieces, with a little overlap between one and the next, so a sentence across two pieces is not lost.
Each piece becomes a sequence of numbers that represents its meaning, called an embedding. Pieces about the same thing have close numbers, even when they use different words.
The question becomes an embedding too. The system looks for the closest pieces, keeps a few and drops those too far away, so the model is not given off-topic material.
The model receives the question, the pieces found and the instructions: answer from these, and say which document each piece of information comes from.
The system is tested on real questions whose answer is known, and the test is repeated whenever documents, instructions or model change.
Limits
RAG reduces made-up answers; it does not eliminate them. If the search finds the wrong piece, or nothing at all, the model can answer badly. That is why the answer cites its source, and why the system must be able to say "it is not in the documents" instead of inventing.
If the archive holds two versions of the same procedure, the system may use the old one. You need a rule: who uploads, who removes, which version counts. RAG is only as good as the archive you give it.
If an employee is not allowed to read a contract, they must not be able to read it through the assistant either. The search has to pick documents according to who is asking, before anything reaches the model. This is not a detail to add at the end: it is designed in from the start.
Where the data goes
With a cloud model, every question sends the question and the pieces found to the provider. Computing the embeddings usually goes through an external service too, both when a document is uploaded and when a question is asked. The whole documents, instead, stay in your archive.
If the documents are highly confidential, both the model and the embedding step can run on your own servers. Whether and how certain data can be used is for your adviser to assess: we design the technical side and tell them exactly what goes where.
Our experience
In Minerva, our study tutor, students can upload their notes and course materials, as PDF or plain text. Minerva splits them into pieces, computes their embeddings and, when the student asks a question or prepares a test, looks for the relevant pieces among their own materials for that subject or that folder.
Each student searches only their own materials. A note can be added to each one, for example "use only these" or "add to these", and the answer says which documents it used. These are the same choices we suggest for a company's documents.
Frequently asked questions
No. The model only receives the pieces found, with each question, and uses them for that answer. What the provider does with the data it receives is set by its terms of use, which should be read before starting.
Yes, if the text is extracted from the images first. The quality of the answers also depends on the quality of the extracted text: complex tables and handwriting are the hardest cases.
Many. With large archives, how you split and search matters more: pieces of the right size, filters by topic or department, tests on real questions.
A keyword search finds the documents that contain those words. RAG also finds passages that say the same thing in other words, and instead of a list of documents it gives an answer that cites them. Often it pays to use both searches together.
Tell us what documents you have and who needs to use them: we will propose a trial on a small set of documents, with real questions. We reply within 24 working hours.