OptLLM: Optimal Assignment of Queries to Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have garnered considerable attention owing to their remarkable capabilities, leading to an increasing number of companies offering LLMs as services. Different LLMs achieve different performance at different costs. A challenge for users lies in choosing the LLMs that best fit their needs, balancing cost and performance. In this paper, we propose a framework for addressing the cost-effective query allocation problem for LLMs. Given a set of input queries and candidate LLMs, our framework, named OptLLM, provides users with a range of optimal solutions to choose from, aligning with their budget constraints and performance preferences, including options for maximizing accuracy and minimizing cost. OptLLM predicts the performance of candidate LLMs on each query using a multi-label classification model with uncertainty estimation and then iteratively generates a set of non-dominated solutions by destructing and reconstructing the current solution. To evaluate the effectiveness of OptLLM, we conduct extensive experiments on various types of tasks, including text classification, question answering, sentiment analysis, reasoning, and log parsing. Our experimental results demonstrate that OptLLM substantially reduces costs by 2.40% to 49.18% while achieving the same accuracy as the best LLM. Compared to other multi-objective optimization algorithms, OptLLM improves accuracy by 2.94% to 69.05% at the same cost or saves costs by 8.79% and 95.87% while maintaining the highest attainable accuracy.
Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Builds on 23 of its 45 references that are in the map. First posted on arXiv 24 May 2024.
Builds on
23 of 45 references.
References · 23
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2024Mixtral of Expertscited by 1,823
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
- 2017Crowdsourcing Multiple Choice Science Questionscited by 765
- 2018CoQA: A Conversational Question Answering Challengecited by 683
11 more
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2020pymoo: Multi-objective Optimization in Pythoncited by 200
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 110
- 2023Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modelingcited by 95
- 2020Impact of News on the Commodity Market: Dataset and Resultscited by 80
- 2018Tools and Benchmarks for Automated Log Parsingcited by 56
- 2023Log Parsing: How Far Can ChatGPT Go?cited by 16
- 2023Which Model Shall I Choose? Cost/Quality Trade-offs for Text Classification Taskscited by 4
- 2017Beyond Evolutionary Algorithms for Search-based Software Engineeringcited by 1
Built on by
Citing papers per year: 2024: 1; 2025: 9; 2026: 6.
16 papers.
Sort:
By area:
- 2024A Unified Approach to Routing and Cascading for LLMscited by 80
- 2025RouterArena: An Open Platform for Comprehensive Comparison of LLM Routerscited by 22
- 2025Doing More with Less: A Survey on Routing Strategies for Resource Optimisation in Large Language Model-Based Systemscited by 20
- 2025Cost-Aware Contrastive Routing for LLMscited by 16
- 2025LLM Routing with Dueling Feedbackcited by 7
- 2025PPMI: Privacy-Preserving LLM Interaction with Socratic Chain-of-Thought Reasoning and Homomorphically Encrypted Vector Databasescited by 6
- 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniquescited by 5
- 2025One Head, Many Models: Cross-Attention Routing for Cost-Aware LLM Selectioncited by 4
- 2025CONCUR: A Framework for Continual Constrained and Unconstrained Routingcited by 1
- 2026ConsRoute:Consistency-Aware Adaptive Query Routing for Cloud-Edge-Device Large Language Modelscited by 1
- 2026LMEdge: QoS-Aware LLM Inference Orchestration on Edge Clusterscited by 1
- 2025Unsupervised Query Routing for Retrieval Augmented Generationcited by 0
4 more
- 2026KRONE: Scalable LLM-Augmented Log Anomaly Detection via Hierarchical Abstractioncited by 0
- 2026Expected Reward Prediction, with Applications to Model Routingcited by 0
- 2026RLCascadeRouter: Quality-Estimator-Free Cascade Routing via Reinforcement Learningcited by 0
- 2026DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environmentscited by 0
- 2026DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environments31 Aug 2026
- 2026RLCascadeRouter: Quality-Estimator-Free Cascade Routing via Reinforcement Learning16 Aug 2026
- 2026LMEdge: QoS-Aware LLM Inference Orchestration on Edge Clusters19 Jul 2026
- 2026ConsRoute:Consistency-Aware Adaptive Query Routing for Cloud-Edge-Device Large Language Models22 Mar 2026
- 2026Expected Reward Prediction, with Applications to Model Routing3 Mar 2026
- 2026KRONE: Scalable LLM-Augmented Log Anomaly Detection via Hierarchical Abstraction7 Feb 2026
- 2025CONCUR: A Framework for Continual Constrained and Unconstrained Routing10 Dec 2025
- 2025LLM Routing with Dueling Feedback1 Oct 2025
- 2025RouterArena: An Open Platform for Comprehensive Comparison of LLM Routers30 Sep 2025
- 2025One Head, Many Models: Cross-Attention Routing for Cost-Aware LLM Selection11 Sep 2025
- 2025Cost-Aware Contrastive Routing for LLMs17 Aug 2025
- 2025PPMI: Privacy-Preserving LLM Interaction with Socratic Chain-of-Thought Reasoning and Homomorphically Encrypted Vector Databases19 Jun 2025
4 more
- 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniques6 Jun 2025
- 2025Doing More with Less: A Survey on Routing Strategies for Resource Optimisation in Large Language Model-Based Systems1 Feb 2025
- 2025Unsupervised Query Routing for Retrieval Augmented Generation14 Jan 2025
- 2024A Unified Approach to Routing and Cascading for LLMs14 Oct 2024
- 2024A Unified Approach to Routing and Cascading for LLMscited by 80
- 2024A Unified Approach to Routing and Cascading for LLMs14 Oct 2024
- 2025RouterArena: An Open Platform for Comprehensive Comparison of LLM Routerscited by 22
- 2025Doing More with Less: A Survey on Routing Strategies for Resource Optimisation in Large Language Model-Based Systemscited by 20
- 2025Cost-Aware Contrastive Routing for LLMscited by 16
- 2025LLM Routing with Dueling Feedbackcited by 7
- 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniquescited by 5
- 2025One Head, Many Models: Cross-Attention Routing for Cost-Aware LLM Selectioncited by 4
- 2025CONCUR: A Framework for Continual Constrained and Unconstrained Routingcited by 1
- 2026ConsRoute:Consistency-Aware Adaptive Query Routing for Cloud-Edge-Device Large Language Modelscited by 1
- 2026LMEdge: QoS-Aware LLM Inference Orchestration on Edge Clusterscited by 1
- 2026KRONE: Scalable LLM-Augmented Log Anomaly Detection via Hierarchical Abstractioncited by 0
- 2026DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environmentscited by 0
- 2026DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environments31 Aug 2026
- 2026LMEdge: QoS-Aware LLM Inference Orchestration on Edge Clusters19 Jul 2026
- 2026ConsRoute:Consistency-Aware Adaptive Query Routing for Cloud-Edge-Device Large Language Models22 Mar 2026
- 2026KRONE: Scalable LLM-Augmented Log Anomaly Detection via Hierarchical Abstraction7 Feb 2026
- 2025CONCUR: A Framework for Continual Constrained and Unconstrained Routing10 Dec 2025
- 2025LLM Routing with Dueling Feedback1 Oct 2025
- 2025RouterArena: An Open Platform for Comprehensive Comparison of LLM Routers30 Sep 2025
- 2025One Head, Many Models: Cross-Attention Routing for Cost-Aware LLM Selection11 Sep 2025
- 2025Cost-Aware Contrastive Routing for LLMs17 Aug 2025
- 2025Towards Efficient Multi-LLM Inference: Characterization and Analysis of LLM Routing and Hierarchical Techniques6 Jun 2025
- 2025Doing More with Less: A Survey on Routing Strategies for Resource Optimisation in Large Language Model-Based Systems1 Feb 2025