Skip to content
Myndeo

Definition

RAG

In short

Retrieval-Augmented Generation: a technique that gives a language model excerpts from your documents, retrieved for each question, so that it answers from verifiable sources.

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.

PREPARATION, ONCE FOR EVERY QUESTION Your documents PDFs, procedures, sheets Splitting into short passages Embeddings one vector per passage Vector database the index of your passages Question “Return period?” as a vector Semantic search closest passages Enriched prompt question + passages LLM relies on the passages Sourced answer with its references
RAG in two stages: your documents are indexed once, then every question retrieves the useful passages before the model answers.

How RAG works

  1. 1 Step 1 The question A user asks a question in natural language.
  2. 2 Step 2 The search The system searches a vector database built from your documents for the passages closest in meaning.
  3. 3 Step 3 The context These passages are added to the prompt sent to the model, along with the question.
  4. 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.

30-minute call · no commitment

Ready to make the move to AI?

Book a 30-minute call. Together we’ll pinpoint your most profitable use cases, with no commitment.