mlsanityData to 14 Oct 2026

ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQL

arXiv 2606.05836 ↗First posted 4 Jun 2026cs.CLcited by 0

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Large language models have substantially advanced Text-to-SQL systems, yet applying them to enterprise-scale databases remains challenging. Real-world databases often contain large and heterogeneous schemas, incomplete metadata, dialect-specific SQL syntax, and complex analytical questions that are difficult to solve with a single SQL query. To address these challenges, we propose ProSPy, a Profiling-driven SQL--Python agentic framework for enterprise-scale Text-to-SQL. ProSPy structures the reasoning process into four stages: it first extracts fine-grained data evidence through automatic profiling, progressively prunes large schemas into task-relevant contexts, fetches intermediate views through a dialect-agnostic SQL interface, and finally performs flexible downstream analysis with Python. This design combines the efficiency of SQL over large databases with the flexibility of Python-based analysis, while reducing reliance on unreliable metadata and improving robustness across SQL dialects. Experiments on Spider 2.0-Lite and Spider 2.0-Snow show that ProSPy consistently outperforms strong baselines with both open-source and proprietary models, achieving execution accuracies of 60.15% and 60.51% with Claude-4.5-Opus, without majority voting. Further analysis shows that ProSPy is robust to SQL dialect variations and achieves a favorable trade-off between schema recall and precision.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 20 of its 42 references that are in the map. First posted on arXiv 4 Jun 2026.

Builds on

20 of 42 references.

Closest ancestors · 2

Same direction, newest first

  1. 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL11 Feb
  2. 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Exploration2 Feb

Other references · 18

  1. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  2. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  3. 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
  4. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  5. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  6. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 232
  7. 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
  8. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
  9. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  10. 2025General-Reasoner: Advancing LLM Reasoning Across All Domainscited by 135
  11. 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
  12. 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
6 more
  1. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
  2. 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQLcited by 38
  3. 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 29
  4. 2025AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scalecited by 17
  5. 2025Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generationcited by 10
  6. 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQLcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026A Semantic-Layer-Mediated Agent for Natural Language to SQL over Heterogeneous Enterprise Databases
  2. 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
  3. 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views
  4. 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agents
  5. 2025RAISE: Reasoning Agent for Interactive SQL Exploration
  6. 2026AgentSM: Semantic Memory for Agentic Text-to-SQL
  7. 2025Rethinking Agentic Workflows: Evaluating Inference-Based Test-Time Scaling Strategies in Text2SQL Tasks
  8. 2024BEAVER: An Enterprise Benchmark for Text-to-SQL