Skip to content

Retrieval-augmented generation

Concept in AI search and SEO
Volatile, last checked 2026-09-04 This page carries measured figures that move quickly.Reviewed 2026-09-04

Retrieval-augmented generation (RAG) is the pattern of fetching documents at query time and conditioning a language model on them, instead of relying on what the model memorised during training[1]. The term comes from a 2020 paper by Patrick Lewis and eleven co-authors, presented at NeurIPS 2020[2]. An answer engine built on a live web index runs the same loop, which puts retrievability upstream of everything else: Google requires that a page be indexed and eligible to be shown in Google Search before it can appear as a supporting link in AI Overviews or AI Mode[3].

The 2020 paper

Lewis and co-authors describe a fine-tuning recipe for "models which combine pre-trained parametric and non-parametric memory for language generation"[2]. The non-parametric half was a December 2018 Wikipedia dump, prepared so that "each Wikipedia article is split into disjoint 100-word chunks, to make a total of 21M documents"[4]. On the Natural Questions benchmark the retrieval-augmented models reached 44.5 exact match, against 34.5 for a closed-book model of the same size[5]. A later survey names the failures the pattern targets: "hallucination, outdated knowledge, and non-transparent, untraceable reasoning processes"[6].

How answer engines apply it

A search-backed assistant runs the same loop with the live web as its corpus. Google documents a query fan-out step in AI Overviews and AI Mode, "issuing multiple related searches across subtopics and data sources" for one question[7]. Each of those searches is a retrieval call, and the generation step writes over whatever the retriever returned. Citations point at those retrieved documents, so a page absent from the candidate pool cannot be cited no matter how good it is[3].

Prompt Retrieval Context window Generation Cited answer What the user asked Search the index Model writes Passage A Passage B Prompt text Index Documents, chunked Every sentence links back Nothing is retrieved after generation starts
Retrieval happens before generation, not during it. The passages the search step returns are the only outside text the model sees, which is why a page that is not retrievable can never be cited.

Grounding does not remove hallucination

A preregistered Stanford-led evaluation of commercial legal research tools found LexisNexis Lexis+ AI and Thomson Reuters Westlaw AI-Assisted Research and Ask Practical Law AI each hallucinate on 17% to 33% of queries, despite all three being built on retrieval[8]. The same paper reports the providers' own claims of eliminating or avoiding hallucination as overstated[8]. That qualifies the survey framing above: retrieval reduces the failure it targets rather than closing it.

Position in the context window

Where a retrieved passage sits in the prompt changes whether the model uses it. Liu and co-authors report that performance is highest when the relevant document occurs at the beginning or the end of the input context[9], and degrades significantly when the model has to reach it in the middle of a long context, including in models built for long contexts[10]. Ranking therefore keeps acting after retrieval, in the order the passages are assembled.

Why retrievability decides citation

Retrieval happens per query, which moves the practical levers upstream of writing. Whether an AI crawler can fetch the page and whether the page is indexed set admission to the pool. How the page is broken into passages sets whether the right passage scores highly for a given query. How fresh the indexed copy is sets whether the answer reflects the current version. Chunking alone is measurable: a 2026 evaluation on a biomedical relation-extraction benchmark swapped fixed-size chunking for a semantic scheme and moved accuracy from 74.2% to 82.6% F1[11]. That is the gap generative engine optimisation works in.

References (11)
  1. Retrieval-augmented generation - Wikipedia Archive
    Journalism Retrieved 2026-09-04
  2. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks Archive
    Academic Published 2020-05-22 Retrieved 2026-09-04
  3. AI features and your website - Google Search Central Archive
    Documentation Published 2025-12-10 Retrieved 2026-09-04
  4. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, full text Archive
    Academic Published 2020-05-22 Retrieved 2026-09-04
  5. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, Table 1 Archive
    Academic Published 2020-05-22 Retrieved 2026-09-04
  6. Retrieval-Augmented Generation for Large Language Models: A Survey Archive
    Academic Published 2023-12-18 Retrieved 2026-09-04
  7. AI features and your website - Google Search Central Archive
    Documentation Published 2025-12-10 Retrieved 2026-09-04
  8. Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools
    Academic Published 2024-05-30 Retrieved 2026-09-04 Volatile, last checked 2026-09-04
  9. Lost in the Middle: How Language Models Use Long Contexts
    Academic Published 2023-07-06 Retrieved 2026-09-04
  10. Lost in the Middle: How Language Models Use Long Contexts
    Academic Published 2023-07-06 Retrieved 2026-09-04
  11. Configurable Semantic Chunking for Biomedical Information Extraction in Retrieval-Augmented Generation Archive
    Academic Published 2026-08-31 Retrieved 2026-09-04 Single-source

Last updated 2026-09-04. Written and maintained by Baseline Labs.

George
Online
0%