Why RAG?
A language model only knows what it saw during training: it knows nothing of your internal procedures, your offerings or your contracts, and may invent a plausible answer (this is known as a hallucination). RAG gives it access to the right sources at the moment the question is asked, without having to retrain it.
How RAG works
- 1 Step 1 The question A user asks a question in natural language.
- 2 Step 2 The search The system searches a vector database built from your documents for the passages closest in meaning.
- 3 Step 3 The context These passages are added to the prompt sent to the model, along with the question.
- 4 Step 4 The sourced answer The model answers based on these excerpts and can cite its sources.
Business use cases
- An internal copilot that answers teams’ questions based on documentation and procedures.
- A customer support agent that draws on the knowledge base and the terms and conditions.
- Natural-language search across case files, contracts or technical manuals.
RAG or fine-tuning?
| RAG | Fine-tuning | |
|---|---|---|
| Principle | Provides documents to the model with each question | Retrains the model on examples |
| Updating knowledge | Immediate: simply update the documents | New training required |
| Citable sources | Yes | No |
| Ideal for | Evolving knowledge, verifiable answers | A very specific style, format or task |
Frequently asked questions
-
It greatly reduces them by grounding answers in your sources, without eliminating them entirely: a check is still worthwhile on sensitive topics.
-
It depends on the chosen architecture: hosting, model and access rights are defined when scoping the project.
