What is Retrieval-Augmented Generation (RAG)?

MAA1
2 min readMar 21, 2024

As we are getting more and more exposure to Large Language Models (LLMs), we’re also starting to see the gaps in the accuracy and reliability of the responses we get from these models. LLMs can start hallucinating, providing responses that might seem accurate at first glance, but aren’t. One of the reasons why a LLM can hallucinate is because it’s unable to verify information from external sources. The LLM solely relies on training data, without access to real-time, up to date content or databases.

Retrieval-Augmented Generation addresses the problem of unreliable or inaccurate data by enhancing generative AI models to incorporate external data sources. After a user has prompted the LLM, the LLM gets an instruction to retrieve relevant content. This means that the LLM will look up a reputable data source, which can be open (e.g. Internet data) or closed (e.g. internal knowledge database). The LLM will link the information found to the user’s query and provide context about why the response is accurate.

Image Credit: Leonie Monigatti on Medium

Main learning point: When I hear about the art of creating and fine tuning LLMs, I think about the added aspect of RAG. Including information retrieval from predefined data sources is is another aspect to consider when improving LLM reliability and accuracy.

Related links for further learning:

  1. https://medium.com/@asheshnathmishra/hallucination-in-large-language-models-2023-f7b4e77855ae
  2. https://blogs.nvidia.com/blog/what-is-retrieval-augmented-generation/
  3. https://research.ibm.com/blog/retrieval-augmented-generation-RAG
  4. https://aws.amazon.com/what-is/retrieval-augmented-generation/
  5. https://ai.meta.com/blog/retrieval-augmented-generation-streamlining-the-creation-of-intelligent-natural-language-processing-models/
  6. https://www.smashingmagazine.com/2024/01/guide-retrieval-augmented-generation-language-models/

--

--

MAA1

Product person, author of "My Product Management Toolkit" and “Managing Product = Managing Tension” — see https://bit.ly/3gH2dOD.