What is RAG (Retrieval-Augmented Generation)?
Retrieval-augmented generation (RAG) is a technique where relevant information is retrieved from your own documents or data and given to a language model at question time, so its answers are grounded and citable.
LLMs only know what was in their training data. RAG gives them an “open book” by adding a retrieval step before generation.
How it works
- Index: split documents into chunks and convert each into an embedding.
- Store: save the embeddings in a vector database or index.
- Retrieve: when a question arrives, find the most similar chunks.
- Generate: send the question plus the chunks to the LLM and ask it to answer from them, with citations.
Example
An employee asks “How many days of parental leave do we get?” The system retrieves the relevant section of the HR handbook, and the model answers with a citation to that page.
Why it matters
RAG is usually the fastest, cheapest way to make an AI assistant knowledgeable about your business. It keeps answers current (just re-index changed documents), supports per-user permissions and reduces hallucinations.
Compare approaches in RAG vs Fine-Tuning, or build one with our RAG chatbot tutorial.
Related terms
Go deeper
The Agent Brief
One practical email a week on AI agents, RAG and generative AI, for builders and business owners. No hype, no spam.