[Paper Review] Did You Ask a Good Question? A Cross-Domain Question Intention Classification Benchmark for Text-to-SQL
This paper introduces TriageSQL, the first cross-domain benchmark for classifying text-to-SQL question intentions into five types: answerable, improper, requiring external knowledge, ambiguous, and unanswerable by standard SQL grammar. Using a fine-tuned RoBERTa model on 390K question-database pairs, it achieves a 60% F1 score, highlighting significant challenges in distinguishing complex unanswerable questions, especially ambiguous and knowledge-requiring ones.
Neural models have achieved significant results on the text-to-SQL task, in which most current work assumes all the input questions are legal and generates a SQL query for any input. However, in the real scenario, users can input any text that may not be able to be answered by a SQL query. In this work, we propose TriageSQL, the first cross-domain text-to-SQL question intention classification benchmark that requires models to distinguish four types of unanswerable questions from answerable questions. The baseline RoBERTa model achieves a 60% F1 score on the test set, demonstrating the need for further improvement on this task. Our dataset is available at https://github.com/chatc/TriageSQL.
Motivation & Objective
- To address the gap in text-to-SQL systems that assume all user questions are answerable, by formalizing and benchmarking unanswerable question types.
- To construct a high-quality, cross-domain dataset with 390K question-database pairs and a manually annotated test set of 2,500 examples across five classes.
- To evaluate the difficulty of classifying unanswerable questions, especially ambiguous and knowledge-dependent ones, using a strong baseline model.
- To provide a standardized benchmark for future research on robust text-to-SQL systems that can handle real-world input diversity.
Proposed method
- The authors define five question intent types: answerable, improper (e.g., small talk), requiring external knowledge (ExtKnow), ambiguous (due to schema or value ambiguity), and unanswerable by standard SQL grammar (Non-SQL).
- They collect and curate 34,000 databases and 390,000 question-database pairs from 20 existing datasets, with manual revision to ensure quality.
- A high-quality test set of 500 examples per class is constructed through manual annotation to ensure reliability and reduce annotation bias.
- A RoBERTa-base model is fine-tuned on a sampled training set (up to 10,000 per class) to serve as a strong baseline for the five-class classification task.
- The model uses special tokens to separate the question and each column in the schema, enabling joint encoding of natural language and database structure.
- The authors analyze model confusion via confusion matrices and ablation studies, particularly examining the impact of non-mentioned columns on ExtKnow vs. answerable classification.
Experimental results
Research questions
- RQ1How do different types of unanswerable questions—such as those requiring external knowledge, being ambiguous, or violating standard SQL grammar—challenge text-to-SQL systems?
- RQ2To what extent can a pre-trained language model like RoBERTa distinguish between answerable and unanswerable questions in a cross-domain setting?
- RQ3What factors contribute to model confusion, particularly between ExtKnow and answerable questions, and how does the presence of non-mentioned columns affect classification?
- RQ4How does the inclusion of non-mentioned columns in answerable questions affect model performance and generalization?
Key findings
- The RoBERTa-based baseline model achieves an average F1 score of 60% on the test set, indicating significant room for improvement in handling unanswerable questions.
- The model performs best on Improper and Non-SQL question types, achieving F1 scores above 70%, suggesting these are easier to detect.
- The model struggles significantly with Ambiguous questions, achieving only a 17% F1 score, highlighting the inherent difficulty of resolving semantic ambiguity in text-to-SQL.
- Confusion between ExtKnow and Answerable questions is high, with the model achieving only 49% F1 on ExtKnow and 63% on Answerable, indicating difficulty in detecting missing schema information.
- Removing non-mentioned columns from answerable questions improves F1 scores for both ExtKnow and Answerable types, suggesting such examples are a major source of confusion.
- The ablation study confirms that non-mentioned columns are a key confounder, as models trained on datasets including such examples perform worse, even with more data.
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.