OraPlan-SQL用分步计划提升中英文复杂查询的准确率
OraPlan-SQL: A Planning-Centric Framework for Complex Bilingual NL2SQL Reasoning
- 用单一规划器结合反馈引导的提示优化,减少多代理协作开销
- 英语和中文执行准确率分别达55.0%和56.7%,验证率超99%
- 适合需要高可靠性和多语言支持的复杂自然语言转SQL场景
我们提出OraPlan-SQL系统,用于Archer NL2SQL评估挑战2025,该基准要求处理涉及算术、常识和假设推理的复杂任务。系统在执行准确率(EX)上排名第一,比第二名高出超过6%,其中英文为55.0%,中文为56.7%,同时保持超过99%的SQL有效性(VA)。系统采用智能体框架,包含生成分步自然语言计划的规划器(Planner agent)和将计划转为可执行SQL的SQL代理(SQL agent)。由于SQL代理严格遵循计划,优化重点放在规划器。不同于依赖多个子代理导致调度开销的方法,我们引入反馈引导的元提示策略,通过人工标注的失败案例聚类,由大模型提炼出修正指南并嵌入规划器系统提示,提升泛化能力且不增加复杂度。针对多语言场景,为解决音译和实体不匹配问题,引入实体链接指南,生成实体的替代表面形式并显式加入计划。最后通过计划多样化增强可靠性:为每条查询生成多个候选计划,每个计划由SQL代理生成对应查询,最终通过多数投票选择执行结果。
原文摘要 · Abstract (English)
We present OraPlan-SQL, our system for the Archer NL2SQL Evaluation Challenge 2025, a bilingual benchmark requiring complex reasoning such as arithmetic, commonsense, and hypothetical inference. OraPlan-SQL ranked first, exceeding the second-best system by more than 6% in execution accuracy (EX), with 55.0% in English and 56.7% in Chinese, while maintaining over 99% SQL validity (VA). Our system follows an agentic framework with two components: Planner agent that generates stepwise natural language plans, and SQL agent that converts these plans into executable SQL. Since SQL agent reliably adheres to the plan, our refinements focus on the planner. Unlike prior methods that rely on multiple sub-agents for planning and suffer from orchestration overhead, we introduce a feedback-guided meta-prompting strategy to refine a single planner. Failure cases from a held-out set are clustered with human input, and an LLM distills them into corrective guidelines that are integrated into the planner's system prompt, improving generalization without added complexity. For the multilingual scenario, to address transliteration and entity mismatch issues, we incorporate entity-linking guidelines that generate alternative surface forms for entities and explicitly include them in the plan. Finally, we enhance reliability through plan diversification: multiple candidate plans are generated for each query, with the SQL agent producing a query for each plan, and final output selected via majority voting over their executions.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。