Several data warehouse and database providers have recently introduced extensions to SQL called AI Queries, enabling users to specify functions and 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 thousands of times. This paper provides an extensive evaluation of a recent AI query approximation approach that enables low cost analytics and database applications to benefit from AI queries. The approach delivers >100x cost and latency reduction for the semantic filter (AI.IF) operator and also important gains for semantic ranking (AI.RANK). The cost and performance gains come from utilizing cheap and accurate proxy models over embedding vectors. We show that despite the massive gains in latency and cost, these proxy models preserve accuracy and occasionally improve accuracy across various benchmark datasets, including the extended Amazon reviews benchmark that has 10M rows. We present an OLAP-friendly architecture within Google \textit{BigQuery} for this approach for purely online (ad hoc) queries, and a low-latency HTAP database-friendly architecture in \textit{AlloyDB} that could further improve the latency by moving the proxy model training offline. We present techniques that accelerate the proxy model training.


翻译:近期,多家数据仓库与数据库供应商推出了名为AI查询的SQL扩展功能,允许用户在SQL中指定由大语言模型(LLM)评估的函数与条件,从而显著拓宽了在结构化与非结构化数据组合上可表达的查询类型。LLM具备卓越的语义推理能力,使其成为处理融合结构化与非结构化数据的复杂且精细查询的关键工具。尽管功能强大,但当AI查询被调用数千次时,其成本可能变得极为高昂。本文对一种新兴的AI查询近似方法进行了全面评估,该方法使得低成本分析应用与数据库系统能够受益于AI查询。该方法在语义过滤(AI.IF)算子中实现了超过100倍的成本与延迟降低,并在语义排序(AI.RANK)中取得了显著增益。这些成本与性能增益源于在嵌入向量上使用廉价且精确的代理模型。我们证明,尽管在延迟与成本方面获得巨大提升,这些代理模型在多个基准数据集(包括包含1000万行的扩展版亚马逊评论基准)上仍保持了准确性,甚至在某些情况下提升了准确度。我们提出了适用于Google \textit{BigQuery}的、面向纯在线(即席)查询的OLAP友好架构,以及在\textit{AlloyDB}中适用于低延迟HTAP数据库的架构——后者通过将代理模型训练移至离线环节进一步降低延迟。我们还介绍了加速代理模型训练的技术。

0
下载
关闭预览

相关内容

人工智能杂志AI(Artificial Intelligence)是目前公认的发表该领域最新研究成果的主要国际论坛。该期刊欢迎有关AI广泛方面的论文,这些论文构成了整个领域的进步,也欢迎介绍人工智能应用的论文,但重点应该放在新的和新颖的人工智能方法如何提高应用领域的性能,而不是介绍传统人工智能方法的另一个应用。关于应用的论文应该描述一个原则性的解决方案,强调其新颖性,并对正在开发的人工智能技术进行深入的评估。 官网地址:http://dblp.uni-trier.de/db/journals/ai/
智能体评判者(Agent-as-a-Judge)研究综述
专知会员服务
37+阅读 · 1月9日
【斯坦福博士论文】大语言模型的AI辅助评估
专知会员服务
31+阅读 · 2025年3月30日
AI Agent,大模型时代重要落地方向, 42页ppt
专知会员服务
290+阅读 · 2023年10月12日
完备的 AI 学习路线,最详细的资源整理!
新智元
18+阅读 · 2019年5月4日
相似词查询:玩转腾讯 AI Lab 中文词向量
AINLP
11+阅读 · 2019年2月25日
AI综述专栏 | 深度神经网络加速与压缩
人工智能前沿讲习班
32+阅读 · 2018年10月31日
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
最新内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
10+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
14+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
9+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
13+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关基金
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员