Glossary · Beginner

What Is Retrieval-augmented Generation? Definition and Example

Retrieval-augmented generation (RAG) is a method where an AI system retrieves relevant documents at the moment of a question and gives them to a language model, which uses them to write its answer. The term comes from a 2020 paper by Lewis et al. (arXiv). It's the reason AI answers can cite current web pages, and the reason GEO is possible at all.

How does RAG work?

  1. Question: a user asks something.
  2. Retrieve: the system searches an index (the web, a search engine's index or a document store) for relevant passages.
  3. Augment: the best passages are added to the model's input.
  4. Generate: the model writes an answer using both what it learned in training and the retrieved text, often with citations.

RAG vs a model alone

Model aloneRAG
KnowledgeFixed at training timeCan include today's pages
Sources shownNoUsually, for retrieved passages
How you influence itSlowly, via what's published over timeFaster: be retrievable and quotable

Example

Illustrative. Asked "what does Brand X's starter plan cost?", a model alone might repeat an outdated price it learned. A RAG system retrieves Brand X's current pricing page and a review site, and states the current price with a link, provided those pages are crawlable and the price is in readable text.

What does RAG mean for content?

Retrieval works on passages, not whole sites. Pages with clear headings, self-contained paragraphs and specific facts are easier to retrieve and quote. Google describes a related technique, query fan-out, where its AI features issue several related searches to find supporting pages (Google).

Why it matters for GEO

Most practical GEO work targets the retrieval step: crawler access, indexability, clear structure and being present on the sources engines retrieve. You can act on these this month, whereas training data changes slowly.

Questions

Where does the term RAG come from?

It was introduced in a 2020 research paper by Lewis et al., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks".

Do ChatGPT and Perplexity use RAG?

Products that search the web and cite pages work on the same principle: retrieve documents, then generate an answer using them.

Can RAG still get things wrong?

Yes. It reduces reliance on memory, but answers can still misread or misquote a retrieved source.