AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ding, Zhongjun, Lin, Yin, Zeng, Tianjing, Zhu, Rong, Ding, Bolin, Zhou, Jingren
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911536611590144
author Ding, Zhongjun
Lin, Yin
Zeng, Tianjing
Zhu, Rong
Ding, Bolin
Zhou, Jingren
author_facet Ding, Zhongjun
Lin, Yin
Zeng, Tianjing
Zhu, Rong
Ding, Bolin
Zhou, Jingren
contents Text-to-SQL systems translate natural language questions into SQL queries, providing substantial value for non-expert users. While large language models (LLMs) show promising results for this task, they remain error-prone. Query ambiguity has been recognized as a major obstacle in LLM-based Text-to-SQL systems, leading to misinterpretation of user intent and inaccurate SQL generation. To this end, we present AmbiSQL, an interactive system that automatically detects query ambiguities and guides users through intuitive multiple-choice questions to clarify their intent. It introduces a fine-grained ambiguity taxonomy for identifying ambiguities arising from both database elements and LLM reasoning, and subsequently incorporates user feedback to rewrite ambiguous questions. In this demonstration, AmbiSQL is integrated with XiYan-SQL, our commercial Text-to-SQL backend. We provide 40 ambiguous queries collected from two real-world benchmarks that SIGMOD'26 attendees can use to explore how disambiguation improves SQL generation quality. Participants can also apply the system to their own databases and natural language questions. The codebase and demo video are available at: https://github.com/JustinzjDing/AmbiSQL and https://www.youtube.com/watch?v=rbB-0ZKwYkk.
format Preprint
id arxiv_https___arxiv_org_abs_2508_15276
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL
Ding, Zhongjun
Lin, Yin
Zeng, Tianjing
Zhu, Rong
Ding, Bolin
Zhou, Jingren
Databases
Computation and Language
Text-to-SQL systems translate natural language questions into SQL queries, providing substantial value for non-expert users. While large language models (LLMs) show promising results for this task, they remain error-prone. Query ambiguity has been recognized as a major obstacle in LLM-based Text-to-SQL systems, leading to misinterpretation of user intent and inaccurate SQL generation. To this end, we present AmbiSQL, an interactive system that automatically detects query ambiguities and guides users through intuitive multiple-choice questions to clarify their intent. It introduces a fine-grained ambiguity taxonomy for identifying ambiguities arising from both database elements and LLM reasoning, and subsequently incorporates user feedback to rewrite ambiguous questions. In this demonstration, AmbiSQL is integrated with XiYan-SQL, our commercial Text-to-SQL backend. We provide 40 ambiguous queries collected from two real-world benchmarks that SIGMOD'26 attendees can use to explore how disambiguation improves SQL generation quality. Participants can also apply the system to their own databases and natural language questions. The codebase and demo video are available at: https://github.com/JustinzjDing/AmbiSQL and https://www.youtube.com/watch?v=rbB-0ZKwYkk.
title AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL
topic Databases
Computation and Language
url https://arxiv.org/abs/2508.15276