arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.07214cs.DBcs.AI
收藏

通过大语言模型实现自动化跨领域探索性数据分析

Towards Automated Cross-domain Exploratory Data Analysis through Large Language Models

East China Normal University \& PingCAP, China;East China Normal University, China

Jun-Peng Zhu, Boyan Niu, Peng Cai, Zheming Ni, Jianwei Wan, Kai Xu, Jiajun Huang, Shengbo Ma, Bing Wang, Xuan Zhou, Guanglei Bao, Donghui Zhang, Liu Tang, Qi Liu

AI总结:

本文提出TiInsight系统,通过HDC和四阶段流程增强LLM的跨领域EDA、文本到SQL及可视化能力,并在Spider与Bird基准上验证其优异性能。

摘要:

探索性数据分析(EDA)与SQL相结合,对于参与数据探索和分析的数据分析师至关重要。然而,数据分析师通常面临两大主要挑战:(1)需要熟练编写SQL查询;(2)需要生成合适的可视化类型,以增强对查询结果的解读。由于其重要性,研究人员已投入大量努力探索解决这些挑战的不同方法,包括利用大语言模型(LLM)。但是,现有方法无法满足现实世界的数据探索需求,主要原因包括:(1)数据库模式复杂;(2)用户意图不明确;(3)跨领域泛化能力有限;(4)端到端文本到可视化能力不足。本文提出了TiInsight,这是一个基于SQL的自动化跨领域探索性数据分析系统。首先,我们提出了分层数据上下文(即HDC),它利用LLM总结与数据库模式相关的上下文,这对于开放世界EDA系统跨数据领域泛化至关重要。其次,该EDA系统被划分为四个组件(即阶段):HDC生成、问题澄清与分解、文本到SQL生成(即TiSQL)以及数据可视化(即TiChart)。最后,我们在PingCAP的生产环境中实现了一个具有用户友好GUI界面的端到端EDA系统。我们还开源了TiInsight的所有API,以促进EDA社区内的研究。通过真实用户研究中的广泛评估,我们证明TiInsight相比人类专家具有出色的性能。具体而言,TiSQL使用GPT-4在Spider数据集上实现了86.3%的执行准确率。它还在Bird数据集上展示了最先进的性能。

英文摘要:

Exploratory data analysis (EDA), coupled with SQL, is essential for data analysts involved in data exploration and analysis. However, data analysts often encounter two primary challenges: (1) the need to craft SQL queries skillfully, and (2) the requirement to generate suitable visualization types that enhance the interpretation of query results. Due to its significance, substantial research efforts have been made to explore different approaches to address these challenges, including leveraging large language models (LLMs). However, existing methods fail to meet real-world data exploration requirements primarily due to (1) complex database schema; (2) unclear user intent; (3) limited cross-domain generalization capability; and (4) insufficient end-to-end text-to-visualization capability. This paper presents TiInsight, an automated SQL-based cross-domain exploratory data analysis system. First, we propose hierarchical data context (i.e., HDC), which leverages LLMs to summarize the contexts related to the database schema, which is crucial for open-world EDA systems to generalize across data domains. Second, the EDA system is divided into four components (i.e., stages): HDC generation, question clarification and decomposition, text-to-SQL generation (i.e., TiSQL), and data visualization (i.e., TiChart). Finally, we implemented an end-to-end EDA system with a user-friendly GUI interface in the production environment at PingCAP. We have also open-sourced all APIs of TiInsight to facilitate research within the EDA community. Through extensive evaluations by a real-world user study, we demonstrate that TiInsight offers remarkable performance compared to human experts. Specifically, TiSQL achieves an execution accuracy of 86.3% on the Spider dataset using GPT-4. It also demonstrates state-of-the-art performance on the Bird dataset.

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

↑