Retrieval-augmented generation (RAG) is a method for improving large language models by retrieving relevant external information before generating a response1. Instead of relying only on static training data, a RAG system can consult documents, databases, uploaded files, or web sources to answer questions with fresher or more domain-specific information1.
RAG is commonly used to reduce hallucinations by grounding outputs in retrieved material1. It can also improve transparency when responses include cited sources, making claims easier to verify1. Another advantage is that it can incorporate new knowledge without full model retraining, which can lower cost and speed up updates1.
RAG is especially useful for chatbots and enterprise systems that need access to internal knowledge bases or authoritative references1. However, it does not eliminate errors: if the model misreads retrieved content, it can still produce misleading answers1.
At a high level, RAG systems often convert data into embeddings, retrieve the most relevant items at inference time, and combine that context with the user prompt1. The approach is a practical way to connect language models with external memory and live information1.