SkillZip:面向可扩展智能体技能库的契约保持图压缩

·

研究论文 · 2026/08/14

大型语言模型(LLM)作为智能体时,其程序性知识存储在可复用的技能包中,并在推理时加载。随着技能库的增长,一个核心挑战是在有限的上下文预算下暴露最小且充分的执行上下文。现有系统难以在技能包级别以下复用例程、在压缩时保持程序契约、保持压缩例程的可执行性和可扩展性,以及随技能演化更新压缩库。这些挑战揭示了单元不匹配:技能作为包检索,作为文本压缩,并在检索后才转换为执行图,而可靠复用需要携带契约的程序单元。我们提出SkillZip,一种执行感知的程序抽象框架,在节级图上进行契约保持压缩。SkillZip将重复出现的契约有效动机重写为可逆的移植宏,同时保留边界签名、依赖闭包、验证器可达性和源码级扩展。在推理时,它水合紧凑的依赖闭包上下文,并仅在需要时展开宏。ReZip进一步整合新技能并使用执行证据修订风险宏。在技术和具身智能体基准上的综合实验表明,SkillZip始终优于最强基线最多12.2个百分点,同时实现3.46倍压缩比,依赖保留99.2%,验证器可达性98.7%。扩展分析进一步确认在200到10万技能库中的稳健检索。

该文针对LLM智能体技能库压缩中的关键挑战,提出了一种新颖的契约保持压缩框架,在保持可执行性和可扩展性的同时显著提升压缩比和检索性能,实验验证充分,具有实际应用价值。

Large Language Models (LLMs) increasingly act as agents whose procedural knowledge is stored in reusable skill packages and loaded at inference time. As skill libraries grow, a central challenge is to expose the smallest sufficient executable context under a limited context budget. Existing systems struggle to reuse routines below the whole-skill level, preserve procedural contracts during compression, keep compressed routines executable and expandable, and update the compressed library as skills evolve. These challenges reveal a unit mismatch: skills are retrieved as packages, compressed as text, and converted into execution graphs only after retrieval, whereas reliable reuse requires a contract-bearing procedural unit. We propose SkillZip, an execution-aware procedural abstraction framework that performs contract-preserving compression over section-level graphs. SkillZip rewrites recurring contract-valid motifs into reversible ported macros while preserving boundary signatures, dependency closure, verifier reachability, and source-level expansion. At inference time, it hydrates a compact, dependency-closed context and expands macros only when required. ReZip further integrates new skills and revises risky macros using execution evidence. Comprehensive experiments1 on technical and embodied agent benchmarks show SkillZip consistently outperforms the strongest baseline by up to 12.2 points, while achieving a 3.46x compression ratio with 99.2% dependency preservation and 98.7% verifier reachability. Scaling analyses further confirm robust retrieval across skill libraries ranging from 200 to 100K skills.

阅读原文

参与讨论