# Off the Beaten Path: Let's Replace Term-Based Retrieval with k-NN Search

arXiv: https://arxiv.org/abs/1610.10001 · HTML: https://mlsanity.com/paper/1610.10001/

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 31 Oct 2016.

## Built on by (most cited first, 14 of 14)

- [The Faiss library](https://mlsanity.com/paper/2401.08281/) (2024)
- [Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Time](https://mlsanity.com/paper/2310.17157/) (2023)
- [Overview of the TREC 2020 deep learning track](https://mlsanity.com/paper/2102.07662/) (2021)
- [Retrieval Augmented Generation (RAG) and Beyond: A Comprehensive Survey on How to Make your LLMs use External Data More Wisely](https://mlsanity.com/paper/2409.14924/) (2024)
- [Towards Best Practices for Training Multilingual Dense Retrieval Models](https://mlsanity.com/paper/2204.02363/) (2022)
- [RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing](https://mlsanity.com/paper/2404.19543/) (2024)
- [Investigating Pedagogical Teacher and Student LLM Agents: Genetic Adaptation Meets Retrieval Augmented Generation Across Learning Style](https://mlsanity.com/paper/2505.19173/) (2025)
- [Deep Learning-based Online Alternative Product Recommendations at Scale](https://mlsanity.com/paper/2104.07572/) (2021)
- [Faster Maximum Inner Product Search in High Dimensions](https://mlsanity.com/paper/2212.07551/) (2022)
- [Are We There Yet? A Decision Framework for Replacing Term Based Retrieval with Dense Retrieval Systems](https://mlsanity.com/paper/2206.12993/) (2022)
- [UNR-Explainer: Counterfactual Explanations for Unsupervised Node Representation Learning Models](https://mlsanity.com/paper/2605.17285/) (2026)
- [CBR -- Boosting Adaptive Classification By Retrieval of Encrypted Network Traffic with Out-of-distribution](https://mlsanity.com/paper/2403.11206/) (2024)
- [Multi-word Term Embeddings Improve Lexical Product Retrieval](https://mlsanity.com/paper/2406.01233/) (2024)
- [Efficient K-generalizable Learned Search](https://mlsanity.com/paper/2603.06159/) (2026)

## Abstract (arXiv)

Retrieval pipelines commonly rely on a term-based search to obtain candidate records, which are subsequently re-ranked. Some candidates are missed by this approach, e.g., due to a vocabulary mismatch. We address this issue by replacing the term-based search with a generic k-NN retrieval algorithm, where a similarity function can take into account subtle term associations. While an exact brute-force k-NN search using this similarity function is slow, we demonstrate that an approximate algorithm can be nearly two orders of magnitude faster at the expense of only a small loss in accuracy. A retrieval pipeline using an approximate k-NN search can be more effective and efficient than the term-based pipeline. This opens up new possibilities for designing effective retrieval pipelines. Our software (including data-generating code) and derivative data based on the Stack Overflow collection is available online.
