Enhancing SQL Query Generation with Neurosymbolic Reasoning

Henrijs Princis, Cristina David, Alan Mycroft

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

8437 Downloads (Pure)

Abstract

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.
Original languageEnglish
Title of host publicationAAAI-25 Technical Tracks 19
EditorsToby Walsh, Julie Shah, Zico Kolter
PublisherAAAI Press
Pages19959-19968
Number of pages10
Edition19
ISBN (Electronic)9781577358978
DOIs
Publication statusPublished - 11 Apr 2025
EventThe 39th Annual AAAI Conference on Artificial Intelligence - Philadelphia, United States
Duration: 25 Feb 20254 Mar 2025
https://aaai.org/conference/aaai/aaai-25/

Publication series

NameProceedings of the AAAI Conference on Artificial Intelligence
PublisherAAAI
Number19
Volume39
ISSN (Print)2159-5399
ISSN (Electronic)2374-3468

Conference

ConferenceThe 39th Annual AAAI Conference on Artificial Intelligence
Country/TerritoryUnited States
CityPhiladelphia
Period25/02/254/03/25
Internet address

Bibliographical note

Publisher Copyright:
Copyright © 2025, Association for the Advancement of Artificia Intelligence (www.aaai.org). All rights reserved.

Fingerprint

Dive into the research topics of 'Enhancing SQL Query Generation with Neurosymbolic Reasoning'. Together they form a unique fingerprint.

Cite this