Skip to content
Renderly
Menu

Glossary · AI

Retrieval-augmented generation (RAG)

Also called: RAG, retrieval augmented generation · Updated 6 November 2026

Retrieval-augmented generation (RAG) is a technique where a language model first retrieves relevant documents from a search index or database, then generates its answer using that retrieved text as context.

The name comes from a 2020 paper by Lewis and colleagues at Facebook AI Research. Today almost every AI search product is a RAG system at heart: ChatGPT search, Perplexity, Google AI Overviews and AI Mode, Copilot and Claude with web search all retrieve pages before they answer.

How it works

  1. The system turns the user’s question into one or more search queries.
  2. A retriever pulls candidate documents from an index (a web search engine, a vector database, or both).
  3. The system selects passages from those documents and puts them in the model’s context window.
  4. The model writes an answer from that context and, in search products, cites the sources.

Why it matters for SEO and GEO

The model can only cite what the retriever found. That makes retrieval the gate. If your page is not indexed by the backend the product uses, is blocked to its crawler, or loses at the passage selection step, the generation step never sees it.

Example

# simplified RAG loop
queries = rewrite(question)              # e.g. 3 to 5 sub-queries
docs = search_index.search(queries, k=10)
passages = select_passages(docs, question, limit=8)
answer = llm.generate(question, context=passages)

Common mistakes

  • Assuming the model “knows” your site from training data. Training data is old and fuzzy. Retrieval is where current pages come in.
  • Writing long pages where the answer is spread across many sections. Passage selection favors chunks that make sense alone.

How Renderly handles it

We optimize for each stage: crawl access, index presence, passage quality. See how LLMs choose sources.

Next step

Want to know where your site stands?

Send us the URL. We run the crawl, the rendering check and an answer engine visibility sample, then reply with the three fixes that matter most.