The problem RAG solves
A general AI model knows what it was trained on, but not your company's policies, contracts or this quarter's numbers, and it can answer confidently when it does not know. Retrieval-augmented generation, or RAG, gives the model the right pieces of your own documents at the moment of the question, so its answer is grounded in them.
How it works, step by step
| Step | What happens | In plain terms |
|---|---|---|
| 1. Collect | Gather approved documents | Decide what the system is allowed to read |
| 2. Split | Break them into passages or chunks | Small enough to be specific, large enough to keep meaning |
| 3. Embed | Turn each chunk into a list of numbers that captures its meaning | So similar ideas end up close together |
| 4. Store | Keep the numbers in a searchable index | A library catalogue organised by meaning |
| 5. Retrieve | Convert the question the same way and find the closest chunks | Pull the most relevant passages |
| 6. Generate | Give the passages and the question to the model and ask it to answer using them, with sources | The model writes from what it was handed |
What RAG does well, and where it fails
| Strength | Limitation |
|---|---|
| Answers from current, private information | If retrieval misses the right passage, the answer is wrong or empty |
| Can show sources for checking | Poor chunking can split key facts apart |
| Easier to update than retraining a model | Outdated or conflicting documents produce conflicting answers |
| Reduces made-up answers | Does not eliminate them — the model can still misread or over-generalise |
Checks before you rely on it
- Access control: can a user retrieve a document they should not see?
- Source quality: are the documents current, approved and consistent?
- Citations: does every answer point to a passage you can open?
- Testing: try twenty real questions, including ones the documents cannot answer, and see whether it says so
- Privacy: where are the documents and embeddings stored, and who can see them?
When RAG is the wrong tool
If your question needs exact calculation from a database, a direct query is more reliable. If you only need a general explanation, a plain assistant is enough. RAG shines when answers must come from a specific body of text.
To learn how to ask and verify well, see prompting for managers, verifying AI output and building a custom GPT for your team.
Frequently Asked Questions
What does RAG stand for?
Retrieval-augmented generation: the system retrieves relevant passages from your documents and the model generates an answer from them.
Does RAG stop AI from making things up?
It reduces the problem by grounding answers in your documents, but errors can still occur, so check the cited sources.
What are embeddings?
Numerical representations of text that place passages with similar meaning close together, which makes searching by meaning possible.
Is RAG safe for confidential documents?
Only with proper access control and a clear understanding of where data is stored and who can see it.