arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12104cs.CLcs.AIcs.DBcs.LG
收藏

分析洞察引擎中的端到端Text-to-SQL生成

End-to-end Text-to-SQL Generation within an Analytics Insight Engine

Distyl AI(Distyl AI公司);Polytechnique Montréal(蒙特利尔理工学院)

Karime Maamari, Amine Mhedhbi

AI总结:

针对企业级Text-to-SQL面临的高复杂度查询支持、低延迟需求、领域术语理解三大挑战,提出基于大语言模型、外部知识检索、层级CTE分解及反馈适配的端到端生成流水线。

摘要:

Text-to-SQL领域的最新进展推动数据库管理系统朝着数据访问更民主化的方向发展,当前的语言模型是这些进展的核心。在Distyl AI的Analytics Insight Engine(分析洞察引擎)开发过程中,这些模型实现了效果出色的Text-to-SQL生成。该引擎在企业客户中的早期部署凸显了三大核心挑战:其一,数据分析师期望获得高复杂度SQL查询编写方面的支持;其二,用户请求是临时的,因此要求低延迟;其三,生成过程需要理解特定领域的术语和实践。\n我们设计并实现了由大语言模型驱动的Text-to-SQL生成流水线,以应对这些挑战。该方法的核心原则依赖于三方面:在预处理阶段提取的外部知识、在查询生成时检索合适的外部知识、以及按照基于CTE(公共表表达式)的层级结构分解SQL查询生成过程。最后,适配框架利用反馈更新外部知识,进而随时间推移提升查询生成效果。我们概述了这一端到端方法,并重点介绍了推理阶段生成SQL的算子。

英文摘要:

Recent advancements in Text-to-SQL have pushed database management systems towards greater democratization of data access. Today's language models are at the core of these advancements. They enable impressive Text-to-SQL generation as experienced in the development of Distyl AI's Analytics Insight Engine. Its early deployment with enterprise customers has highlighted three core challenges. First, data analysts expect support with authoring SQL queries of very high complexity. Second, requests are ad-hoc and, as such, require low latency. Finally, generation requires an understanding of domain-specific terminology and practices. The design and implementation of our Text-to-SQL generation pipeline, powered by large language models, tackles these challenges. The core tenants of our approach rely on external knowledge that we extract in a pre-processing phase, on retrieving the appropriate external knowledge at query generation time, and on decomposing SQL query generation following a hierarchical CTE-based structure. Finally, an adaptation framework leverages feedback to update the external knowledge, in turn improving query generation over time. We give an overview of our end-to-end approach and highlight the operators generating SQL during inference.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