Having an AI look up relevant documents first, then answer based on them.
RAG stands for retrieval-augmented generation. Instead of answering only from what it memorized in training, the AI first fetches documents related to your question and reads them along with it. The name comes from a 2020 paper by Facebook AI Research and university partners.
Usually the documents are split into chunks and turned into embeddings; the chunks closest in meaning to your question get added to the prompt. Swapping in new documents updates the answers with no retraining, and it's easy to cite sources.
It helps reduce hallucinations. But if the retrieved text is wrong, the answer will be too.
Think of it like this
It's the difference between a closed-book and an open-book test. With the book open, you can find the page and back up your answer even if your memory is fuzzy. Open it to the wrong chapter, though, and your answer goes wrong too.
For example
Give it your school's festival flyer, and it can answer "When's the booth sign-up deadline?" from that flyer.
Records about this
Source-checked moments from AI history.
The canonical text of retrieval-augmented generation, combining parametric and non-parametric memory