Lesson 07 of 8 · 5 min
RAG: giving AI an open book
The big idea
RAG lets an AI look things up in your own documents before it answers, like an open-book test.
Updated October 8, 2026
Think of it like this
In a closed-book test, you answer from memory. In an open-book test, you can look things up first. A plain AI chatbot takes a closed-book test: it answers from what it learned during training. RAG, short for retrieval-augmented generation, turns it into an open-book test using your own documents.
How it works
- The question comes in. For example: how many vacation days do I get?
- The system searches your documents. It looks for the passages most related to the question. Good systems search by meaning, so a question about "time off" can find a policy that says "annual leave". They do this with embeddings, which turn text into lists of numbers so that passages with similar meanings sit close together.
- The question and the passages go to the model together. The model now has the facts in front of it.
- The model writes the answer and can point to the document and section each fact came from.
Why it helps
The model can answer questions about information it never saw in training: your policies, your products, last month's reports. It makes fewer things up, because the facts are right there. And you can check the answer against its sources.
What can go wrong
RAG is only as good as the documents and the search. If the policy in the system is out of date, the answer will be out of date too. If the search finds the wrong passage, the model will answer the wrong question very confidently.
Try it
Ask an AI chatbot about your own company's vacation policy. It cannot know. Now paste the policy into the chat and ask again. You have just done RAG by hand.
Why it matters at work
Most "chat with your documents" products are RAG. Before you buy one, ask: which documents does it search, how are they kept up to date, does every answer show its sources, and can people only see documents they are allowed to see?