What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation (RAG) fetches relevant passages from trusted documents before a model answers, grounding replies in real reference text.
What it means
Retrieval-augmented generation (RAG) is an architecture that pairs a language model with a search system over a specific collection of documents. When you ask a question, the software first searches an approved library (company policies, legal precedents, technical manuals or lecture slides), pulls the most relevant passages into the prompt, and tells the model to answer using those passages with citations.
Think of it as turning a closed-book memory test into an open-book exam where the exact textbook pages are placed open on the desk first.
Why it matters if you're a student
Most serious enterprise AI products in law, banking, consulting and healthcare are RAG systems underneath. Knowing how RAG works helps you use and critique them well:
→ if the underlying document store is out of date or messy, the model's answer will be out of date too → if the search step pulls the wrong paragraph, the model summarises the wrong rule confidently → clickable source snippets exist so you can read them, not just admire the footnote icon
An everyday example
Suppose an engineering firm connects an internal assistant to its archive of building regulations and past project specs. When a graduate engineer asks about fire-door tolerances, RAG retrieves the current statutory guidance clauses first so the answer quotes real paragraphs rather than guessing from memory.
Common misconception
Teams often assume plugging RAG onto a messy shared drive fixes accuracy overnight. If a folder holds three conflicting versions of a client contract labeled "FINAL_v2_REAL", retrieval alone does not know which file won. Clean information architecture comes before smart answers.