Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigm

Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigm

3 Jul 2024 | Yuanzhen Xie, Xinzhou Jin, Tao Xie, Mingxiong Lin, Liang Chen, Chenyun Yu, Lei Cheng, Chengxiang Zhuo, Bo Hu, Zang Li
This paper proposes a workflow paradigm method for enhancing attention in large language models (LLMs) to improve text-to-SQL performance. The method decomposes complex tasks into subtasks, reduces irrelevant information, and enhances LLM attention through a series of modules: Information Determination, Classification & Hint, SQL Generation, Self-Correction, and Active Learning. The Information Determination module identifies relevant database schema elements, while the Classification & Hint module categorizes problems and provides tailored prompts. The SQL Generation module uses question templates and retrieval strategies to generate SQL queries. The Self-Correction module improves query accuracy by identifying and correcting errors, and the Active Learning module expands the model's problem-solving capabilities by learning from past mistakes. The method outperforms existing approaches on three datasets: Spider Dev, Spider-Realistic, and Bird Dev, achieving significant improvements in execution accuracy. It also performs well on the Spider Test dataset, achieving new state-of-the-art results. The method is efficient, with lower token and time costs compared to existing approaches. It is also scalable, as demonstrated by its performance on the complex Bird dataset. The workflow paradigm is effective in improving LLM performance in text-to-SQL tasks by focusing attention and reducing irrelevant information. The method is based on human thinking patterns and is designed to be adaptable to different problem types. The method is also effective in improving the accuracy of SQL queries by incorporating self-correction and active learning modules. The method is evaluated on multiple datasets and shows significant improvements in performance compared to existing approaches. The method is also efficient, with lower token and time costs compared to existing approaches. The method is scalable and effective in improving the performance of LLMs in text-to-SQL tasks.This paper proposes a workflow paradigm method for enhancing attention in large language models (LLMs) to improve text-to-SQL performance. The method decomposes complex tasks into subtasks, reduces irrelevant information, and enhances LLM attention through a series of modules: Information Determination, Classification & Hint, SQL Generation, Self-Correction, and Active Learning. The Information Determination module identifies relevant database schema elements, while the Classification & Hint module categorizes problems and provides tailored prompts. The SQL Generation module uses question templates and retrieval strategies to generate SQL queries. The Self-Correction module improves query accuracy by identifying and correcting errors, and the Active Learning module expands the model's problem-solving capabilities by learning from past mistakes. The method outperforms existing approaches on three datasets: Spider Dev, Spider-Realistic, and Bird Dev, achieving significant improvements in execution accuracy. It also performs well on the Spider Test dataset, achieving new state-of-the-art results. The method is efficient, with lower token and time costs compared to existing approaches. It is also scalable, as demonstrated by its performance on the complex Bird dataset. The workflow paradigm is effective in improving LLM performance in text-to-SQL tasks by focusing attention and reducing irrelevant information. The method is based on human thinking patterns and is designed to be adaptable to different problem types. The method is also effective in improving the accuracy of SQL queries by incorporating self-correction and active learning modules. The method is evaluated on multiple datasets and shows significant improvements in performance compared to existing approaches. The method is also efficient, with lower token and time costs compared to existing approaches. The method is scalable and effective in improving the performance of LLMs in text-to-SQL tasks.
Reach us at info@study.space
Understanding Decomposition for Enhancing Attention%3A Improving LLM-based Text-to-SQL through Workflow Paradigm