CARROT: A Cost Aware Rate Optimal Router

Seamus Somerstep, Felipe Maia Polo, Allysson Flavio Melo de Oliveira, Prattyush Mangal, Mírian Silva +3 more
2/5/2025
stat.MLcs.LGcs.NI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

With the rapid growth in the number of Large Language Models (LLMs), there has been a recent interest in LLM routing, or directing queries to the cheapest LLM that can deliver a suitable response. We conduct a minimax analysis of the routing problem, providing a lower bound and finding that a simple router that predicts both cost and accuracy for each question can be minimax optimal.

Show full abstract

Inspired by this, we introduce CARROT, a Cost AwaRe Rate Optimal rouTer that selects a model based on estimates of the models' cost and performance. Alongside CARROT, we also introduce the Smart Price-aware ROUTing (SPROUT) dataset to facilitate routing on a wide spectrum of queries with the latest state-of-the-art LLMs. Using SPROUT and prior benchmarks such as Routerbench and open-LLM-leaderboard-v2 we empirically validate CARROT's performance against several alternative routers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{somerstep2025carrot,
  title  = {CARROT: A Cost Aware Rate Optimal Router},
  author = {Seamus Somerstep and Felipe Maia Polo and Allysson Flavio Melo de Oliveira and Prattyush Mangal and Mírian Silva and Onkar Bhardwaj and Mikhail Yurochkin and Subha Maity},
  year   = {2025},
  eprint = {2502.03261},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.03261v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.03261.svg)](https://codeofpaper.com/paper/2502.03261)

Discussion