Dan: Tara, I have a question that's been bugging me since episode three. You told us not to use AI to find legal authorities because it fabricates citations. But you also said AI is powerful for analysing documents. how do those two things fit together?
Tara: That's exactly where we're going today. The difference comes down to whether the model is generating from its training data — where hallucination lives — or from documents you've actually pointed it at. And that distinction has a name. Retrieval-augmented generation. RAG for short.
Dan: RAG. Okay, break that down for me.
Tara: let's start with why the problem exists. An LLM is frozen after training. It can't look things up. It has no library, no database it can search. The context window — whatever you put in the prompt — is everything the model knows about your task. that's it. Nothing else.
Dan: And that's why it fabricates citations?
Tara: Exactly. You ask it to find a case, it has no library to search, so it generates the most statistically plausible case name, citation, and holding. Fluent, confident... fabricated.
Dan: so the model isn't being deceptive — it literally has nowhere to look.
Tara: Right. Now, what RAG does is add a retrieval step before generation. the system searches a specified document collection — your contracts, your case law database, your firm's precedents — retrieves the passages most relevant to your question, inserts them into the context window, and then the model generates from that material. Not from its general training.
Dan: So it's a two-step process. Retrieve, then generate.
Tara: Exactly. And this is important — RAG isn't a different kind of AI. It's a smarter way of feeding information to the same AI. think of it this way. Without RAG, you're asking a well-read associate to answer from memory. With RAG, you're handing them the relevant files first.
Dan: That's a huge difference in legal practice.
Tara: It is. And the tool's system prompt — we covered those invisible layers in episode four — typically instructs the model to answer only from retrieved material and flag when it can't find something relevant. That instruction is what keeps it grounded.
Dan: but how does the retrieval part actually work? Is it just keyword search?
Tara: No, and this is where it gets really interesting for lawyers. traditional legal research relies on keyword search. You type exact terms, the system finds documents containing those terms. But what happens when the document uses different language? "Termination for cause" versus "dismissal for misconduct." Or "force majeure" versus "unforeseeable circumstances beyond reasonable control." Keyword search misses those matches entirely.
Dan: And those are exactly the kinds of connections lawyers need to make.
Tara: Precisely. RAG-enabled systems use semantic search. Instead of matching exact words, the system matches meaning. It understands that two passages are about the same concept even when they use entirely different language. this is why RAG can surface a relevant clause buried on page one-eighty of a two-hundred-page agreement that a keyword search would miss — the clause uses none of your search terms, but it addresses exactly your question.
Dan: so semantic search catches conceptual relevance, not just word overlap?
Tara: Exactly. For lawyers, this is transformative. Think about how often the critical provision in a contract or the decisive paragraph in a judgment doesn't use the exact phrase you'd search for.
Dan: and what does this mean for accuracy? Because that's been the big concern all along.
Tara: Hallucination risk drops substantially when the model is grounded in actual documents. The failure modes shift to the reviewable errors we discussed in episode seven — omission, mischaracterisation, anchoring — and crucially, you have source documents to check against. trust-building features become possible too. Direct citations tracing each claim to a specific passage. Confidence scores. Reasoning trails. Review becomes targeted rather than from-scratch verification.
Dan: but here's something I keep hearing. Context windows are huge now — some models accept two hundred thousand tokens. Can't I just paste everything in?
Tara: Good question, and the answer is — sometimes, but not always. Two reasons. First, practical ceiling. A trial bundle, a precedent library, a full data room won't fit in any context window. second — and this is the subtle one — attention dilution. Models don't attend equally to everything in long inputs. Information in the middle of very long contexts gets less attention. A clause buried deep in a three-hundred-page document may be missed... not because the model can't see it, but because its attention is spread too thin.
Dan: so RAG solves this by being selective?
Tara: Exactly. It retrieves specific relevant passages so the model's attention is focused, not diluted. for most lawyers starting out, the context window approach covers eighty percent of daily tasks. One contract, one judgment — upload it, ask questions, done. RAG becomes essential at scale — large collections, repeated queries, persistent access across sessions.
Dan: and I suspect we've already been using RAG without knowing it?
Tara: Almost certainly. Legal AI tools — Harvey, CoCounsel, LawNet AI — are RAG systems. The "legal AI tool" wrapper from episode four is, in most cases, RAG with a specialised document collection behind it. Even uploading a PDF to Claude or ChatGPT and asking questions about it is a basic form of the same principle. You're grounding the model in material you provide.
Dan: but RAG isn't perfect either, right?
Tara: No. And this matters. Retrieval quality is everything. If the retrieval step pulls the wrong passages — imprecise query, incomplete collection, poor indexing — the model generates confidently from the wrong material. Semantic search is powerful but imperfect. It can miss relevant passages, especially in highly technical or jurisdiction-specific content where meaning is nuanced.
Dan: So the system needs tuning?
Tara: significant tuning. RAG systems need calibration to perform well on legal material. The out-of-the-box experience is rarely the final product. Retrieval precision improves with better indexing, better chunking of documents, and iterative testing against real legal queries. the model can still misinterpret what it retrieves. All error modes from episode seven remain in play. Human review is non-negotiable.
Dan: and you need to ask the vendor the right questions too.
Tara: Absolutely. Key question — is the tool drawing only from my documents, or supplementing from its training data? That's the due diligence from episode five applied here. ... So the takeaway. RAG is what turns AI from a confident guesser into a tool that works from evidence — and semantic search means it finds relevant material that keyword searches miss entirely. For lawyers, this is the architecture that makes AI useful for substantive legal work. But retrieval quality varies, systems need fine-tuning, and human review still sits at the end of every workflow.
Dan: And next time we start getting hands-on — the four building blocks of a good prompt. Turns out, giving instructions to an AI is a lot like briefing a new associate. Thanks for listening — see you next time. ... The hosts on this podcast are AI-generated voices. Content is designed by a practising lawyer but is for educational purposes only — not legal advice.