STARQA: A Question Answering Dataset for Complex Analytical Reasoning over Structured Databases
Mounica Maddela, Lingjue Xie, Daniel Preotiuc-Pietro, Mausam
Abstract
Semantic parsing methods for converting text to SQL queries enable question answering over structured data and can greatly benefit analysts who routinely perform complex analytics on vast data stored in specialized relational databases. Although several benchmarks measure the abilities of text to SQL, the complexity of their questions is inherently limited by the level of expressiveness in query languages and none focus explicitly on questions involving complex analytical reasoning which require operations such as calculations over aggregate analytics, time series analysis or scenario understanding. In this paper, we introduce STARQA, the first public human-created dataset of complex analytical reasoning questions and answers on three specialized-domain databases. In addition to generating SQL directly using LLMs, we evaluate a novel approach (Text2SQLCode) that decomposes the task into a combination of SQL and Python: SQL is responsible for data fetching, and Python more naturally performs reasoning. Our results demonstrate that identifying and combining the abilities of SQL and Python is beneficial compared to using SQL alone, yet the dataset still remains quite challenging for the existing state-of-the-art LLMs.
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.
Builds on4
- Have LLMs Advanced Enough? A Challenging Problem Solving Benchmark For Large Language ModelsDaman Arora, Himanshu Gaurav Singh, MausamEMNLP 2023 · 36 citations
- RAR: Retrieval-augmented retrieval for code generation in low resource languagesAvik Dutta, Mukul Singh, Gust Verbruggen, Sumit Gulwani et al.EMNLP 2024 · 1 citation
- Dual Reader-Parser on Hybrid Textual and Tabular Evidence for Open Domain Question AnsweringAlexander Hanbo Li, Patrick Ng, Peng Xu, Henghui Zhu et al.ACL 2021
- Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause FrequenciesTerrance Liu, Shuyi Wang, Daniel Preotiuc-Pietro, Yash Chandarana et al.EMNLP 2025
Related papers
- LogicCat: A Chain-of-Thought Text-to-SQL Benchmark for Complex ReasoningLiutao, Xutao Mao, Dixuan Zhang, Yifan Li et al.AAAI 2026 · 3 citations
- CRT-QA: A Dataset of Complex Reasoning Question Answering over Tabular DataZhehao Zhang, Xitao Li, Yan Gao, Jian-Guang LouEMNLP 2023 · 3 citations
- STaR-SQL: Self-Taught Reasoner for Text-to-SQLMingqian He, Yongliang Shen, Wenqi Zhang, Qiuying Peng et al.ACL 2025
- SQUAB: Evaluating LLM robustness to Ambiguous and Unanswerable Questions in Semantic ParsingSimone Papicchio, Luca Cagliero, Paolo PapottiEMNLP 2025
- KaggleDBQA: Realistic Evaluation of Text-to-SQL ParsersChia-Hsuan Lee, Oleksandr Polozov, Matthew RichardsonACL 2021
