Retrieval-Augmented Generation, often shortened to RAG, is a method that helps an AI system answer with information it can look up. Instead of relying only on what a model learned during training, the system first retrieves relevant documents, passages, or records. Then it uses that material as context while generating a response.
A simple example is a company help bot. The bot may not have memorized every policy, price, and support article. With RAG, the user's question is used to search the company's knowledge base. The best matching sections are given to the AI model, and the model writes an answer based on those sections.
RAG is often built with a vector database. Documents are split into smaller chunks, turned into vectors, and stored. When a question arrives, it is also turned into a vector. The system finds chunks that are close in meaning and sends them to the model.
This approach can make AI answers more useful and easier to update. If a policy changes, the company can update the document instead of retraining the whole model. RAG can also show sources, which helps users check where an answer came from.
RAG is not magic. If the search retrieves weak or outdated information, the final answer may still be poor. Good chunking, permissions, source quality, and evaluation all matter. Still, RAG is one of the most practical ways to connect a large language model to current, private, or specialized information.