ICL-Router: In-Context Learned Model Representations for LLM Routing

Chenxu Wang, Hao Li, Yiqun Zhang, Linyao Chen, Jianhao Chen, Ping Jian, Qiaosheng Zhang, Shuyue Hu

TL;DR

ICL-Router is a novel framework that dynamically routes user queries to the most capable LLM in a pool by representing model strengths as compact "in-context vectors." Unlike previous methods, it allows for the seamless, "plug-and-play" integration of new models without requiring the router to be retrained, while achieving state-of-the-art performance across both familiar and entirely new tasks.

What Problem Does This Paper Address?

The "Model Zoo" is expanding rapidly, and we’ve learned that no single Large Language Model (LLM) is the master of every domain. One model might excel at Python coding, while another is superior at symbolic logic or mathematical reasoning. Model Routing aims to harness these complementary strengths by directing each query to the best-suited model.

However, existing routers face two major hurdles:

  1. Scalability: Most routers are trained on a fixed set of models. If a new, better model is released tomorrow, you usually have to retrain the entire router from scratch.
  2. Representation: It is difficult to accurately represent a model's "capability profile" in a way that a router can understand and use to make split-second decisions.

The authors of ICL-Router aim to decouple model profiling from the routing logic, creating a system that is both more accurate and infinitely more adaptable.

Methods

ICL-Router consists of three components: an embedding model, a projector (a simple MLP), and an LLM-based router. The system is trained in two distinct stages:

  1. Stage 1: Query Reconstruction Training: To ensure the router understands the "language" of the embedding model, the authors co-train the projector and the router to reconstruct original text queries from their vector representations. This aligns the semantic space of the embeddings with the internal reasoning space of the router.
  2. Stage 2: ICL Model Routing Training: The core innovation lies here. For every model in the pool, the system creates a Capability Profile. This profile is a collection of "in-context vectors"—pairs consisting of a query's vector and a binary indicator of whether that specific model answered it correctly.

At inference time, the router receives the new query vector along with the capability profiles of all candidate models. It then predicts the probability of each model successfully answering the query and selects the one with the highest score. Because the router learns to reason over these profiles rather than specific model IDs, adding a new model only requires a quick evaluation on a small "anchor" query set to generate its profile—no retraining required.

Datasets

The researchers evaluated ICL-Router on 10 diverse benchmarks, split into two categories:

  • In-Distribution (ID): OlympiadBench, BBH (Big-Bench Hard), LogicBench, MMLUPro, and MBPP.
  • Out-of-Distribution (OOD): AIME, KORBench, MMLU-CF, AGIEval, and HumanEval.

To train the router effectively, they constructed a "Challenging Query Set" of 500 queries where only a subset of the model pool (1 to 4 out of 8 models) could provide the correct answer, forcing the router to learn subtle distinctions in capability.

Key Insights and Ideas

  • Performance as DNA: The paper treats a model's success/failure patterns on a diverse set of queries as a unique "capability profile." This is a much richer representation than simple text descriptions or category labels.
  • The Power of Alignment: The "Query Reconstruction" stage is vital. Without it, the router struggles to interpret the raw vectors coming from the embedding model. By forcing the router to "re-read" the query from the vector, it learns exactly what that vector represents semantically.
  • Diminishing Returns of Exemplars: Interestingly, the authors found that more data isn't always better. Routing performance peaked at around 500 in-context exemplars. Beyond that, the "noise" or redundancy in the capability profile actually began to slightly degrade performance.

Key Results

  • Superior Accuracy: On in-distribution tasks, ICL-Router achieved an average accuracy of 76.30%, outperforming the best single model in the pool (DeepSeek-R1-distill-Qwen-7B) by 7.2 absolute points.
  • Beating the Competition: It surpassed existing state-of-the-art routers like RouterDC and EmbedLLM by 3.9 and 2.2 points, respectively.
  • Robust Generalization: On OOD tasks (tasks the router never saw during training), it maintained a lead, scoring 66.47% average accuracy.
  • Scalability: As more models were added to the pool (e.g., integrating Falcon, Gemma 3, and AceReason), ICL-Router’s performance showed a consistent upward trajectory, whereas competing methods like MODEL-SAT showed inconsistent or fluctuating gains.

Limitations and Future Work

While impressive, the authors acknowledge a few constraints:

  • Model Size: The study primarily focused on a model pool of small-parameter LLMs (around the 7B-8B range). The dynamics might shift when routing between massive frontier models (100B+ parameters).
  • Task Variety: The benchmarks used are largely "objective" (math, logic, coding). The authors haven't yet explored how this routing logic applies to more subjective tasks like creative writing or open-ended chat.
  • Computational Overhead: While the routing tokens are few, using a 7B model as a router still adds some latency compared to much smaller, specialized classifiers.

Future work will likely involve testing the framework on larger model pools and exploring its utility in instruction-following and multi-turn dialogue scenarios.

Summary updated

BibTeX
@inproceedings{wang2026icl,
  author = {Chenxu Wang and Hao Li and Yiqun Zhang and Linyao Chen and Jianhao Chen and Ping Jian and Qiaosheng Zhang and Shuyue Hu},
  title = {{ICL-Router: In-Context Learned Model Representations for LLM Routing}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i39.40628},
}
Figure