ThriftLLM: On Cost-Effective Selection of Large Language Models for Classification Queries
Keke Huang, Yimin Shi, Dujian Ding, Yifei Li, Yang Fei, Laks V. S. Lakshmanan, Xiaokui Xiao
Abstract
Recently, large language models (LLMs) have demonstrated remarkable capabilities in understanding and generating natural language content, attracting widespread attention in both industry and academia. An increasing number of services offer LLMs for various tasks via APIs. Different LLMs demonstrate expertise in different domains of queries (e.g., text classification queries). Meanwhile, LLMs of different scales, complexities, and performance are priced diversely. Driven by this, several researchers are investigating strategies for selecting an ensemble of LLMs, aiming to decrease overall usage costs while enhancing performance. However, to our best knowledge, none of the existing works addresses the problem, how to find an LLM ensemble subject to a cost budget, which maximizes the ensemble performance with guarantees. In this paper, we formalize the performance of an ensemble of models (LLMs) using the notion of correctness probability, which we formally define. We develop an approach for aggregating responses from multiple LLMs to enhance ensemble performance. Building on this, we formulate the Optimal Ensemble Selection (OES) problem of selecting a set of LLMs subject to a cost budget that maximizes the overall correctness probability. We show that the correctness probability function is non-decreasing and non-submodular and provide evidence that the OES problem is likely to be NP-hard. By leveraging a submodular function that upper bounds correctness probability, we develop an algorithm, ThriftLLM, and prove that it achieves an instance-dependent approximation guarantee with high probability. Our framework functions as a data processing system that selects appropriate LLM operators to deliver high-quality results under budget constraints. It achieves state-of-the-art performance for text classification and entity matching queries on multiple real-world datasets against various baselines in our extensive experimental evaluation, while using a relatively lower cost budget, strongly supporting the effectiveness and superiority of our method.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext cb426c14-8df6-4d5e-af8b-3327ea94e7d0Cited by top-tier papers6
- Causal LLM Routing: End-to-End Regret Minimization from Observational DataAsterios Tsiourvas, Wei Sun, Georgia PerakisNeurIPS 2025 · 27 citations
- Featurized-Decomposition Join: Low-Cost Semantic Joins with GuaranteesSepanta Zeighami, Shreya Shankar, Aditya G. ParameswaranVLDB 2026 · 11 citations
- Task Cascades for Efficient Unstructured Data ProcessingShreya Shankar, Sepanta Zeighami, Aditya G. ParameswaranSIGMOD 2026 · 7 citations
- Cut Costs, Not Accuracy: LLM-Powered Data Processing with GuaranteesSepanta Zeighami, Shreya Shankar, Aditya G. ParameswaranSIGMOD 2026 · 1 citation
- Adaptive Graph Refinement and Label Propagation with LLMs for Cost-Effective Entity ResolutionHongtao Wang, Renchi Yang, Haoran Zheng, Xiangyu KeKDD 2026 · 1 citation
Builds on12
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
- Deep Entity Matching with Pre-Trained Language ModelsYuliang Li, Jinfeng Li, Yoshihiko Suhara, AnHai Doan et al.VLDB 2021 · 484 citations
- Hybrid LLM: Cost-Efficient and Quality-Aware Query RoutingDujian Ding, Ankur Mallick, Chi Wang, Robert Sim et al.ICLR 2024 · 282 citations
- Creating Embeddings of Heterogeneous Relational Datasets for Data Integration TasksRiccardo Cappuzzo, Paolo Papotti, Saravanan ThirumuruganathanSIGMOD 2020 · 139 citations
- LLM-Blender: Ensembling Large Language Models with Pairwise Ranking and Generative FusionDongfu Jiang, Xiang Ren, Bill Yuchen LinACL 2023 · 95 citations
Related papers
- Balancing Information Accuracy and Response Timeliness in Networked LLMsYigit Turkmen, Baturalp Buyukates, Melih BastopcuINFOCOM 2026
- MESS+: Dynamically Learned Inference-Time LLM Routing in Model Zoos with Service Level GuaranteesHerbert Woisetschläger, Ryan Zhang, Shiqiang Wang, Hans-Arno JacobsenNeurIPS 2025 · 11 citations
- OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification InferenceDujian Ding, Bicheng Xu, Laks V. S. LakshmananICLR 2025
- SkillAggregation: Reference-free LLM-Dependent AggregationGuangzhi Sun, Anmol Kagrecha, Potsawee Manakul, Philip C. Woodland et al.ACL 2025 · 5 citations
- Large Language Model-Enhanced Multi-Armed BanditsJiahang Sun, Zhiyong Wang, Runhan Yang, Chenjun Xiao et al.ACL 2026 · 6 citations
