Free auditStart free
GlossaryGlossary · AI search

Retrieval-Augmented Generation

RAG pairs a language model with a retrieval step so answers draw on fetched sources. What it is, where it came from, and what it means for AI search.

4 min
read
8
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

Retrieval-augmented generation (RAG) is a technique where a language model is given passages fetched from an external index or knowledge base and writes its answer from them, instead of relying only on what it learned in training. The 2020 paper that introduced the term combined a pre-trained model with a retriever over Wikipedia.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01How it works

How retrieval-augmented generation works

A plain language model answers from its parameters, which are fixed at training time. A RAG system adds a retriever: a component that searches an index for passages related to the question and hands them to the model along with the question. The model then writes an answer conditioned on that text.

The index can be anything searchable: a company's help center, a document store, or a web search index. In the original paper it was a dense vector index of Wikipedia, queried by a pre-trained neural retriever.

A minimal RAG prompt, simplified
Answer the question using only the passages below.
If they do not contain the answer, say so.

Passage 1 (https://example.com/returns): Items can be returned within 30 days...
Passage 2 (https://example.com/shipping): Standard shipping takes 3-5 days...

Question: Can I return an opened item?
  1. 01

    Receive the question

    The system takes the user's query, sometimes rewriting it or splitting it into several searches.

  2. 02

    Retrieve passages

    A retriever searches the index and returns the passages that best match the query.

  3. 03

    Build the prompt

    The passages and the question are placed together in the model's input.

  4. 04

    Generate the answer

    The model writes a response conditioned on that text.

  5. 05

    Attach sources

    Many products show links or citations to the passages used. That is a product choice, not something the technique guarantees.

02Good to know

What the original research reported

RAG was introduced in the 2020 paper "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" by Patrick Lewis and colleagues. The authors describe RAG models as "models which combine pre-trained parametric and non-parametric memory for language generation."
04Checklist

Practical steps

First2
Check robots.txt for the search bots you want to allow, such as Googlebot and OAI-SearchBot. Training bots like GPTBot are separate settings.
Keep important content as text in the HTML, and make pages reachable through internal links, as Google's AI features guidance recommends.
Next1
Write passages that stand on their own: a clear heading, then a direct answer. Retrievers return passages, so a paragraph that only makes sense with the one before it is a weak candidate. This is editorial advice, not a documented ranking rule.
Then1
Do not add AI-specific files or markup for the sake of it. Google states you do not need to "create new machine readable files, AI text files, or markup" for its AI features.
05Good to know

Common misconceptions

RAG also does not make an answer correct. The model can misread a retrieved passage, and the passage itself can be wrong. Retrieval does not remove errors.

RAG and grounding overlap but are not identical. RAG names the retrieve-then-generate method. Grounding names the goal of tying output to source material, which RAG is one way to achieve.

Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01Does RAG require special schema markup or an llms.txt file?

Google requires no special markup or AI files. A page must be indexed and snippet-eligible, and the site must be included in Search generative AI features in Search Console.

02If I block GPTBot, can ChatGPT search still cite my content?

Yes. OpenAI lists GPTBot and OAI-SearchBot as independent settings. OpenAI says a site can allow OAI-SearchBot to appear in search results while disallowing GPTBot to indicate crawled content should not be used for training its generative AI foundation models.

03Is RAG the same as fine-tuning?

No. Fine-tuning changes a model's weights through more training. RAG supplies retrieved passages to the model alongside the question at query time. The original paper actually fine-tuned its RAG models, so the two can be combined.

Sources · 8

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • arxiv.org
  • google.com
  • openai.com
  1. 01Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (abstract)arxiv.org · checked 2026-10-24
  2. 02AI features and your websitedevelopers.google.com · checked 2026-10-24
  3. 03Google's common crawlersdevelopers.google.com · checked 2026-10-24
  4. 04Overview of OpenAI crawlersdevelopers.openai.com · checked 2026-10-24
  5. 05Robots meta tag specificationsdevelopers.google.com · checked 2026-10-24
  6. 06Search generative AI control - Search Console Helpsupport.google.com · checked 2026-10-24
  7. 07Generative AI performance report (Search) - Search Console Helpsupport.google.com · checked 2026-10-24
  8. 08Optimizing your website for generative AI features on Google Searchdevelopers.google.com · checked 2026-10-24
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly