LLMRouterBench: LLM 라우팅을 위한 대규모 벤치마크 및 통합 프레임워크
LLMRouterBench: A Massive Benchmark and Unified Framework for LLM Routing
TL;DR Highlight
여러 LLM 중 쿼리별 최적 모델을 고르는 '라우팅' 기법 10종을 40만 건으로 통합 평가했더니, 최신 상용 라우터조차 단순 최강 단일 모델보다 성능이 낮았다.
Who Should Read
GPT-5 같은 비싼 모델 호출 비용을 줄이기 위해 쿼리 유형별로 적합한 LLM을 자동 배정하는 라우팅 시스템을 고민하는 ML 엔지니어나 백엔드 개발자. 여러 LLM API를 조합해 쓰는 프로덕션 시스템을 운영 중인 팀.
Core Mechanics
- 수학은 Qwen3-8B·Intern-S1-mini, 코드는 Qwen-Coder·Fin-R1이 강하듯 모델마다 잘하는 도메인이 달라서 라우팅의 전제(모델 상호보완성)는 실제로 유효함
- 동일 조건으로 평가하면 EmbedLLM·GraphRouter·MODEL-SAT·Avengers 등 상위 라우터들의 성능 차이가 거의 없고, 심지어 신경망 학습 없는 클러스터링 기반 Avengers도 동급 성능
- 상용 라우터 OpenRouter는 Best Single 모델(GPT-5) 대비 정확도가 오히려 24.7% 낮음 — 복잡한 라우터가 단순 전략을 항상 이기지는 않음
- 현재 라우터와 Oracle(이상적 선택) 사이의 큰 성능 갭은 '오직 한 모델만 정답을 아는 희귀한 쿼리'를 잡아내지 못하는 model-recall failure가 주원인
- 임베딩 모델을 22M짜리 all-MiniLM으로 바꿔도 라우팅 성능 차이가 미미 — 더 좋은 임베딩을 쓰는 게 병목이 아님
- 모델 풀을 무작정 늘리면 수익 체감이 발생하고, 잘 고른 소수 모델 조합이 무작위 대규모 풀을 능가함
Evidence
- OpenRouter 상용 라우터가 Best Single(GPT-5) 대비 PerfGain -24.7% — 더 큰 모델 풀을 쓰고도 단일 모델보다 나쁜 결과
- Avengers-Pro(클러스터링 기반)는 Best Single 대비 최대 +4% 정확도 향상 및 31.7% 비용 절감 동시 달성, ParetoDist ≈ 0.001로 Pareto 최전선에 근접
- 정답 모델이 3개 이하인 어려운 쿼리(전체의 11.9%, 410개)에서 Avengers 24.6%, EmbedLLM 23.2%의 낮은 정확도 — 희귀 전문가 모델 탐지 실패가 핵심 병목
- gte-qwen2-7B(7B) → all-MiniLM-L6-v2(22.7M)로 임베딩 모델 교체 시 GraphRouter·EmbedLLM·Avengers 모두 성능 변화 미미 (70.29→68.05, 71.24→70.95, 71.94→71.03)
How to Apply
- 여러 LLM API를 쓰는 시스템이라면 Avengers-Pro처럼 쿼리를 k-means(k=64)로 클러스터링하고 클러스터별 최적 모델을 배정하는 방식을 먼저 시도해볼 것 — 신경망 학습 없이도 상위권 성능을 낼 수 있음
- 비용 절감이 목표라면 무조건 많은 모델을 풀에 넣지 말고, 도메인별 top-k 모델만 선별해 작은 풀을 구성하는 게 더 효율적 — 모델 추가보다 curation이 우선
- 자체 라우터를 평가할 때 Best Single(단일 최강 모델)을 베이스라인으로 삼고, 이를 못 이기면 라우팅 효과가 없다고 판단할 것 — LLMRouterBench의 21개 데이터셋 기준 공개 코드로 재현 가능
Code Example
# Avengers-Pro 스타일 클러스터링 라우터 (간략 구현)
from sklearn.cluster import KMeans
from sentence_transformers import SentenceTransformer
import numpy as np
class ClusteringRouter:
def __init__(self, model_pool, k=64, embed_model='all-MiniLM-L6-v2'):
self.model_pool = model_pool # {'gpt-5': client_gpt5, 'qwen3-235b': client_qwen, ...}
self.k = k
self.embedder = SentenceTransformer(embed_model) # 임베딩 모델 품질은 큰 영향 없음
self.kmeans = None
self.cluster_to_model = {} # 클러스터별 최적 모델 매핑
def fit(self, train_queries, train_labels):
"""train_labels: {query_i: {'gpt-5': correct, 'qwen3-235b': correct, ...}}"""
embeddings = self.embedder.encode(train_queries)
self.kmeans = KMeans(n_clusters=self.k, random_state=42)
cluster_ids = self.kmeans.fit_predict(embeddings)
# 각 클러스터에서 정확도 가장 높은 모델 선택
for c in range(self.k):
idxs = np.where(cluster_ids == c)[0]
scores = {m: np.mean([train_labels[i].get(m, 0) for i in idxs])
for m in self.model_pool}
self.cluster_to_model[c] = max(scores, key=scores.get)
def route(self, query, alpha=0.7):
"""alpha: 성능 계수 (1.0=성능 최우선, 0.0=비용 최우선)"""
emb = self.embedder.encode([query])
cluster = self.kmeans.predict(emb)[0]
return self.cluster_to_model[cluster]
# 사용 예시
# router = ClusteringRouter(model_pool={'gpt-5': ..., 'qwen3-235b': ..., 'gemini-flash': ...})
# router.fit(train_queries, train_labels)
# best_model = router.route('Prove that sqrt(2) is irrational')Terminology
Related Resources
Original Abstract (Expand)
Large language model (LLM) routing assigns each query to the most suitable model from an ensemble. We introduce LLMRouterBench, a large-scale benchmark and unified framework for LLM routing. It comprises over 400K instances from 21 datasets and 33 models. Moreover, it provides comprehensive metrics for both performance-oriented routing and performance-cost trade-off routing, and integrates 10 representative routing baselines. Using LLMRouterBench, we systematically re-evaluate the field. While confirming strong model complementarity-the central premise of LLM routing-we find that many routing methods exhibit similar performance under unified evaluation, and several recent approaches, including commercial routers, fail to reliably outperform a simple baseline. Meanwhile, a substantial gap remains to the Oracle, driven primarily by persistent model-recall failures. We further show that backbone embedding models have limited impact, that larger ensembles exhibit diminishing returns compared to careful model curation, and that the benchmark also enables latency-aware analysis. All code and data are available at https://github.com/ynulihao/LLMRouterBench.