LIVE
Architectural tweaks may break conventional scaling law exponents16/09/26|OpenAI publishes a framework for reporting model misalignment16/09/26 · OpenAI|NVIDIA's Vera Rubin NVL72 Debuts in MLPerf Inference v6.116/09/26 · NVIDIA|OpenAI expands ChatGPT advertising with Sponsored Agents16/09/26 · OpenAI|OpenAI moves into advertising with 'Sponsored Agents'16/09/26 · OpenAI|Google DeepMind Introduces Gemini 3.8 Live and Its Extended Thinking Variant15/09/26 · Google DeepMind|What's at stake in AI's trillion-dollar infrastructure bet15/09/26|A Flaw in Chain-of-Thought Safety Monitoring14/09/26|Stellar Colosseum: A Multi-Agent System for Long-Horizon Mathematical Research14/09/26|Apple Code Hints Siri Could Be Swapped for ChatGPT or Claude14/09/26 · Apple|Anthropic says Houthi-linked actors used Claude Code for missile guidance software13/09/26 · Anthropic|Yoshua Bengio examines why AI agents lie, cheat and coordinate13/09/26|Architectural tweaks may break conventional scaling law exponents16/09/26|OpenAI publishes a framework for reporting model misalignment16/09/26 · OpenAI|NVIDIA's Vera Rubin NVL72 Debuts in MLPerf Inference v6.116/09/26 · NVIDIA|OpenAI expands ChatGPT advertising with Sponsored Agents16/09/26 · OpenAI|OpenAI moves into advertising with 'Sponsored Agents'16/09/26 · OpenAI|Google DeepMind Introduces Gemini 3.8 Live and Its Extended Thinking Variant15/09/26 · Google DeepMind|What's at stake in AI's trillion-dollar infrastructure bet15/09/26|A Flaw in Chain-of-Thought Safety Monitoring14/09/26|Stellar Colosseum: A Multi-Agent System for Long-Horizon Mathematical Research14/09/26|Apple Code Hints Siri Could Be Swapped for ChatGPT or Claude14/09/26 · Apple|Anthropic says Houthi-linked actors used Claude Code for missile guidance software13/09/26 · Anthropic|Yoshua Bengio examines why AI agents lie, cheat and coordinate13/09/26|
Advanced📚

RAG explained simply

RAG is the technique that connects an LLM to your documents for grounded, hallucination-free answers. We explain the mechanism, technical stack and optimizations that make a difference.

13 min readPublished May 5, 2026· Updated September 17, 2026

In one sentence

RAG (Retrieval Augmented Generation) is a technique that connects an LLM to your knowledge base: instead of inventing, the model searches for information in your documents then responds based on them. It's become THE core technical component of enterprise chatbots in 2026.

📚
The analogy that works
Imagine an expert consulting your archives before responding. Without RAG, the expert answers from memory (and can be wrong). With RAG, for each question, they search through your files, read the relevant passages, then respond citing their sources. The difference: their answers become verifiable and factually grounded.

🔍 Want to see RAG in action?

Compare no-code RAG solutions (Google NotebookLM, Claude Projects) and code-based solutions (LangChain, LlamaIndex).

See the comparison

The problem RAG solves

Without RAG, a "classic" LLM has 2 major limitations:

Classic LLM vs LLM with RAG

 🧠LLM alone📚LLM + RAG
Source of knowledgeMemorised in weightsYour docs in real time
HallucinationsFrequent (3-25%)Very rare (~1%)
Information updatesRequires retrainingModify your docs, done
Citations / sourcesOften inventedVerifiable, real
Business customisationLimited (expensive fine-tuning)Total (just your docs)
Implementation costLow (direct API)Medium (vector infrastructure)

How RAG works concretely

RAG breaks down into 2 phases: indexing (once) and querying (for each question).

Phase 1: Document indexing

Knowledge base preparation

  1. Document collection

    PDFs, Word files, web pages, databases. All relevant content.

  2. Chunking

    Split into pieces of 200-1,000 tokens. Too small = lack of context. Too large = noise.

  3. Embedding (vectorisation)

    Each chunk is transformed into a vector (list of numbers) that captures its semantic meaning.

  4. Vector database storage

    Vectors are stored in Pinecone, Qdrant, Weaviate, or pgvector for fast searching.

Phase 2: User query

Question lifecycle

  1. User question

    'What is our refund policy?'

  2. Question vectorisation

    The question becomes a vector, like the indexed chunks.

  3. Semantic search

    We find the 5-10 chunks 'closest' to the question vector.

  4. Prompt construction

    We inject the found chunks into the LLM's prompt with the question.

  5. Grounded response

    The LLM responds based on the provided chunks, with citations.

Why it works: the magic of embeddings

Embedding (vectorisation) is RAG's secret. The principle: transform text into numbers that capture its meaning.

