Peer reviewed
Retrieval-Augmented Generation (RAG)
RAG pairs a trained generator with a retriever that fetches relevant passages from an external corpus (a Wikipedia index searched with dense vectors), then conditions the output on those passages. Both the retriever's query encoder and the generator are trained together, and retrieved documents can be swapped or updated without retraining the model. This lets a model cite and use up-to-date or domain-specific knowledge, reducing fabricated answers on knowledge-intensive tasks like open-domain question answering.