提出新环境机制,让文本转SQL代理减少无效探索,提升查询准确率。
Sophrosyne: Agentic Exploration of Relational Data Systems Needs Moderation
- 在数据接口中加入引导指令,控制代理的探索行为。
- 实验显示探索量降低4.6倍,查询准确率最高提升12.4%。
- 适合需要安全、精准查询的数据库应用开发者使用。
由大语言模型驱动的Text2SQL代理通过工具调用探索数据系统来生成SQL。然而,为保障安全和访问范围,数据系统通常提供具有明确接口表面的环境。我们研究并分类了当前常见的接口类型,发现粗粒度与细粒度接口之间存在根本权衡:前者成本低但信息不足,后者虽精确却易引发代理过度探索,导致引入无关模式元素,影响查询准确性。我们主张抑制过度探索是有效利用接口的关键,并提出Sophrosyne——一种在接口响应中加入引导指令以规范代理探索过程的数据系统环境。初步结果表明,该方法使过度探索减少4.6倍,查询准确率最高提升12.4%(约4个百分点)。
原文摘要 · Abstract (English)
Text2SQL agents powered by LLMs translate natural language intent into SQL by exploring the data system through tool calls before formulating the query. However, to ensure secure and scoped access, data systems construct environments with explicit API surfaces. We study and categorize these APIs exposed today as either coarse-grained or fine-grained and posit that choosing between them presents a fundamental tradeoff between cost-efficient exploration and accurate SQL generation. Most data systems expose fine-grained APIs, but this inadvertently disadvantages agents: they over-explore, incorporating irrelevant schema elements into their query formulation and produce inaccurate results. We argue that curbing over-exploration is key to the effective use of these API surfaces, and propose Sophrosyne, a data system environment that augments API responses with directives that guide the agent's exploration process. Initial results show that directives reduce over-exploration by 4.6x and boost accuracy by up to 12.4% (approx. 4 percentage points).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。