LaunchRanked

GlossaryAI search

What is retrieval-augmented generation (RAG)?

Also called: RAG, retrieval augmented generation

Definition

Retrieval-augmented generation (RAG) is a technique where a system first retrieves relevant documents, then passes them to a language model so it can answer from that material instead of memory alone.

Retrieval-augmented generation (RAG), explained

The name comes from a 2020 paper by Patrick Lewis and colleagues, "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks", accepted at NeurIPS 2020. It combined a pre-trained model's built-in knowledge (the paper calls it parametric memory) with an external index it could search (non-parametric memory). The authors reported that this produced more specific and more factual language than the model alone.

A typical RAG pipeline has four steps. Indexing: documents are split into chunks and each chunk is stored, often with an embedding. Retrieval: when a question arrives, the system finds the chunks most related to it, by keyword search, vector search or both. Augmentation: the best chunks are pasted into the model's prompt with instructions like "answer using these sources". Generation: the model writes the answer, often with citations back to the chunks it used.

Web AI search is RAG at internet scale. The retrieval step is a search engine, the chunks are passages from web pages, and the citations are links. That's why the base glossary entry on grounding and this one overlap: grounding is the goal, RAG is the most common way to get there.

Two things follow for anyone who wants to be retrieved. First, retrieval usually works on passages, not whole pages, so each section of a page should make sense on its own. Second, the retriever can only find what it has indexed, so crawl access and clear, specific wording decide whether you're in the candidate set at all.

If you're building a product feature on RAG, the same logic applies to your own docs: clean chunks, good metadata and a sensible top-k beat a bigger model surprisingly often.

Why it matters for founders

Nearly every AI answer that cites sources runs some form of RAG. Understanding the pipeline shows why structure and clarity at the section level decide whether your page is retrieved, used and linked.

Example

A support bot for a SaaS app splits the help center into chunks, embeds them, and retrieves the three closest chunks for each question. The model answers from those chunks and links the help article it used.

Common mistakes

  • Writing sections that only make sense after reading the whole page.
  • Assuming a bigger model fixes bad retrieval. Wrong chunks in means wrong answers out.
  • Blocking the crawlers that feed an assistant's index, then expecting to be retrieved.

Sources

Checked

← All 274 glossary terms