Definition
Retrieval-Augmented Generation, usually shortened to RAG, is a pattern in which an application retrieves information from an external source and includes that information in the model’s input. The model generates its answer using both its learned parameters and the supplied evidence.
RAG does not update the model. It changes the context available for one request.
Simple example
A support assistant receives a question about a refund policy. Before asking the model to answer, the application searches the current policy collection, selects the relevant passages, and places them beside the question. The model can then answer from the policy text instead of relying only on general knowledge.
Why it matters
Application knowledge can change independently of model weights. RAG lets an application supply current, private, or domain-specific information at request time. If the retrieval layer retains source metadata, the application can expose the retrieved sources for inspection or citations. Engineers can inspect retrieval and generation separately.
One important nuance
Retrieval is not proof of correctness. The system can retrieve the wrong passage, omit an important exception, or provide evidence the user is not authorized to see. The model can also ignore good evidence. Inspect which passages retrieval selected and what reached the model. Test whether the answer follows that context. Enforce access control before supplying protected passages to the model, and check freshness when sources change. Keep source metadata if the answer needs citations.