100倍成本与延迟降低:利用轻量级代理模型分析AI查询近似性能
100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Models
AI总结:
本文研究了AI查询近似方法,通过轻量级代理模型实现100倍成本和延迟降低,提升语义过滤和排序性能,适用于OLAP和HTAP数据库。
摘要:
近年来,数据仓库和数据库供应商推出了名为AI查询的SQL扩展,允许用户通过SQL指定由LLM评估的函数和条件,显著扩展了对结构化和非结构化数据组合的查询类型。LLM提供了出色的语义推理能力,使其成为复杂和微妙查询的重要工具。然而,当AI查询被调用数千次时,其成本会变得不可接受。本文对一种新的AI查询近似方法进行了全面评估,该方法使低成本分析和数据库应用能够受益于AI查询。该方法在语义过滤操作符上实现了>100倍的成本和延迟降低,并在语义排序上也取得了重要进展。这些成本和性能的提升来自于利用低成本且准确的代理模型来处理嵌入向量。我们证明,尽管在延迟和成本上取得了巨大收益,这些代理模型在各种基准数据集中保留了准确性,有时甚至提高了准确性,包括扩展的亚马逊评论基准数据集(具有1000万行)。我们提出了适用于Google BigQuery的OLAP友好的架构,用于纯在线(即席)查询,并在AlloyDB中提出了低延迟的HTAP数据库友好的架构,可进一步通过将代理模型训练移至离线环境来提高延迟。我们还展示了加速代理模型训练的技术。
英文摘要:
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 operator and also important gains for semantic ranking. 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 BigQuery for this approach for purely online (ad hoc) queries, and a low-latency HTAP database-friendly architecture in AlloyDB that could further improve the latency by moving the proxy model training offline. We present techniques that accelerate the proxy model training.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。