Retrieval-augmented generation combines a retriever that searches an external document collection with a generator language model. Lewis et al. (2020) introduced it, pairing a parametric seq2seq model with a non-parametric vector index of Wikipedia and showing it produced more factual, specific text and set state-of-the-art results on open-domain question answering.
Most modern RAG systems retrieve with dense embeddings, following Dense Passage Retrieval (Karpukhin et al., 2020); the idea of joining retrieval to a language model was also developed in REALM (Guu et al., 2020).
What is RAG in AI? The meaning in plain terms
The RAG meaning in one line: look it up first, then answer. A plain LLM answers only from what it absorbed during training, which can be outdated or misremembered. A RAG system first fetches passages relevant to the question — from company documents, a knowledge base or the web — and gives them to the model along with the question, so the answer can quote and cite real sources.
That is why RAG AI is the usual way to build chatbots over private documents, support assistants that must stay current, and research tools that show where each claim came from.
How retrieval-augmented generation works
- 1Index. Documents are split into chunks, each chunk is turned into an embedding, and the embeddings are stored in a vector database or search index.
- 2Retrieve. The user's question is embedded the same way, and the most similar chunks are found by nearest-neighbour search, often followed by a reranking step.
- 3Augment and generate. The top passages are inserted into the prompt, within the model's context window, and the model writes an answer grounded in them — ideally citing which passage supports each statement.
RAG vs fine-tuning
Both make a model more useful for your domain, but they change different things. RAG changes what the model can see; fine-tuning changes the model itself.
| RAG | Fine-tuning | |
|---|---|---|
| What changes | The context given to the model | The model's weights |
| Updating knowledge | Re-index the documents | Train again |
| Citations | Can point to the passages used | No built-in source trail |
| Best for | Fresh, private or fast-changing facts | Consistent style, format or specialised behaviour |
Long context windows let you paste whole documents into a chat, which can replace RAG for a handful of files. RAG still wins when the collection is larger than the window, changes often, or must be searched across many users.
RAG at MultipleChat
MultipleChat Projects work this way: files you add to a project are indexed, and when you send a message MultipleChat searches them and passes only the most relevant chunks to the model — so every chat in the project can draw on your documents without copy-pasting. Web search adds live sources, and on paid plans Auto Verification can check an answer for factual issues right after it is delivered.