IRAIDBMar 23

flexvec: SQL Vector Retrieval with Programmatic Embedding Modulation

arXiv:2603.225878.6Has Code
Predicted impact top 73% in IR · last 90 daysOriginality Incremental advance
AI Analysis

This work addresses the need for more programmable retrieval systems for AI agents, offering a novel integration into SQL with demonstrated efficiency gains, though it appears incremental in its application of existing concepts to a new interface.

The paper tackles the problem of exposing more of the retrieval pipeline to AI agents by introducing flexvec, a retrieval kernel that allows programmatic embedding modulation (PEM) via arithmetic operations on embeddings and scores before selection, integrated into a SQL interface. On a production corpus of 240,000 chunks, three composed modulations executed in 19 ms end-to-end on a desktop CPU without approximate indexing, and at one million chunks, the same operations took 82 ms.

As AI agents become the primary consumers of retrieval APIs, there is an opportunity to expose more of the retrieval pipeline to the caller. flexvec is a retrieval kernel that exposes the embedding matrix and score array as a programmable surface, allowing arithmetic operations on both before selection. We refer to composing operations on this surface at query time as Programmatic Embedding Modulation (PEM). This paper describes a set of such operations and integrates them into a SQL interface via a query materializer that facilitates composable query primitives. On a production corpus of 240,000 chunks, three composed modulations execute in 19 ms end-to-end on a desktop CPU without approximate indexing. At one million chunks, the same operations execute in 82 ms.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes