Glossary
What is RAG (retrieval-augmented generation)?
Last updated
RAG (retrieval-augmented generation) is a technique where an AI first retrieves relevant passages or records from your own sources, then writes its answer from them, usually with citations. It is the standard way to get an AI to answer from your own documents, policies and past work, rather than only from what it absorbed during training.
Why it matters
Left to itself, a language model answers from a general pattern of everything it was trained on, which does not include your company’s policies, contracts or last quarter’s figures. RAG closes that gap without retraining the model: at the moment a question is asked, the system searches your own material, hands the most relevant passages to the model, and asks it to answer from those specifically. The result is an answer grounded in something checkable, with a citation, rather than a fluent guess.
This is also the practical foundation of an AI knowledge base: the useful part is rarely the model, it is having your documents properly indexed, searchable and permission-aware so RAG has something reliable to retrieve from in the first place.
How it works
A production RAG system generally runs five steps: documents are parsed and split into sensible chunks; each chunk is turned into an embedding and stored in a vector database (often alongside plain keyword search, known as hybrid search); a question is embedded the same way and matched against the closest chunks; those chunks are handed to the model as context; and the model writes an answer from them, ideally citing which passage it used. Permissions are checked at query time, so a person only ever gets an answer built from documents they are allowed to see.
Examples
A knowledge base that answers “what’s our policy on X?” from your own handbook, with the specific paragraph cited. A proposal-drafting agent that finds similar past bids via MCP and drafts sections grounded in what actually worked before, rather than inventing plausible-sounding boilerplate.
RAG versus fine-tuning
A common early question is whether to use RAG or fine-tune a model on your own data instead. They solve different problems and are often used together.
| Question | RAG | Fine-tuning |
|---|---|---|
| What it changes | What the model is shown at question time. | The model's own weights, via extra training. |
| Keeping it current | Update the source documents; the next question sees them. | Requires retraining or further fine-tuning. |
| Can it cite its source? | Yes, naturally, since it retrieved a specific passage. | No; the knowledge is baked in and unattributable. |
| Best for | Answering from a changing body of documents or data. | Teaching a consistent style, format or specialised skill. |
Most business knowledge bases need RAG, not fine-tuning, because the material (policies, past work, current figures) changes constantly and answers need to be traceable to a source.
RAG versus GraphRAG
Plain RAG retrieves chunks of text based on similarity. GraphRAG adds a knowledge graph, so an AI can also follow relationships between things rather than only matching wording. Independent benchmark work (GraphRAG-Bench, February 2026) found plain RAG “comparable to or outperforms GraphRAG” on simple, single-passage lookups, while GraphRAG showed a clear advantage on complex, multi-step reasoning and summarising across many sources, at meaningfully higher cost. The practical rule: start with RAG, and only add a graph once your questions genuinely depend on following connections.
Common mistakes
Treating RAG as a single tool rather than a pipeline. Weak results are usually a chunking, indexing or permissions problem, not a model problem.
No permission filtering at query time. Retrieval that ignores who is asking will happily surface a document the person should never have seen.
Skipping citations. An answer with no visible source is much harder to trust and to check, and removes the main advantage RAG has over an ungrounded answer.
Reaching for GraphRAG by default. A graph adds real cost and complexity. Most “look up the right paragraph” questions are answered well by plain or hybrid search.
Frequently asked questions
Can RAG answer from our own documents without making things up?
That is exactly what it is for: it retrieves the relevant passage first and asks the model to answer from it, with a citation, rather than answering from memory alone. It substantially reduces, but does not eliminate, the chance of a wrong answer, which is why citations and permission checks matter.
Does a RAG system show its sources?
A well-built one does, on every answer, because it retrieved a specific passage before writing the answer. If a system cannot show its source, that is usually a sign the retrieval and generation steps have not been wired together properly.
Will it respect document permissions?
Only if permissions are checked at query time, using the identity of the person asking. This is a design decision, not something RAG guarantees automatically, so it is worth confirming explicitly with anyone building one for you.
How is a RAG-based knowledge base kept up to date?
By re-indexing documents as they change, ideally automatically. Because RAG retrieves from the current document set rather than from the model’s training, an updated policy is reflected in answers as soon as it is re-indexed, with no retraining required.
How this connects
Which approach fits?
Is the data it needs in reasonable order?
This looks like
Related terms
Sources
- GraphRAG-Bench: evaluating GraphRAG against vector RAG. arXiv (2506.05690), February 2026.