arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.06759cs.CLcs.AIcs.DB
收藏

用于Text-to-SQL的合理化模型

Rationalization Models for Text-to-SQL

IBM T.J. Watson Research Center(IBM T.J.沃森研究中心)

Gaetano Rossiello, Nhan Pham, Michael Glass, Junkyu Lee, Dharmashankar Subramanian

AI总结:

本研究提出生成CoT推理依据的框架,通过手动标注少量示例、迭代动态少样本知识蒸馏训练合理化模型,为text-to-SQL数据集生成合成标注,实验证明该方法可提升小模型在BIRD数据集上的执行准确率与可解释性。

摘要:

我们提出了一个生成思维链(Chain-of-Thought, CoT)推理依据的框架,以增强text-to-SQL模型的微调效果。这些推理由中间SQL语句和解释组成,作为构建最终SQL查询的增量步骤。该流程首先手动标注少量示例,随后用这些示例提示大语言模型,执行来自教师模型的迭代式动态少样本知识蒸馏过程。之后在经过验证的分解查询上训练合理化模型,从而为text-to-SQL数据集生成大量合成的CoT标注。为评估该方法,我们在BIRD数据集上分别对有、无这些推理依据的小语言模型进行微调。结果表明,逐步生成查询提升了执行准确率,尤其是在中等和高复杂度查询上,同时还增强了可解释性。

英文摘要:

We introduce a framework for generating Chain-of-Thought (CoT) rationales to enhance text-to-SQL model fine-tuning. These rationales consist of intermediate SQL statements and explanations, serving as incremental steps toward constructing the final SQL query. The process begins with manually annotating a small set of examples, which are then used to prompt a large language model in an iterative, dynamic few-shot knowledge distillation procedure from a teacher model. A rationalization model is subsequently trained on the validated decomposed queries, enabling extensive synthetic CoT annotations for text-to-SQL datasets. To evaluate the approach, we fine-tune small language models with and without these rationales on the BIRD dataset. Results indicate that step-by-step query generation improves execution accuracy, especially for moderately and highly complex queries, while also enhancing explainability.

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

↑