通过分组查询让大模型专注特定类型问题,提升文本转SQL能力。
PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQL
- 按问题类型分组训练,引导模型聚焦单一题型的推理逻辑。
- 在Spider和BIRD数据集上超越或持平当前最佳方法。
- 不同基础性能模型经针对性训练后均有显著提升,类似人类学习过程。
大型语言模型(LLMs)在文本转SQL任务中表现出强大的推理能力。与数学应用题和常识推理等任务不同,SQL查询具有相对固定的模式,这为探究大模型是否能通过类别化思维——如同人类基于相似例证进行归纳推理——获益提供了可能。本研究提出,通过查询分组划分,使大模型专注于学习某一类问题的特定思维过程,从而提升其在不同难度级别和问题类别间的推理能力。实验表明,多个先进的大模型在采用PTD-SQL后,在Spider和BIRD数据集上要么超越,要么达到此前最优(SOTA)水平。令人惊讶的是,初始表现各异的模型在经过针对性钻探训练后均取得显著进步,尤其在自身能力边界处,展现出与人类学习进展相似的特性。代码已公开于https://github.com/lrlbbzl/PTD-SQL。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have emerged as powerful tools for Text-to-SQL tasks, exhibiting remarkable reasoning capabilities. Different from tasks such as math word problems and commonsense reasoning, SQL solutions have a relatively fixed pattern. This facilitates the investigation of whether LLMs can benefit from categorical thinking, mirroring how humans acquire knowledge through inductive reasoning based on comparable examples. In this study, we propose that employing query group partitioning allows LLMs to focus on learning the thought processes specific to a single problem type, consequently enhancing their reasoning abilities across diverse difficulty levels and problem categories. Our experiments reveal that multiple advanced LLMs, when equipped with PTD-SQL, can either surpass or match previous state-of-the-art (SOTA) methods on the Spider and BIRD datasets. Intriguingly, models with varying initial performances have exhibited significant improvements, mainly at the boundary of their capabilities after targeted drilling, suggesting a parallel with human progress. Code is available at https://github.com/lrlbbzl/PTD-SQL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。