The question the paper asks#
Most RAG systems start with vector search. An embedding model turns each document into one embedding, and the number of values in it is the embedding dimension. A query becomes a vector of the same size, and the search returns the top-k documents that score highest against it.
In “On the Theoretical Limitations of Embedding-Based Retrieval”1, Orion Weller, Michael Boratko, Iftekhar Naim and Jinhyuk Lee of Google DeepMind ask whether some query can return every possible set of k documents. Their answer is no. For a fixed dimension, some sets of k documents can never be the top k, whatever the query.
This matters more each year, because each new kind of query asks the model for a new combination of documents. A query such as “Novels from 1849 or George Sand novels”, from the QUEST dataset, joins two unrelated groups of documents with “or”. The more such queries a system must answer, the more combinations its vectors must hold.
I took every figure about the paper from version 2, dated 12 March 2026. The last section adds results from my own retrieval experiments.
The dimension sets a limit#
A search returns a set of documents reliably only when each of them scores higher than every other document by a clear gap. The authors use a gap of 0.2 in cosine similarity (a margin of \(\gamma = 0.1\)), which they say is close to what real models show.
With that margin, the number of sets that a dimension \(d\) can serve has a limit. If \(n\) is the number of documents, every set of \(k\) documents can be the top \(k\) only when
$$\binom{n}{k} \le \left(1 + \frac{1}{\gamma}\right)^{d}$$The left side counts the possible sets of \(k\) documents, and it grows quickly with \(n\). So when the corpus grows, the minimum dimension grows with it:
| Documents in the corpus | Minimum dimension, top 10 | Minimum dimension, top 100 |
|---|---|---|
| 10,000 | 33 | 233 |
| 1,000,000 | 52 | 425 |
| 1,000,000,000 | 81 | 713 |
These are lower bounds. The authors call them an extreme lower bound, because a real model must also learn its vectors by gradient descent and read tokenized text. The next section shows how far above the bound the real need is.
Even vectors fitted to the test fail#
To find the best case, the authors removed language from the problem. They made random vectors for \(n\) documents and one query for every pair of documents (\(k = 2\)). Then they optimized the vectors directly against the right answers, with the Adam optimizer. A real model cannot do this, because it must work on queries it has never seen, so no embedding model can do better than these “free embeddings”.
For each dimension, the authors added documents one at a time until the optimization could no longer return every pair. They call that number of documents the critical n. For 100 documents, the bound above asks for at least 4 dimensions, but the fitted vectors need 19.
The authors fit a cubic curve to these points (\(r^2 = 0.999\)) and extend it to the dimensions that real models use:
| Embedding dimension | Critical n, best case |
|---|---|
| 512 | about 500,000 |
| 768 | about 1.7 million |
| 1,024 | about 4 million |
| 3,072 | about 107 million |
| 4,096 | about 250 million |
So even in the best case, 4,096 dimensions cannot return every pair from a corpus of 1 billion documents. Real models fall far below this curve: in the next section, models with 4,096 dimensions fail on 46 documents. Free embeddings handle that corpus with 12 dimensions.
LIMIT: a simple test that embedding models fail#
The authors then built a test in plain English called LIMIT. Each document describes a person and the things that person likes, such as “Jon likes Hawaiian pizza and sports cars”. Each query asks one question: “Who likes apples?”
To make the test hard, they chose 46 documents and made pairs of them the answers to the queries. 46 documents make 1,035 pairs, and the test uses 1,000 of them, one for each query. The full test adds 49,954 documents that answer no query, for 50,000 in all. The small version keeps only the 46.
The chart uses recall@k: the share of the right documents that appear in the top k results. Choose a version of the test.
On the full test, no embedding model reached 20% recall@100. The best was Promptriever at 18.9%, and the multi-vector model GTE-ModernColBERT reached 54.8%. Multi-vector retrieval keeps one vector for each token, so it is not limited by one vector per document. BM25 keyword search reached 93.6%.
The small version has only 46 documents, and embedding models still fail it. The best found 54.3% of the right documents in its top 2. Even with 20 of the 46 documents returned, no embedding model found all of them: the best reached 97.7%. Gemini 2.5 Pro read all 46 documents and all 1,000 queries in one prompt, and it answered every query correctly.
Within one model, a smaller dimension made the results worse. Gemini Embedding reached 10.0% recall@100 at its full 3,072 dimensions. When the authors cut its vectors to 768 values, it reached 7.6%, and at 256 values, 1.2%. Many systems cut vectors in this way to save storage, with Matryoshka embeddings.
Training on similar data does not fix it#
If the queries only looked unfamiliar, training on similar examples would fix them. In a separate experiment, the authors fine-tuned an embedding model on a training set built from other liked items. Its recall@10 rose from near zero to at most 2.8%. When they trained it on the test queries themselves, it learned the task, which shows a limit of capacity, not a lack of data.
Keyword search fails in the opposite way#
BM25 wins on LIMIT because each query shares a word with its right documents. To remove that advantage, the authors replaced each liked item with a synonym, such as “spectacles” for “glasses”. On this version of the 46-document test, BM25 lost more than 89% of its score, and it fell below most embedding models. Qwen3 Embedding lost 38.9%.
Benchmark scores did not predict LIMIT scores#
Qwen3 Embedding had the highest benchmark score of the six embedding models on BEIR, a common retrieval benchmark: 62.76. On LIMIT, it had the second-lowest recall@100, 4.8%. Promptriever had the second-lowest BEIR score, 56.40, and the highest recall@100, 18.9%.
What the limit means for a RAG system#
LIMIT is built to be hard. Each of its 46 documents is an answer to many queries, so its queries connect documents far more densely than common test sets do. Most search traffic asks for fewer combinations. The limit matters when queries join conditions with “and” or “or”, or follow instructions that define relevance in a new way. Search agents write more queries of this kind. The proof shows that some sets of documents cannot be returned, but it cannot say in advance which ones.
The paper does not test a combined design. But its results show that each method fails where another one succeeds: BM25 on synonyms, embeddings on combinations, and a language model only when the documents fit in its prompt. So let a second method catch what the vectors miss:
- Run BM25 keyword search beside the vector search.
- Merge the two result lists into one list. This design is hybrid search.
- Rerank the merged list with a reranker model or a language model.
- Add test queries that join two conditions with “and” or “or”.
- Measure recall@k on those queries before and after each change.
- If you cut or quantize your embeddings, measure recall@k at the smaller size first.
- Choose the embedding model on your own test queries, not on a public benchmark score.
What I measured on my own corpus#
I am building RAGged, a lab that tests each part of a RAG system one change at a time. Several of its experiments test the advice above, on financial documents and code.2
Its corpus is not LIMIT. It has 118 documents: 17 company annual reports (10-K filings from the FinanceBench dataset), 8 financial regulations, 77 files of Bank of Anthos, an open-source banking application, and 16 internal documents. They are cut into 12,071 chunks of 1,200 characters. Before each chunk is embedded, Claude Haiku writes a short header that says which document and section it comes from, and BM25 searches the same header and text. Vector search uses Voyage’s voyage-4 model at 1,024 dimensions.
There are 269 questions, and the right passages for each are known. Most need one passage. Each figure is recall@5: the share of the right passages that appear in the top 5 chunks. I count a difference between two methods only when its 95% bootstrap interval excludes zero, so that it is unlikely to be chance.
Vector search beat keyword search#
On LIMIT, BM25 found five times as many right documents as the best embedding model. On my corpus the order was reversed. Vector search found 81.9% of the right passages in its top 5, and BM25 found 57.9%. BM25 came level only on the 42 questions that quote an exact term, such as a section number or a function name: 85.1% against 88.9%, a gap too small to separate from chance. On the annual reports, it found 14.3%.
Hybrid search did worse than vector search alone, at 73.6%. The cause was the way I merged the two lists. Reciprocal rank fusion gives a chunk \(1/(60 + \text{rank})\) for each list that returns it, and I took 50 chunks from each list. With these settings, a chunk that both lists return always outranks a chunk that only one list returns, even the first result of vector search. So BM25’s weak matches pushed good vector results out of the top 5. I did not test weighted merging or other settings.
A reranker gave the gain#
The Voyage reranker, rerank-3, reads the question with each of the 50 candidates from vector search and puts them in a new order. It raised recall@5 from 81.9% to 93.1%. The questions whose passage was retrieved but ranked below the top 5 fell from 35 to 6. The gain was largest on the annual reports, from 49.6% to 75.4%. A local reranker, bge-reranker-v2-m3, gave no gain: 81.1%.
With the reranker in place, BM25 added nothing measurable. Hybrid search with the same reranker reached 92.1%, one point below vector search with it, a gap too small to separate from chance. On the 42 exact-term questions, it led by 2.4 points, and the interval of that lead just touches zero. A reranker can only reorder what it is given, and the merged list lacked the right passage for 14 questions, against 8 for vector search alone.
The reranker has a cost. It added 821 ms per question at the median and 1,147 ms at the 95th percentile, over the network, against my budget of 200 ms. It cost about $0.82 per 1,000 questions.
Questions that need two passages#
Each LIMIT query needs two documents. The nearest questions I have are 71 that each need passages from two or more documents or pages:
- A function or class name, and the other files that use it: 19 questions.
- An article that cites an article of another regulation: 10 questions.
- An article that refers to another article of the same regulation: 20 questions.
- A term that two or more regulations define: 22 questions.
A script checked their answers by text search. No person has read them.
| Measure, 71 questions | Vector search | Vector search with the Voyage reranker |
|---|---|---|
| Recall@5 | 67.2% | 83.6% |
| Questions with every passage in the top 5 | 36.6% | 66.2% |
| Questions with every passage in the top 20 | 81.7% | 94.4% |
Recall@5 was 67.2%, against 81.9% on the 269 earlier questions, and vector search had every passage of a question in its top 5 for only 36.6% of them. As with recall@2 on LIMIT, finding one right passage was easier than finding all of them. The reranker raised that share to 66.2%. The hardest kind was a reference to another article of the same regulation: even with the reranker, both passages were in the top 5 for only 9 of the 20.
These runs do not show the dimension limit at work. 71 questions over 12,071 chunks ask for far fewer combinations than LIMIT’s 1,000 queries over 46 documents, and a miss can have other causes. I also built a graph that follows the citations between documents and the links between code files. Added to the reranker’s candidates, it changed the score of none of the 370 questions.
Reading every document in one prompt#
On LIMIT, Gemini 2.5 Pro read all 46 documents in one prompt and answered every query. I tried the same at a larger scale. Claude Sonnet 5.5 read 93 of my documents, 768,956 tokens, in one prompt, and answered the same 71 questions. All 71 answers named every expected item, and it declined all 15 questions that the documents cannot answer. Retrieval with the reranker put every needed passage in front of the model for 64 of the 71. The answers were scored by matching the expected items. They have not been judged for correctness.
The long prompt does not scale:
- Cost. With the prompt kept in the provider’s cache, a question cost $0.086, about four times the estimated $0.021 for retrieval with the reranker. Without the cache, a question would cost $1.55 at list price.
- Size. The 93 documents are 21% of the text that the same users may send to a cloud model. The rest does not fit in a context window of 1 million tokens.
- Time. A whole answer took 9 seconds at the median, with the cache warm.
Embedding models built for one kind of text lost on that text#
Step 7 says to choose the embedding model on your own questions. On mine, two models built for one kind of text did worse on it than the general voyage-4. Voyage’s finance model, voyage-finance-2, found 37.5% of the passages in the annual reports, against 49.6%. Its code model, voyage-code-4, found 77.0% on the code, against 89.7%.
What this means for the advice above#
On my corpus, the reranker (step 3) gave the gain. BM25 (steps 1 and 2) added nothing measurable once the reranker was in place, and without a reranker the merged list made results worse. This does not contradict LIMIT, where each query shares a word with its right documents and BM25 wins.
So test each step on your own documents before you keep it. Write test questions of the kinds your users ask, then measure recall@k with and without the change, as steps 4 and 5 say. Keep a change only when it helps on those questions.
I expect BM25 to help most when questions quote exact strings that an embedding model has not learned, such as product codes, part numbers, error codes and domain-specific terms. My corpus gives only a small sign of this. On the 42 questions that quote a section number, an identifier or a title, hybrid search with the reranker found 99.4% against 97.0%, a lead too small to confirm.
I did not test step 6, cutting vectors to fewer dimensions, or queries that join two conditions with “and” or “or”.
Sources#
Orion Weller, Michael Boratko, Iftekhar Naim and Jinhyuk Lee (Google DeepMind): On the Theoretical Limitations of Embedding-Based Retrieval. arXiv, version 2, 12 March 2026. The data and code are on GitHub. ↩︎
RAGged benchmark reports: the embedder stage (20 November 2026), lexical and hybrid search (20 November 2026), reranking (21 November 2026), retrieval on questions that need two or more passages (25 November 2026), graph retrieval (27 November 2026) and the long-context baseline (28 November 2026). I recomputed the figures on the 269 questions from the per-question result files, so that every method is compared on the same questions. ↩︎