What is RAG?
RAG (retrieval-augmented generation) lets an AI look things up in your documents before it answers.
In a hurry? Watch the one-minute version.
Someone said "we should add RAG" and everyone nodded. In about two minutes: what retrieval-augmented generation actually is, why a chatbot doesn't know your company's handbook, how RAG searches your documents and puts the right passages in front of the model before it answers, why it can cite its sources, and why it's only as good as what it finds. Featuring an open-book exam, a very dusty folder of PDFs, and unlimited Fridays (not a real policy).
Read Tim's takeBefore you add RAG, clean the cupboardRAG lets an AI answer from your own documents, and it can only be as good as what it finds. Most RAG projects that disappoint don't have an AI problem. They have a filing problem.What you'll be able to explain
Explain retrieval-augmented generation: a search step finds relevant passages in your documents, puts them in the context window next to the question, and the model answers from them (ideally citing them); it reduces but does not eliminate wrong answers, and depends on the documents and the retrieval being right.
"Great, when were those documents last updated?"
RAG answers from whatever it finds in your documents. Outdated or duplicated documents give outdated answers, with a citation that makes them look trustworthy.
A good answer sounds like: Each source has an owner and a single current version, and answers show their sources. All the questions →
Transcript
Everyone nodded
Someone in your meeting just said: we should add RAG. Everyone nodded. Somebody pictured an actual rag. Polishing the robot. Nobody asked what it actually is. Let's fix that.
The policy it made up
Ask a chatbot about your company's holiday policy. Your handbook was never in its training data. So it admits it doesn't know, or confidently invents one. Unlimited Fridays. Hello again, hallucinations.
Open-book exam
Right now, it's taking a closed-book exam. Every answer comes from memory. RAG, short for retrieval-augmented generation, makes it an open-book exam. Before answering, it checks the manual.
Search, paste, answer
Here's how it works. You ask a question. A search step digs through your documents: the handbook, the wiki, that folder of old PDFs, and grabs a few passages that look relevant. They get pasted into the context window, the model's desk, next to your question. Then the model answers using them, ideally citing where it found them.
Who named this?
Retrieve, augment, generate. Find it, paste it, answer it. The name comes from a 2020 research paper, whose lead author later admitted they'd have put more thought into the name. Why only a few passages? They have to fit on the desk. Finding the right ones? Another episode.
Only as good as what it finds
Here's the catch. RAG is only as good as what it finds. Outdated handbook? Outdated answer. Wrong passage? Wrong answer, now with a footnote. In 2024, Stanford researchers tested legal research tools built this way. They hallucinated less than a general chatbot, but still seventeen to thirty-three percent of the time. Fewer. Not zero.
The question that silences the room
So ask what it searches, and whether it shows its sources. And that rag? Not a cleaning cloth. Though it does mop up some of the mess. Next time someone says we should add RAG, nod. Then ask the question that silences the room: great, when were those documents last updated? Silence. Congratulations. You're nodding with intent.
Sources
Every claim in this episode was checked against these 5 sources on before recording. AI moves fast: if something here is out of date, tell Tim.
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., 2020, NeurIPS)
- What is RAG (Retrieval-Augmented Generation)? (AWS)
- Reduce hallucinations (Claude API docs)
- Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools (Magesh et al., Stanford, 2024)
- What Is Retrieval-Augmented Generation, aka RAG? (NVIDIA blog, interview with Patrick Lewis)
Related

A large language model (LLM) is the AI behind chatbots like ChatGPT and Claude: it predicts the next word, extremely well.

AI hallucinations are confident, fluent answers that an AI simply made up.

A context window is how much text an AI model can take in at once, including your whole chat and its own reply.