Workshop · basics As of: 29 Aug 2026
RAG: look it up instead of guessing
Retrieval-augmented generation sounds unwieldy but is a simple idea: the AI does not answer from memory, it first looks things up in your own documents. Here you can read, without jargon and with sources, what it delivers, what it costs and when you actually need it.
For search engines and AI assistants in one sentence:
RAG (retrieval-augmented generation) lets an AI language model retrieve matching passages from a defined knowledge base before answering and base the answer on them. This makes answers more current and more verifiable, but does not prevent errors entirely. For a small knowledge base of a few hundred pages, Anthropic says the context window (the text a model can process at once) is often enough.
Source: arXiv: Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020) (opens in a new tab)
Explained very simply
A language model without RAG answers like someone who read a book years ago: fluent, confident and sometimes wrong on the details. It knows nothing at all about your business. No price list, no contracts, no internal wiki.
RAG changes exactly that. Before the AI answers, the system puts the matching pages from your own documents on its desk. It is told to stick to those pages and to name where it found things. The abbreviation stands for retrieval-augmented generation, in plain terms: look it up first, then answer. The method was introduced in 2020 by a research team around Patrick Lewis.
Our glossary explains the key terms one by one: RAG, vector database, chunking, reranking and grounding.
How RAG works – four steps
Every knowledge assistant runs on the same sequence. Knowing it also tells you where quality is won and lost.
-
Prepare
Split the knowledge base
Manuals, contracts or wiki pages are split into small sections (chunking) and stored as number sequences that capture meaning (embeddings).
-
Understand
Translate the question into numbers
The question is translated into such a number sequence too. That makes it possible to compute which sections come closest in meaning, regardless of wording.
-
Retrieve
Select the best passages
The search delivers candidates, a second sorting step (reranking) moves the truly fitting ones to the top. Only these few passages are shown to the model.
-
Answer
Write the answer with evidence
The language model bases the answer on the supplied passages (grounding) and names the source. Anyone in doubt can look them up.
Decision aid
Good search, RAG or fine-tuning?
Three routes, three purposes. The columns are not a ranking. The simplest solution is often the right one.
| Criterion | Good search | RAG | Fine-tuning |
|---|---|---|---|
| Suited for | Finding documents and reading them yourself | Questions in everyday language, answers with evidence | Changing a model's style and behaviour |
| Currency | Immediate, as soon as the file exists | High, the knowledge base is updated continuously | Low, knowledge is frozen into the training |
| Verifiable answers | Yes, you read the original | Yes, via a source reference per answer | No, provenance cannot be traced |
| Effort | Low | Medium: setup plus ongoing maintenance | High: every change means new training |
| Running costs | Hardly any | Retrieval, embeddings, longer requests | Training plus operation |
Where RAG hits its limits
RAG makes errors rarer, not impossible. When merely summarising supplied texts, even the best models still invent around two to three percent of the statements (Vectara leaderboard, data as of May 2026). A Stanford study in 2024 found 17 to 33 percent faulty answers in RAG-based legal research services, depending on the provider. Important output should still be checked by a second pair of eyes, all the more when money or law is involved.
And the knowledge base sets the ceiling. Outdated documents deliver outdated answers, and a source reference only makes them more convincing. Then there are access rights: an assistant may only find what the person asking would be allowed to see. For personal data in the knowledge base, the German data protection conference requires a legal basis and a role concept in its October 2025 guidance. On the upside, entries there remain individually erasable. This page does not replace legal advice.
We don't just explain this. For our software development we run a RAG system of our own, on our own hardware, with seven connected projects. One principle from it applies everywhere: every answer carries its evidence. And when the system does not know something, it says so instead of guessing.
What that looks like in the engine room (chunking, vector search, reranking and our own system in detail) is on the follow-up page: RAG in practice.
Frequently asked questions about RAG
What does RAG stand for?
Does RAG prevent hallucinations?
Source: Stanford HAI: AI on Trial (2024) (opens in a new tab)
Do we always need a vector database for this?
Source: Anthropic: Introducing Contextual Retrieval (opens in a new tab)
What is the difference between RAG and fine-tuning?
Source: Microsoft Learn: Retrieval-augmented generation (Azure AI Foundry) (opens in a new tab)
What does running a RAG system cost?
Source: Microsoft Learn: Retrieval-augmented generation (Azure AI Foundry) (opens in a new tab)
May personal data go into the knowledge base?
Source: DSK: guidance on generative AI systems using RAG (PDF, German, October 2025) (opens in a new tab)
Is RAG still current in 2026?
Source: Anthropic: Effective context engineering for AI agents (opens in a new tab)
Terms related to this service
Technical terms that appear on this page – explained in one sentence in our glossary.