Route by think, not just semantics: LLM routing via query cognition state
Abstract
Large Language Models (LLMs) exhibit highly heterogeneous capabilities across domains and tasks, making it increasingly important to route each query to the most cost-effective model that can answer it reliably. Existing LLM routers typically rely on textual or semantic representations of queries. However, semantic similarity does not necessarily imply routing similarity. Specifically, semantically similar queries may require substantially different capabilities, while semantically different queries may be best handled by the same model. In fact, humans typically form an internal understanding of a question before producing an answer. Likewise, an LLM progressively transforms a query into contextualized internal representations before generating its response, motivating us to explore whether such representations provide richer signals for routing. Based on this insight, we present CogRouter, an LLM routing framework that routes queries according to their internal representations from a generative model and matches them against candidate model capabilities. Each candidate is represented by combining its capability description with a learnable embedding derived from historical performance, capturing complementary semantic and empirical capability signals. To avoid discarding equally best routing choices, we further propose a tie-aware pairwise training strategy that preserves all tied-best candidates and avoids artificial ordering among them. Extensive experiments on xRouteBench and RouterBench demonstrate that CogRouter outperforms state-of-the-art LLM routing methods by up to 13.81% and 20.09% in routing quality. Our code is available at https://anonymous.4open.science/r/CogRouter-F45C/.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.