AutoMix: Automatically Mixing Language Models
Pranjal Aggarwal, Aman Madaan, Ankit Anand, Srividya Pranavi Potharaju, Swaroop Mishra, Pei Zhou, Aditya Gupta, Dheeraj Rajagopal, Karthik Kappaganthu, Yiming Yang, Shyam Upadhyay, Manaal Faruqui, Mausam
TL;DR
AutoMix tackles the challenge of leveraging multiple black-box LLMs under budget constraints by combining a small-model solution, context-grounded few-shot self-verification, and two routing strategies (thresholding and a POMDP-based router). The key innovations are a verification signal framed as entailment and a principled router that handles noisy verifier outputs to route queries across $N$ models with differing costs and capabilities. The approach yields consistent cost-performance gains across five datasets and five models, supported by the ibc metric and geometric interpretation, and scales to three-model settings with robust improvements. AutoMix demonstrates significant practical impact by reducing inference costs while maintaining or improving performance, and it opens avenues for broader applicability with black-box LLM APIs and low-data regimes.
Abstract
Large language models (LLMs) are now available from cloud API providers in various sizes and configurations. While this diversity offers a broad spectrum of choices, effectively leveraging the options to optimize computational cost and performance remains challenging. In this work, we present Automix, an approach that strategically routes queries to larger LMs, based on the approximate correctness of outputs from a smaller LM. Central to Automix are two key technical contributions. First, it has a few-shot self-verification mechanism, which estimates the reliability of its own outputs without requiring extensive training. Second, given that self-verification can be noisy, it employs a POMDP based router that can effectively select an appropriately sized model, based on answer confidence. Experiments across five language models and five challenging datasets show that Automix consistently surpasses strong baselines, reducing computational cost by over 50% for comparable performance.
