Retrieval-Augmented Generation (RAG) and Why It Matters in LLMs

Hesam Sheikh
5 min readMar 4, 2024

Retrieval-Augmented Generation (RAG) is the hot topic of LLMs. If you’re designing Chatbots, RAG is the solution to accurate and precise conversations. Here’s everything you need to know about it.

How RAG works, in a nutshell.

You go to ChatGPT and ask “What is the largest company by revenue?” You wait a bit and you get “The largest company by revenue is Apple.” But is it right? Isn’t Microsoft number 1 now with its heavy investment in AI? Could it be Nvidia with its rocketing stock? You ask another question, “Who is the father of Quantum Physics?” — A scientific question. And it answers “Albert Einstein is often considered the father of quantum physics?” Is it thought? What about Max Planck? Or Niels Bohr, Werner Heisenberg, Erwin Schrödinger, and Paul Dirac?

Now this conversation is hypothetical and you may not get this string of questions and answers from ChatGPT, But if you have worked with it you already know what I want to get at. LLMs cannot be trusted with their answers. If they’re not connected to the internet, their answers can be outdated. On the other hand, you cannot tell when they are telling you the right answer and when they are making it up…

LLMs Don’t Know What They’re Talking About

--

--