Retrieval-Augmented Generation (RAG)
A pattern where, instead of relying solely on the LLM's training, the system retrieves relevant documents from a knowledge base and includes them in the prompt as context.
What Retrieval-Augmented Generation (RAG) means in practice
Retrieval-Augmented Generation is the dominant production pattern for enterprise LLM use. At ingestion time documents are chunked, embedded, and stored in a vector database. At query time the user's question is embedded, the nearest chunks are retrieved, and the LLM is prompted to answer using the retrieved context. The architectural payoff is that the LLM's knowledge stays current (just re-ingest), domain-specific (just choose what to ingest), and traceable (the answer cites the chunks it grounded on). The engineering reality is that 80% of RAG quality lives in retrieval — chunking strategy, embedding choice, hybrid search, re-ranking — not in the generation. Teams that go straight to fine-tuning before exhausting retrieval improvements waste their first six weeks.
Related terms
Embedding →
A dense numeric vector representation of a piece of text (or image, or audio) such that semantically similar inputs produce vectors close in the embedding space.
Vector database →
A database optimised for storing high-dimensional vectors and serving nearest-neighbour queries — the storage layer that makes RAG fast.
Hybrid retrieval →
Combining dense vector search with sparse keyword search (BM25), then fusing the results — typically yielding 15–25% accuracy lift over either alone.
Chunking →
Splitting source documents into the units that get embedded and retrieved — typically 200–800 tokens per chunk, with strategy varying by document type.
More in this category
All 62 terms, in plain language
Sovereign AI, RAG, agentic AI, IDP, MLOps and the regulations that shape enterprise AI.