SkewRoute: Training-Free LLM Routing for Knowledge Graph Retrieval-Augmented Generation via Score Skewness of Retrieved Context

Hairu Wang, Yuan Feng, Yukun Cao, Xike Xie, S. Kevin Zhou

Abstract

Large language models excel at many tasks but often incur high inference costs during deployment. To mitigate hallucination, many systems use a knowledge graph to enhance retrieval-augmented generation (KG-RAG). However, the large amount of retrieved knowledge contexts increase these inference costs further. A promising solution to balance performance and cost is LLM routing, which directs simple queries to smaller LLMs and complex ones to larger LLMs. However, no dedicated routing methods currently exist for RAG, and existing training-based routers face challenges scaling to this domain due to the need for extensive training data. We observe that the score distributions produced by the retrieval scorer strongly correlate with query difficulty. Based on this, we propose a novel, training-free routing framework, the first tailored to KG-RAG that effectively balances performance and cost in a plug-and-play manner. Experiments show our method reduces calls to larger LLMs by up to 50% without sacrificing response quality, demonstrating its potential for efficient and scalable LLM deployment.

Introduction

Retrieval-Augmented Generation (RAG) is the industry standard for reducing LLM hallucinations, but it comes with a significant "token tax." In Knowledge Graph RAG (KG-RAG), where structured data (triples) are retrieved, providing enough context for complex reasoning can increase input token counts by over 30x. This makes inference prohibitively expensive for many real-world applications.

LLM routing—directing "easy" questions to a cheap, small model (e.g., Qwen-7B) and "hard" questions to a powerful, expensive one (e.g., Qwen-72B)—is a common cost-saving strategy. However, current routers face two major flaws in the context of RAG: a heavy dependency on massive amounts of labeled training data and a failure to account for "knowledge shift," where the bottleneck is reasoning over external context rather than internal model knowledge.

Methods

We introduce SkewRoute, a training-free routing framework for KG-RAG that decides whether to use a small or large LLM based on the "skewness" of retrieval scores. Unlike traditional routers, SkewRoute is a "plug-and-play" solution requiring zero training.

Overview of the SkewRoute framework, routing queries based on the skewness of retrieved context scores.

The framework quantifies score skewness using four mathematical approaches:

  • Area Under Curve (AUC): Measuring the area under the min-max normalized score curve.
  • Cumulative Threshold: Calculating how many triples are needed to reach a certain percentage (e.g., 95%) of the total score sum.
  • Entropy-based Routing: Measuring the "uniformity" of the score distribution.
  • Gini Coefficient: Borrowing from economics to measure "inequality" among context scores.

Core Observation

The core innovation of SkewRoute lies in the observation that the distribution of scores assigned to retrieved triples by a standard RAG scorer (like an MLP or cross-encoder) is a reliable proxy for query difficulty.

Comparison of score distributions for high skewness (simple queries) and low skewness (complex queries).

As illustrated above, simple queries typically produce highly skewed score distributions (where a few triples have very high scores). In contrast, complex queries requiring multi-hop reasoning often result in more uniform, low-skewness distributions. If the scores are highly skewed, the query is likely simple and sent to a Smaller LLM. If the scores are more evenly distributed, the query likely requires complex reasoning and is sent to a Larger LLM.

Results and Discussion

SkewRoute was evaluated using two widely recognized Knowledge Graph Question Answering (KGQA) benchmarks: WebQSP (1-hop and 2-hop queries) and CWQ (up to 4-hop reasoning), both utilizing Freebase as the external knowledge source.

  • Efficiency: SkewRoute is incredibly fast, running in roughly 0.01ms per query on a CPU. This represents a 2,700x speedup over GPU-accelerated training-based routers like GraphRouter.
  • Effectiveness: On the WebQSP dataset, the Gini-based router outperformed the state-of-the-art RouteLLM by over 8x in average effectiveness (the improvement in Hit@1 over random routing).
  • Cost and Token Savings: The framework can reduce calls to larger LLMs by up to 50% while maintaining performance. Furthermore, the same skewness logic can be used to reduce the number of triples sent to the LLM, further slashing token costs.

Conclusion

SkewRoute demonstrates that retrieval scores are not just filters but diagnostic tools. By leveraging score skewness, we achieve a training-free, highly efficient routing mechanism that significantly lowers the cost of KG-RAG deployment. Future work will focus on extending this paradigm to broader RAG settings, such as chunk-based text retrieval and multimodal systems.

Summary updated

Abstract

Large language models excel at many tasks but often incur high inference costs during deployment. To mitigate hallucination, many systems use a knowledge graph to enhance retrieval-augmented generation (KG-RAG). However, the large amount of retrieved knowledge contexts increase these inference costs further. A promising solution to balance performance and cost is LLM routing, which directs simple queries to smaller LLMs and complex ones to larger LLMs. However, no dedicated routing methods currently exist for RAG, and existing training-based routers face challenges scaling to this domain due to the need for extensive training data. We observe that the score distributions produced by the retrieval scorer strongly correlate with query difficulty. Based on this, we propose a novel, training-free routing framework, the first tailored to KG-RAG that effectively balances performance and cost in a plug-and-play manner. Experiments show our method reduces calls to larger LLMs by up to 50% without sacrificing response quality, demonstrating its potential for efficient and scalable LLM deployment.
BibTeX
@misc{wang2025skewroute,
  author = {Hairu Wang and Yuan Feng and Yukun Cao and Xike Xie and S. Kevin Zhou},
  title = {{SkewRoute: Training-Free LLM Routing for Knowledge Graph Retrieval-Augmented Generation via Score Skewness of Retrieved Context}},
  year = {2025},
  eprint = {2505.23841},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23841},
}

Loading related content...

Figure