Retrieval-augmented generation pairs search with generation. When a question arrives, the system finds the most relevant passages from a knowledge base, such as policies, manuals, past projects, or a website, and includes them in the model's context. The model then answers using that material, ideally citing where it came from.
RAG reduces unsupported answers and lets AI use private or current information without retraining a model. Its quality depends on the retrieval step, including how documents are split, indexed, and ranked, and on clear instructions about what to do when the answer is not in the material.