把技能藏进模型权重,省掉一半提示词
现在的AI智能体(比如帮你操作网页、回答问题的助手)通常靠“把技能写成文字塞进提示词”来执行任务,但每次都要带上整段技能说明,既浪费上下文窗口,又暴露了技能细节。这篇研究反其道而行:用一个预训练的超网络,把文字技能直接转成LoRA适配器(一种轻量级模型补丁),存进模型的权重空间里。这样一来,执行任务时不再需要反复输入技能文本,而是像插U盘一样加载对应的LoRA模块。在ALFWorld(家居任务)和Search-QA(搜索问答)上,这个方法比传统文字技能方案分别提升了21.4和13.4个百分点的成功率,同时减少了64%到72%的提示词消耗。更关键的是,这些LoRA技能可以像乐高一样组合、缩放,甚至通过参数加减实现技能叠加。它不是你明天就能直接用的工具,但指向了一个方向:未来的AI智能体可能不再靠“读说明书”来学习新技能,而是像安装插件一样,把技能直接“焊”进模型里。
📄 原文摘要(英文)
Agent systems increasingly use textual skills to encode reusable task procedures, but injecting these skills into the prompt at every step incurs substantial context overhead and exposes skill content as plaintext. We present LatentSkill, a framework that converts textual skills into plug-and-play LoRA adapters through a pretrained hypernetwork. LatentSkill stores skill knowledge in weight space rather than context space, removing per-step skill tokens while preserving modular loading, scaling, and composition. On ALFWorld and Search-QA, LatentSkill outperforms the corresponding in-context skill baseline while using substantially fewer prefill tokens: it improves ALFWorld success by 21.4 and 13.4 points on the seen and unseen splits with 64.1% fewer prefill tokens, and improves Search-QA exact match by 3.0 points with 72.2% lower skill-token overhead. Further analysis shows that generated skill LoRAs form a structured semantic geometry, can be precisely controlled via the LoRA scaling coefficient, and can be composed through parameter-space arithmetic when skill components are aligned. These findings suggest that weight-space skills provide an efficient, modular, and less exposed substrate for extending LLM agents.