A language model learned from a huge mass of text up to a certain date, but it knows nothing about your contracts, your documentation, or this week's news. RAG fills that gap without retraining the model.
The principle: search first, answer second. See also artificial intelligence.
01 — The problem
The model doesn't know what it hasn't seen
Asking an AI for information specific to your organization invites it to make up a plausible-sounding answer. RAG gives it the material before it answers.
02 — How it works
Search, supply, answer
- Your documents are split into passages and indexed.
- For each question, the most relevant passages are retrieved.
- They're supplied to the model along with the question, with instructions to rely on them and cite them.
- The answer is grounded in your content, with verifiable sources.

03 — What determines quality
Everything happens before the model
- Clean, up-to-date documents.
- Sensible chunking (neither too coarse nor too fine).
- A search that actually surfaces the right passages.
- An instruction that requires citations and saying "I don't know" when the information is missing.
04 — Limitations
What RAG doesn't solve
If the answer isn't anywhere in your documents, RAG can't do anything about it. You also need to manage access rights (not revealing to one person what belongs to another) and keep the index up to date.
05 — Frequently asked questions
RAG explained in 5 minutes (in French) — Quentin Gavila
Frequently Asked Questions
RAG or fine-tuning?
RAG brings up-to-date, citable knowledge without retraining. Fine-tuning adjusts style or format. They're often combined.
Do I have to send my documents to a third party?
Not necessarily: depending on the architecture, the index and the model can be hosted on your own infrastructure. That's an important factor when choosing.
Does RAG eliminate hallucinations?
It reduces them a lot when the answer is in the documents and citations are required. It doesn't eliminate them entirely.
06 — Resources & links
Where to go, concretely
Understand
- NEWTIV — Artificial intelligence
- How models and hybrid AI work.
- newtiv.com/article/les-intelligences-artificielles.html
- NEWTIV — Adding a useful AI chatbot to your site
- A direct application of RAG.
- newtiv.com/article/ajouter-un-chatbot-ia-a-son-site.html

Réagissez
Commentaires