From Simple to Complex: An Agent Framework with a Progressive Difficulty Planning Strategy for Text-to-SQL
Abstract: Large Language Models (LLMs) have shown significant potential in text-to-SQL tasks. However, most existing methods operate within simplified scenarios with pre-prepared inputs (i.e., questions and database schemas) and outputs (i.e., predicted SQL). In contrast, real-world SQL development often requires consulting external knowledge and interacting with the database environment through iterative steps. To address this, we propose SoC-Agent, a novel LLM-powered agent framework designed for SQL generation in complex environments. SoC-Agent emulates the human iterative development process, breaking down tasks into a series of subtasks of increasing difficulty. Specifically, the agent first tackles simpler subtasks, iteratively refining its approach based on previous results, and then addresses more complex tasks. This incremental strategy enhances the agent's reasoning ability for complex SQL generation. Additionally, agent can also leverage external knowledge sources and dynamically interacts with the database environment to gather necessary information for each subtask, ensuring that the results are both accurate and contextually relevant. We evaluate our method on Spider 2.0 dataset, specifically designed for agentic tasks, demonstrating the superiority in handling complex SQL generation.
Paper Type: Long
Research Area: NLP Applications
Research Area Keywords: code generation and understanding
Contribution Types: Model analysis & interpretability, NLP engineering experiment, Approaches low compute settings-efficiency
Languages Studied: English
Submission Number: 1374
Loading