FR
Glossaire de l'IA

What Is RAG (Retrieval-Augmented Generation)?

Durée3 lecture min.Mis à jour 3 juillet 2026

En bref

RAG, short for retrieval-augmented generation, is a technique that gives an AI model relevant information to read at the moment you ask a question, so its answer is grounded in real, current documents instead of only what it memorised during training. Instead of hoping the model already knows your data, a RAG system first retrieves the most relevant snippets from a knowledge source (your docs, a database, a set of PDFs), pastes them into the prompt as context, and then asks the model to answer using that material. The result is answers that cite your actual content, stay current as your data changes, and hallucinate less, without the cost of retraining the model.

How RAG works

A RAG pipeline has two halves: retrieval and generation. First you index your knowledge into a searchable store, often a vector database of embeddings. At query time the system finds the passages most relevant to the question, adds them to the prompt, and the model generates an answer from that grounded context.

  • Index: split your documents into chunks and store them so they can be searched by meaning, not just keywords.
  • Retrieve: for each question, pull back the handful of chunks most relevant to it.
  • Generate: paste those chunks into the prompt as context and let the model answer from them.

RAG vs fine-tuning

RAG and fine-tuning both adapt a model to your needs, but they solve different problems. Fine-tuning changes the model weights to teach it a style or skill, and it is slow and expensive to update. RAG leaves the model untouched and instead feeds it fresh knowledge at query time, so it is the right tool when your facts change often or must be cited. Many real systems use both: fine-tuning for behaviour, RAG for knowledge.

Why RAG matters for builders

RAG is how most production AI features stay accurate and trustworthy. It lets a support bot answer from your real help center, a research agent cite its sources, and an internal tool reason over private data the base model never saw. Because retrieval controls what the model reads, RAG also reduces hallucination and gives you a place to enforce permissions, keeping the model honest and grounded in the context you allow it to see.

Questions fréquemment posées

Étape suivante

Prêt à mettre l’IA au service d’un véritable workflow ?

Commencez par le cours de base, conservez vos progrès localement et synchronisez tout sur votre compte gratuit quand vous le souhaitez.