In-context learning of large-language models (LLMs) has achieved remarkable success in the field of natural language processing, while extensive case studies reveal that the single-step chain-of-thought prompting approach faces challenges such as attention diffusion and inadequate performance in complex tasks like text-to-SQL. To improve the contextual learning capabilities of LLMs in text-to-SQL, a workflow paradigm method is proposed, aiming to enhance the attention and problem-solving scope of LLMs through decomposition. Specifically, the information determination module for eliminating redundant information and the brand-new prompt structure based on problem classification greatly enhance the model's attention. Additionally, the inclusion of self-correcting and active learning modules greatly expands the problem-solving scope of LLMs, hence improving the upper limit of LLM-based approaches. Extensive experiments conducted on three datasets demonstrate that our approach outperforms other methods by a significant margin. About 2-3 percentage point improvements compared to the existing baseline on the Spider Dev and Spider-Realistic datasets and new SOTA results on the Spider Test dataset are achieved. Our code is available on GitHub: \url{https://github.com/FlyingFeather/DEA-SQL}.
翻译:大语言模型(LLMs)的上下文学习在自然语言处理领域取得了显著成功,但大量案例研究表明,单步思维链提示方法在文本到SQL等复杂任务中面临注意力分散和表现不足等问题。为提升LLMs在文本到SQL任务中的上下文学习能力,提出了一种工作流范式方法,旨在通过分解增强LLMs的注意力与问题解决范围。具体而言,通过信息确定模块消除冗余信息,并基于问题分类构建全新提示结构,大幅提升了模型的注意力。此外,引入的自纠正与主动学习模块极大地扩展了LLMs的问题解决范围,从而提高了基于LLM方法的上限。在三个数据集上的广泛实验表明,本方法显著优于其他方法。在Spider Dev和Spider-Realistic数据集上相比现有基线提升约2-3个百分点,在Spider Test数据集上取得了新的最优结果。我们的代码已在GitHub上开源:\url{https://github.com/FlyingFeather/DEA-SQL}。