Jargonautica
Retrieval and Knowledge

Retrieval Augmented Generation

Also called: RAG

A technique where the system searches a document collection for relevant material and includes it in the prompt before the model answers. It turns a closed book exam into an open book one. This is how most organisations get a model to answer questions about their own internal documents, and it substantially reduces invented answers on factual queries.

Technical view

Documents are chunked, converted into embeddings, and stored in a vector database. A query is embedded and used to retrieve the nearest matching chunks, which are inserted into the prompt. Quality depends heavily on retrieval quality: if the right chunk is not returned, the model cannot use it. Practical refinements include hybrid search combining keyword and semantic matching, reranking, and careful chunking strategy. Compared to fine-tuning, retrieval has the advantage that the knowledge base can be updated at any time without retraining.


Part of AI Terminology Index, section: Retrieval and Knowledge.

How it connects

Retrieval Augmented Generation links to 30 other terms, and the 12 closest are drawn here. The faint lines are links between those terms. See it in the full graph.

ChunkingChunkingContext WindowContext WindowSemantic SearchSemantic SearchVector DatabaseVector DatabaseEmbeddingsEmbeddingsHallucinationHallucinationRerankingRerankingLost in the MiddleLost in the MiddleKnowledge CutoffKnowledge CutoffContext EngineeringContext EngineeringMemoryMemoryRetrieval MetricsRetrieval MetricsRetrieval Augmented Generation