English

Multi-LLM Query Optimization

Data Structures and Algorithms 2026-03-27 v1 Machine Learning Optimization and Control

Abstract

Deploying multiple large language models (LLMs) in parallel to classify an unknown ground-truth label is a common practice, yet the problem of optimally allocating queries across heterogeneous models remains poorly understood. In this paper, we formulate a robust, offline query-planning problem that minimizes total query cost subject to statewise error constraints which guarantee reliability for every possible ground-truth label. We first establish that this problem is NP-hard via a reduction from the minimum-weight set cover problem. To overcome this intractability, we develop a surrogate by combining a union bound decomposition of the multi-class error into pairwise comparisons with Chernoff-type concentration bounds. The resulting surrogate admits a closed-form, multiplicatively separable expression in the query counts and is guaranteed to be feasibility-preserving. We further show that the surrogate is asymptotically tight at the optimization level: the ratio of surrogate-optimal cost to true optimal cost converges to one as error tolerances shrink, with an explicit rate of O(loglog(1/αmin)/log(1/αmin))O\left(\log\log(1/\alpha_{\min}) / \log(1/\alpha_{\min})\right). Finally, we design an asymptotic fully polynomial-time approximation scheme (AFPTAS) that returns a surrogate-feasible query plan within a (1+ε)(1+\varepsilon) factor of the surrogate optimum.

Keywords

Cite

@article{arxiv.2603.24617,
  title  = {Multi-LLM Query Optimization},
  author = {Arlen Dean and Zijin Zhang and Stefanus Jasin and Yuqing Liu},
  journal= {arXiv preprint arXiv:2603.24617},
  year   = {2026}
}
R2 v1 2026-07-01T11:37:48.870Z