arXiv:2611.02314cs.CLNov 2026

Manuscript Offprint

arXiv:2611.02314

GRIPS: An Empirical Study of Pre-SQL Grounding Information for SQL Generation

Ekata Mitra, Yufei Tao, Kamalamalini Nagasundaram, Ameeta Agrawal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Text-to-SQL systems answer natural language questions over structured data, but can fail before SQL generation by linking question mentions to the wrong table, column, value, or relation. Even valid SQL can then return an incorrect answer. This raises a central question: What pre-SQL information helps a SQL generator, and when does additional information cease to help? We investigate this question on TempTabQA-C and BIRD. Among the audited SQL Static failures, grounding errors form the largest category on both benchmarks. We introduce GRIPS (Grounding Representation and Input Processing for SQL generation), a three-stage method that derives structured pre-SQL information to make these decisions explicit before query generation. Across GPT-5-nano and Llama-70B, GRIPS-Adaptive improves over SQL Static in 18 of 20 settings, with an average accuracy gain of 11.8 percentage points, while reducing model-call token usage by 47.8%. Our controlled analysis shows which grounding information can improve SQL generation, whereas adding more pre-SQL information does not consistently help. By separating question-input grounding from SQL generation, GRIPS makes text-to-SQL more accurate, efficient, and easier to diagnose.

1 Introduction

Text-to-SQL systems provide a practical interface for answering natural language questions over structured data: given a schema or set of tables, the system returns an executable query and a final answer. Large language models (LLMs) have made this workflow look straightforward, but structured-data reasoning requires several decisions before any SQL is generated. The system must determine what the question refers to in the schema, select relevant tables or slices, resolve values and filters, and decide which operations to apply. These pre-SQL decisions are interdependent: an incorrect grounding decision can lead to a valid query that answers

the wrong question. Selecting relevant context is particularly important because more context is not necessarily better; even when retrieved information is relevant, additional context can degrade LLM performance (Du et al., 2025). Errors in these pre-SQL decisions propagate to downstream reasoning, and have been observed across semi-structured tables and fully relational databases (Zhou et al., 2024; Shankarampeta et al., 2025; Gruber et al., 2025; Li et al., 2023; Osés Grijalba et al., 2025).

Prior work improves different parts of the text-to-SQL pipeline through schema linking and retrieval (Gao et al., 2024; Shi et al., 2025; Glass et al., 2025; Nahid et al., 2025; Eben et al., 2025; Pourreza and Rafiei, 2023; Wang et al., 2025a; Xie et al., 2026; Talaei et al., 2024; Rajgaria et al., 2025), cost-aware routing (Zhu et al., 2025; Yi and Chen, 2025; Shao et al., 2025), and tabular QA prompting (Kulkarni et al., 2025; Deng et al., 2025; Rajgaria et al., 2025). However, the question-input interpretation must be systematically examined while keeping the SQL generator fixed. Consequently, it remains difficult to isolate which pre-SQL information helps and when additional information hurts.

To examine this issue, we use SQL Static (Kulkarni et al., 2025) as a common diagnostic system across two datasets, TempTabQA-C and BIRD. Our audit shows that many failures originate in question-input grounding before SQL syntax or execution becomes the main issue. This observation motivates treating pre-SQL interpretation as an explicit, inspectable handoff rather than leaving it only to the SQL-generation prompt. Therefore, we introduce GRIPS (Grounding Representation and Input Processing for SQL generation), a three-stage architecture that separates input processing, SQL generation, and execution. Stage I derives structured pre-SQL information from the question and its available context. Stage II combines this information with the original input and SQL demonstrations to generate a single SQLite query. Stage III executes the query and returns the answer. We study a fixed-prompt version, GRIPS-Static, and an adaptive version, GRIPS-Adaptive, which selects demonstrations for the current input. This separation allows us to study not only whether GRIPS improves SQL generation, but also which information should be resolved before generation begins.

Our work is organized around three research questions:

RQ1: Where do text-to-SQL failures arise—during question-input grounding, SQL operation selection, or execution?

RQ2: How does the complete GRIPS system compare with prior methods in answer accuracy and model-call token usage?

RQ3: When the SQL generator and demonstrations are fixed, which pre-SQL grounding information improves performance?

Our main contributions are:

  1. A cross-format analysis of text-to-SQL failures, with a diagnostic taxonomy covering grounding, operator, and execution-interface errors.

  2. An inspectable pre-SQL interface, evaluated through the GRIPS pipeline across two structured-data settings and two model families.

  3. A controlled study of the information passed through this interface, showing that compact grounding can help while additional fields do not consistently improve SQL generation.