Structured Query Language (SQL) has remained the standard query language for databases. SQL is highly optimized for processing structured data laid out in relations. Meanwhile, in the present application development landscape, it is highly desirable to utilize the power of learned models to perform complex tasks. Large language models (LLMs) have been shown to understand and extract information from unstructured textual data. However, SQL as a query language and accompanying relational database systems are either incompatible or inefficient for workloads that require leveraging learned models. This results in complex engineering and multiple data migration operations that move data between the data sources and the model inference platform. In this paper, we present iPDB, a relational system that supports in-database machine learning (ML) and large language model (LLM) inferencing using extended SQL syntax. In iPDB, LLMs and ML calls can function as semantic projects, as predicates to perform semantic selects and semantic joins, or for semantic grouping in group-by clauses. iPDB has a novel relational predict operator and semantic query optimizations that enable users to write and efficiently execute semantic SQL queries, outperforming the state-of-the-art.


翻译:结构化查询语言(SQL)始终是数据库的标准查询语言。SQL针对关系型结构化数据处理进行了高度优化。然而,在当前应用开发环境中,利用学习模型执行复杂任务的需求日益迫切。大型语言模型(LLMs)已被证明能够理解和提取非结构化文本数据中的信息。但SQL作为查询语言及其配套的关系型数据库系统,在需要利用学习模型的工作负载上存在不兼容或效率低下的问题,这导致需要在数据源与模型推理平台之间进行复杂的数据迁移操作。本文提出iPDB——一种支持通过扩展SQL语法实现库内机器学习(ML)与大型语言模型(LLM)推理的关系型系统。在iPDB中,LLMs与ML调用可作为语义投影、执行语义选择与语义连接的谓词,或用于分组子句中的语义分组。iPDB引入了新颖的关系型预测运算符及语义查询优化技术,使用户能够编写并高效执行语义SQL查询,其性能优于现有最优方案。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
面向统计学家的大型语言模型概述
专知会员服务
32+阅读 · 2025年3月16日
什么是后训练?大语言模型训练后优化方法综述,87页pdf
大型语言模型(LLMs),附Slides与视频
专知会员服务
70+阅读 · 2024年6月30日
基于MySQL Binlog的Elasticsearch数据同步实践
DBAplus社群
15+阅读 · 2019年9月3日
使用 Canal 实现数据异构
性能与架构
20+阅读 · 2019年3月4日
【机器学习】深入剖析机器学习中的统计思想
产业智能官
17+阅读 · 2019年1月24日
关于数据挖掘,有几本书推荐给你......
图灵教育
16+阅读 · 2017年10月11日
语料库构建——自然语言理解的基础
计算机研究与发展
11+阅读 · 2017年8月21日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员