CompSkill: Compiling Execution Experience for Skill Retrieval
Organizations: Beijing University of Posts and Telecommunications · Nanyang Technological University · Sichuan University · Shanghai Jiao Tong University
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 ALFWorld. 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: https://github.com/satoshinji2992/CompSkill
Figures & tables
| Method | Representation | Selection and adaptation mechanism |
| Dense / Vector Skills | Document vectors | Frozen cosine similarity retrieves original documents. |
| SkillRouter / SkillRet | Encoder / reranker | Relevance pairs train recall and reranking; original skill text stays fixed. |
| NUDGE | Document vectors | Relevance labels drive constrained vector edits; the encoder stays fixed. |
| RankGPT | Candidate list | Prompted LLM comparisons reorder retrieved documents. |
| GoS / GoSkills | Graph / skill groups | Recall prerequisites (GoS); compose role-aware groups (GoSkills). |
| SkillNet-Fabric | Typed graph + Wiki | Retrieve and expand typed relations; an Explorer selects from Wiki evidence. |
| Success | CompSkill versus baseline | ||||||||
| Executor | Method | #Docs | Tasks | Rate (%) | Complex (%) | Worst DB (%) | Gain [95% CI] | W/L | |
| DeepSeek-V4.1-Flash | No Skills | 0 | 200 | 60.2 | 37.1 | 41.4 | 60 [ , ] | 75/15 | 0.001 |
| Vector Top-4 | 4 | 240 | 72.3 | 59.0 | 51.4 | 20 [ , ] | 34/14 | 0.006 | |
| GoSkills | 2.57 | 218 | 65.7 | 43.8 | 53.3 | 42 [ , ] | 59/17 | 0.001 | |
| Vector Top-1 | 1 | 236 | 71.1 | 57.3 | 55.7 | 24 [ , ] | 30/6 | 0.001 | |
| SkillRouter | 1 | 226 | 68.1 | 52.8 | 51.4 | 34 [ , ] | 41/7 | 0.001 | |
| ToolQA | AppWorld | ALFWorld | |||||
|---|---|---|---|---|---|---|---|
| Method | DS | GPT | DS | GPT | DS | GPT | Total |
| Support contrasts | 87 | 72 | 8 | 2 | 1 | 0 | |
| No Skills | 200 | 197 | 68 | 78 | 118 | 125 | 786 |
| Vector Top-4 | 240 | 245 | 70 | 78 | 123 | 130 | 886 |
| Vector Top-1 | 236 | 235 | 69 | 81 | 127 | 128 | 876 |
| GoSkills | 218 | 221 | 74 | 81 | 124 | 130 | 848 |
| Method | Docs | Eval. | New | All |
|---|---|---|---|---|
| Vector Top-1 | 1 | 235 | 227 | 568 |
| SkillRouter | 1 | 225 | 225 | 556 |
| BM25 | 1 | 223 | 214 | 543 |
| SkillRet-8B | 1 | 226 | 222 | 553 |
| RankGPT | 1 | 249 | 245 | 612 |
| Selector | Supplied guidance | Signal behind the choice | Luna | DS |
| SkillRouter | a web hotel-booking skill | learned relevance | ||
| BM25 | a Skiplagged travel skill | lexical overlap | ||
| Vector Top-1 | DB lookup guide | embedding similarity | ||
| SkillRet-8B, RankGPT | DB lookup guide | dense retrieval, LLM reranking | ||
| Tool2Vec | DB listings guide | queries solved in support | ✓ | ✓ |
| Vector Top-4 | lookup, Vrbo, listings, web skill (4 docs) | similarity, four documents | ✓ | ✓ |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| , | versioned skill document and library |
| , | public task context and frozen support history |
| , , | selector, supplied skill set and its size cap |
| , , , | environment, execution budget, trajectory and native success |
| , | frozen encoder and frozen compressor |
| , , | 4096-d embedding, its 512-d anchor and the compressor scale |
| Setting | Value |
|---|---|
| Compact keys | |
| Encoder | Qwen3-Embedding-8B |
| Key and query dimension | 512 of 4,096 |
| Compressor training | SkillRet TRAIN |
| Compressor | 4096 512, 2 residual LN–MLP blocks |
| MLP expansion, activation | 4,096, SiLU |
| Benchmark | Eval. | Support | Library | Mean chars | Median chars | Actions / time | Success |
|---|---|---|---|---|---|---|---|
| ToolQA | 332 | 318 | 785 | 6,446 | 4,142 | 20 / 900 s | answer exact match |
| AppWorld Challenge | 90 | 90 | 469 | 1,139 | 961 | 30 / 900 s | unit tests (TGC, SGC) |
| ALFWorld | 134 | 12 | 37 | 2,312 | 2,298 | 30 / 900 s | goal reached |
| ID | Title | Description (verbatim) | Chars |
|---|---|---|---|
| toolqa_002 | US Domestic Flight Data — Single-Record Lookup Guide | Procedural guide for retrieving individual flight attributes from the 2022 US domestic flights dataset, covering schema, flight identifier conventions, time column encoding, boolean filters, and when to use SQL over FilterDB. | 4,621 |
| toolqa_003 | US Domestic Flight Data — Multi-Record Aggregation Guide | Guide for answering multi-step aggregation and analysis questions about 2022 US domestic flight data, covering schema conventions, FilterDB pitfalls, and SQL workarounds. | 5,167 |
| toolqa_004 | NYC Airbnb Listing Data — Single-Record Lookup | Guide for querying individual listing attributes from the NYC Airbnb dataset, covering FilterDB pitfalls and SQL workarounds. | 3,863 |
| toolqa_005 | NYC Airbnb Listing Data — Aggregation and Derived Calculations | Guide for answering complex analytical questions about NYC Airbnb listing data, covering price parsing, multi-column derived calculations, and geographic queries. | 4,905 |
| toolqa_006 | Yelp Business Data Lookup | Guide for retrieving attributes of individual Yelp businesses: address, city, state, postal code, star rating, review count, hours, appointment requirement, and coordinates. | 3,473 |
| toolqa_007 | Yelp Business Data Aggregation and Spatial Queries | Guide for aggregation, category-based extremum search, and geospatial distance queries on Yelp business data, with SQL Haversine patterns for nearest-business and radius queries. | 4,585 |
| Benchmark | Subset | Example task |
|---|---|---|
| ToolQA | Flights, lookup | What was the departure time of the AA2319 flight from MIA to LAS on 2022-06-05? |
| Flights, complex | What percentage of the flights from JAC were delayed on 2022-02-24? | |
| Airbnb, lookup | What is the host’s name for Luxury Wellness Space - Breathtaking NYC Views in Long Island City? | |
| Airbnb, complex | What is the total price at least if you want to stay at Bright, modern room with panoramic window in Maspeth for 8 nights? | |
| Yelp, lookup | What is the address of Smilies in area with postal code T5V 1H9? | |
| Yelp, complex | How many Home Organization businesses are there in Franklin, TN? |
| Selector | Retrieval | Context supplied to the executor |
|---|---|---|
| No Skills | — | no guidance block |
| Vector Top-4 | Qwen3-Embedding-8B, 4096-d cosine, top-4 | four complete documents in rank order (ALFWorld: 1,800 characters per skill, 9,000 in total) |
| Vector Top-1 | same encoder and similarity, top-1 | one complete document |
| GoSkills | official group-structured retrieval | member documents of the selected group plan; on ALFWorld the official role contract with 1–4 skills |
| SkillRouter | released bi-encoder over the full library, top-20, then released cross-encoder | top-1 complete document |
| SkillNet-Fabric | 37 skill contracts, 207 typed edges, task wiki and planner | task-specific wiki (ALFWorld only); skill text up to 1,700 characters |
| Setting | GPT-5.5 | DeepSeek |
|---|---|---|
| Model | gpt-5.5 | deepseek-flash |
| Reasoning | low effort | thinking, low |
| Reply limit (tokens) | 16,384 | 16,384 |
| Cumulative output gate | 24,000 | 24,000 |
| ToolQA actions / time | 20 / 900 s | 20 / 900 s |
| AppWorld actions / time | 30 / 900 s | 30 / 900 s |
| Method | Enc. | NDCG@10 | R@10 | Cmpl.@10 |
|---|---|---|---|---|
| BM25 | — | 51.7 | 59.4 | 44.6 |
| bge-large-en-v1.5 | frozen | 59.0 | 64.4 | 48.3 |
| Qwen3-Emb.-0.6B | frozen | 62.0 | 68.0 | 51.3 |
| Qwen3-Emb.-8B | frozen | 63.7 | 70.3 | 54.3 |
| harrier-oss-0.6B | frozen | 70.3 | 76.2 | 61.7 |
| 4096-d (same enc.) | frozen | 64.0 | 70.6 | 54.4 |
| Projection | NDCG@10 | R@10 | Cmpl.@10 |
|---|---|---|---|
| Truncated 128 | 53.6 | 60.5 | 44.4 |
| Truncated 256 | 58.4 | 65.2 | 48.5 |
| Truncated 512 | 62.2 | 68.8 | 52.4 |
| Truncated 1024 | 63.3 | 69.6 | 53.0 |
| Truncated 2048 | 64.1 | 70.5 | 54.2 |
| Native 4096 | 64.0 | 70.6 | 54.4 |
| Fusion | NDCG@10 | R@10 | Cmpl.@10 |
|---|---|---|---|
| BM25 + native 4096-d | 62.2 | 70.3 | 55.3 |
| BM25 + compact 512-d | 65.8 | 74.5 | 60.0 |
| BM25 + SkillRouter-Emb. | 65.7 | 73.5 | 58.9 |
| BM25 + SkillRet-Emb.-8B | 70.0 | 78.9 | 66.1 |
| Required skills | Queries | 4096-d | 512-d | pp |
|---|---|---|---|---|
| One | 2,143 | 84.2 | 89.7 | +5.5 |
| Two | 1,703 | 32.0 | 45.1 | +13.1 |
| Three | 546 | 7.0 | 11.3 | +4.3 |
| Two or three | 2,249 | 25.9 | 36.9 | +11.0 |
| Unseen only | 1,838 | 28.7 | 39.9 | +11.2 |
| Index | R@1 | R@5 | R@10 | MRR | nDCG |
|---|---|---|---|---|---|
| SRA (665 queries, 26K skills) | |||||
| Compact, seed 17 | 44.4 | 64.9 | 73.9 | 60.9 | 60.9 |
| Compact, seed 29 | 44.4 | 66.6 | 74.4 | 61.8 | 61.5 |
| Compact, seed 43 | 45.3 | 67.4 | 74.9 | 62.5 | 62.5 |
| Native 4096-d | 46.1 | 66.8 | 71.8 | 62.5 | 62.1 |
| Truncated | 45.0 | 60.4 | 66.8 | 59.7 | 58.4 |
| Operation (CPU) | Median | P90 |
|---|---|---|
| Compact Top-10 | 0.31 ms | 0.40 ms |
| Default index and rendering | 0.33 ms | 0.59 ms |
| SkillRouter, cached scores | 0.25 ms | 0.32 ms |
| GoSkills retrieval and rendering | 172 ms | 181 ms |
| Storage | bytes | |
| Compact keys (785) | 1,607,680 | |
| Query type (%) | Database (%) | |||||||
| Method | Docs | Simple | Complex | Airbnb | Coffee | Flights | Yelp | Hit@1 (%) |
| DeepSeek-V4.1-Flash | ||||||||
| No Skills | 0 | 87.0 | 37.1 | 62.7 | 48.9 | 41.4 | 85.1 | — |
| Vector Top-4 | 4 | 87.7 | 59.0 | 65.1 | 87.0 | 51.4 | 80.5 | 63.0 |
| Vector Top-1 | 1 | 87.0 | 57.3 | 61.4 | 80.4 | 55.7 | 82.8 | 63.0 |
| GoSkills | 2.57 | 90.9 | 43.8 | 67.5 | 53.3 | 58.6 | 82.8 | 44.9 |
| Supplied documents | Docs | Successes |
|---|---|---|
| Labeled guide | 1 | 72 |
| Labeled + sibling guide | 2 | 67 |
| Labeled + other-database guide | 2 | 75 |
| Tasks | Comparison | W/L | Holm |
|---|---|---|---|
| Held-out 180 | CompSkill vs. SkillRet-8B | 23/4 | 0.002 |
| Held-out 180 | CompSkill vs. Tool2Vec | 8/9 | 1.000 |
| Held-out 180 | CompSkill vs. RankGPT | 10/4 | 0.718 |
| Held-out 180 | CompSkill vs. BM25 | 23/5 | 0.006 |
| Held-out 180 | KeyOpt index vs. SkillRet-8B | 22/8 | 0.097 |
| Held-out 180 | KeyOpt index vs. Tool2Vec | 6/12 | 0.718 |
| Cohort | Executor | Label sibling | Label unrelated | Unrelated sibling |
|---|---|---|---|---|
| ToolQA 332 (dev.) | GPT | [ , ] | [ , ] | [ , ] |
| DeepSeek | [ , ] | [ , ] | [ , ] | |
| ToolQA held-out 180 | GPT | [ , ] | [ , ] | [ , ] |
| DeepSeek | [ , ] | [ , ] | [ , ] | |
| ToolQA, three new databases | GPT | [ , ] | [ , ] | [ , ] |
| DeepSeek | [ , ] | [ , ] | [ , ] |
| Method ( ) | GPT-5.6 | DeepSeek-1017 |
|---|---|---|
| No Skills | 64 | 49 |
| Vector Top-1 | 59 | 62 |
| SkillRouter | 61 | 58 |
| BM25 | 59 | 57 |
| SkillRet-8B | 82 | 84 |
| Tool2Vec | 79 | 78 |
| Method ( ) | GPT-5.6 | DeepSeek-1017 |
|---|---|---|
| No Skills | 233 | 308 |
| Vector Top-1 | 275 | 325 |
| SkillRouter | 275 | 325 |
| BM25 | 273 | 322 |
| SkillRet-8B | 271 | 332 |
| Tool2Vec | 285 | 331 |