AuloryYour AI Learning Hub

AI Vocabulary · 03 Working with AI

What is Retrieval-Augmented Generation (RAG)?

Looking up relevant documents first and handing them to the model, so it answers from your sources.

Intermediate

RAG is a common pattern for making AI answer from your own information. When a question comes in, the system first searches a collection of documents, picks the most relevant passages and adds them to the context. The model then writes its answer based on those passages, ideally with references.

The search part often uses embeddings to find passages by meaning rather than exact words. RAG lets a model work with internal or recent knowledge without retraining, and reduces hallucinations because the facts are in front of it.

RAG is only as good as its retrieval. If the wrong passages are found, the answer will confidently use the wrong material.

Why it matters for you

Most "chat with your documents" products are RAG. When you evaluate one, test it with real questions where you know the answer, and check whether it cites the right source.

Own it

With RAG, your knowledge stays in your document collection, not in the model. You can update it any day, and you can switch the model underneath without losing anything.

Where it comes from

The name comes from a 2020 paper by Patrick Lewis and colleagues at Facebook AI Research (now Meta AI), University College London and New York University: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Insider detail: Lewis later apologised for the unflattering acronym, explaining that nobody had a better name ready when it was time to publish (NVIDIA blog).

Related

ContextEmbeddingsHallucinationKnowledge CutoffContext Engineering

Your AI Learning Hub

Learn the whole AI Vocabulary, step by step, and build with it. Build it. Own it.