RAG retrieves relevant external documents first, then feeds them into an LLM to generate query-specific responses that go beyond static training data.
Retrieval-augmented generation (RAG) is a technique for using large language models (LLMs) that first retrieves relevant information from external data sources (such as document collections, databases, or the web) and then uses that retrieved text to help generate an answer to a user query. In this setup, the retrieved documents supplement what the LLM learned during training, enabling the model to use domain-specific and/or more up-to-date information that may not be present in its original training data. The purpose of RAG is to improve response quality and reliability by grounding generation in external sources, which can reduce issues like hallucinations and increase transparency by allowing cited or verifiable material. It also helps reduce the need to retrain models when new information becomes available, since updates can be made to the external knowledge base rather than the model weights. While RAG improves factuality, it does not fully eliminate errors—models can still misinterpret retrieved context or generate misinformation even when the sources themselves are factually correct.
RAG retrieves relevant external documents first, then feeds them into an LLM to generate query-specific responses that go beyond static training data.
RAG is used to improve factual grounding, reduce hallucinations, and increase transparency, while also lowering the need for frequent model retraining.
RAG does not guarantee correctness: the LLM can still misinterpret context or produce misinformation even when retrieved sources are accurate.
A method that combines information retrieval from external sources with LLM generation so answers are grounded in retrieved documents.
A neural language model trained on large text corpora that generates text based on learned patterns and prompts.
The process of selecting the most relevant documents or passages from an external data source for a given query.
A storage system that holds embeddings of documents and supports similarity-based retrieval.
Numerical vector representations of text used to measure similarity and enable retrieval.
When an LLM produces incorrect or unsupported information in its output.
“Can you explain what "RAG retrieves relevant external documents first, then feeds them into an LLM to generate query-specific responses that go beyond static training data." means in simple terms?”