Retrieval-Augmented Generation (RAG)
A technique that retrieves relevant documents and feeds them to a model so its answers are grounded in real sources.
In RAG, a user's question is used to search a knowledge base, often a vector database of embeddings. The best-matching passages are inserted into the prompt, and the model answers using them, ideally with citations.
RAG lets models use private or up-to-date information without retraining, and it reduces (but doesn't eliminate) hallucinations.
💡 Example: A company help bot that searches its own documentation before answering a customer.
Related terms
EmbeddingsLists of numbers (vectors) that represent the meaning of text, images or other data.Vector DatabaseA database optimized for storing embeddings and quickly finding the most similar ones.GroundingTying an AI model's output to verified sources, data or real-world context.HallucinationWhen an AI model confidently produces information that is false or made up.