AutoMix
Overview
automix is a selection algorithm that optimizes cost-quality tradeoff using POMDP (Partially Observable Markov Decision Process) based cascaded routing with self-verification.
It aligns to config/algorithm/selection/automix.yaml.
Paper: Automatically Mixing Language Models (NeurIPS 2024)
Key Advantages
- Routes to smaller/cheaper models first, escalates only when needed.
- Self-verification via entailment checking or logprob confidence.
- POMDP-based decision framework for optimal cost-quality routing.
- Supports particle filtering for belief state updates.
- Keeps verification behavior local to the decision that needs it.
Algorithm Principle
AutoMix implements a 3-step cascaded routing approach:
- Generate: Start with the smallest/cheapest model in
modelRefs. - Self-Verify: The same model verifies its own answer via entailment check or logprob analysis.
- Route: If verification confidence is below threshold, escalate to the next larger model.
The POMDP framework models the router's uncertainty about model capability as a belief state , which is updated via particle filtering after each interaction:
Where is the observation (verification result) and is the action (chosen model). The optimal policy maximizes: