AAU Student Projects - visit Aalborg University's student projects portal
A master thesis from Aalborg University

Schema Guided Abstention Mechanism for NL2SQL

Author(s)

Term

4. term

Education

Publication year

2025

Submitted on

2025-06-11

Pages

10 pages

Abstract

NL2SQL systems democratise access to databases by enabling non-expert users to retrieve information through natural language. Although state-of-the-art NL2SQL models show impressive SQL generation, they typically lack mechanisms to assess question answerability, limiting their practical reliability. Existing approaches that incorporate abstention often require extensive training for each database, which hinders generalisability. We explore a schema-guided approach to abstention that enables NL2SQL systems to identify and abstain from infeasible questions before SQL generation. Our schema-guided abstention approach uses the pretrained features of existing decoder-only models to capture the connection between user question and schema, and from this information drive the abstention prediction. With our method, we create an abstention mechanism that transfer to unseen domains, reducing the amount of data required for training. Our experiments show that we achieve state-of-the-art performance in the abstention task, while maintaining a better balance between abstention and SQL generation than existing NL2SQL systems. This improves reliability and moves NL2SQL systems closer to real-world usability.

Keywords

Documents


Colophon: This page is part of the AAU Student Projects portal, which is run by Aalborg University. Here, you can find and download publicly available bachelor's theses and master's projects from across the university dating from 2008 onwards. Student projects from before 2008 are available in printed form at Aalborg University Library.

If you have any questions about AAU Student Projects or the research registration, dissemination and analysis at Aalborg University, please feel free to contact the VBN team. You can also find more information in the AAU Student Projects FAQs.