The brilliant idea behind embeddings
Two sentences that mean the same thing have vectors that are mathematically close, even if they don't use the same words. Example: - "How do I cancel my order?" → vector A - "Purchase cancellation procedure" → vector B - A and B are very close in vector space So even if the user phrases things differently from your docs, RAG finds the right passages.

The technical components of a RAG

Typical 2026 RAG stack

 🔧ComponentPopular choices
Embedding modelOpenAI ada-002, Voyage AI, CohereOpenAI ($0.10/1M tokens)
Managed vector databasePinecone, Weaviate CloudPinecone (~$50-500/month)
Self-hosted vector databaseQdrant, Milvus, pgvectorpgvector (free, on Postgres)
Orchestration frameworkLangChain, LlamaIndexLlamaIndex (simpler for RAG)
LLM for generationClaude, GPT, Mistral, LlamaClaude Sonnet (quality/price ratio)
Reranker (optional)Cohere Rerank, JinaCohere ($1/1k requests)

The 5 challenges of RAG in production

📚What goes wrong in practice (and how to fix it)

1. Chunking is crucial

Too small (100 tokens) → you lose context. Too large (2,000 tokens) → you introduce noise.

Best practice: 500-800 tokens with overlap of 100-200 tokens between chunks. Keep logical structure (paragraphs, sections).

2. Embedding quality varies

Not all embedding models are equal. For French, Voyage AI or Cohere are better than OpenAI Ada.

Best practice: test 2-3 embedding models on your own data and measure accuracy (% of correct answers).

3. Pure semantic search has limitations

If you search for "Apple" (the brand), semantic search might return passages about "apple" (the fruit).

Best practice: combine semantic search + keyword search (BM25). This is hybrid search, which greatly improves results.

4. Reranking changes everything

After initial retrieval (top 20), a reranker (Cohere Rerank, Jina) re-ranks results with a more precise model. Massive accuracy gain for ~$1/1,000 requests.

5. Evaluating a RAG is difficult

How do you know if your RAG is good? Useful metrics:

  • Faithfulness: is the answer faithful to the provided chunks?
  • Answer relevance: does the answer address the question?
  • Context precision: were the retrieved chunks relevant?

Tools: RAGAS, TruLens, LangSmith.

RAG: advanced vs basic

RAG performance: impact of each optimisation

+ Fine-tuning embeddings92% accuracy
+ Query rewriting88% accuracy
+ Reranking (Cohere)85% accuracy
+ Hybrid search (sem + BM25)75% accuracy
Basic RAG (chunks + embeddings)65% accuracy

Reading: between basic RAG and optimised RAG, you can gain +27 accuracy points. On critical questions (legal, medical), it changes everything.

Real use cases

Where RAG excels in 2026
1. Level 1 customer support Chatbot that answers 80% of FAQ questions based on support documentation. You reduce ticket volume by 60-80%. 2. Internal document assistants "What is our leave policy?" → instant answer based on the HR manual. 3. Legal / medical research Search through 10,000 contracts / patient files: "Find all cases where..." 4. Personalised education Tutoring adapted to a student's course, based on their own notes. 5. Contextualised code assistance GitHub Copilot Chat, Cursor: RAG on your codebase for relevant suggestions.

RAG vs Fine-tuning: which to choose?

Many people confuse them. The two are complementary but do different things:

RAG vs Fine-tuning

 📚RAG🎯Fine-tuning
Main purposeGive access to new informationChange style or behaviour
Content updatesEasy (modify docs)Heavy (retrain)
CostModerate (vector infrastructure)High (GPU for training)
HallucinationsGreatly reducedNot particularly
Style/tone customisationLimitedExcellent
Highly specialised domainOK for factsOK for vocabulary/reasoning

2026 golden rule: RAG first (90% of needs). Fine-tuning only if RAG isn't enough (very specific style, critical latency performance).

The metaphor that sums it all up

🎓
Exam with / without documentation
Without RAG, the LLM takes the exam closed book: it answers from memory, can bluff. With RAG, the LLM takes the exam open book: before each answer, it consults the right chapters (thanks to semantic search), then responds citing the passages. Guess who succeeds better? The open book exam wins systematically on factual questions. That's exactly RAG's promise: transform an LLM into an expert with access to your library.

Key takeaways

  • ✅ RAG drastically reduces hallucinations (from 25% to 1-3%)
  • ✅ It lets you use an LLM on your own data without fine-tuning
  • ✅ Typical 2026 stack: Embedding (OpenAI/Voyage) + Vector database (Pinecone/pgvector) + LLM (Claude/GPT) + Framework (LlamaIndex)
  • ✅ Optimisations that change everything: hybrid search, reranking
  • RAG first, fine-tuning later (90% of needs are solved with RAG)

RAG has become the enterprise AI technique. If you're building a professional chatbot in 2026, this is where you start.

🧠 Quiz
Question 1 of 3

What does RAG primarily do?

Going further

Tags
RAGEmbeddingsArchitectureRecherche sémantique

Read next