arXiv:2511.18715cs.AI2025-11被引 1

通过逐步推理从海量模型中精准挑选最优工具,提升大模型代理的实用性和效率。

HuggingR$^{4}$: A Progressive Reasoning Framework for Discovering Optimal Model Companions

  • 将模型选择转化为多轮迭代推理,逐步拆解用户需求
  • 在14,399个任务上达到92.03%可用性,比现有方法高26.51%
  • 减少6.9倍令牌消耗,适合需要高效调用外部模型的开发者

构建高效的大型语言模型代理,越来越依赖于从大规模开放仓库(如HuggingFace,超过200万个模型)中根据自然语言请求选择合适的AI模型作为工具。与调用固定API工具不同,仓库级模型选择需处理海量且不断变化的候选模型,且元数据不完整。现有方法将完整模型描述嵌入提示词,导致提示词过长、令牌成本过高,可扩展性差。为此,我们提出HuggingR$^4$,首个将模型选择重构为迭代推理过程而非一次性检索的框架。通过融合推理、检索、精炼与反思,HuggingR$^4$逐步分解用户意图,通过多轮讨论检索候选模型,基于细粒度分析优化选择,并通过反思验证结果。为支持严谨评估,我们构建了一个涵盖37类任务的大型基准,包含14,399条多样化用户请求。实验表明,HuggingR$^4$在工作可行性上达92.03%,合理性达82.46%,分别优于当前最先进基线26.51%和33.25%,同时令牌消耗降低6.9倍。

原文摘要 · Abstract (English)

Building effective LLM agents increasingly requires selecting appropriate AI models as tools from large open repositories (e.g., HuggingFace with > 2M models) based on natural language requests. Unlike invoking a fixed set of API tools, repository-scale model selection must handle massive, evolving candidates with incomplete metadata. Existing approaches incorporate full model descriptions into prompts, resulting in prompt bloat, excessive token costs, and limited scalability. To address these issues, we propose HuggingR$^4$, the first framework to recast model selection as an iterative reasoning process rather than one-shot retrieval. By synergistically integrating Reasoning, Retrieval, Refinement, and Reflection, HuggingR$^4$ progressively decomposes user intent, retrieves candidates through multi-round deliberation, refines selections via fine-grained analysis, and validates results through reflection. To facilitate rigorous evaluation, we introduce a large-scale benchmark comprising 14,399 diverse user requests across 37 task categories. Experiments demonstrate that HuggingR$^4$ achieves 92.03% workability and 82.46% reasonability-outperforming current state-of-the-art baselines by 26.51% and 33.25%, respectively, while reducing token consumption by $6.9 \times$.

大模型代理模型选择推理框架HuggingFace

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。