AutoMix optimizes computational cost and performance by strategically routing queries to larger language models based on self-verification.