Skip to content
Ask Sera Search
Ask SeraAnswers from our guides, research and news Search
Learn
Guides
Research
Sectors
Platforms
News
Tools
About

What is retrieval in AI search?

Retrieval finds the documents or passages in an index that best match a query. In AI search, it selects the text a model reads before it answers.

In short. Retrieval is finding the documents or passages in an index that best match a query. In AI search and retrieval-augmented generation, the retrieved text goes into the prompt, and the model writes its answer from that text. A page that the retrieval step does not return is not part of what the model reads for that answer.

On this page 7 sections

The evidence

  • Confirmed:

    The 2020 paper that introduced retrieval-augmented generation paired a pre-trained language model with a dense vector index of Wikipedia, which a neural retriever searched.1arXiv, May 22, 2020

  • Confirmed:

    OpenAI's Retrieval API returns at most 10 results per search by default. Developers can raise the limit to 50.2OpenAI API documentation. Checked Dec 1, 2026

  • Tested:

    In Anthropic's tests, combining contextual embeddings with contextual BM25 keyword retrieval cut the top-20 retrieval failure rate by 49%, from 5.7% to 2.9%. Contextual embeddings alone cut it by 35%.3Anthropic, Sep 19, 2024

  • Confirmed:

    Google says AI Overviews and AI Mode may issue multiple related searches across subtopics and data sources to build a response, a technique it calls query fan-out.4Google Search Central, updated Dec 10, 2025

Confirmed by the platformTested

Retrieval is the search step inside an AI answer. Before a model writes, a retrieval system looks up the documents or passages that best match the question and hands the best of them to the model.

#How does retrieval work?

Retrieval matches a query against an index that the system built in advance. A keyword index lists the documents that contain each word. This structure is an inverted index. A vector index stores an embedding of each passage. The system scores the matches, ranks them and keeps the highest-ranked results, a cutoff called top-k.

Anthropic's post on Contextual Retrieval lists the steps of a typical pipeline for retrieval-augmented generation (RAG). The system splits the documents into chunks of no more than a few hundred tokens. BM25 finds the top chunks by exact word matches, and embeddings find the top chunks by meaning. A rank fusion step combines the two lists and removes duplicates. The top chunks then go into the prompt.3

In a product, these steps run automatically. OpenAI's retrieval guide says that a file added to a vector store is chunked, embedded and indexed for the developer. A search returns at most 10 results by default, and the limit can go up to 50.2

#What are the main types of retrieval?

Retrieval systems match either words or meaning. The Dense Passage Retrieval paper calls sparse vector models such as TF-IDF and BM25 the standard method for passage retrieval in open-domain question answering. It shows that retrieval can also use dense representations alone.5

  • Sparse retrieval matches the words of the query. BM25 is the common ranking function.
  • Dense retrieval compares embeddings of the query and the passages. Dense retrieval can find text that uses other words for the same meaning.
  • Hybrid search runs both and merges the two lists. Hybrid search explains how.

Many systems then run a second step. A reranker puts the first results in a new order with a more precise model.

Retrieval gives a language model text that is not in its parameters. The paper that introduced RAG says pre-trained models store factual knowledge in their parameters but have limited ability to access and precisely manipulate it. It also names provenance and updating the model's knowledge as open problems. Its RAG models added a dense vector index of Wikipedia that a neural retriever searched.1

AI search engines retrieve from the web. Google's page on AI features says AI Overviews and AI Mode may issue multiple related searches across subtopics and data sources. It calls this technique query fan-out. While the response is generated, Google's models find more supporting web pages to link.4 The guide What is query fan-out? covers how Google runs these searches.

#How is retrieval quality measured?

Anthropic measured retrieval quality with recall at 20, which counts the relevant documents found within the top 20 chunks. It reported the reverse figure: the share of relevant documents that the system failed to retrieve. Combining contextual embeddings with contextual BM25 cut that failure rate by 49%, from 5.7% to 2.9%.3

A page reaches an AI answer only if a retrieval step returns it. What is retrieval-augmented generation (RAG)? covers the full pipeline and what it means for a site.

Read next

Used in

Related terms

Questions

What is the difference between retrieval and generation?

Retrieval finds text in an index. Generation is the step where a language model writes an answer. In a RAG system, retrieval runs first and its results go into the prompt for generation.

Does retrieval use keywords or embeddings?

It can use either, or both. Keyword retrieval such as BM25 matches the words of a query, and dense retrieval compares embeddings. Hybrid search runs both and merges the results.

How many results does a retrieval step return?

The system sets a limit, called top-k. OpenAI's Retrieval API returns up to 10 results by default and up to 50 on request. Anthropic passed the top 20 chunks to the model in its tests.

About this page

Researched and reviewed by Promptly Found. Reviewed Dec 1, 2026. Next review due Mar 2027.

Notes

  1. 1
    Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksarXiv · May 22, 2020 · Checked Dec 1, 2026 · Paper
  2. 2
    RetrievalOpenAI API documentation · Checked Dec 1, 2026 · Primary source
  3. 3
    Introducing Contextual RetrievalAnthropic · Sep 19, 2024 · Checked Dec 1, 2026 · Primary source
  4. 4
    AI features and your websiteGoogle Search Central · Dec 10, 2025 · Checked Dec 1, 2026 · Primary source
  5. 5
    Dense Passage Retrieval for Open-Domain Question AnsweringarXiv · Apr 10, 2020 · Checked Dec 1, 2026 · Paper
Cite this page
Citation style

Promptly Found. (2026, December 1). What is retrieval in AI search? https://promptlyfound.com/glossary/retrieval

Revisions 1
First published.