General AI term
A pattern that retrieves relevant source material and supplies it to a generative model before generation.
Retrieval-augmented generation, or RAG, separates finding relevant material from generating a response. A retrieval system selects passages, then the model uses those passages as context for the answer.
RAG does not make retrieval or generation automatically correct. Define source authority, require citations or evidence links where appropriate, and validate missing or conflicting material.