ulab-ai/xRouteBench

Dataset

7

stars

9

commits

1

linked in READMEs

Aug 15, 2026

updated

benchmark
llm-routing
model-selection

README

xRouteBench — LLM Routing Benchmark

xRouteBench is a benchmark for training and evaluating LLM routers — systems that pick the best LLM from a candidate pool for each incoming query, trading off performance vs. price cost.

Every query in each scenario was executed against all 18 candidate LLMs, recording each model's response, task performance, token usage, and latency. A router learns from the train split which model to pick, and is evaluated on test.

Scenarios (configs)

ConfigDomainTrain rows / queriesTest rows / queriesMetric
llmrouter_generic13 classic NLP benchmarks (MMLU, GSM8K, MATH, MBPP, ARC, …)80,802 / 4,48767,122 / 3,729em_mc, GSM8K, MATH, code_eval, f1
memory_locomoLong-conversation memory QA (RAG top-k=5)15,930 / 8855,652 / 314f1
memory_longmemevalLong-term memory eval (RAG top-k=5)4,986 / 2771,818 / 101f1
timeseriesTime-series understanding (7 sub-tasks)17,568 / 9762,286 / 127mc
videoEgocentric video QA (Charades-Ego)3,618 / 201486 / 27em
multimodal_geometry3kGeometry math (multimodal)8,640 / 4801,098 / 61em
multimodal_mathvistaVisual math reasoning14,400 / 8001,800 / 100em, em_mc
personalizedPersonalized preference (LLM-judge; chat-format queries)2,464 / 2,235308 / 303llm_judge
llm_candidatesThe 18-model candidate pool with pricing18 models

Schema (routing data)

Each row = one (query, candidate model) pair:

FieldTypeDescription
task_namestrSub-task the query belongs to (e.g. gsm8k, mbpp)
querystrFull input prompt (personalized: JSON-encoded chat messages)
ground_truthlist/strReference answer(s)
metricstrScoring metric for this row
choicesstrOptions for multiple-choice items (JSON-encoded)
task_idstrID within the sub-task
model_namestrCandidate LLM this row was executed with
responsestrThe model's actual response
token_numintTotal tokens
input_tokens / output_tokensintToken breakdown (for price computation)
response_timefloatLatency in seconds
performancefloatTask score of this model on this query (0–1)
embedding_idintIndex into precomputed query-embedding files (not included here)

Raw query configs (*_queries)

Each scenario also ships its raw query set (no model executions) as a <scenario>_queries config with train / valid / test splits — use these to run your own candidate models from scratch. Fields: task_name, query, ground_truth, metric, choices, task_id (+ conversation_id/category for the memory scenarios). The memory queries are the RAG top-k=5 turn-pair variant used in the published experiments. Note: the valid split exists only here; the routing-data configs have train/test.

Candidate pool & pricing (llm_candidates config)

18 models spanning $0.05–$1.25 per 1M input tokens (25× spread) served via Together AI / NVIDIA NIM. Row cost = input_tokens × input_price/1e6 + output_tokens × output_price/1e6.

Usage

from datasets import load_dataset

ds = load_dataset("ulab-ai/xRouteBench", "llmrouter_generic")   # any config name above
train, test = ds["train"], ds["test"]

pricing = load_dataset("ulab-ai/xRouteBench", "llm_candidates")["train"]

Composite reward for cost-aware routing (GraphRouter-style):

reward = α · norm(performance) − β · norm(price_cost)

💻 Code

The official implementation of LLMRouter, including router implementations, training and evaluation pipelines, and utilities for working with xRouteBench, is available on GitHub:

👉 ulab-uiuc/LLMRouter

Notes

  • Query embeddings (.pt) are not included; they can be regenerated from the query field with any sentence encoder.
  • The memory scenarios use the RAG top-k=5 turn-pair context variant.

📚 Citation

If you find xRouteBench useful for your research or projects, please cite it as:

@article{feng2026llmrouter,
  title={LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers},
  author={Feng, Tao and Yu, Fangxu and Zhang, Haozhen and Dai, Zhongjie and Yuan, Liangqi and Lei, Zijie and Zhang, Weizhi and Zhu, Kunlun and Yue, Haodong and Xuan, Keyang and others},
  journal={arXiv preprint arXiv:2608.06867},
  year={2026}
}

Contributors

taofeng

9 commits

