Papers
Topics
Authors
Recent
Search
2000 character limit reached

SkillPager: Query-Adaptive Intra-Skill Navigation via Semantic Node Retrieval

Published 30 May 2026 in cs.IR and cs.AI | (2606.00822v1)

Abstract: Skill-based LLM agents increasingly rely on long procedural documents, but full-document prompting wastes tokens and dilutes information critical to execution. We study this setting as intra-skill retrieval, where the goal is to select a minimal, execution-sufficient context from a known skill document given a query. We present SkillPager, a two-stage framework that parses each Markdown skill into typed semantic nodes offline and leverages Maximal Marginal Relevance (MMR) to perform global, query-conditioned node selection online. On a benchmark of 395 skills and 1,975 queries, SkillPager achieves 78.89% LLM-judged context sufficiency, compared to 82.23% for the exhaustive full-document baseline, while reducing prompt tokens by 47.04%. A granularity ablation shows that applying the same retrieval algorithm to raw fixed-length chunks reaches a comparable 81.77% sufficiency but increases token cost by 28.81%, demonstrating that efficiency gains are driven by typed semantic granularity rather than the retrieval algorithm alone. Among graph-based baselines, SkillPager outperforms the strongest baseline by a margin of 12.16%. Further ablations show that supporting content is most effective when retained in the candidate pool and selected adaptively rather than removed by static heuristics. These results identify typed intra-document retrieval as a distinct access problem for skill-based agents.

Summary

  • The paper presents SkillPager, a two-stage framework that decomposes markdown documents into semantically typed nodes for efficient intra-skill retrieval.
  • It employs a global Maximal Marginal Relevance strategy to balance query relevance against redundancy, achieving almost full-document context sufficiency while reducing token usage.
  • Empirical evaluations on 395 skills demonstrate superior performance over graph-based methods, emphasizing the benefits of adaptive node inclusion in LLM agent architectures.

SkillPager: Query-Adaptive Intra-Skill Navigation via Semantic Node Retrieval

Problem Motivation and Core Challenges

Procedural skills serve as the operational backbone for LLM-based agents, yet the common practice of encoding these skills as long Markdown documents introduces substantial inefficiency in agent prompting. Injecting entire skill documents leads to unnecessary token consumption and dilutes essential procedural directives with auxiliary content (e.g., conceptual explanations, parameter listings, code examples). The intra-skill retrieval problem—extracting a compact, execution-sufficient context for a given query from within a single known skill—presents three technical challenges: constructing retrieval-ready representations from unstructured text, circumventing the brittleness of sparse dependency graphs, and balancing context sufficiency against prompt efficiency. Figure 1

Figure 1: Summary of the main challenges underlying intra-skill context retrieval, highlighting the need for semantic decomposition, avoidance of sparse graph traversal, and efficiency-quality trade-off.

SkillPager Framework Overview

SkillPager is introduced as a two-stage system designed to address the above challenges. Stage 1 comprises an offline transformation wherein raw Markdown is decomposed into semantically typed nodes (e.g., step, param, example, concept) and structural relationships are inferred among them via directed edges. Stage 2 employs a global Maximal Marginal Relevance (MMR) strategy over the cached node set to yield a context that is both relevant to the query and diverse in procedural roles, under a dynamic node budget. Figure 2

Figure 2: SkillPager architecture—a composition of offline semantic parsing and online query-adaptive MMR-based node selection for efficient, execution-oriented context assembly.

While previous approaches such as SkillReducer (Gao et al., 31 Mar 2026) focus on offline compression and ObjectGraph (Dubey et al., 30 Apr 2026) leverages manual graph traversal, SkillPager advances the state of intra-skill retrieval through a topology-agnostic, typed, query-adaptive paradigm.

Semantic Parsing and Representation

Stage 1 operationalizes a fine-grained parsing pipeline that splits textual content at sentence boundaries and infers semantic types using a LLM. Each node is classified as one of six types: step, param, precondition, error_handling, example, or concept. This fine-grained and explicitly typed representation is critical—nearly half of all nodes in the SkillPager benchmark are non-executable, emphasizing the necessity of selective extraction. Figure 3

Figure 3: Example parsed semantic graph for a medium-complexity skill, with nodes color-coded by type and edges denoting sequence and semantic or referential relationships.

Edges are inferred using adjacency, embedding-based similarity, reference matching, and conditional analysis, but the retrieval stage eschews topological traversal in favor of global access—an architectural decision justified empirically.

