arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.00527cs.DB
收藏

ChatBI:迈向自然语言到复杂商业智能 SQL

ChatBI: Towards Natural Language to Complex Business Intelligence SQL

Jinqing Lian, Xinyi Liu, Yingxia Shao, Yang Dong, Ming Wang, Zhang Wei, Tianqi Wan, Ming Dong, Hailin Yan

AI总结:

ChatBI 面向 NL2BI 任务,通过单视图选择降低模式链接难度,并采用分阶段流程生成复杂语义 SQL,在百度数据平台上实现了更优的实用性、通用性和效率。

摘要:

自然语言到 SQL(NL2SQL)技术为不熟悉数据库的非专业用户提供了使用 SQL 进行数据分析的机会。将自然语言转换为商业智能(NL2BI)是 NL2SQL 在实际生产系统中一个流行的实践场景。与 NL2SQL 相比,NL2BI 带来了更多挑战。\n在本文中,我们提出了 ChatBI,一种用于解决 NL2BI 任务的全面且高效的技术。首先,我们分析了交互模式,这是 NL2SQL 和 NL2BI 在使用上存在差异的一个重要模块,并设计了一个更小、成本更低的模型来匹配这种交互模式。在 BI 场景中,表包含大量列,使得现有依赖大语言模型(LLMs)进行模式链接的 NL2SQL 方法由于 token 限制而无法继续进行。BI 场景中歧义列的比例更高,也使得模式链接变得困难。ChatBI 结合数据库社区中现有的视图技术,首先将模式链接问题分解为单视图选择问题,然后使用一个更小、成本更低的机器学习模型来选择列数显著减少的单视图。随后,该单视图的列作为模式链接所需的列传递给 LLM。最后,ChatBI 提出了一种不同于现有流程的分阶段处理流程,使 ChatBI 能够更准确地生成包含复杂语义和比较关系的 SQL。\n我们已将 ChatBI 部署在百度的数据平台上,并将其集成到多个产品线中进行大规模生产任务评估。获得的结果凸显了其在实用性、通用性和效率方面的优势。同时,在我们真实的 BI 场景数据表和查询下,与当前主流的 NL2SQL 技术相比,它也取得了最佳结果。

英文摘要:

The Natural Language to SQL (NL2SQL) technology provides non-expert users who are unfamiliar with databases the opportunity to use SQL for data analysis.Converting Natural Language to Business Intelligence (NL2BI) is a popular practical scenario for NL2SQL in actual production systems. Compared to NL2SQL, NL2BI introduces more challenges. In this paper, we propose ChatBI, a comprehensive and efficient technology for solving the NL2BI task. First, we analyze the interaction mode, an important module where NL2SQL and NL2BI differ in use, and design a smaller and cheaper model to match this interaction mode. In BI scenarios, tables contain a huge number of columns, making it impossible for existing NL2SQL methods that rely on Large Language Models (LLMs) for schema linking to proceed due to token limitations. The higher proportion of ambiguous columns in BI scenarios also makes schema linking difficult. ChatBI combines existing view technology in the database community to first decompose the schema linking problem into a Single View Selection problem and then uses a smaller and cheaper machine learning model to select the single view with a significantly reduced number of columns. The columns of this single view are then passed as the required columns for schema linking into the LLM. Finally, ChatBI proposes a phased process flow different from existing process flows, which allows ChatBI to generate SQL containing complex semantics and comparison relations more accurately. We have deployed ChatBI on Baidu's data platform and integrated it into multiple product lines for large-scale production task evaluation. The obtained results highlight its superiority in practicality, versatility, and efficiency. At the same time, compared with the current mainstream NL2SQL technology under our real BI scenario data tables and queries, it also achieved the best results.

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

↑