Text-to-SQL enables users to interact with databases through natural language, simplifying access to structured data. Although highly capable large language models (LLMs) achieve strong accuracy for complex queries, they incur unnecessary latency and dollar cost for simpler ones. In this paper, we introduce the first LLM routing approach for Text-to-SQL, which dynamically selects the most cost-effective LLM capable of generating accurate SQL for each query. We present two routing strategies (score- and classification-based) that achieve accuracy comparable to the most capable LLM while reducing costs. We design the routers for ease of training and efficient inference. In our experiments, we highlight a practical and explainable accuracy-cost trade-off on the BIRD dataset.
A Survey of Large Language Model-Based Generative AI for Text-to-SQL: Benchmarks, Applications, Use Cases, and Challenges
Cleveland State University(克利夫兰州立大学);The Davey Tree Expert Company(戴维树专家公司);The MathWorks(MathWorks公司);Khoury College of Computer Science, Roux Institute at Northeastern University(东北大学鲁克斯研究所科里计算机科学学院)
Optimizing Diversity and Quality through Base-Aligned Model Collaboration
University of Chicago(芝加哥大学);University of Southern California, Information Sciences Institute(南加州大学信息科学研究所);University of California, Davis(加州大学戴维斯分校)
RACER: Risk-Aware Calibrated Efficient Routing for Large Language Models
Southern University of Science and Technology, China(南方科技大学);The Chinese University of Hong Kong, Shenzhen, China(香港中文大学(深圳));Shenzhen Loop Area Institute, China(深圳环湖研究院)
Optimizing Resource Allocation for Geographically-Distributed Inference by Large Language Models
Department of Computer Science and Engineering, Pennsylvania State University, University Park, PA, USA(计算机科学与工程系,宾夕法尼亚州立大学,大学公园,PA,USA);Department of Computer Science, Virginia Tech, Blacksburg, VA, USA(计算机科学系,弗吉尼亚理工大学,布莱克堡,VA,USA);Department of Electrical Communication Engineering, Indian Institute of Science, Bangalore, India(电子通信工程系,印度科学研究院,班加罗尔,印度)
DBCopilot: Natural Language Querying over Massive Databases via Schema Routing
Institute of Software, CAS(中国科学院软件研究所);Hangzhou Institute for Advanced Study, UCAS(中国科学院大学杭州高等研究院);University of Chinese Academy of Sciences (UCAS)(中国科学院大学);Alibaba Cloud Intelligence Group(阿里巴巴云智能集团)