Thinkquel:一种使用合成数据和跨度感知目标的专门用于文本到dbt转换的模型
Thinkquel: A Model Dedicated to Text-to-dbt Using Synthetic Data and a Span-Aware Objective
AI总结:
针对自然语言转数据转换流程的准确率低、训练信号不匹配等问题,提出融合合成数据流水线、跨度感知强化学习目标与TS-GRPO的Thinkquel模型,显著提升执行成功率与结果匹配率,增强训练稳定性。
摘要:
将自然语言请求转换为可靠的、可投入生产的数据转换流程仍具挑战:正确性取决于精准的模式链接和数据仓库专属的SQL方言,而训练期间可用的最强监督信号——执行成功与结果匹配——仅在序列层面提供。与此同时,构建大型经执行验证的语料库成本高昂,且词元级目标与这些全局信号不匹配,会导致优化不稳定、可移植性有限。我们推出Thinkquel,这是一款经微调的模型,用于生成鲁棒、可移植且经执行验证的数据库查询。Thinkquel的方法整合了新型合成数据流水线TS-SQL(该流水线将dbt作为可移植中间表示)、跨度感知强化学习目标,以及Token-Sequence GRPO(TS-GRPO)——TS-GRPO专为弥合大语言模型微调时词元级训练信号与序列级执行奖励之间的差距而设计。在包含500个样本的TS-SQL测试集上,采用两阶段监督微调课程的Thinkquel(32B参数)实现了93.2%的执行成功率和61.8%的结果精确匹配率,较基础模型分别提升67.2%(执行成功率)和44.4%(匹配率)。在Spider数据集(14B参数)实验中,相较于GRPO和GSPO,TS-GRPO提升了训练稳定性,并加快了执行匹配奖励的收敛速度。
英文摘要:
Transforming natural-language requests into reliable, production-ready data transformations remains challenging: correctness depends on precise schema linking and warehouse-specific SQL dialects, while the strongest supervision available during training--execution success and result matching--are provided only at the sequence level. At the same time, assembling large, execution-validated corpora is costly, and token-level objectives misalign with these global signals, yielding unstable optimization and limited portability. We introduce Thinkquel, a fine-tuned model for producing robust, portable, and execution-validated database queries. Methodologies in Thinkquel integrates a novel synthetic data pipeline, TS-SQL, that leverages dbt as a portable intermediate representation with a span-aware reinforcement learning objective, and Token-Sequence GRPO (TS-GRPO), specifically designed to bridge the gap between token-level training signals and sequence-level execution rewards when finetuning LLMs. On the 500-example TS-SQL test set, Thinkquel (32B) reaches 93.2% execution success and 61.8% exact-result match with a two-stage SFT curriculum, improving over the base model by 67.2% (exec.) and 44.4% (match). In Spider (14B) experiments, TS-GRPO increases training stability and speeds convergence of the execution-match reward relative to GRPO and GSPO.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。