ulab-ai/xRouteBench

Dataset

7

stars

9

commits

1

linked in READMEs

Aug 15, 2026

updated

benchmark
llm-routing
model-selection

README

xRouteBench — LLM Routing Benchmark

xRouteBench is a benchmark for training and evaluating LLM routers — systems that pick the best LLM from a candidate pool for each incoming query, trading off performance vs. price cost.

Every query in each scenario was executed against all 18 candidate LLMs, recording each model's response, task performance, token usage, and latency. A router learns from the train split which model to pick, and is evaluated on test.

Scenarios (configs)

ConfigDomainTrain rows / queriesTest rows / queriesMetric
llmrouter_generic13 classic NLP benchmarks (MMLU, GSM8K, MATH, MBPP, ARC, …)80,802 / 4,48767,122 / 3,729em_mc, GSM8K, MATH, code_eval, f1
memory_locomoLong-conversation memory QA (RAG top-k=5)15,930 / 8855,652 / 314f1
memory_longmemevalLong-term memory eval (RAG top-k=5)4,986 / 2771,818 / 101f1
timeseriesTime-series understanding (7 sub-tasks)17,568 / 9762,286 / 127mc
videoEgocentric video QA (Charades-Ego)3,618 / 201486 / 27em
multimodal_geometry3kGeometry math (multimodal)8,640 / 4801,098 / 61em
multimodal_mathvistaVisual math reasoning14,400 / 8001,800 / 100em, em_mc
personalizedPersonalized preference (LLM-judge; chat-format queries)2,464 / 2,235308 / 303llm_judge
llm_candidatesThe 18-model candidate pool with pricing18 models

Schema (routing data)

Each row = one (query, candidate model) pair:

FieldTypeDescription
task_namestrSub-task the query belongs to (e.g. gsm8k, mbpp)
querystrFull input prompt (personalized: JSON-encoded chat messages)
ground_truthlist/strReference answer(s)
metricstrScoring metric for this row
choicesstrOptions for multiple-choice items (JSON-encoded)
task_idstrID within the sub-task
model_namestrCandidate LLM this row was executed with
responsestrThe model's actual response
token_numintTotal tokens
input_tokens / output_tokensintToken breakdown (for price computation)
response_timefloatLatency in seconds
performancefloatTask score of this model on this query (0–1)
embedding_idintIndex into precomputed query-embedding files (not included here)

Raw query configs (*_queries)

Each scenario also ships its raw query set (no model executions) as a <scenario>_queries config with train / valid / test splits — use these to run your own candidate models from scratch. Fields: task_name, query, ground_truth, metric, choices, task_id (+ conversation_id/category for the memory scenarios). The memory queries are the RAG top-k=5 turn-pair variant used in the published experiments. Note: the valid split exists only here; the routing-data configs have train/test.

Candidate pool & pricing (llm_candidates config)

18 models spanning $0.05–$1.25 per 1M input tokens (25× spread) served via Together AI / NVIDIA NIM. Row cost = input_tokens × input_price/1e6 + output_tokens × output_price/1e6.

Usage

from datasets import load_dataset

ds = load_dataset("ulab-ai/xRouteBench", "llmrouter_generic")   # any config name above
train, test = ds["train"], ds["test"]

pricing = load_dataset("ulab-ai/xRouteBench", "llm_candidates")["train"]

Composite reward for cost-aware routing (GraphRouter-style):

reward = α · norm(performance) − β · norm(price_cost)

💻 Code

The official implementation of LLMRouter, including router implementations, training and evaluation pipelines, and utilities for working with xRouteBench, is available on GitHub:

👉 ulab-uiuc/LLMRouter

Notes

  • Query embeddings (.pt) are not included; they can be regenerated from the query field with any sentence encoder.
  • The memory scenarios use the RAG top-k=5 turn-pair context variant.

📚 Citation

If you find xRouteBench useful for your research or projects, please cite it as:

@article{feng2026llmrouter,
  title={LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers},
  author={Feng, Tao and Yu, Fangxu and Zhang, Haozhen and Dai, Zhongjie and Yuan, Liangqi and Lei, Zijie and Zhang, Weizhi and Zhu, Kunlun and Yue, Haodong and Xuan, Keyang and others},
  journal={arXiv preprint arXiv:2608.06867},
  year={2026}
}

Contributors

taofeng

9 commits