arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.38294cs.DBcs.SE
收藏

LASSO:一种由大语言模型智能体合成的SQL验证系统

LASSO: An LLM-Agent Synthesized System for SQL Validation

IIT Bombay(印度理工学院孟买分校)

Shreyas Jadhav, S. Sudarshan

AI总结:

本文提出受XData启发的LLM智能体合成框架LASSO,采用快速启发式数据生成策略及针对特定语义错误的攻击策略,经多基准测试其性能优于XData等现有技术。

摘要:

大语言模型(LLMs)的兴起显著提升了文本转SQL的能力,但生成的查询可能存在错误。测试数据集对于发现错误至关重要,仅拥有一个或少数测试数据集会导致许多bug未被检测到。有效的测试需要多个能暴露细微语义错误和边界情况的测试数据集。近期关于测试数据生成和等价性检查的研究聚焦于使用约束求解器,但基于约束的方法速度慢且可扩展性差。本文介绍LASSO,这是一个受XData启发的框架,旨在最小化约束求解器的使用,转而优先采用基于快速启发式的数据生成策略。LASSO部署了多个“攻击策略”,每个策略针对特定类别的语义错误。LASSO代码是使用基于LLM的智能体编码构建的,我们采用精心设计的工作流和规则来支持有效的代码生成,并避免常见的代码生成问题。LASSO包含大量内部测试用例以捕获生成代码中的错误,在扩展LASSO时还会添加更多用例,以避免后续的回归问题。我们在多个基准上进行的实证评估表明,LASSO的性能优于现有技术,包括XData、SpotIT、ParSEval和Polygon。

英文摘要:

The rise of Large Language Models (LLMs) has significantly advanced text-to-SQL capabilities, but generated queries may have errors. Test datasets are important for catching errors, but having only one or a few test datasets leaves many bugs undetected. Effective testing requires multiple test datasets that can expose subtle semantic bugs and edge cases. Recent work on test data generation and equivalence checking has focused on using constraint solvers. However, constraint-based approaches are slow and not scalable. In this paper, we introduce LASSO, a framework inspired by XData, but designed to minimize the use of constraint solvers, instead prioritizing use of data generation strategies based on fast heuristics. LASSO deploys a number of "attack strategies", each targeting a specific class of semantic errors. LASSO code was built using LLM-based agentic coding. We used carefully designed workflows and rules to support effective code generation and to avoid common code generation issues. A large number of internal test cases are included in LASSO to catch errors in generated code, and more are added when we extend LASSO, to avoid subsequent regressions. Our empirical evaluation across multiple benchmarks demonstrates that LASSO outperforms the state of the art, including XData, SpotIT, ParSEval, and Polygon.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