Achieving 100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Models

Yannis Papakonstantinou
Xianshun Chen
Yves-Laurent Kom Samo
Yu Xiao
Jian He
Pushkar Khadilkar
Sam Idicula
Thibaud Hottelier
Alon Halevy
Rushabh Desai
Proceedings of the ACM on Management of Data, ACM New York, NY, USA (2026), pp. 1-23

Abstract

Several data warehouse and database providers have recently introduced extensions to SQL called AI Queries, enabling users to specify conditions in SQL that are evaluated by LLMs, thereby broadening significantly the kinds of queries one can express over the combination of structured and unstructured data. LLMs offer remarkable semantic reasoning capabilities, making them an essential tool for complex and nuanced queries that blend structured and unstructured data. While extremely powerful, these AI queries can become prohibitively costly when invoked on tables with millions of rows.

This paper provides an extensive evaluation of an AI query approximation approach that enables low cost analytics and database applications to benefit from AI queries.
The approach deliver >100x cost and latency reduction for the semantic filter (AI.IF) operator and also important gains for semantic ranking (ORDER BY AI.SCORE). The cost and performance gains come from utilizing cheap and accurate proxy inference ML models over embedding vectors.
We show that despite the massive gains in latency and cost, these proxy models preserve accuracy across various benchmark datasets, including the extended Amazon reviews benchmark that has 10M rows.
We present an OLAP-friendly architecture of this approach for purely online queries, a database app-friendly architecture that further increases accuracy and the online gains by moving the proxy model training offline. We present techniques that accelerate the proxy model training.
×