GradeSQL: Outcome reward models for intelligent Text-to-SQL generation from LLMs

Read full text
Authors: Mattia Tritto, Giuseppe Farano, Dario Di Palma, Gaetano Rossiello, Dharmashankar Subramanian, Fedelucio Narducci, Tommaso Di Noia
Cited by: 1
References: 53

Abstract

Abstract As Large Language Models (LLMs) become foundational to next-generation Intelligent Information Systems, the bridge between natural language interfaces and structured database systems remains a critical bottleneck. While Text-to-SQL generation enables cooperative support for complex query formulation, ensuring the reliability of these generated queries at inference time is a central challenge. Conventional methods rely on coarse execution-based signals, which may limit their ability to capture the nuanced semantic alignment required for high-stakes database environments. In this work, we propose the use of Outcome Reward Models (ORMs) as a fine-grained, probabilistic feedback mechanism for test-time verification in Text-to-SQL tasks. We introduce GradeSQL, a framework for training task-specific ORMs that assign scalar utility scores to candidate SQL queries based on their semantic correctness and alignment with database schema. Our approach is evaluated on the BIRD and Spider benchmarks across multiple open-source LLM families. Experimental results demonstrate that ORM-based verification consistently outperforms traditional execution-based heuristics.

Fields of Study & Subjects

Advanced Database Systems and Queries Semantic Web and Ontologies Natural Language Processing Techniques

Publication details

Journal / source
Journal of Intelligent Information Systems
Publisher
Springer Science and Business Media LLC
Volume
64
Issue
5
Pages
2545–2568
Publication date
7 July 2026
Language
EN