Manuscript Offprint

arXiv:2611.01115

CompSkill: Compiling Execution Experience for Skill Retrieval

Qi Shen, Ziyue Zhu, Yongqing Jiang, Zhen Xia, Li Shengjie, Shuai Zhao, Bo Cheng, Xiaobao Wu, Anh Tuan Luu, Haoran Luo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

LLM agents increasingly rely on skill documents, yet most retrievers rank them by description alone and ignore what earlier executions revealed, even though a relevant skill can hurt execution. We present CompSkill, which indexes skills with learned 512-d keys and compiles matched same-task comparisons into skill offsets and capped key residuals (KeyOpt), so experience changes which document the executor receives, never its text. Under a logistic outcome model with unknown task difficulty, matched comparisons cancel that difficulty and only discordant ones carry information; on support executions, predictions improve with each discordant task. An experience hypergraph keeps each comparison with its executor and document versions, recalls missed skills and grounds a cited review. Compact keys raise SkillRet NDCG@10 from 64.0 to 70.9 at one eighth of the dimension. With one document, CompSkill completes 256 and 260 of 332 ToolQA tasks with GPT-5.6-luna and DeepSeek-V4.1-Flash, respectively, more than every baseline, and stays on par with the strongest baselines on AppWorld and ALF-World. On 332 newly generated ToolQA tasks, it completes 256 with GPT-5.6-luna, significantly more than BM25, SkillRet-8B, Tool2Vec and RankGPT; over all 844 ToolQA tasks, it completes 24 more than the strongest baseline. Selection matters beyond relevance: pairing the right guide with a same-database sibling instead of another database's guide costs 8 of 96 tasks. Code, models and support data are public. 1^{1}

1 Introduction

Large language model (LLM) agents solve interactive tasks through tool calls (Yao et al., 2023; Schick et al., 2023; Qin et al., 2024; Li et al., 2023a)

Figure

Figure 1: CompSkill on ToolQA: the semantic Top-10 offers a lookup guide; events recall the missing listings guide, which KeyOpt ranks first and cited review keeps.

and reusable skills: documents explaining how to query a database, use an API or perform a routine (Wang et al., 2024; Anthropic, 2025; Xu and Yan, 2026; Jiang et al., 2026c). Public skill ecosystems now hold tens of thousands of such documents (Li et al., 2026b; Wang et al., 2026b; Zhang et al., 2026a), and choosing a useful one has become central to execution (Li et al., 2026c; Badhe et al., 2026). Yet most retrievers choose the next skill by description alone, ignoring earlier executions.

Existing retrievers use semantic similarity, learned relevance, reranking or group structure (Su et al., 2026; Kang et al., 2026; Li et al., 2026a; Zheng et al., 2026b; Xiao et al., 2026; Yang et al., 2026a; Wei et al., 2026; Zeng et al., 2026). These priors organize what a skill describes; they do not establish whether a particular executor can use it under a fixed budget (Figure 2), and a retrieved skill can even hurt execution (Wang et al., 2026c; Tank and Nama, 2026; Jiang et al., 2026d; Cho and Park, 2026). On ToolQA, even the strongest baseline supplies the labeled guide first for at most 78.3% of tasks; a database lookup guide, for example, does

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

1^{1}https://github.com/satoshinji2992/CompSkill

Figure

Figure 2: Three challenges, CompSkill components and empirical evidence: SkillRet Recall@10 (compact keys: three-seed mean), a ToolQA Coffee ranking example, GPT-5.6-luna Hit@1 on the 332 ToolQA evaluation tasks, and paired review outcomes (9 wins, 3 losses) on the 332 newly generated tasks.

not explain how to answer an aggregation request (Figure 1). We ask how execution feedback can teach a retriever this distinction while keeping both the skill documents and the executor unchanged.

Learning from execution raises three practical problems. Finding the relevant procedure. Skill documents cover many details, yet small procedural differences can determine their suitability. Editing the documents to guide selection also changes the executor's instructions (Suzgun et al., 2026; Zhang et al., 2026c; Ouyang et al., 2026a; Yang et al., 2026b). Comparable feedback. Success on an easy task and failure on a hard one do not establish which skill is more useful (Joachims et al., 2017); alternatives must be compared on the same task with the same executor (Gao et al., 2026). Context for reuse. A past outcome needs its executor, document versions and observed alternatives to inform a new choice (Zhao et al., 2026; Zhou et al., 2026). Such experience can also recover useful skills that semantic recall missed.

To learn from execution without editing skills or the executor, we present CompSkill, an experience-compiled skill retrieval framework that answers each problem with one component. Compact Semantic Indexing gives every skill a learned 512-d key that experience can edit while the document stays intact. Matched Feedback Calibration (KeyOpt) compiles same-task, same-executor comparisons into a key correction: a reliability offset plus a cross-validated conditional residual whose effect

is capped. An Experience Hypergraph keeps each comparison with its executor and document versions, recalls skills that semantic retrieval missed, and grounds review in cited outcomes (Figure 3). Keys and events are updated only between rounds, from support runs: the executor always receives an original document, and reading the compiled experience adds one inner product per candidate and no model call to the frozen encoder and reranker.

We evaluate on SkillRet, ToolQA, AppWorld and ALFWorld (Kang et al., 2026; Zhuang et al., 2023; Trivedi et al., 2024; Shridhar et al., 2021). On SkillRet, 512-d compact keys outperform the 4096-d embeddings they compress (NDCG@10 70.9 versus 64.0). With one document, CompSkill completes 256/332 ToolQA tasks with GPT-5.6-luna and 260/332 with DeepSeek-V4.1-Flash, above every baseline with either executor, including BM25, SkillRet-8B, Tool2Vec and RankGPT; the GPT fits come from GPT-5.5 support and transfer to GPT-5.6-luna without refitting. On AppWorld and ALF-World, whose support holds few contrasting executions, it stays on par with the strongest baselines. On 180 held-out and 332 newly generated ToolQA tasks, it significantly outperforms four retrievers on each set, including Tool2Vec and RankGPT on the new tasks (Section 4.3). Error analysis shows where the gains come from: a near-miss sibling guide costs more than an unrelated document, and more than another database's guide even beside the right guide, and with the GPT fit the KeyOpt index supplies a sibling on 16 of the 180 held-out tasks where Vector Top-1 supplies 37.

Contributions. (i) An architecture that compiles execution experience into retrieval while leaving documents, prompts and executor weights untouched: editable compact keys, matched calibration whose capped conditional part costs one inner product per candidate, and an experience hypergraph whose attributed events recall missed skills and ground cited review. (ii) An analysis, checked on real support data, showing that under an additive logistic outcome model matched discordant pairs identify executor-specific utility differences independently of task difficulty, that only such pairs carry information, and that the conditional correction is capped and every correction vanishes without discordant evidence (Appendix B). (iii) Evidence from four benchmarks, two held-out ToolQA sets and a conflict test showing that gains concentrate where confusable guides decide execution and support holds contrasting outcomes.

References (50)