ZhugeSQL: Multi-LLM Collaborative Inference Framework for Fintech Text-to-SQL Queries
摘要
In the digital age, data has emerged as a pivotal driver in the fintech domain, underpinning critical applications such as risk assessment, investment decision-making, and market trend forecasting. However, existing data querying approaches face significant challenges, with traditional Text-to-SQL methods and underlying technologies, such as LSTM and Transformer models, exhibiting notable limitations. These models often rely heavily on extensive training data and struggle to achieve a balance between accuracy and inference speed. To address these issues, this paper introduces ZhugeSQL, an innovative multi-LLM collaborative Inference framework designed to enhance the performance of Text-to-SQL tasks. ZhugeSQL leverages a simulated database to meticulously evaluate model performance and employs a cosine similarity algorithm to identify semantically similar questions. Based on rigorous scoring criteria, it dynamically selects the most suitable language model for each query. Additionally, ZhugeSQL incorporates prompt learning techniques to further improve query accuracy. Experimental results validate the efficacy of ZhugeSQL, demonstrating superior SQL generation accuracy compared to mainstream models such as SQLCoder and DeepSeek-22B. In terms of inference speed, ZhugeSQL achieves significant improvements over DeepSeek-22B, while maintaining a high level of accuracy. Furthermore, ZhugeSQL eliminates the need for complex model fine-tuning or retraining, substantially reducing computational resource requirements. These findings highlight ZhugeSQL as a practical and efficient solution for addressing data querying challenges in the fintech sector.