Pre-SQL grounding improves text to SQL query accuracy and efficiency
GRIPS: An Empirical Study of Pre-SQL Grounding Information for SQL Generation
Computation and Language
Summary
Text-to-SQL systems translate everyday questions into database commands, but can mess up by linking words to the wrong data parts. The authors studied what information helps the system get this linking right before creating the SQL. They built a method called GRIPS that separates this grounding step from actual SQL generation, making the system more accurate and faster by using fewer computer resources. Their tests showed better results than older methods across different models, and adding too much extra info didn’t always help.
What this means in practice
- •For data platform teams: Enhance natural language query systems to produce more accurate SQL commands by improving the grounding of question components before query creation.
- •For business intelligence developers: Build more efficient text-to-SQL interfaces that reduce processing time and computational cost by separating grounding from generation steps.
- •For database chatbot developers: Create commercial products that answer database questions more reliably by implementing structured pre-SQL grounding to avoid misinterpretations.$Commercial implications: This paper enables building improved commercial chatbots for databases with better accuracy and efficiency, making them more market viable.
Authors
Ekata Mitra, Yufei Tao, Kamalamalini Nagasundaram, Ameeta Agrawal
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.