Interactive Text-to-SQL Generation via Editable Step-by-Step Explanations
Yuan Tian, Zheng Zhang, Zheng Ning, Toby Jia-Jun Li, Jonathan K. Kummerfeld, Tianyi Zhang
Abstract
Relational databases play an important role in business, science, and more. However, many users cannot fully unleash the analytical power of relational databases, because they are not familiar with database languages such as SQL. Many techniques have been proposed to automatically generate SQL from natural language, but they suffer from two issues: (1) they still make many mistakes, particularly for complex queries, and (2) they do not provide a flexible way for non-expert users to validate and refine incorrect queries. To address these issues, we introduce a new interaction mechanism that allows users to directly edit a stepby-step explanation of a query to fix errors. Our experiments on multiple datasets, as well as a user study with 24 participants, demonstrate that our approach can achieve better performance than multiple SOTA approaches. Our code and datasets are available at https: //github.com/magic-YuanTian/STEPS .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 34ad336d-8b91-4579-b252-c22fbd115205Cited by top-tier papers8
- Improving Steering and Verification in AI-Assisted Data Analysis with Interactive Task DecompositionMajeed Kazemitabaar, Jack Williams, Ian Drosos, Tovi Grossman et al.UIST 2024 · 49 citations
- SQLucid: Grounding Natural Language Database Queries with Interactive ExplanationsYuan Tian, Jonathan K. Kummerfeld, Toby Jia-Jun Li, Tianyi ZhangUIST 2024 · 13 citations
- Sphinteract: Resolving Ambiguities in NL2SQL Through User InteractionFuheng Zhao, Shaleen Deep, Fotis Psallidas, Avrilia Floratou et al.VLDB 2025 · 12 citations
- Jupybara: Operationalizing a Design Space for Actionable Data Analysis and Storytelling with LLMsHuichen Will Wang, Larry Birnbaum, Vidya SetlurCHI 2025 · 11 citations
- Cerebra: Aligning Implicit Knowledge in Interactive SQL AuthoringYunfan Zhou, Qiming Shi, Zhongsu Luo, Xiwen Cai et al.CHI 2026 · 2 citations
Builds on10
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 citations
- Graphix-T5: Mixing Pre-trained Transformers with Graph-Aware Layers for Text-to-SQL ParsingJinyang Li, Binyuan Hui, Reynold Cheng, Bowen Qin et al.AAAI 2023 · 164 citations
- GraPPa: Grammar-Augmented Pre-Training for Table Semantic ParsingTao Yu, Chien-Sheng Wu, Xi Victoria Lin, Bailin Wang et al.ICLR 2021 · 59 citations
- IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL GenerationYitao Cai, Xiaojun WanEMNLP 2020 · 41 citations
Related papers
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLYue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya et al.NeurIPS 2025 · 21 citations
- MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLArian Askari, Christian Pölitz, Xinye TangAAAI 2025 · 44 citations
- Speak to your Parser: Interactive Text-to-SQL with Natural Language FeedbackAhmed Elgohary, Saghar Hosseini, Ahmed Hassan AwadallahACL 2020 · 13 citations
- SQL-Checker: Error Detection and Labeling for Text-to-SQL with Interpretability AnalysisXingyu Ma, Xin Tian, Lingxiang Wu, Xuepeng Wang et al.WWW 2026
- SafeQL: Search-based Refinement for Safe and Efficient LLM-based Text-to-SQLGeonho Lee, Min-Soo KimVLDB 2026
