← Back to the A-Z glossary
AI glossary · P1

RAG

RAG lets an AI answer using documents pulled up at the moment you ask the question.

RAG 4 min read Updated 2026-05-22
— Definition

RAG, in plain words

RAG lets an AI answer using documents pulled up at the moment you ask the question.

Explain the search-then-answer chain, along with its limits.

A concrete example

You ask a question about an internal procedure. The system finds the relevant passages, then hands them to the model to answer.

Why it matters

It's one of the most practical ways to cut down on made-up answers and put private data to use.

You run into it in documentation chatbots, internal knowledge bases, and agents that cite their sources.

Don't mix it up with

Embedding: An embedding turns a piece of text into a list of numbers so you can compare its meaning with other texts.

Vector database: A vector database stores embeddings and finds the texts closest to a question.

Common mistakes

  • Assuming RAG guarantees a true answer.
  • Splitting the documents badly.
  • Not showing the sources used.

Quick checklist

  • First I check whether the word names a concept, a tool, a risk, or a metric.
  • I tie it to a concrete case: You ask a question about an internal procedure. The system finds the relevant passages, then hands them to the model to answer.
  • I keep the main trap in mind: Assuming RAG guarantees a true answer.

Quick questions

What is RAG in AI?

RAG lets an AI answer using documents pulled up at the moment you ask the question.

Where will I run into RAG?

You run into it in documentation chatbots, internal knowledge bases, and agents that cite their sources.

Which word should I read next?

Start with Embedding, Vector database, Chunking.

Want to keep going in order?

Head back to the full glossary, search a word, then open only the pages that deserve more than a short definition.

Open the AI glossary