Enhancements in Data Querying: Applying MMR-Integrated In-Context Learning to LLM-based Text-to-SQL
In the modern business ecosystem, informed decision-making relies heavily on effective data utilization. To enable more intuitive and efficient data access, Text-to-SQL technologies serve as a crucial bridge. This paper introduces an improvement by integrating the Maximal Marginal Relevance (MMR) with In-Context Learning (ICL) to improve the performance of Large Language Models (LLMs) in generating SQL queries. This research focuses on strategically deploying MMR within ICL frameworks, optimizing prompt construction by balancing relevance and diversity of examples. This method was rigorously tested on datasets from domains such as tobacco and automotive marketing, as well as the cross-domain SPIDER benchmark. Results demonstrate that the proposed method excels in both domain-specific and complex questions.
Authors
- Ming Huang (ORCID: https://orcid.org/0000-0002-9517-2125)
- Zhenyu Zhou (ORCID: https://orcid.org/0000-0002-3344-4463)
- Junfang Li (ORCID: https://orcid.org/0000-0003-3775-4378)
- Yang Chuniie
Institutions
- Alibaba Group (China) (CN)
- Zhejiang University (CN)
Publication Details
- Published
- 2024-11-01
- DOI
- https://doi.org/10.1109/cac63892.2024.10865575
- Citations
- 3
- Primary Topic
- Advanced Database Systems and Queries
- Type
- article
- Field-Weighted Citation Impact
- 1.05