← Wed, Nov 11 digest

Faster Retrieval for Better, More Efficient RAG

read article ↗ hn thread ↗

Apple researchers introduce amortized Maximum Inner Product Search (MIPS), using small neural networks trained offline to speed up RAG retrieval by routing queries more efficiently.

read it The article details a novel architectural approach to optimizing MIPS for RAG with concrete performance benchmarks and mathematical grounding.

summary

Apple researchers present amortized Maximum Inner Product Search (MIPS) for retrieval-augmented generation, using small neural networks trained offline to bypass slow exhaustive searches. SupportNets approximate convex support functions for cluster routing, while KeyNets act as query rewriters to map user questions directly to optimal key vectors. Evaluated on the Natural Questions dataset, these models achieve significantly higher recall and lower latency than traditional centroid-based indexing. This method trades a one-time training cost for lightweight inference tailored to known production query distributions.

key points

  1. SupportNets use Input Convex Neural Networks to model support functions of vector clusters, achieving up to 1.9x faster routing to the correct cluster.
  2. KeyNets act as query rewriters by mapping raw user queries directly to optimal key vectors, cutting retrieval latency up to 8x in FAISS IVF indexes.
  3. The approach amortizes computational cost by training small neural networks offline using supervised datasets derived from expected query distributions.

who should read it

Machine learning engineers and search infrastructure developers optimizing large-scale RAG systems.

discussion mixed

consensus

Commenters note that while mathematically sound, learned retrieval methods are typically only necessary at hyperscale, whereas simpler BM25 or lexical search often outperforms them for smaller datasets.

pushback

Some argue that relying on embedding-based retrieval can bias or limit LLMs compared to letting them explore raw text directly using tools like grep.

best comment by armcat ↗

Just yesterday I saw a talk from Spotify where they presented their own fast retrieval mechanism "Parallel Fusion Router" [1]. It's also in the "learned retrieval" paradigm - in their case they use a teacher LLM to train a much smaller router LLM how to retrieve, using an LLM-as-a-judge based reward function.

From my own experience, these learned methods from Apple, Spotify and others, are highly relevant to hyperscale only - when you are dealing with hundreds of millions of items to choose from (or more), and require super high relevance in the top-5. For all other use cases (up to a few …

It highlights industry context from Spotify's similar router and argues that simpler lexical search usually wins outside of hyperscale use cases.

Generated by an LLM from the article and thread. Check the sources before relying on it.