Retrieval and Augmentation of Domain Knowledge for Text-to-SQL Semantic Parsing

Manasi Patwardhan, Ayush Agarwal, Shabbirhussain Bhaisaheb, Aseem Arora, Lovekesh Vig +1 more
10/1/2025
cs.CL

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

The performance of Large Language Models (LLMs) for translating Natural Language (NL) queries into SQL varies significantly across databases (DBs). NL queries are often expressed using a domain specific vocabulary, and mapping these to the correct SQL requires an understanding of the embedded domain expressions, their relationship to the DB schema structure. Existing benchmarks rely on unrealistic, ad-hoc query specific textual hints for expressing domain knowledge. In this paper, we propose a systematic framework for associating structured domain statements at the database level. We present retrieval of relevant structured domain statements given a user query using sub-string level match. We evaluate on eleven realistic DB schemas covering diverse domains across five open-source and proprietary LLMs and demonstrate that (1) DB level structured domain statements are more practical and accurate than existing ad-hoc query specific textual domain statements, and (2) Our sub-string match based retrieval of relevant domain statements provides significantly higher accuracy than other retrieval approaches.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{patwardhan2025retrieval,
  title  = {Retrieval and Augmentation of Domain Knowledge for Text-to-SQL Semantic Parsing},
  author = {Manasi Patwardhan and Ayush Agarwal and Shabbirhussain Bhaisaheb and Aseem Arora and Lovekesh Vig and Sunita Sarawagi},
  year   = {2025},
  eprint = {2510.02394},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.02394v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.02394.svg)](https://codeofpaper.com/paper/2510.02394)

Discussion