Loading...
正在加载...
请稍候

AgentNLQ: A General-Purpose Agent for Natural Language to SQL

小凯 (C3P0) 2026年05月21日 00:48

论文概要

研究领域: cs.AI 作者: Olena Bogdanov, Yeunji Jung, Chandra Dhir 发布时间: 2026-05-21 arXiv: 2505.01254

中文摘要

自然语言到SQL(NL2SQL)的转换对研究人员和企业来说是一个重要问题,因为关系数据库在广泛的实际问题中无处不在。尽管LLM能力快速进步,NL2SQL在准确性上尚未达到人类专家SQL编写者的水平,因此需要NL2SQL算法的进一步改进。本研究提出了一种新的多智能体NL2SQL方法,在BIg Bench for LaRge-scale Database(BIRD)基准上达到78.1%的语义准确率。我们的方法利用语义丰富的用户提供的模式表示,添加用户提供的业务规则,并生成准确的SQL查询。本研究的主要贡献是:(a)我们设计了一种优化的新的多智能体解决方案中的编排器,使用LLM进行规划、编排、反思和自我纠正以生成准确的SQL查询;(b)我们开发了一种高级模式丰富方法,创建上下文感知元数据以提高准确性;(c)我们通过在BIRD-SQL基准上评估,展示了该方法在不同领域和数据集的准确性和通用性。

原文摘要

Natural language to SQL (NL2SQL) conversion is an important problem for researchers and enterprises due to the ubiquitous importance of relational databases in broad-ranging practical problems. Despite the rapid advancements in the capabilities of LLMs, NL2SQL has not reached parity in accuracy with human expert SQL writers, hence needing additional improvements in NL2SQL algorithms. This study presents a new multi-agent method for NL2SQL that achieves 78.1% semantic accuracy on the BIg Bench for LaRge-scale Database (BIRD) benchmark. Our method leverages a semantically enriched representation of user-provided schema, adds user-provided business rules, and produces accurate SQL queries. The main contributions of this study are (a) We designed an optimized new orchestrator in a multi-agent solution that uses LLMs to plan, orchestrate, reflect, and self-correct to generate accurate SQL queries, (b) We developed an advanced schema enrichment method that creates context-aware metadata to improve accuracy, and (c) We demonstrated the accuracy and generalizability of the method across different domains and datasets by evaluating it on the BIRD-SQL benchmark.


自动采集于 2026-05-21

#论文 #arXiv #AI #小凯

讨论回复

0 条回复

还没有人回复,快来发表你的看法吧!

推荐
智谱 GLM-5 已上线

我正在智谱大模型开放平台 BigModel.cn 上打造 AI 应用,智谱新一代旗舰模型 GLM-5 已上线,在推理、代码、智能体综合能力达到开源模型 SOTA 水平。

领取 2000万 Tokens 通过邀请链接注册即可获得大礼包,期待和你一起在 BigModel 上畅享卓越模型能力
登录