English

Enhancing SQL Query Generation with Neurosymbolic Reasoning

Databases 2024-08-27 v1 Artificial Intelligence Software Engineering

Abstract

Neurosymbolic approaches blend the effectiveness of symbolic reasoning with the flexibility of neural networks. In this work, we propose a neurosymbolic architecture for generating SQL queries that builds and explores a solution tree using Best-First Search, with the possibility of backtracking. For this purpose, it integrates a Language Model (LM) with symbolic modules that help catch and correct errors made by the LM on SQL queries, as well as guiding the exploration of the solution tree. We focus on improving the performance of smaller open-source LMs, and we find that our tool, Xander, increases accuracy by an average of 10.9% and reduces runtime by an average of 28% compared to the LM without Xander, enabling a smaller LM (with Xander) to outperform its four-times larger counterpart (without Xander).

Keywords

Cite

@article{arxiv.2408.13888,
  title  = {Enhancing SQL Query Generation with Neurosymbolic Reasoning},
  author = {Henrijs Princis and Cristina David and Alan Mycroft},
  journal= {arXiv preprint arXiv:2408.13888},
  year   = {2024}
}

Comments

11 pages, 8 figures

R2 v1 2026-06-28T18:23:21.819Z