AI glossary
What is RAG (Retrieval Augmented Generation)?
RAG (Retrieval Augmented Generation) is a method in which an AI language model retrieves relevant passages from an external knowledge source before each answer and bases its response on that content. This lets the model use current, company-specific knowledge without being retrained. RAG reduces invented answers and makes statements traceable to their sources.
Also known as: RAG, Retrieval Augmented Generation, Retrieval-Augmented Generation
Last updated: December 2026
How it works
First, the content is prepared: documents such as FAQs, price lists, service descriptions or website copy are split into short chunks. For each chunk, an embedding is calculated, a series of numbers that represents the meaning of the text. These vectors are stored in a search database which, together with the original texts, forms the knowledge base.
When a user asks a question, it is also turned into an embedding. The system looks for the chunks whose meaning is closest to the question, often combined with a classic keyword search. The best matches are passed to the large language model along with the question and the instructions in the prompt.
The model then writes its answer based on these excerpts. If no suitable passage is found, the system can be configured to say so openly or hand over to a staff member. When information changes, updating the document is enough; the model does not need to be retrained.
A practical example
A dental practice uploads its list of treatments, notes on professional teeth cleaning and its appointment cancellation rules to the knowledge base of its phone assistant. A patient calls and asks how far in advance an appointment must be cancelled. The system finds the relevant paragraph and states the practice's actual notice period instead of inventing a generic answer.
If the practice changes the rule, the team only edits the text. From the next call onwards, the AI phone assistant gives the new rule.
What businesses should look out for
- Answer quality depends directly on document quality: current, unambiguous and free of contradictions.
- Structure content in meaningful, self-contained sections so the search can find the right passages.
- Define how the system responds when no source is found, to avoid hallucinations.
- Clarify where documents and the vector database are stored, and do not upload unnecessary personal data.
- Regularly check which questions return no match and fill those gaps in the knowledge base.
Frequently asked questions
How does RAG differ from fine-tuning?
Fine-tuning trains the model itself on additional data, which is costly and has to be repeated whenever something changes. RAG leaves the model unchanged and supplies fresh knowledge with every request. For company information that changes often, RAG is usually the more practical choice.
Does RAG require a vector database?
In most implementations, yes, because it enables searching by meaning rather than exact words. For very small collections of content, a simple full-text search may be enough. Many platforms already include the necessary infrastructure.
Does RAG rule out wrong answers?
No, but it reduces them considerably. Errors still occur when the search returns unsuitable passages or the documents themselves are outdated. Testing and a well-maintained knowledge base therefore remain necessary.
Related terms
Knowledge base
The verified collection of company information an AI assistant draws on when answering.
Hallucination
A plausible-sounding but false or invented statement produced by an AI language model.
Large language model (LLM)
AI model trained on very large amounts of text to understand and generate language; the basis of modern chatbots and AI agents.
Prompt
Text input that steers a language model: instructions, context and a question that determine how the AI behaves and responds.
Chatbot
Software that holds written conversations with people, for example in a website chat or messaging apps, and answers questions automatically.
Cite this definition
Want to explain this term on your website, in a presentation or in documentation? Feel free to link to this entry. You can copy the HTML code directly:
