通过并行探索测试用例提升文本转SQL的准确率与效率
PExA: Parallel Exploration Agent for Complex Text-to-SQL
- 将文本转SQL类比为软件测试覆盖,用并行原子SQL验证语义
- 在Spider 2.0上达70.2%执行准确率,刷新当前最优纪录
- 适合需要高精度且容忍轻微延迟的复杂数据库查询场景
基于大模型的文本转SQL代理常面临性能与延迟的权衡。本文将文本转SQL重构为软件测试覆盖问题:先用一系列简单原子SQL并行执行,覆盖原查询语义;通过迭代测试用例覆盖率,在信息充分后生成最终SQL,利用已探索的中间结果引导生成。在当前最先进的Spider 2.0基准上验证,取得70.2%的执行准确率,达到新最优水平。
原文摘要 · Abstract (English)
LLM-based agents for text-to-SQL often struggle with latency-performance trade-off, where performance improvements come at the cost of latency or vice versa. We reformulate text-to-SQL generation within the lens of software test coverage where the original query is prepared with a suite of test cases with simpler, atomic SQLs that are executed in parallel and together ensure semantic coverage of the original query. After iterating on test case coverage, the final SQL is generated only when enough information is gathered, leveraging the explored test case SQLs to ground the final generation. We validated our framework on a state-of-the-art benchmark for text-to-SQL, Spider 2.0, achieving a new state-of-the-art with 70.2% execution accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。