Hi‐ <scp>RAG</scp> : A Hierarchical Retrieval‐Augmented Generation Framework for Scalable and Generalisable Tool Selection in Large Language Model Agents

ABSTRACT As tool repositories for Large Language Model (LLM) agents grow from dozens to hundreds of endpoints, flat retrieval paradigms that treat the repository as an unstructured list suffer from context overload, cross‐domain semantic collision and degraded selection accuracy. We propose Hi‐RAG, a Hierarchical Retrieval‐Augmented Generation framework that exploits the Type Service Tool structure of the Model Context Protocol (MCP) via a principled coarse‐to‐fine pipeline. Stage 1 applies a Tool‐as‐Proxy hybrid retrieval strategy (BM25 sparse retrieval combined with dense bi‐encoder search, fused via Weighted Reciprocal Rank Fusion) to identify candidate services efficiently. Stage 2 performs type‐aware re‐ranking over a local heterogeneous graph, integrating a domain‐level gating mechanism with contextualised tool attention for precise service scoring. We further introduce MCPBench , the first benchmark for hierarchical tool selection, comprising 201 tools across 40 real‐enterprise services—23% of queries require multi‐service reasoning. Experiments across five LLMs show Hi‐RAG improves Top‐1 accuracy by up to 7.5% (single‐service) and 10.0% (multi‐service) over Flat‐RAG, while reducing token consumption by up to 89% against full‐context injection. Comparisons with a strong late‐interaction baseline (ColBERT‐RAG) further confirm the superiority of Hi‐RAG. Zero‐shot evaluation on ToolLLM (16,464 tools) confirms scalability, and formal analyses establish context growth with respect to repository size.

Authors

Institutions

Publication Details

Journal
Expert Systems
Published
2026-06-30
DOI
https://doi.org/10.1111/exsy.70341
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Hi‐ RAG : A Hierarchical Retrieval‐Augmented Generation Framework for Scalable and Generalisable Tool Selection in Large Language Model Agents

Wei Tian, Yuhao Zhou
Expert Systems
Topic Modeling
article

Hi‐ RAG : A Hierarchical Retrieval‐Augmented Generation Framework for Scalable and Generalisable Tool Selection in Large Language Model Agents

Wei Tian, Yuhao Zhou
article en

Abstract

ABSTRACT As tool repositories for Large Language Model (LLM) agents grow from dozens to hundreds of endpoints, flat retrieval paradigms that treat the repository as an unstructured list suffer from context overload, cross‐domain semantic collision and degraded selection accuracy. We propose Hi‐RAG, a Hierarchical Retrieval‐Augmented Generation framework that exploits the Type Service Tool structure of the Model Context Protocol (MCP) via a principled coarse‐to‐fine pipeline. Stage 1 applies a Tool‐as‐Proxy hybrid retrieval strategy (BM25 sparse retrieval combined with dense bi‐encoder search, fused via Weighted Reciprocal Rank Fusion) to identify candidate services efficiently. Stage 2 performs type‐aware re‐ranking over a local heterogeneous graph, integrating a domain‐level gating mechanism with contextualised tool attention for precise service scoring. We further introduce MCPBench , the first benchmark for hierarchical tool selection, comprising 201 tools across 40 real‐enterprise services—23% of queries require multi‐service reasoning. Experiments across five LLMs show Hi‐RAG improves Top‐1 accuracy by up to 7.5% (single‐service) and 10.0% (multi‐service) over Flat‐RAG, while reducing token consumption by up to 89% against full‐context injection. Comparisons with a strong late‐interaction baseline (ColBERT‐RAG) further confirm the superiority of Hi‐RAG. Zero‐shot evaluation on ToolLLM (16,464 tools) confirms scalability, and formal analyses establish context growth with respect to repository size.

Expert SystemsVol. 43(8)
East China Normal University (CN)
Openalex Percentile: Top 8%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.