From Trajectories to Hierarchical Skill Graphs with Semantic Contracts
Abstract
External skills enable language-model agents to reuse experience without parameter updates. However, the quality of document-based skills depends on the ability of an LLM to preserve procedural knowledge during summarization, while static skill loading fails to adapt guidance to changing interaction phases. Graph-based representations support structured retrieval, but historical dependencies alone do not establish current action applicability. To address these limitations, we introduce Semantic Contract Graph (SCG), a framework that integrates hierarchical skill learning with semantic contract evaluation. Offline, SCG recursively composes recurring action sequences into a hierarchical graph of reusable skills. Online, it retrieves a phase-relevant subgraph and evaluates whether action preconditions hold in the current context. Together, the retrieved subgraph and semantic verdicts condition a frozen agent through prompt augmentation. Experiments on ALFWorld, ScienceWorld, SpreadsheetBench, and WebShop show that SCG improves task performance while reducing interaction rounds. Ablation studies reveal the contributions of graph structure and semantic guidance, highlighting the value of integrating skill graphs with live semantic contract checks.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.