arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

MIRA:用于Text-to-SQL修正的证据验证修复记忆

MIRA: Evidence-Verified Repair Memory for Text-to-SQL Correction

Yining Liu, Chenyu Yang, Boyan Li, Rui Mao, Yuyu Luo

arXiv 2608.06950首次发表:更新:

AI 中文总结

本研究针对Text-to-SQL智能体生成的语义错误SQL问题,提出可插拔SQL修正器MIRA,将历史修正转为独立记忆项,经实验在BIRD和ScienceBenchmark数据集上显著提升了SQL执行准确率。

AI 中文摘要

Text-to-SQL智能体仍会生成可执行但语义错误的SQL语句,可靠的SQL修正器必须在不破坏正确语句的前提下修复错误查询。来自同一数据库的已确认修正可在不更新参数的情况下重复使用。然而现有方法常将多个错误及其修正打包为单一粗粒度经验,应用整个经验可能引入无关编辑,将初始正确的查询转为错误。可靠的重复使用取决于三个决策:从历史修正中保留什么、何时激活生成的记忆、如何将其适配到当前SQL。我们提出MIRA(Memory-Item Reuse and Adaptation,记忆项复用与适配),这是一种可插拔的SQL修正器,利用数据库证据指导记忆复用。MIRA将历史修正转换为可独立复用的修复记忆项,针对每个当前查询,它使用问题和SQL检索记忆项,随后对照数据库证据检查每个项,并将受支持的项适配到当前SQL。我们评估了由三个Text-to-SQL智能体在BIRD和ScienceBenchmark的14个数据库上生成的1785条测试查询,MIRA在BIRD和ScienceBenchmark上分别将执行准确率提升了16.53%和8.78%。

英文摘要

Text-to-SQL agents still produce executable yet semantically incorrect SQL. A reliable SQL corrector must repair incorrect queries without corrupting correct ones. Confirmed corrections from the same database can be reused without parameter updates. Existing methods, however, often bundle multiple errors and their repairs into a single coarse-grained experience. Applying the entire experience can introduce irrelevant edits and turn an initially correct query into an incorrect one. Reliable reuse therefore depends on three decisions: what to retain from a historical correction, when to activate the resulting memory, and how to adapt it to the current SQL. We propose MIRA (Memory-Item Reuse and Adaptation), a pluggable SQL corrector that uses database evidence to guide memory reuse. MIRA converts historical corrections into independently reusable repair memory items. For each current query, it retrieves memory items using the question and SQL. It then checks each item against database evidence and adapts the supported items to the current SQL. We evaluate 1,785 test queries generated by three Text-to-SQL agents across 14 databases from BIRD and ScienceBenchmark. MIRA improves execution accuracy by 16.53% and 8.78% on BIRD and ScienceBenchmark, respectively.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