Glossary

Retrieval-augmented generation (RAG)

Last updated

Overview

Also called RAG

Definition: Retrieval-augmented generation (RAG) is a technique that improves a language model's output by retrieving relevant documents at answer time and giving them to the model as context.

The name comes from a 2020 paper by Patrick Lewis and colleagues, accepted at NeurIPS 2020, which paired a pre-trained text generator with a neural retriever over a dense vector index of Wikipedia. The authors reported more specific and factual language than a model without retrieval. Google’s machine learning glossary describes RAG as a common grounding technique, used to raise factual accuracy and to give a model knowledge it was not trained on.

Example: an assistant asked about a policy published last week searches the web, pulls the most relevant pages and writes its answer from them, citing each one.

Why it matters for site owners

AI search products that search the web before answering, such as Perplexity, follow this retrieve-then-generate pattern. A page therefore has to be crawlable and retrievable at the moment of the question to be used. The crawlers that do this retrieval, such as OAI-SearchBot and PerplexityBot, are controlled separately from training crawlers.

  • Grounding

    Grounding is the process of basing all or part of an AI model's response on information retrieved from trusted sources, such as a search index, rather than only on what the model learned in training.

  • Large language model (LLM)

    A large language model (LLM) is a language model with a very large number of parameters, usually built on the Transformer architecture, that predicts and generates text.

  • Hallucination

    A hallucination is output from a generative AI model that sounds plausible but is factually wrong, presented as a statement about the real world.

Latest news

Sources

  1. PrimaryarXiv

    Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., NeurIPS 2020)

    Checked

  2. PrimaryGoogle for Developers

    Machine Learning Glossary

    Checked

  3. PrimaryPerplexity

    How does Perplexity work?

    Checked

Get the briefing

Google and AI search changes, explained the day they land.

Unsubscribe from any email. Privacy policy

Add AI SEO Wire as a preferred source on Google