Enhancing SQL Query Generation with Neurosymbolic Reasoning
DOI:
https://doi.org/10.1609/aaai.v39i19.34198Abstract
We propose a neurosymbolic architecture aimed at boosting the performance of any Language Model (LM) for SQL query generation. This approach leverages symbolic reasoning to guide the LM's exploration of the search space by considering multiple paths, symbolically evaluating choices at each decision point to choose the next step, with the added novel ability to backtrack. A key innovation is the use of symbolic checks on both partially and fully generated SQL queries, enabling early truncation of unsuccessful search paths. Input consists of textual requirements on the desired query, along with optional example tuples to be selected by the query. Experiments on Xander, our open-source implementation, show it both reduces runtime and increases accuracy of the generated SQL. A specific result is an LM using Xander outperforming a four-times-larger LM.Downloads
Published
2025-04-11
How to Cite
Princis, H., David, C., & Mycroft, A. (2025). Enhancing SQL Query Generation with Neurosymbolic Reasoning. Proceedings of the AAAI Conference on Artificial Intelligence, 39(19), 19959–19968. https://doi.org/10.1609/aaai.v39i19.34198
Issue
Section
AAAI Technical Track on Machine Learning V