What is RAG (Retrieval-Augmented Generation)?

RAG is a technique where an AI tool searches your documents first, then writes an answer grounded in what it found.

Retrieval-augmented generation solves the biggest weakness of language models: they only know what was in their training data, and they will improvise when they do not know. With RAG, the tool first searches a knowledge source — your help centre, a document library, a product catalogue, or the live web — pulls the most relevant passages, and passes them to the model as context before it writes. The answer is therefore grounded in real text you control, and good implementations cite the source so you can verify it. This is why AI search tools and support assistants can answer accurately about products released after the model was trained. When comparing tools, ask three practical questions: what sources can it index, how often does it re-index, and does it show citations. A RAG system with stale indexing or invisible sources is just a slower chatbot. RAG usually depends on a vector database to find semantically similar passages rather than exact keyword matches.

Also known as

  • retrieval augmented generation
  • grounded generation

Related tools

  • Perplexity AI — AI search engine that gives direct answers with cited sources.
  • Intercom Fin — AI customer support bot that resolves queries automatically.
  • ChatGPT — The most versatile AI assistant for writing, research, and brainstorming.
  • Claude — Thoughtful, safety-focused AI assistant with excellent reasoning.
  • Google Gemini — Google's multimodal AI with real-time information access.

Related terms

  • Vector Database — A vector database stores text or images as numerical embeddings so software can find results by meaning rather than exact keywords.
  • Hallucination (AI) — A hallucination is when an AI tool produces confident, fluent output that is factually wrong or entirely invented.
  • Large Language Model (LLM) — An LLM is an AI model trained on huge amounts of text that predicts language well enough to write, summarise, translate, and answer questions.
  • Context Window — The context window is the maximum amount of text, measured in tokens, an AI model can consider at one time.

Browse all 40 glossary terms

Category: AI Infrastructure