Query-Adaptive MMR-Based Retrieval

Stage 2 recasts retrieval as a global search in the semantic node space, utilizing MMR to optimize the trade-off between query relevance and redundancy. The objective combines query-node embedding similarity with maximal dissimilarity to already selected nodes, controlled by parameter λ. Critically, all node types remain in the retrieval candidate pool, allowing the system to dynamically include supporting context when warranted.

The retrieval process is governed by a dynamic budget—k=20k=20 for skills with ≤100 nodes, k=60k=60 for larger skills—empirically shown to provide a robust sufficiency-efficiency balance across heterogeneous skills.

Empirical Evaluation

SkillPager is benchmarked on 395 skills and 1,975 synthetic LLM-generated queries. On LLM-judged context sufficiency, SkillPager attains 78.89%—notably close to the 82.23% achieved via full-document injection—while reducing token usage by 47.04%. Among graph-based intra-document baselines, SkillPager demonstrates a substantial 12.16% absolute gain in sufficiency over the strongest alternative, validating the necessity of global, redundancy-aware retrieval.

Notably, substituting fixed-size text chunks for typed semantic nodes in the retrieval pool retains comparable context sufficiency (81.77%) but increases token usage by 28.81%, substantiating the claim that the efficiency gains are fundamentally driven by node granularity, not the retrieval algorithm.

Ablations: Typed Node Utility and Adaptive Inclusion

Ablation studies examine the impact of node selection strategies on retrieval efficacy. Incorporating concept nodes adaptively (rather than excluding or statically filtering them) significantly improves sufficiency—86.67% versus 78.26% for executable-only selection. Heuristic, density-based filtering underperforms even the executor-only baseline, indicating that static rules are inferior to per-query, MMR-based adaptive inclusion. Figure 4

Figure 4: Concept ablation comparison confirming that adaptive inclusion of support content yields superior context sufficiency while minimizing extraneous nodes.

Hyperparameter Analysis

Sweeping the MMR λ parameter reveals a sharp transition in retrieval performance: λ=0.7 and higher provide robust query coverage and context sufficiency, while lower λ settings penalize coverage severely due to over-weighting diversity and triggering early termination. Similarly, context sufficiency encounters diminishing returns with increasing selection budget k; k=20 balances high sufficiency (85.03%) with substantial token reduction (31.66%). Figure 5

Figure 5: Threshold effect of λ on context sufficiency, with optimal regime emerging for λ ≥ 0.7.

Figure 6

Figure 6: Token efficiency versus context sufficiency as a function of budget k; the diminishing-returns regime validates a dynamic budget approach.

Practical and Theoretical Implications

The methodological innovations in SkillPager have several implications:

  • Agent system efficiency: By reducing context size nearly by half with minimal loss in critical execution content, SkillPager enables scalable, low-latency agent execution without sacrificing accuracy.
  • Retrieval-unit granularity: Results demonstrate the superiority of semantically typed nodes over naive chunking for both efficiency and downstream sufficiency, highlighting the importance of semantic parsing in middleware for LLM agent architectures.
  • Adaptive retrieval objectives: The finding that redundancy control via MMR and adaptive type inclusion are necessary for high-quality intra-skill context assembly suggests broad applicability to other intra-document retrieval applications (e.g., modular tool components, compositional API documentation).
  • Limits of graph traversal: The empirical ineffectiveness of graph-based dependency traversal for coverage further emphasizes the need for global, content-based selection in sparse, weakly connected, or procedurally nonlinear documents.

The study also identifies limitations, including reliance on LLM-judged context sufficiency rather than real-world execution or end-to-end agent success, and the exclusion of routing and multi-skill fusion. The dynamic budget's robustness to skill size and λ's stable optimal regime indicate ease of deployment in variable real-world datasets.

Conclusion

SkillPager provides a structured, query-adaptive solution to intra-skill retrieval in agentic architectures, pairing offline semantic graph parsing with online, global redundancy-controlled node selection. Empirical results on a diverse skill benchmark demonstrate that context sufficiency can approach full-document injection while halving token costs. Efficiency is attained not simply through retrieval algorithm design but through semantic granularity and per-query typed node selection. The principled assembly of execution-sufficient prompts positions SkillPager as a foundation for further research into intra-document navigation, multi-skill composition, and robust, compositional context management in LLM agents.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.