Text-to-SQL systems powered by Large Language Models have excelled on academic benchmarks but struggle in complex enterprise environments. The primary limitation lies in their reliance on static schema representations, which fails to resolve semantic ambiguity and scale effectively to large, complex databases. To address this, we propose APEX-SQL, an Agentic Text-to-SQL Framework that shifts the paradigm from passive translation to agentic exploration. Our framework employs a hypothesis-verification loop to ground model reasoning in real data. In the schema linking phase, we use logical planning to verbalize hypotheses, dual-pathway pruning to reduce the search space, and parallel data profiling to validate column roles against real data, followed by global synthesis to ensure topological connectivity. For SQL generation, we introduce a deterministic mechanism to retrieve exploration directives, allowing the agent to effectively explore data distributions, refine hypotheses, and generate semantically accurate SQLs. Experiments on BIRD (70.65% execution accuracy) and Spider 2.0-Snow (51.01% execution accuracy) demonstrate that APEX-SQL outperforms competitive baselines with reduced token consumption. Further analysis reveals that agentic exploration acts as a performance multiplier, unlocking the latent reasoning potential of foundation models in enterprise settings. Ablation studies confirm the critical contributions of each component in ensuring robust and accurate data analysis. Our code is released at https://github.com/Tencent/APEX-SQL-Project.


翻译:基于大语言模型的文本到SQL系统在学术基准测试中表现优异,但在复杂企业环境中仍面临挑战。其核心局限在于依赖静态模式表示,无法有效解决语义歧义问题,也难以扩展至大规模复杂数据库。为此,我们提出APEX-SQL——一种将范式从被动转换转向智能体探索的智能体文本到SQL框架。该框架采用假设-验证循环机制,将模型推理锚定于真实数据。在模式链接阶段,我们通过逻辑规划实现假设语言化、双路径剪枝缩减搜索空间、并行数据剖析验证列角色与真实数据的一致性,并通过全局合成确保拓扑连通性。针对SQL生成,我们引入确定性机制检索探索指令,使智能体能够有效探索数据分布、优化假设并生成语义准确的SQL语句。在BIRD(执行准确率70.65%)和Spider 2.0-Snow(执行准确率51.01%)上的实验表明,APEX-SQL以更低的令牌消耗超越竞争基线。进一步分析显示,智能体探索作为性能倍增器,可解锁基础模型在企业场景中的潜在推理能力。消融研究证实了各组件在确保鲁棒且准确的数据分析中的关键作用。我们的代码已开源至https://github.com/Tencent/APEX-SQL-Project。

0
下载
关闭预览

相关内容

【伯克利博士论文】协同语言智能体
专知会员服务
21+阅读 · 1月10日
「基于深度学习的 SQL 生成」2022研究综述
专知会员服务
29+阅读 · 2022年8月12日
【知乎】超越Lexical:用于文本搜索引擎的语义检索框架
专知会员服务
22+阅读 · 2020年8月28日
深度文本匹配在智能客服中的应用
AI100
18+阅读 · 2018年10月24日
谷歌 AI:语义文本相似度研究进展
AI研习社
22+阅读 · 2018年6月13日
干货|当深度学习遇见自动文本摘要,seq2seq+attention
机器学习算法与Python学习
10+阅读 · 2018年5月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月27日
VIP会员
最新内容
《履带式无人地面战车技术发展现状》
专知会员服务
3+阅读 · 8月2日
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
3+阅读 · 8月1日
美空军如何将人工智能从战场部署至后方机关
专知会员服务
12+阅读 · 7月31日
《史诗怒火行动:多域前瞻评估》49页报告
专知会员服务
10+阅读 · 7月31日
《英国防部:未来空战系统数字化战略》33页
专知会员服务
6+阅读 · 7月31日
《面向自主飞行网络的智能体人工智能架构》
专知会员服务
9+阅读 · 7月31日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员