arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.21602cs.AI
收藏

GenEdit:复合算子与持续改进以应对企业级文本到SQL生成

GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprise

Distyl AI;Polytechnique Montreal(蒙特利尔理工学院)

Karime Maamari, Connor Landy, Amine Mhedhbi

AI总结:

GenEdit通过复合算子分解SQL生成并利用用户反馈更新知识集,实现企业级文本到SQL的持续改进,提升复杂查询处理能力。

摘要:

近年来,由大型语言模型驱动的文本到SQL生成技术的进步正在使数据访问民主化。尽管取得了这些进展,企业级部署仍然面临挑战,因为需要捕获业务特定知识、处理复杂查询,并满足持续改进的期望。为解决这些问题,我们设计并实现了GenEdit:我们的文本到SQL生成系统,该系统通过用户反馈进行改进。GenEdit构建并维护一个公司特定的知识集,采用一个分解SQL生成的算子流水线,并使用反馈来更新其知识集,以改进未来的SQL生成。\n我们描述了GenEdit的架构,该架构由两个核心模块组成:(i)分解式SQL生成;和(ii)基于用户反馈的知识集编辑。对于生成,GenEdit利用复合算子来改进知识检索,并创建作为思维链步骤的计划,以指导生成。GenEdit首先在初始检索阶段检索相关示例,其中原始SQL查询被分解为子语句、子句或子查询。然后,它还检索指令和模式元素。利用检索到的上下文信息,GenEdit随后以自然语言生成关于如何产生查询的逐步计划。最后,GenEdit使用该计划生成SQL,最大限度地减少模型推理的需求,这增强了复杂SQL的生成。如有必要,GenEdit会基于语法和语义错误重新生成查询。知识集编辑通过交互式副驾驶推荐,允许用户迭代他们的反馈并根据需要重新生成SQL查询。每次生成都使用分阶段编辑来更新生成提示。一旦提交反馈,它将在通过回归测试并获得批准后合并,从而改进未来的生成。

英文摘要:

Recent advancements in Text-to-SQL, driven by large language models, are democratizing data access. Despite these advancements, enterprise deployments remain challenging due to the need to capture business-specific knowledge, handle complex queries, and meet expectations of continuous improvements. To address these issues, we designed and implemented GenEdit: our Text-to-SQL generation system that improves with user feedback. GenEdit builds and maintains a company-specific knowledge set, employs a pipeline of operators decomposing SQL generation, and uses feedback to update its knowledge set to improve future SQL generations. We describe GenEdit's architecture made of two core modules: (i) decomposed SQL generation; and (ii) knowledge set edits based on user feedback. For generation, GenEdit leverages compounding operators to improve knowledge retrieval and to create a plan as chain-of-thought steps that guides generation. GenEdit first retrieves relevant examples in an initial retrieval stage where original SQL queries are decomposed into sub-statements, clauses or sub-queries. It then also retrieves instructions and schema elements. Using the retrieved contextual information, GenEdit then generates step-by-step plan in natural language on how to produce the query. Finally, GenEdit uses the plan to generate SQL, minimizing the need for model reasoning, which enhances complex SQL generation. If necessary, GenEdit regenerates the query based on syntactic and semantic errors. The knowledge set edits are recommended through an interactive copilot, allowing users to iterate on their feedback and to regenerate SQL queries as needed. Each generation uses staged edits which update the generation prompt. Once the feedback is submitted, it gets merged after passing regression testing and obtaining an approval, improving future generations.

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

↑