内在路由器:从冻结的LLM中激发原生技能路由

·

研究论文 · 2026/09/16

技能扩展了LLM智能体的参数化知识,其收益取决于选择正确的技能。现有部署方案通过将每个技能的元数据预加载到上下文中进行路由,这会分散智能体的注意力并限制技能库规模;检索流水线则将选择移出上下文,也移出了智能体的能力范围。我们表明,冻结的智能体LLM在其自身前向传播中已携带路由信号,且仅需两个线性映射即可读出,无需在上下文中放入技能文本。Gavel(Glance And Verdict from a frozen LLM)分两步读取该信号:第一步“一瞥”通过两个映射(唯一被训练的参数)投影任务和每个技能的中间层状态,并针对安装时一次前向传播构建的紧凑每技能库对完整技能库打分;第二步“裁决”恢复入围技能的前向传播,读取模型自身的似然和是/否判断,并与“一瞥”以专家乘积方式融合。Gavel训练一次即可零样本迁移到三个公开基准和我们的新基准SkillTraj(372条模拟智能体轨迹)。在Qwen3-32B上,它优于增加1.2B至16B外部参数的渐进式披露和检索重排序流水线,在书面任务上最高提升13.4分,在技能需求于rollout中途出现时最高提升21.9分。路由准确率随骨干模型增强而提升,在bash智能体框架中,同一32B模型在Skill-Use上触发正确技能的频率高于在Codex中运行的更大前沿模型。

该工作表明冻结LLM自身已具备技能路由信号,仅需训练两个线性映射即可高效读出,避免了上下文膨胀和外部检索参数,在多个基准上显著优于现有方案,且随骨干模型增强而提升,为智能体技能选择提供了新思路。

Skills extend an LLM agent beyond its parametric knowledge, and the gain they promise rests on picking the right one. Deployed harnesses route by preloading every skill's metadata into the context, which disperses the agent's attention and caps the library size. Retrieval pipelines move the selection out of the context, but also out of the agent's capability. We show that the frozen agent LLM already carries the routing signal in its own forward passes, and that two linear maps suffice to read it out with no skill text in the context. Gavel (Glance And Verdict from a frozen LLM) reads it in two steps. A glance projects the task's and each skill's mid-layer states through the two maps, the only parameters trained, and scores the full library against compact per-skill banks that one forward pass builds at installation. A verdict then resumes the shortlisted skills' forward passes and reads the model's own likelihood and yes/no judgment, fused with the glance as a product of experts. Trained once, Gavel transfers zero-shot to three public benchmarks and SkillTraj, our new benchmark of 372 simulated agent trajectories. On Qwen3-32B it outperforms progressive disclosure and retrieve-and-rerank pipelines that add 1.2B to 16B external parameters, by up to 13.4 points on written tasks and up to 21.9 when the need for a skill arises mid-rollout. Routing accuracy improves as the backbone does, and in a bash-agent harness the same 32B triggers the correct skill on Skill-Use more often than far larger frontier models running in Codex.

阅读原文

参与讨论