Back to Blog
·2 min read
Edit

What is Retrieval Augmented Generation (RAG)?

Large language models (LLMs) like ChatGPT-4 have transformed how we use AI, but they have three big gaps:

  • Outdated knowledge, they can’t see beyond their training data.
  • Hallucinations, they sometimes make up convincing but false answers.
  • Generic responses, often missing the nuance a business needs.

Retrieval-Augmented Generation (RAG) is one way to mitigate these limitations.

RAG lets an LLM “look things up” before answering, similar to an open-book exam, pulling from trusted sources like company policies, standards, or databases. This ensures that the output is tailored and traceable to the up-to-date business context.

Think of it in three steps:

  1. Setup: Stocking the shelves of a library and indexing the books (creating a vector database).

  2. Use: The “librarian” finds the right books (RETRIEVAL), then combines the relevant context from those books with the prompt (AUGMENTED), finally the LLM reads and synthesises them (GENERATION).

  3. Evaluate: The crucial step that makes the chatbot trustworthy. Businesses compare responses against model answers, let users give simple thumbs-up/down feedback, and show the sources behind every answer. This constant loop ensures the chatbot keeps learning, builds trust across users and remains relevant.

In a nutshell: Imagine the LLM as a judge; experienced, knowledgeable, and capable of interpreting the law broadly. But when the case demands specifics, the judge calls on a clerk to research past rulings, statutes, and case files. The clerk (RAG) digs up the precise context, hands it back to the judge, and then the judge delivers a verdict grounded in both experience and evidence.

Erik Cavan

Erik Cavan

Applied AI

Share: