
www.simplify-data.de
Manuals, contracts, quotes, meeting notes: in many companies, knowledge is spread across thousands of documents that hardly anyone knows in full. An AI assistant that answers questions based on those documents sounds appealing. The technology behind it is usually called RAG. This article explains, without jargon, how it works and what you should know before starting a project.
The problem: language models don't know your data
Large language models (LLMs), such as those behind ChatGPT or Claude, were trained on vast amounts of public text. They know nothing about your internal documents, price lists or work instructions. If you ask about them anyway, in the worst case they invent an answer that sounds plausible. This is called a hallucination.
You could retrain a model on your own data (fine-tuning). But that is costly, has to be repeated whenever the documents change, and makes it impossible to trace where a statement came from. For searching company knowledge, a different approach is common.
What RAG means
RAG stands for retrieval-augmented generation. The term was coined in a 2020 research paper whose authors included researchers from Facebook AI Research (now Meta). The idea is simple: before the language model answers, a system retrieves the relevant passages from your documents and hands them to the model.
The model then answers not from memory but on the basis of the excerpts provided. Think of it as an open-book exam: the model phrases the answer, the facts come from your documents.
How RAG works, step by step
1. Preparing the documents
The documents are ingested: PDFs, Word files, wiki pages or emails. The text is split into smaller sections, known as chunks, such as individual paragraphs or chapters.
2. Turning sections into numbers
Each section is converted into a numerical vector by an embedding model. An embedding represents the meaning of a text so that texts with similar content get similar numbers. The vectors are stored in a vector database.
3. Finding the right passages
When someone asks a question, the question is also converted into a vector. The system then looks for the sections whose meaning is closest to the question. Unlike a classic keyword search, this also finds matches that use different words, such as "leave request" when someone asks about "days off". Semantic search is often combined with keyword search.
4. Generating the answer
The retrieved sections are sent to the language model together with the question and an instruction to answer only on that basis. Good systems also show which document the information came from, so users can verify it.
RAG, fine-tuning and classic search compared
| Criterion | Classic full-text search | RAG | Fine-tuning |
|---|---|---|---|
| Result | List of documents | Written answer with sources | Written answer without sources |
| Freshness | immediately after indexing | immediately after indexing | only after retraining |
| Traceability | high | high, if sources are shown | low |
| Effort | low | medium | high |
| Typical use | File shares, intranet | Knowledge assistant, support | Specific writing style, domain language |
Typical use cases for SMEs
- Internal knowledge base: employees ask about processes, policies or technical details instead of digging through folders.
- Customer service: an assistant suggests replies based on manuals and previous tickets, and a person reviews and sends them.
- Sales: quick access to product data, data sheets and previous quotes.
- Onboarding: new colleagues find answers without having to ask all the time.
Where RAG reaches its limits
RAG is not a cure-all. The quality of the answers depends heavily on the documents: outdated, contradictory or poorly scanned material leads to poor answers. An assistant is only as good as the knowledge base behind it.
The search itself can also miss. If the system does not find the right sections, the model answers on the wrong basis. Questions that require analysis across many documents, such as "How many contracts expire this year?", are handled poorly by a pure RAG system. Structured data and classic reporting are better suited for those.
RAG reduces hallucinations but does not eliminate them completely. That is why showing sources matters so much.
Data protection and permissions
In a RAG system, excerpts from your documents are passed to the language model. If you use a cloud service, the same rules apply as for any other AI tool: a data processing agreement, clarity on where data is processed, and no use of your data for training. Alternatively, language models can be run on your own infrastructure or with European hosting providers.
An often underestimated issue is access rights. If all documents go into one shared index, the assistant may suddenly quote personnel files or salary lists. The system must respect existing permissions and only use sections that the person asking would be allowed to open themselves.
What drives the effort
It is hard to quote a flat price for a RAG system, because costs depend heavily on scope. The main factors are:
- Volume and condition of documents: clean text files are processed quickly, while scanned paper records first need text recognition (OCR).
- Number of data sources: each connection, for example to a file share, wiki or ticket system, adds its own effort.
- Hosting model: cloud models are usually billed by usage, while your own infrastructure means hardware and operating costs.
- Permission model: the finer the access rights, the more work the implementation takes.
- Usage intensity: more queries increase the ongoing costs for the language model.
Checklist: how to start a RAG project
- Narrow down the use case: start with a clearly defined area, such as the support manual, not the entire file share.
- Review the documents: remove outdated versions and duplicates, and decide who is responsible for updates.
- Collect test questions: write down 30 to 50 real questions with the correct answers. This lets you measure quality.
- Settle hosting and data protection: cloud model with a DPA, a European provider or self-hosting.
- Map permissions: the assistant may only show what the person is allowed to see anyway.
- Pilot with a small group: gather feedback before rolling the system out widely.
- Plan for maintenance: new and changed documents must be added to the index regularly.
How Simplify Data can help
Simplify Data in Kiel builds AI solutions and automation for companies in Schleswig-Holstein, Hamburg and across Germany. This includes connecting your own documents to language models, from choosing the hosting setup to integrating with existing systems. Learn more on our page about AI solutions for businesses.
