This topic came up during yesterday’s webinar on AI. How could you wipe out genAI hallucinations (or at least reduce them)? Get a RAG.
By “RAG”, I mean Retrieval-Augmented Generation. What is that, you ask?
It’s the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response.
This article from Nvidia (What Is Retrieval-Augmented Generation, aka RAG?, written by Rick Merritt and available here), actually uses a legal-oriented analogy to illustrate what RAG is:
“Judges hear and decide cases based on their general understanding of the law. Sometimes a case — like a malpractice suit or a labor dispute — requires special expertise, so judges send court clerks to a law library, looking for precedents and specific cases they can cite.
Like a good judge, large language models (LLMs) can respond to a wide variety of human queries. But to deliver authoritative answers that cite sources, the model needs an assistant to do some research.
The court clerk of AI is a process called retrieval-augmented generation, or RAG for short.”
Retrieval-augmented generation gives models sources they can cite, like footnotes in a research paper, so users can check any claims. That builds trust. What’s more, the technique can help models clear up ambiguity in a user query. It also reduces the possibility a model will make a wrong guess, a phenomenon sometimes called hallucination.
I’ve covered several public examples of generative AI hallucinations recently, including this one I covered yesterday. It’s one of the biggest concerns people have about generative AI.
In our prep call for yesterday’s UnitedLex webinar on the EDRM network, Thomas Suh, COO of LegalMation, mentioned RAG as an important process in the development of generative AI technology. I was familiar with the term but realized that I haven’t seen much discussion of the concept anywhere, especially within legal tech sites (if I missed any, I apologize). So, I thought I would devote a post to it. 🙂
How did it get named RAG? Patrick Lewis, lead author of the 2020 paper that coined the term, apologized for the unflattering acronym that now describes a growing family of methods across hundreds of papers and dozens of commercial services he believes represent the future of generative AI.
“We definitely would have put more thought into the name had we known our work would become so widespread,” Lewis said in an interview from Singapore, where he was sharing his ideas with a regional conference of database developers.
Nonsense! I love it just as it is! If you want to wipe out genAI hallucinations (or at least reduce them), get a RAG. Got it?
Of course, if ChatGPT goes completely off the rails like it did earlier this week, a RAG won’t help. Why? Because it’s already hosed! See what I did there? 😀
So, what do you think? Were you familiar with the term “RAG”? You are now! Please share any comments you might have or if you’d like to know more about a particular topic.
Image created using Bing Image Creator Powered by DALL-E, using the term “robot wiping down a computer monitor with a rag”.
Disclaimer: The views represented herein are exclusively the views of the author, and do not necessarily represent the views held by my employer, my partners or my clients. eDiscovery Today is made available solely for educational purposes to provide general information about general eDiscovery principles and not to provide specific legal advice applicable to any particular circumstance. eDiscovery Today should not be used as a substitute for competent legal advice from a lawyer you have retained and who has agreed to represent you.
Discover more from eDiscovery Today by Doug Austin
Subscribe to get the latest posts sent to your email.




[…] couple of weeks ago, I discussed RAG, what it is and how it works (at a high-level). But this diagram from Dr. Low’s article […]
[…] query external sources and pull relevant information into their input context. Because it applies retrieval-augmented generation (RAG) explainability, they’ve nicknamed it “RAGE Against the Machine”. See what they did there? […]