GRIPS: An Empirical Study of Pre-SQL Grounding Information for SQL Generation
Organizations: Department of Computer Science, Portland State University, USA
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.
Figures & tables
| Example 1: TempTabQA-C, Hard | |
|---|---|
| C: | Darrell Pace |
| Personal Information: Birth Date = 1956-10-23 | |
| Olympic Games: Individual MedalGold 1976 Montreal; MedalGold 1984 Los Angeles | |
| Pan American Games: Team MedalGold 1979 San Juan; MedalGold 1983 Caracas | |
| Pan American Games: Individual MedalGold 1983 Caracas; MedalSilver 1979 San Juan | |
| Q: | How many medals did Darrell Pace win in his/her twenties? |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Control | Condition | Definition | Illustrative example |
| Shared | Without Stage I information | The auxiliary Stage I block is empty. The question, schema/evidence, demonstrations, and SQL-generation instructions remain unchanged. | Empty payload: {} . |
| Shared | With guided representation | Supplies recognized question–input matches with their semantic types and normalized values. No profile summaries are included. | Column: element Tables: bond , atom . |
| Content | With representation + profile | Adds deterministic counts, structural scope, priority, target determinacy, and coarse difficulty summaries. This is the deployed GRIPS handoff. | Representation: element , bond , atom Implicated tables: 2 FK span: 2 Target: clear; difficulty: moderate. |
| Content | With expanded profile | Adds internal pattern, count/repetition, requirement, and compressed-signature fields to the deployed handoff. | Pattern: column over two tables Repeated table mentions: 4 Requirement: 5-tuple Signature: repeated-table doublet. |
| Source | With adapted DIN links | Supplies schema links produced by the DIN-SQL linking stage to the common Stage II generator. This is an adapted intermediate output, not native end-to-end DIN-SQL. | connected.bond_id = TR004_8_9 connected.atom_id = atom.atom_id Selected column: atom.element . |
| Source | With adapted MAC selection | Supplies the MAC-SQL selector’s table and column decisions to the common Stage II generator. The base schema remains available. | Keep: atom , bond Select from connected : bond and atom IDs Drop: molecule . |
Text-to-SQL
Text-to-SQL translates natural-language questions into executable database queries, linking user intent to schemas, values, and SQL logic.
See all 185 papers