Lune

VLDB2025Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Adaptive Graph Refinement and Label Propagation with LLMs for Cost-Effective Entity Resolution cites Deep Entity Matching with Pre-Trained Language Models
  • Featurized-Decomposition Join: Low-Cost Semantic Joins with Guarantees cites Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guarantees
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Causal LLM Routing: End-to-End Regret Minimization from Observational DataAsterios Tsiourvas, Wei Sun, Georgia PerakisNeurIPS 2025 · 27 citations
  2. Featurized-Decomposition Join: Low-Cost Semantic Joins with GuaranteesSepanta Zeighami, Shreya Shankar, Aditya G. ParameswaranVLDB 2026 · 11 citations
  3. Task Cascades for Efficient Unstructured Data ProcessingShreya Shankar, Sepanta Zeighami, Aditya G. ParameswaranSIGMOD 2026 · 7 citations
  4. Cut Costs, Not Accuracy: LLM-Powered Data Processing with GuaranteesSepanta Zeighami, Shreya Shankar, Aditya G. ParameswaranSIGMOD 2026 · 1 citation
  5. Adaptive Graph Refinement and Label Propagation with LLMs for Cost-Effective Entity ResolutionHongtao Wang, Renchi Yang, Haoran Zheng, Xiangyu KeKDD 2026 · 1 citation

Builds on14

  1. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
  2. Deep Entity Matching with Pre-Trained Language ModelsYuliang Li, Jinfeng Li, Yoshihiko Suhara, AnHai Doan et al.VLDB 2021 · 484 citations
  3. Hybrid LLM: Cost-Efficient and Quality-Aware Query RoutingDujian Ding, Ankur Mallick, Chi Wang, Robert Sim et al.ICLR 2024 · 282 citations
  4. Text Classification via Large Language ModelsXiaofei Sun, Xiaoya Li, Jiwei Li, Fei Wu et al.EMNLP Findings 2023 · 218 citations
  5. Creating Embeddings of Heterogeneous Relational Datasets for Data Integration TasksRiccardo Cappuzzo, Paolo Papotti, Saravanan ThirumuruganathanSIGMOD 2020 · 139 citations

Related papers

  1. SkyLLM: Cross-LLM-APIs Federation for Cost-effective Query ProcessingHeng Zhao, Yifei ZhuACL Findings 2025 · 1 citation
  2. SelectLLM: Query-Aware Efficient Selection Algorithm for Large Language ModelsKaushal Kumar Maurya, KV Aditya Srivatsa, Ekaterina KochmarACL Findings 2025 · 4 citations
  3. Balancing Information Accuracy and Response Timeliness in Networked LLMsYigit Turkmen, Baturalp Buyukates, Melih BastopcuINFOCOM 2026
  4. 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
  5. OCCAM: Towards Cost-Efficient and Accuracy-Aware Classification InferenceDujian Ding, Bicheng Xu, Laks V. S. LakshmananICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines