DiSRouter: Distributed Self-Routing for LLM Selections
About
The proliferation of Large Language Models (LLMs) has created a diverse ecosystem of models with highly varying performance and costs, necessitating effective query routing to balance performance and expense. Current routing systems often rely on a centralized external router trained on a fixed set of LLMs, making them inflexible and prone to poor performance since the small router can not fully understand the knowledge boundaries of different LLMs. We introduce DiSRouter (Distributed Self-Router), a novel paradigm that shifts from centralized control to distributed routing. In DiSRouter, a query traverses a network of LLM agents, each independently deciding whether to answer or route to other agents based on its own self-awareness, its ability to judge its competence. This distributed design offers superior flexibility, scalability, and generalizability. To enable this, we propose a two-stage Self-Awareness Training pipeline that enhances each LLM's self-awareness. Extensive experiments demonstrate that DiSRouter significantly outperforms existing routing methods in utility across various scenarios, effectively distinguishes between easy and hard queries, and shows strong generalization to out-of-domain tasks. Our work validates that leveraging an LLM's intrinsic self-awareness is more effective than external assessment, paving the way for more modular and efficient multi-agent systems.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| LLM Routing | Heterogeneous four-agent system Gemma, Phi, Qwen (test) | Accuracy82 | 27 | |
| LLM Routing | OOD Datasets (test) | Accuracy75 | 11 | |
| LLM Query Routing | SQuAD, HellaSwag, and HeadQA (out-of-domain) | Accuracy74 | 11 | |
| LLM Routing | OOD | Accuracy69 | 11 | |
| LLM Routing | In-domain datasets Balance, alpha=0.5 | Accuracy83 | 11 | |
| LLM Routing | In-domain datasets Cost First, alpha=0.8 | Accuracy77 | 11 | |
| LLM Routing | In-domain datasets Performance First, alpha=0.2 | Accuracy84 | 11 | |
| LLM Routing | GPT series models Out of Domain | Accuracy61 | 8 | |
| LLM Routing | GPT series models (In Domain) | Accuracy84 | 8 | |
| System Latency Analysis | LLM Routing Evaluation Dataset | Average TTFT (s)0.081 | 6 |