AgentNLQ: A General-Purpose Agent for Natural Language to SQL

πŸ“… 2026-05-18
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the persistent gap between current natural language to SQL (NL2SQL) systems and human expert performance, which limits their reliable deployment in real-world database applications. To bridge this gap, the authors propose a large language model–based multi-agent framework that enhances generation quality through semantically enriched schema representations, integration of user-defined business rules, and a multi-stage reasoning pipeline. Key innovations include a novel multi-agent coordinator enabling planning, scheduling, and self-reflection mechanisms, as well as a context-aware schema augmentation strategy. Evaluated on the BIRD-SQL benchmark, the proposed approach achieves a semantic accuracy of 78.1%, substantially outperforming existing methods and demonstrating strong cross-domain generalization capabilities.
πŸ“ Abstract
Natural language to SQL (NL2SQL) conversion is an important problem for researchers and enterprises due to the ubiquitous importance of relational databases in broad-ranging practical problems. Despite the rapid advancements in the capabilities of LLMs, NL2SQL has not reached parity in accuracy with human expert SQL writers, hence needing additional improvements in NL2SQL algorithms. This study presents a new multi-agent method for NL2SQL that achieves 78.1% semantic accuracy on the BIg Bench for LaRge-scale Database (BIRD) benchmark. Our method leverages a semantically enriched representation of user-provided schema, adds user-provided business rules, and produces accurate SQL queries. The main contributions of this study are (a) We designed an optimized new orchestrator in a multi-agent solution that uses LLMs to plan, orchestrate, reflect, and self-correct to generate accurate SQL queries, (b) We developed an advanced schema enrichment method that creates context-aware metadata to improve accuracy, and (c) We demonstrated the accuracy and generalizability of the method across different domains and datasets by evaluating it on the BIRD-SQL benchmark.
Problem

Research questions and friction points this paper is trying to address.

Natural Language to SQL
NL2SQL
relational databases
semantic accuracy
SQL generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

multi-agent NL2SQL
schema enrichment
semantic accuracy
LLM orchestration
BIRD benchmark
O
Olena Bogdanov
JPMorgan Chase
Y
Yeunji Jung
JPMorgan Chase
C
Chandra Dhir
JPMorgan Chase
P
Pareekshitreddy Gaddam
JPMorgan Chase
S
Saurabh Jain
JPMorgan Chase
L
Lakshmi Tumati
JPMorgan Chase
V
Vijay Parthasarathy
JPMorgan Chase
A
Anup Shirgaonkar
JPMorgan Chase