Grounding model answers by retrieving relevant documents or records first, then conditioning generation on those snippets—reducing hallucination when facts live outside the model weights.
RAG is the standard pattern for “knowledge lives in our systems, not only in the base model.” A retriever finds candidates; the model reads them in context and cites or reasons over them.
Connection to agents
Agents often combine RAG with function calling: tools fetch fresh data, while retrieval supplies long-tail documentation. Both manage what enters the context window. Quality depends heavily on chunking and often improves with reranking.
