Skip to content

What is RAG? Definition and explanations

RAG (Retrieval-Augmented Generation) combines document retrieval with a generative model: the system fetches relevant passages from your sources, then generates an answer grounded on those excerpts. Fewer hallucinations, more traceability.

In one sentence

RAG makes AI answer from your documents, not only from its trained memory.

Key points

  • Two phases: retrieval (often vector + keyword) then conditioned generation.
  • Quality depends on chunking, metadata, and access control.
  • Citations let you verify sensitive claims.
  • No guarantee if sources are incomplete or stale.
  • Complements fine-tuning and system prompts.

Term at a glance

RAG
Retrieval-Augmented Generation
French term
Génération augmentée par récupération
Domain
Artificial intelligence
Category
Applied generative AI
Level
Intermediate to advanced

Why RAG became essential

Quality depends on indexing, document chunking and passage ranking.

Sources are often cited so users can verify.

It is the preferred approach for internal knowledge bases, HR policies or product docs.

Building a RAG pipeline

  1. 01

    Curate sources

    Approved docs, dated versions, exclude unvalidated drafts.

  2. 02

    Index well

    Coherent chunks, metadata, recall tests on typical questions.

  3. 03

    Secure queries

    Filter chunks by user identity; log questions and served passages.

  4. 04

    Evaluate continuously

    Faithfulness metrics, FAQ coverage, expert feedback loops.

A concrete RAG example

An employee asks about the expense policy; the system retrieves the current HR page and answers with a link to the source.

RAG use cases

Internal support

IT, HR, finance — sourced answers from policies.

Sales

Specs and lead times from PIM/ERP exports.

Compliance

Query registers with audit trail.

Assisted legal research

First-pass triage, not legal advice.

Benefits and limits of RAG

  • Updatable without costly retraining
  • Traceability via citations
  • Can merge multiple repositories
  • Bad index → silently wrong answers
  • Added latency
  • Demands document governance

RAG or fine-tuning?

RAGFine-tuning
GoalInject up-to-date facts and docsChange model style or behaviour
Update costReindex documentsTraining runs
TraceabilityStrong with mandatory citationsWeak — weights dispersed
Data neededSearchable corpusLabelled example sets

RAG and business value

RAG turns a generic LLM into a front-end for your document estate — if that estate is trustworthy. Start with a narrow scope and weekly eval rather than indexing all of SharePoint at once.

Frequently asked questions

Does RAG remove hallucinations?

It reduces them when sources cover the question and prompts enforce fidelity. Extrapolation still happens.

Do you need a vector database?

Often for semantics, sometimes plus BM25. Depends on volume, language, budget.

RAG with agents?

Yes — the agent calls the retriever as a tool before other actions.

Related terms

Sources and references

Want an internal assistant that cites your docs — not random web text?

Design your RAG
Glossary