CARGO: A Framework for Confidence-Aware Routing of Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Barrak, Amine, Fourati, Yosr, Olchawa, Michael, Ksontini, Emna, Zoghlami, Khalil
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916956231172096
author Barrak, Amine
Fourati, Yosr
Olchawa, Michael
Ksontini, Emna
Zoghlami, Khalil
author_facet Barrak, Amine
Fourati, Yosr
Olchawa, Michael
Ksontini, Emna
Zoghlami, Khalil
contents As large language models (LLMs) proliferate in scale, specialization, and latency profiles, the challenge of routing user prompts to the most appropriate model has become increasingly critical for balancing performance and cost. We introduce CARGO (Category-Aware Routing with Gap-based Optimization), a lightweight, confidence-aware framework for dynamic LLM selection. CARGO employs a single embedding-based regressor trained on LLM-judged pairwise comparisons to predict model performance, with an optional binary classifier invoked when predictions are uncertain. This two-stage design enables precise, cost-aware routing without the need for human-annotated supervision. To capture domain-specific behavior, CARGO also supports category-specific regressors trained across five task groups: mathematics, coding, reasoning, summarization, and creative writing. Evaluated on four competitive LLMs (GPT-4o, Claude 3.5 Sonnet, DeepSeek V3, and Perplexity Sonar), CARGO achieves a top-1 routing accuracy of 76.4% and win rates ranging from 72% to 89% against individual experts. These results demonstrate that confidence-guided, lightweight routing can achieve expert-level performance with minimal overhead, offering a practical solution for real-world, multi-model LLM deployments.
format Preprint
id arxiv_https___arxiv_org_abs_2509_14899
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CARGO: A Framework for Confidence-Aware Routing of Large Language Models
Barrak, Amine
Fourati, Yosr
Olchawa, Michael
Ksontini, Emna
Zoghlami, Khalil
Software Engineering
Machine Learning
As large language models (LLMs) proliferate in scale, specialization, and latency profiles, the challenge of routing user prompts to the most appropriate model has become increasingly critical for balancing performance and cost. We introduce CARGO (Category-Aware Routing with Gap-based Optimization), a lightweight, confidence-aware framework for dynamic LLM selection. CARGO employs a single embedding-based regressor trained on LLM-judged pairwise comparisons to predict model performance, with an optional binary classifier invoked when predictions are uncertain. This two-stage design enables precise, cost-aware routing without the need for human-annotated supervision. To capture domain-specific behavior, CARGO also supports category-specific regressors trained across five task groups: mathematics, coding, reasoning, summarization, and creative writing. Evaluated on four competitive LLMs (GPT-4o, Claude 3.5 Sonnet, DeepSeek V3, and Perplexity Sonar), CARGO achieves a top-1 routing accuracy of 76.4% and win rates ranging from 72% to 89% against individual experts. These results demonstrate that confidence-guided, lightweight routing can achieve expert-level performance with minimal overhead, offering a practical solution for real-world, multi-model LLM deployments.
title CARGO: A Framework for Confidence-Aware Routing of Large Language Models
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2509.14899