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

面向Text-to-SQL的自动数据库描述生成

Automatic database description generation for Text-to-SQL

Alibaba Group(阿里巴巴集团)

Yingqi Gao, Zhiling Luo

AI总结:

针对Text-to-SQL任务中数据库描述缺失问题,提出一种基于LLM的粗到细与细到粗双过程自动生成描述方法,在Bird基准上提升SQL生成准确率0.93%,达到人类水平的37%。

摘要:

在Text-to-SQL任务中,表和列的描述对于弥合自然语言与数据库模式之间的鸿沟至关重要。本报告提出了一种在缺少显式描述时自动生成有效数据库描述的方法。所提出的方法采用双过程方法:先粗后细过程,随后是细后粗过程。粗到细方法利用LLM的固有知识,引导理解过程从数据库到表,最后到列。该方法提供了对数据库结构的整体理解,并确保上下文对齐。相反,细到粗方法从列级别开始,在回溯到表级别时提供更准确和细致的理解。在Bird基准上的实验结果表明,与不使用描述相比,使用所提方法生成的描述将SQL生成准确率提高了0.93%,并达到了人类水平性能的37%。源代码公开于https://github.com/XGenerationLab/XiYan-DBDescGen。

英文摘要:

In the context of the Text-to-SQL task, table and column descriptions are crucial for bridging the gap between natural language and database schema. This report proposes a method for automatically generating effective database descriptions when explicit descriptions are unavailable. The proposed method employs a dual-process approach: a coarse-to-fine process, followed by a fine-to-coarse process. The coarse-to-fine approach leverages the inherent knowledge of LLM to guide the understanding process from databases to tables and finally to columns. This approach provides a holistic understanding of the database structure and ensures contextual alignment. Conversely, the fine-to-coarse approach starts at the column level, offering a more accurate and nuanced understanding when stepping back to the table level. Experimental results on the Bird benchmark indicate that using descriptions generated by the proposed improves SQL generation accuracy by 0.93\% compared to not using descriptions, and achieves 37\% of human-level performance. The source code is publicly available at https://github.com/XGenerationLab/XiYan-DBDescGen.

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

↑