RetrievalAccuracyLLM Architecture Updated

RAG (Retrieval-Augmented Generation)

Definition

RAG (retrieval-augmented generation) is an AI technique that retrieves relevant documents at query time and feeds them to a language model, so its answer is grounded in real sources instead of memory alone.

At a glance

Introduced
Lewis et al., NeurIPS 2020
Pipeline
Index → retrieve → augment and generate
Typical store
A vector database or search index
Main benefit
Answers grounded in current, citable sources — without retraining the model
Main limit
If retrieval misses the right passage, the answer can still be wrong

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

  1. 1
    Index. Documents are split into chunks, each chunk is turned into an embedding, and the embeddings are stored in a vector database or search index.
  2. 2
    Retrieve. 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.
  3. 3
    Augment 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 reduces hallucination but does not eliminate it: if retrieval misses the right passage, or the model misreads it, the answer can still be wrong. Check the cited sources on anything that matters.

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.

RAGFine-tuning
What changesThe context given to the modelThe model's weights
Updating knowledgeRe-index the documentsTrain again
CitationsCan point to the passages usedNo built-in source trail
Best forFresh, private or fast-changing factsConsistent 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.

References

Primary, peer-reviewed and archival sources for this definition.

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W., Rocktäschel, T., Riedel, S., & Kiela, D. (2020). Advances in Neural Information Processing Systems 33 (NeurIPS 2020).
Dense Passage Retrieval for Open-Domain Question Answering
Karpukhin, V., Oğuz, B., Min, S., Lewis, P., Wu, L., Edunov, S., Chen, D., & Yih, W. (2020). Proceedings of EMNLP 2020, pp. 6769–6781.
REALM: Retrieval-Augmented Language Model Pre-Training
Guu, K., Lee, K., Tung, Z., Pasupat, P., & Chang, M.-W. (2020). Proceedings of the 37th International Conference on Machine Learning (ICML 2020).

Dictionary & encyclopedic entries

Cite this entry

MultipleChat. "RAG (Retrieval-Augmented Generation)." MultipleChat AI & LLM Glossary, October 2026. https://multiple.chat/ai-glossary/rag

Related terms

See this in practice

Run the same prompt across ChatGPT, Claude, Gemini, Grok and Perplexity side by side — with your own files as context and answers you can cross-check.

Try MultipleChat Free

Continue learning

See paid plans