While Text-to-SQL remains the dominant approach for database interaction, real-world analytics increasingly require the flexibility of general-purpose programming languages such as Python or Pandas to manage file-based data and complex analytical workflows. Despite this growing need, the reliability of Text-to-Python in core data retrieval remains underexplored relative to the mature SQL ecosystem. To address this gap, we introduce BIRD-Python, a benchmark designed for cross-paradigm evaluation. We systematically refined the original dataset to reduce annotation noise and align execution semantics, thereby establishing a consistent and standardized baseline for comparison. Our analysis reveals a fundamental paradigmatic divergence: whereas SQL leverages implicit DBMS behaviors through its declarative structure, Python requires explicit procedural logic, making it highly sensitive to underspecified user intent. To mitigate this challenge, we propose the Logic Completion Framework (LCF), which resolves ambiguity by incorporating latent domain knowledge into the generation process. Experimental results show that (1) performance differences primarily stem from missing domain context rather than inherent limitations in code generation, and (2) when these gaps are addressed, Text-to-Python achieves performance parity with Text-to-SQL. These findings establish Python as a viable foundation for analytical agents-provided that systems effectively ground ambiguous natural language inputs in executable logical specifications. Resources are available at https://anonymous.4open.science/r/Bird-Python-43B7/.
Pi-SQL: Enhancing Text-to-SQL with Fine-Grained Guidance from Pivot Programming Languages
Shanghai University of Finance and Economics(上海金融学院);Tsinghua University(清华大学);Beihang University(北航);Wuhan University(武汉大学);Southern University of Science and Technology(南方科技大学)
Evaluating LLMs on Conversational Text-to-SQL under Chain Ambiguity and Intent Drift
The Hong Kong Polytechnic University(香港理工大学);City University of Macau(澳门城市大学);Jilin University(吉林大学);Beihang University(北京航空航天大学);Jinan University(暨南大学)
Query Carefully: Detecting the Unanswerables in Text-to-SQL Tasks
Institute of Computer Science, Zurich University of Applied Sciences(计算机科学研究所,应用科学大学苏黎世);Institute of Medical Virology, University of Zurich(医学病毒学研究所,苏黎世大学);Department of Gastroenterology and Hepatology, University Hospital Zurich, University of Zurich(消化内科与肝病科,苏黎世大学医院,苏黎世大学)
LLM-Based SQL Generation: Prompting, Self-Refinement, and Adaptive Weighted Majority Voting
Institute of Information Management(信息管理研究所);National Yang Ming Chiao Tung University(阳明交通大学);R. B. Annis School of Engineering(R. B. Annis工程学院);University of Indianapolis(印第安纳大学)
From Questions to Queries: An AI-powered Multi-Agent Framework for Spatial Text-to-SQL
Geoinformation and Big Data Research Laboratory, Department of Geography, The Pennsylvania State University(宾夕法尼亚州立大学地理系地理信息与大数据研究实验室);Institute for Computational and Data Sciences and Department of Geography, The Pennsylvania State University(宾夕法尼亚州立大学计算与数据科学研究所及地理系)
Sonar-TS: Search-Then-Verify Natural Language Querying for Time Series Databases
Jiangxi University of Finance and Economics(江西财经大学);Griffith University(格里菲斯大学);Yunnan University(云南大学);Microsoft Research Asia(微软亚洲研究院);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))