What is dense retrieval?
Dense retrieval finds passages by comparing embeddings of the query and each passage, so it can match text that uses other words for the same meaning.
In short. Dense retrieval is retrieval that compares embeddings of the query and of each passage, instead of matching their words. A model turns each text into a dense vector of numbers, and the system returns the passages whose vectors are closest to the query vector. It can find a passage that shares no words with the query. Keyword methods such as BM25 are called sparse retrieval.
On this page 7 sections
The evidence
- Tested:
- Observed:
- Confirmed:
In OpenAI's example, the passage 'The first lunar landing occurred in July of 1969.' scored 0% keyword similarity and 65% semantic similarity with the query 'When did we go to the moon?'3OpenAI API documentation. Checked Dec 1, 2026
Confirmed by the platformTestedObserved in data
Dense retrieval is the embedding side of AI retrieval. It lets a system find a passage for a question even when the passage uses different words.
#How does dense retrieval work?
Dense retrieval compares vectors instead of words. The Dense Passage Retrieval paper uses a dual-encoder framework. One encoder turns questions into embeddings, and another turns passages into embeddings. The authors trained the encoders on a small number of questions and passages.1
A system embeds every passage in advance and stores the vectors, often in a vector database. At query time, it embeds the query and looks for the closest stored vectors. A similarity measure such as cosine similarity scores how close each one is.
Microsoft's page on relevance in Azure AI Search vector search describes two ways to find the closest vectors. Exhaustive k-nearest neighbors (KNN) scans the whole vector space. Hierarchical Navigable Small World (HNSW) runs an approximate nearest neighbor search over a graph, which is faster. A query parameter, k, sets how many nearest neighbors to return.4
#What is the difference between dense and sparse retrieval?
Sparse retrieval matches the words in the query, and dense retrieval matches meaning. The DPR paper calls sparse vector models such as TF-IDF and BM25 the standard method for passage retrieval in open-domain question answering.1
OpenAI's retrieval guide shows the difference with the query "When did we go to the moon?" The passage "The first lunar landing occurred in July of 1969." scored 0% keyword similarity and 65% semantic similarity. The passage "When I ate the moon cake, it was delicious." scored 40% keyword similarity and 28% semantic similarity. OpenAI computed semantic similarity as cosine similarity between text-embedding-3-small embeddings.3
Dense retrieval can miss exact matches. Anthropic's post on Contextual Retrieval gives the query "Error code TS-999" as an example. An embedding model might find content about error codes in general but miss the exact code, which BM25 finds.5 For this reason, many systems run both in hybrid search.
#How well does dense retrieval work?
Results depend on the data. The DPR paper reports that its dense retriever beat a strong Lucene BM25 system by 9 to 19 percentage points in top-20 passage retrieval accuracy, on a wide range of question answering datasets.1
The BEIR benchmark tested 10 retrieval systems on 18 public datasets that the models had not been trained on. BM25 was a strong baseline. Dense retrieval models were more efficient than reranking models but often performed worse than other approaches.2
#Why is dense retrieval used in AI search?
Dense retrieval decides which passages match a question by meaning. A page can be retrieved for a question whose exact words it does not contain, if its text answers the same need. OpenAI says semantic search can surface results that share few or no keywords with the query.3
What are vector embeddings? explains how embeddings are made and compared. What is semantic search? compares search by meaning with keyword search.
Read next
LLMs
What are vector embeddings?
A vector embedding is a list of numbers that represents the meaning of text. OpenAI's text-embedding-3-large returns 3,072 of them by default.
AI search
What is semantic search and how does it differ from keyword search?
Semantic search matches the meaning of a query, often with vector embeddings. Keyword search matches its words. Hybrid search runs both and merges the results.
AI search
What is retrieval-augmented generation (RAG)?
RAG retrieves documents at query time and gives them to a language model to write a cited answer. How ChatGPT, Claude, Google, Bing and Perplexity use it.
AI search
How does AI search choose which sources to cite?
AI search retrieves pages from an index, reads passages and cites what it used. What OpenAI, Anthropic, Google, Microsoft and Perplexity document.
Related terms
Questions
Why is it called dense retrieval?
The name contrasts dense representations, the embeddings that a model learns, with sparse vector models such as TF-IDF and BM25 that represent text by its words. The Dense Passage Retrieval paper uses these two terms.
Is dense retrieval the same as semantic search?
Yes, in most systems. Semantic search is the general idea of matching meaning, and dense retrieval is the common way to do it, with embeddings and a nearest-neighbor search. OpenAI describes its Retrieval API as semantic search over vector stores.
Is dense retrieval better than BM25?
It depends on the data. The Dense Passage Retrieval paper beat a BM25 system on question answering datasets. The BEIR benchmark found that BM25 held up well across 18 datasets and that dense models often did worse on data they were not trained for.
About this page
Researched and reviewed by Promptly Found. Reviewed Dec 1, 2026. Next review due Mar 2027.
Notes
- 1
- 2
- 3
- 4
- 5
Cite this page
Promptly Found. (2026, December 1). What is dense retrieval? https://promptlyfound.com/glossary/dense-retrieval
Revisions 1
- First published.