Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection
Fuente:
arXiv
Guardado en:
| Autores principales: | , , , , , |
|---|---|
| Formato: | Preprint |
| Publicado: |
2024
|
| Materias: | |
| Acceso en línea: | |
| Etiquetas: |
Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
|
| _version_ | 1866912245041070080 |
|---|---|
| author | Ma, Xingyu Tian, Xin Wu, Lingxiang Wang, Xuepeng Tang, Xueming Wang, Jinqiao |
| author_facet | Ma, Xingyu Tian, Xin Wu, Lingxiang Wang, Xuepeng Tang, Xueming Wang, Jinqiao |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2409_15907 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection Ma, Xingyu Tian, Xin Wu, Lingxiang Wang, Xuepeng Tang, Xueming Wang, Jinqiao Computation and Language Artificial Intelligence 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. |
| title | Enhancing Text-to-SQL Capabilities of Large Language Models via Domain Database Knowledge Injection |
| topic | Computation and Language Artificial Intelligence |
| url | https://arxiv.org/abs/2409.15907 |