retrieval-augmented generation (RAG)
/ ree-TREE-vul awg-MEN-tid jen-er-AY-shun /
Retrieval-augmented generation is the now-standard way to let a model answer using information it was never trained on: before it writes a word, you search a collection of documents for the passages most relevant to the question, paste those passages into the prompt, and ask the model to answer based on them. It is the difference between an open-book and a closed-book exam — instead of relying on memory alone, the model gets to read the relevant page first.
This solves several stubborn problems at once. A model's built-in knowledge is frozen at training time and goes stale; RAG lets it cite today's news or this morning's company memo. It cannot know your private files; RAG lets it read them on demand without baking them permanently into the model. And because the retrieved passages are shown to it, the system can point back to its sources, so a human can check whether the answer is actually supported. The retrieval step usually leans on embeddings and vector search to find passages by meaning, not just keywords.
RAG reduces hallucination but does not abolish it, and that honesty matters. If the search returns irrelevant or wrong passages, the model will dutifully answer from bad material. Even with good passages it may misread them, blend them with its own faulty memory, or cite a source that does not actually say what it claims. RAG makes a model far more grounded and up-to-date; it does not make it incapable of being confidently wrong.
You ask a company chatbot "What's our refund window?" The system searches the internal policy docs, finds the paragraph saying "30 days," pastes it into the prompt, and the model answers "30 days, per the returns policy" — citing the document. The model never memorized that policy; it read it just now.
Open-book answering: search first, then generate from the found text.
RAG is only as good as its retrieval. If the search surfaces the wrong passage, the model produces a confident, well-written, wrong answer — sometimes harder to catch than an obvious guess, because it looks sourced. Garbage in, fluent garbage out.