[Paper Review] APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL
APEX-SQL introduces agentic exploration for Text-to-SQL to ground reasoning in real data, improving schema linking and SQL generation in large enterprise databases. It uses a hypothesis-verification loop with logical planning, dual-pathway pruning, parallel data profiling, and deterministic guidance retrieval to outperform baselines on BIRD and Spider 2.0-Snow.
Text-to-SQL systems powered by Large Language Models have excelled on academic benchmarks but struggle in complex enterprise environments. The primary limitation lies in their reliance on static schema representations, which fails to resolve semantic ambiguity and scale effectively to large, complex databases. To address this, we propose APEX-SQL, an Agentic Text-to-SQL Framework that shifts the paradigm from passive translation to agentic exploration. Our framework employs a hypothesis-verification loop to ground model reasoning in real data. In the schema linking phase, we use logical planning to verbalize hypotheses, dual-pathway pruning to reduce the search space, and parallel data profiling to validate column roles against real data, followed by global synthesis to ensure topological connectivity. For SQL generation, we introduce a deterministic mechanism to retrieve exploration directives, allowing the agent to effectively explore data distributions, refine hypotheses, and generate semantically accurate SQLs. Experiments on BIRD (70.65% execution accuracy) and Spider 2.0-Snow (51.01% execution accuracy) demonstrate that APEX-SQL outperforms competitive baselines with reduced token consumption. Further analysis reveals that agentic exploration acts as a performance multiplier, unlocking the latent reasoning potential of foundation models in enterprise settings. Ablation studies confirm the critical contributions of each component in ensuring robust and accurate data analysis.
Motivation & Objective
- Motivate the shift from passive schema-based prompting to active, data-grounded reasoning for Text-to-SQL in large, complex databases.
Proposed method
- Proposes a unified agentic Text-to-SQL framework with a hypothesis-verification loop for both schema linking and SQL generation.
Experimental results
Research questions
- RQ1Can agentic exploration grounded in real data improve schema linking recall and precision in large enterprise databases?
- RQ2Does the agentic approach enhance SQL generation accuracy and efficiency compared to baselines on enterprise-scale benchmarks?
Key findings
- APEX-SQL achieves state-of-the-art schema linking performance on BIRD and Spider benchmarks (e.g., high strict recall across subsets).
- In SQL generation, APEX-SQL surpasses competitive baselines in execution accuracy on BIRD-Dev and Spider 2.0-Snow, with notable reductions in token consumption.
- Agentic exploration acts as a performance multiplier, unlocking latent reasoning potential for foundation models in enterprise settings.
- Ablation studies confirm the importance of logical planning, pruning, and deterministic guidance for robust data analysis and query synthesis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.