What is retrieval augmented generation?

Shared on September 17, 2026 by Vipin Chaudhary

Retrieval-augmented generation (RAG) is a way to make a large language model answer with information retrieved from an external knowledge source rather than relying only on facts stored in its parameters. The source might be a document collection, database, structured dataset, or web index. RAG combines a retriever, which finds relevant information, with a generator, which uses that information to compose the response. [citation_1nvw8z] [citation_1pkcdo]

A typical RAG workflow is: (1) receive a user question, (2) search an indexed knowledge corpus for relevant passages, and (3) place the retrieved passages alongside the question in the generator’s prompt. The language model then produces an answer conditioned on that retrieved context. [citation_1pkcdo] This lets organizations use private or domain-specific material and update the answerable knowledge base without retraining the model whenever the underlying documents change. [citation_1nvw8z] [citation_1pkcdb]

RAG can improve factuality and contextual relevance, but it is not a guarantee of truth. Its performance depends on retrieving the right evidence and aligning that evidence with the generator’s objective; irrelevant or incomplete retrieval can still produce a poor answer. [citation_1nvw8z] Evidence from a medical question-answering evaluation likewise found that RAG’s gains weakened when the retrieval corpus did not match the target domain, showing why corpus quality and query–document fit matter. [citation_1njagv] In short, RAG is “search first, then generate”: retrieval supplies potentially relevant evidence, and the language model turns that evidence into a readable response.

Comments & Discussion