Architecture Patterns · Fast-moving · Intermediate
Retrieval-Augmented Generation
Also known as: RAG
An architecture that retrieves relevant documents at query time and gives them to a language model as context for its answer.
What Retrieval-Augmented Generation is
RAG separates knowledge from reasoning. The model supplies language ability; a searchable corpus supplies current, private, verifiable facts.
How it works
Documents are chunked, embedded and indexed in a vector store. At query time the question is embedded, the nearest chunks are retrieved — often combined with keyword search and a re-ranking model — and injected into the prompt with instructions to answer only from that context and cite it.
Why it matters
It is the default enterprise pattern because it updates instantly, needs no retraining, keeps data governed, and makes answers checkable.
Common uses
- →Internal knowledge base assistants
- →Customer support over product documentation
- →Legal, policy and contract question answering
- →Research tools over private paper libraries
Strengths
- ✓Fresh and private data without retraining
- ✓Citations and auditability
- ✓Cheaper than fine-tuning for facts
Watch for
- ✓Retrieval quality caps answer quality
- ✓Chunking strategy is fiddly
- ✓Adds latency and infrastructure
Continue exploring
More in this collection
Browse all AI Concepts