RAG Simulation

How AI Uses Your Documents

The difference between a closed-book test and an open-book test. Same student, same question. But one gets reference material and the other relies on what they memorized. That's RAG, giving AI an open book.

Stage 0

How AI Uses Your Documents

The difference between a closed-book test and an open-book test. Same student, same question. But one gets reference material and the other relies on what they memorized. That's RAG, giving AI an open book.

🧠
Closed-book AI

Answers from general training patterns and memory.

vs
📖
Open-book AI

Searches your documents before answering.

Stage 1, Closed Book

Without RAG

Question
Without your documents, AI draws from general training data. It gives you a plausible average, not your specific answer. This is the closed-book test.
Stage 2, Open Book

With RAG

Same Question

Combined context sent to the model
+
Same model, same question, completely different answer. The difference? This time the model had your actual documents in its context when answering. That's Retrieval-Augmented Generation.
Stage 3, The Mechanism

The RAG Pipeline

Click once to watch the five-step flow. Each card appears in order so the process is easy to follow.

Five steps. Your question triggers a search. Relevant document chunks are found. Those chunks are attached to your prompt. The model generates from the combined context. The response cites where the information came from.
Stage 4, Real World

What RAG Enables

Click each card to see how the same pattern powers tools people already use.

Every AI tool that 'searches' before answering uses some form of RAG. Perplexity searches the web. Enterprise tools search your company docs. AI tutors search course materials. The mechanism is the same, giving the model reference material at the moment of answering.

Practical Takeaway

When choosing AI tools, ask: does it use RAG? Can it access my documents? An AI tool with access to your specific data will always give better answers than one working from general training alone. And now you know exactly why.

You've now seen every piece of the process, from the moment you type a prompt to the moment the response appears. Ready to watch it all work together?

Watch the Full Journey →
Stage 0 of 4