Research of the procedure for converting text into sql based on large language models (LLM) through cross-domaine semantic analysis
Abstract
Theme of work. Research on the Text-to-SQL conversion procedure based on Large Language Models (LLM) through Cross-Domain Semantic Analysis. Purpose of work. To enhance the accuracy and adaptability of Text-to-SQL conversion using Large Language Models (LLM) through cross-domain semantic analysis, enabling reliable query interpretation across various domains and database structures. Methods of research. Comparative analysis, experimental evaluation, cross-domain semantic testing. Results. The research demonstrates that optimized prompt engineering and fine-tuning significantly improve the accuracy and cross-domain adaptability of Large Language Models for Text-to-SQL conversion. Conclusions. This study confirms that Large Language Models (LLMs) can effectively enhance the Text-to-SQL conversion process when optimized with targeted prompt engineering and fine-tuning. Cross-domain semantic analysis proved essential for enabling LLMs to handle varied database structures and domain-specific terminology, improving versatility and accuracy. The findings highlight the potential of LLMs to make SQL query generation more accessible to non-technical users, promoting broader application of AI in database management. Future work may focus on further refining these models to reduce computational costs and increase processing efficiency.
Downloads
References
/References
Katsogiannis-Meimarakis G., Koutrika G. Survey on Deep Learning Approaches for Text-to-SQL. VLDB. 2023. 32, 4. P. 905–936. URL: https://www.researchgate.net/publication/367348812_A_survey_on_deep_learning_approaches_for_text-to-SQL Дата звернення: 21.08.2024.
A Comprehensive Evaluation of ChatGPT’s Zero-Shot Text-to-SQL Capability / A. Liu et al. CoRR abs/2303. 2023. P. 13547. URL: https://www.researchgate.net/publication/367348812_A_survey_on_deep_learning_approaches_for_text-to-SQL
Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation / D. Gao et al. Proceedings of the VLDB Endowment. 2024. Vol. 17, no. 5. P. 132–1145. URL: https://www.researchgate.net/publication/380309883_Text-to-SQL_Empowered_by_Large_Language_Models_A_Benchmark_Evaluation Дата звернення: 13.09.2024.
RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL / H. Li et al. 37th AAAI Conference on Artificial Intelligence, 2023. P. 13067–13075 URL: https://arxiv.org/abs/2302.05965
C3: Zero-shot Text-to-SQL with ChatGPT / X. Dong et al. 2023 URL: https://arxiv.org/abs/2307.07306
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task / T. Yu et al. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium. Stroudsburg, PA, USA, 2018. URL: https://yale-lily.github.io/spider Дата звернення: 10.08.2024.
Stanford Alpaca: An Instruction-following LLaMA model / R. Taori et al. URL: https://en.wikipedia.org/wiki/Llama_(language_model)
Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies / L. Nan et al. CoRR abs/2305.12586. 2023. URL: https://arxiv.org/abs/2305.12586
What Makes Good In-Context Examples for GPT-3? / J. Liu et al. In Pro- ceedings of Deep Learning Inside Out: The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, 2022. P. 100–114. URL: https://aclanthology.org/2022.deelio-1.10/
A Case-Based Reasoning Framework for Adaptive Prompting in Cross-Domain Text-to-SQL / C. Guo et al. CoRR abs/2304.13301. 2023. URL: https://www.researchgate.net/publication/370295634_A_Case-Based_Reasoning_Framework_for_Adaptive_Prompting_in_Cross-Domain_Text-to-SQL
Zhong R., Yu T., Klein D. Semantic Evaluation for Text-to-SQL with Distilled Test Suites. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. P. 396–411. URL: https://aclanthology.org/2020.emnlp-main.29/
Katsogiannis-Meimarakis G., Koutrika G. Survey on Deep Learning Approaches for Text-to-SQL. VLDB. 2023. 32, 4. P. 905–936. URL: https://www.researchgate.net/publication/367348812_A_survey_on_deep_learning_approaches_for_text-to-SQL Дата звернення: 21.08.2024.
A Comprehensive Evaluation of ChatGPT’s Zero-Shot Text-to-SQL Capability / A. Liu et al. CoRR abs/2303. 2023. P. 13547. URL: https://www.researchgate.net/publication/367348812_A_survey_on_deep_learning_approaches_for_text-to-SQL
Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation / D. Gao et al. Proceedings of the VLDB Endowment. 2024. Vol. 17, no. 5. P. 132–1145. URL: https://www.researchgate.net/publication/380309883_Text-to-SQL_Empowered_by_Large_Language_Models_A_Benchmark_Evaluation Дата звернення: 13.09.2024.
RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL / H. Li et al. 37th AAAI Conference on Artificial Intelligence, 2023. P. 13067–13075 URL: https://arxiv.org/abs/2302.05965
C3: Zero-shot Text-to-SQL with ChatGPT / X. Dong et al. 2023 URL: https://arxiv.org/abs/2307.07306
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task / T. Yu et al. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium. Stroudsburg, PA, USA, 2018. URL: https://yale-lily.github.io/spider Дата звернення: 10.08.2024.
Stanford Alpaca: An Instruction-following LLaMA model / R. Taori et al. URL: https://en.wikipedia.org/wiki/Llama_(language_model)
Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies / L. Nan et al. CoRR abs/2305.12586. 2023. URL: https://arxiv.org/abs/2305.12586
What Makes Good In-Context Examples for GPT-3? / J. Liu et al. In Pro- ceedings of Deep Learning Inside Out: The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, 2022. P. 100–114. URL: https://aclanthology.org/2022.deelio-1.10/
A Case-Based Reasoning Framework for Adaptive Prompting in Cross-Domain Text-to-SQL / C. Guo et al. CoRR abs/2304.13301. 2023. URL: https://www.researchgate.net/publication/370295634_A_Case-Based_Reasoning_Framework_for_Adaptive_Prompting_in_Cross-Domain_Text-to-SQL
Zhong R., Yu T., Klein D. Semantic Evaluation for Text-to-SQL with Distilled Test Suites. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. P. 396–411. URL: https://aclanthology.org/2020.emnlp-main.29/