The Open-Book AI·Part 2 of 10·6 min read

The Open-Book Exam: What RAG Actually Is

The whole idea in one sitting

Pritish Maheta·

Picture two students walking into the same exam.

The first one spent months memorizing. Ask her anything she studied and the answer comes back instantly. But if a question falls outside what she memorized — or the syllabus changed last week and nobody told her — she has a choice: leave it blank, or write something that sounds right and hope.

The second student memorized nothing special. But she's allowed to bring the textbook. Her skill isn't recall — it's knowing how to find the right page fast, read it, and answer based on what's actually printed there. If the book doesn't cover it, she can say so, and point to the gap.

Last time, we met the genius with amnesia — a brilliant model that answers everything from memory, invents what it doesn't know, and has never seen your documents. Today we fix him. Not by making him smarter. By changing the exam.

That's RAG: Retrieval-Augmented Generation. Three intimidating words that mean let the AI take the exam open-book.

The three words, translated

Work backwards through the name and the whole thing unpacks itself.

Generation is what the model already does — it generates text. Answers, summaries, emails. That part doesn't change.

Retrieval is the new ingredient — before generating anything, the system goes and retrieves the relevant material from your actual documents. Not the whole library. Just the few passages that matter for this specific question.

Augmented is the glue — the model's generation is augmented by what was retrieved. It writes the answer with the right pages sitting in front of it, instead of from a foggy memory of the whole internet.

Look it up first, then answer. That's the entire idea. Everything else in this series is craft.

The three steps, on a whiteboard

Every RAG system — from a weekend prototype to the ones running inside banks — is the same three steps. If you can hold these, you can whiteboard RAG for anyone.

Step 1: Store. Before any questions arrive, you build the library. Take your documents — policies, manuals, contracts, help-center articles — cut them into retrievable pieces, and index them so they can be found by meaning, not just by exact words. This happens once, in advance, and gets updated as your documents change.

Step 2: Find. A question arrives: "Can customers return sale items?" The system searches the library and pulls out the handful of passages most relevant to that question — say, the returns section of your policy and last spring's exception memo. This is the open-book student flipping to the right page.

Step 3: Answer. Now, and only now, the model gets involved. It receives the question and the retrieved passages together, with one standing instruction: answer based on these. The response comes back grounded — "Sale items can be returned within 14 days, per the March policy update" — often with a citation pointing at the exact source.

Question in, relevant pages found, grounded answer out. Three steps. You now understand more about RAG than most people who drop the acronym in meetings.

The quiet superpower: the knowledge lives outside the model

Here's the consequence that makes RAG a business idea and not just an engineering trick.

In Step 1, notice what we didn't do: we never touched the model. We didn't retrain it, didn't feed your documents into its brain, didn't change a single one of its internal wires. The model stays generic. Your knowledge sits outside it, in the library, retrieved on demand.

That separation buys you three things people consistently underestimate.

Instant updates. Your refund policy changes Tuesday morning? Update the document in the library, and every answer from Tuesday afternoon reflects it. No retraining, no waiting, no new model version. Compare that with knowledge baked into the model itself — frozen at training time, expensive to refresh. The amnesiac genius never has to relearn anything, because he was never asked to memorize it in the first place. He just gets handed the current edition.

An audit trail. Because the answer came from retrieved passages, the system can show its work: this answer, from this paragraph, in this document. When the AI is wrong, you can trace why — was the source wrong, or the reading of it? A closed-book guess gives you nothing to inspect. This is the difference between an employee who says "trust me" and one who says "here's the memo."

Privacy by architecture. Your documents aren't absorbed into a model that might serve other people. They sit in your library, under your control, consulted at answer time. For legal, medical, and financial teams, this single property is often the whole reason RAG gets approved.

Why this beats the obvious alternatives

"Why not just train the model on our data?" — because that's making the student memorize a textbook that gets re-edited every month. Slow, expensive, and stale by exam day. (There are good reasons to train — we'll settle that argument properly in Part 9.)

"Why not paste all our documents into the chat?" — for a page or two, that works fine, and honestly, that is RAG at its smallest: you did the retrieval by hand. It stops working at scale. You can't paste ten thousand pages, and even the biggest AI desks charge you for every page, every single question. RAG's whole discipline is bringing the right three pages instead of the whole bookshelf.

The catch

By now you should have exactly one suspicion, and it's the correct one:

Everything depends on Step 2 finding the right page.

The open-book student only wins if she can actually locate the passage. And real questions are cruel about this. Someone asks "How do I get my money back?" — the document says "Refund Policy." Zero words in common. Ctrl+F finds nothing. A system that searches by matching words will hand the genius the wrong pages, and a genius reading the wrong pages produces confident, well-cited nonsense.

So the machine needs something stranger than word-matching. It needs to understand that "money back" and "refund" mean the same thing — to find pages by meaning, not spelling.

How a machine does that is, I think, the most beautiful idea in modern AI. It involves a map.

The one line to remember

RAG doesn't make the AI smarter. It changes the exam from closed-book to open-book — and open-book beats brilliant-but-guessing almost every time.

Next — Part 3: "The Map Inside the Machine." How AI finds "Refund Policy" when you asked about "money back": every sentence gets coordinates, similar meanings become neighbors, and search becomes navigation. No math, one map.

Facing this problem in production?

I help teams make AI systems smaller, faster, and cheaper — from distillation to full MLOps pipelines.

Work with me