Datasets:
File size: 7,292 Bytes
e5a6320 5a2824d e5a6320 5a2824d e5a6320 5a2824d e5a6320 1e182c8 e5a6320 5a2824d e5a6320 1e182c8 e5a6320 5a2824d e5a6320 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | ---
configs:
- config_name: llmrouter_generic
data_files:
- split: train
path: llmrouter_generic/train.parquet
- split: test
path: llmrouter_generic/test.parquet
- config_name: memory_locomo
data_files:
- split: train
path: memory_locomo/train.parquet
- split: test
path: memory_locomo/test.parquet
- config_name: memory_longmemeval
data_files:
- split: train
path: memory_longmemeval/train.parquet
- split: test
path: memory_longmemeval/test.parquet
- config_name: timeseries
data_files:
- split: train
path: timeseries/train.parquet
- split: test
path: timeseries/test.parquet
- config_name: video
data_files:
- split: train
path: video/train.parquet
- split: test
path: video/test.parquet
- config_name: multimodal_geometry3k
data_files:
- split: train
path: multimodal_geometry3k/train.parquet
- split: test
path: multimodal_geometry3k/test.parquet
- config_name: multimodal_mathvista
data_files:
- split: train
path: multimodal_mathvista/train.parquet
- split: test
path: multimodal_mathvista/test.parquet
- config_name: personalized
data_files:
- split: train
path: personalized/train.parquet
- split: test
path: personalized/test.parquet
- config_name: llm_candidates
data_files:
- split: train
path: llm_candidates/train.parquet
- config_name: llmrouter_generic_queries
data_files:
- split: train
path: llmrouter_generic_queries/train.parquet
- split: valid
path: llmrouter_generic_queries/valid.parquet
- split: test
path: llmrouter_generic_queries/test.parquet
- config_name: memory_locomo_queries
data_files:
- split: train
path: memory_locomo_queries/train.parquet
- split: valid
path: memory_locomo_queries/valid.parquet
- split: test
path: memory_locomo_queries/test.parquet
- config_name: memory_longmemeval_queries
data_files:
- split: train
path: memory_longmemeval_queries/train.parquet
- split: valid
path: memory_longmemeval_queries/valid.parquet
- split: test
path: memory_longmemeval_queries/test.parquet
- config_name: timeseries_queries
data_files:
- split: train
path: timeseries_queries/train.parquet
- split: valid
path: timeseries_queries/valid.parquet
- split: test
path: timeseries_queries/test.parquet
- config_name: video_queries
data_files:
- split: train
path: video_queries/train.parquet
- split: valid
path: video_queries/valid.parquet
- split: test
path: video_queries/test.parquet
- config_name: multimodal_geometry3k_queries
data_files:
- split: train
path: multimodal_geometry3k_queries/train.parquet
- split: valid
path: multimodal_geometry3k_queries/valid.parquet
- split: test
path: multimodal_geometry3k_queries/test.parquet
- config_name: multimodal_mathvista_queries
data_files:
- split: train
path: multimodal_mathvista_queries/train.parquet
- split: valid
path: multimodal_mathvista_queries/valid.parquet
- split: test
path: multimodal_mathvista_queries/test.parquet
- config_name: personalized_queries
data_files:
- split: train
path: personalized_queries/train.parquet
- split: valid
path: personalized_queries/valid.parquet
- split: test
path: personalized_queries/test.parquet
language:
- en
task_categories:
- text-generation
tags:
- llm-routing
- model-selection
- benchmark
pretty_name: xRouteBench
---
# 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)
| Config | Domain | Train rows / queries | Test rows / queries | Metric |
|---|---|---|---|---|
| `llmrouter_generic` | 13 classic NLP benchmarks (MMLU, GSM8K, MATH, MBPP, ARC, …) | 80,802 / 4,487 | 67,122 / 3,729 | em_mc, GSM8K, MATH, code_eval, f1 |
| `memory_locomo` | Long-conversation memory QA (RAG top-k=5) | 15,930 / 885 | 5,652 / 314 | f1 |
| `memory_longmemeval` | Long-term memory eval (RAG top-k=5) | 4,986 / 277 | 1,818 / 101 | f1 |
| `timeseries` | Time-series understanding (7 sub-tasks) | 17,568 / 976 | 2,286 / 127 | mc |
| `video` | Egocentric video QA (Charades-Ego) | 3,618 / 201 | 486 / 27 | em |
| `multimodal_geometry3k` | Geometry math (multimodal) | 8,640 / 480 | 1,098 / 61 | em |
| `multimodal_mathvista` | Visual math reasoning | 14,400 / 800 | 1,800 / 100 | em, em_mc |
| `personalized` | Personalized preference (LLM-judge; chat-format queries) | 2,464 / 2,235 | 308 / 303 | llm_judge |
| `llm_candidates` | The 18-model candidate pool with pricing | 18 models | — | — |
## Schema (routing data)
Each row = one (query, candidate model) pair:
| Field | Type | Description |
|---|---|---|
| `task_name` | str | Sub-task the query belongs to (e.g. `gsm8k`, `mbpp`) |
| `query` | str | Full input prompt (personalized: JSON-encoded chat messages) |
| `ground_truth` | list/str | Reference answer(s) |
| `metric` | str | Scoring metric for this row |
| `choices` | str | Options for multiple-choice items (JSON-encoded) |
| `task_id` | str | ID within the sub-task |
| `model_name` | str | Candidate LLM this row was executed with |
| `response` | str | The model's actual response |
| `token_num` | int | Total tokens |
| `input_tokens` / `output_tokens` | int | Token breakdown (for price computation) |
| `response_time` | float | Latency in seconds |
| `performance` | float | Task score of this model on this query (0–1) |
| `embedding_id` | int | Index 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
```python
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)
```
## 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.
|