Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection

Xingyu Ma, Xin Tian, Lingxiang Wu, Xuepeng Wang, Xueming Tang +1 more
9/24/2024
cs.CLcs.AI

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

Abstract

Text-to-SQL is a subtask in semantic parsing that has seen rapid progress with the evolution of Large Language Models (LLMs). However, LLMs face challenges due to hallucination issues and a lack of domain-specific database knowledge(such as table schema and cell values). As a result, they can make errors in generating table names, columns, and matching values to the correct columns in SQL statements. This paper introduces a method of knowledge injection to enhance LLMs' ability to understand schema contents by incorporating prior knowledge. This approach improves their performance in Text-to-SQL tasks. Experimental results show that pre-training LLMs on domain-specific database knowledge and fine-tuning them on downstream Text-to-SQL tasks significantly improves the Execution Match (EX) and Exact Match (EM) metrics across various models. This effectively reduces errors in generating column names and matching values to the columns. Furthermore, the knowledge-injected models can be applied to many downstream Text-to-SQL tasks, demonstrating the generalizability of the approach presented in this paper.

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. 7 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{ma2024enhancing,
  title  = {Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection},
  author = {Xingyu Ma and Xin Tian and Lingxiang Wu and Xuepeng Wang and Xueming Tang and Jinqiao Wang},
  year   = {2024},
  eprint = {2409.15907},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15907v2}
}

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/2409.15907.svg)](https://codeofpaper.com/paper/2409.15907)

Discussion