Back to AI Research

AI Research

Optimal Skill Selection for LLM Agents with Provabl... | AI Research

Key Takeaways

  • Optimal Skill Selection for LLM Agents with Provable Bicriteria Guarantees introduces a formal framework to improve how LLM agents choose which external skil...
  • Yet current agents score skills independently by semantic relevance and assemble the set by top-$k$ or greedy packing, with no quality guarantee or cost awareness on the selected set.
  • As a result, redundant or poorly chosen skills waste scarce context tokens and can even degrade performance.
  • Optimal Skill Selection for LLM Agents with Provable Bicriteria Guarantees introduces a formal framework to improve how LLM agents choose which external skill documents to load into their limited context windows.
  • Modern LLM agents typically select skills by scoring them individually based on semantic relevance and then using heuristics like top-k or greedy packing.
Paper AbstractExpand

Loading reusable skill documents into a bounded context window is now the primary way large language model (LLM) agents acquire task-specific capabilities, which makes skill selection a first-order determinant of task performance and token cost. Yet current agents score skills independently by semantic relevance and assemble the set by top-$k$ or greedy packing, with no quality guarantee or cost awareness on the selected set. As a result, redundant or poorly chosen skills waste scarce context tokens and can even degrade performance. We give the first model of how the selected skill set shapes execution outcomes and cast skill selection as an optimization problem: choose a skill set under a hard token budget to maximize a monotone submodular benefit minus context penalty. For this problem, we develop Best Prefix Selection (BPS), a polynomial-time algorithm, and prove, to our knowledge, the first performance guarantee for skill selection: a bicriteria $(1-1/e,1)$ approximation whose benefit coefficient is optimal in polynomial time. On a contamination-controlled BigCodeBench variant, BPS outperforms all the baselines, reaching $0.73$ measured task success versus $0.20$--$0.52$ for released skill routers, text retrievers, and the executor's own selection, on $28\%$ fewer tokens than the strongest released router.

Optimal Skill Selection for LLM Agents with Provable Bicriteria Guarantees introduces a formal framework to improve how LLM agents choose which external skill documents to load into their limited context windows. By treating skill selection as a mathematical optimization problem rather than a simple ranking task, the researchers provide a way to maximize task performance while minimizing token costs and avoiding redundant information.

The Problem with Current Selection

Modern LLM agents typically select skills by scoring them individually based on semantic relevance and then using heuristics like top-k or greedy packing. The authors, Yu Chen, Ruishuo Chen, Xun Wang, Zhuoran Li, and Longbo Huang, argue that these methods fail because they ignore the "set-level" nature of the problem. Selecting skills is not just about individual relevance; it involves managing capability overlap, complementarity, and the hard constraint of a finite context window. When agents select the wrong combination of skills, they waste tokens and can even degrade performance compared to using no skills at all.

The Best Prefix Selection (BPS) Algorithm

The researchers developed Best Prefix Selection (BPS), a polynomial-time algorithm designed to solve this selection problem. They model the process as a regularized submodular maximization task. In this model:

  • Benefit: A monotone submodular function captures how skills provide specific capabilities, accounting for diminishing returns when multiple skills cover the same capability.

  • Penalty: A linear penalty accounts for the performance degradation caused by excessive context length.

  • Constraint: A hard token budget limits the total size of the selected skill set.
    BPS provides a bicriteria (1-1/e, 1) approximation, which the authors state is the first performance guarantee for skill selection. This means the algorithm achieves an optimal benefit coefficient in polynomial time while strictly adhering to the token budget.

Performance and Results

The authors tested BPS on a contamination-controlled variant of the BigCodeBench benchmark. Their results indicate that BPS outperformed existing methods—including standard skill routers and text retrievers—by achieving a 0.73 task success rate compared to the 0.20–0.52 range of the baselines. Additionally, BPS achieved these results while using 28% fewer tokens than the strongest released router. The researchers also demonstrated that their model could accurately recover latent skill-capability relationships from execution records alone, correctly ranking covered capability pairs over uncovered ones with an AUC of 0.996.

Key Considerations

The effectiveness of this approach relies on the accuracy of the fitted objective function. The authors note that the "fitting error" between their model and the true execution outcomes can impact selection quality. While they provide a proposition showing that this error transfers to selection regret, the practical utility of the system depends on the ability to calibrate the model using execution records. The framework assumes a fixed executor, meaning the parameters must be learned specifically for the model being used to ensure the structured objective remains valid.

Comments (0)

No comments yet

Be the first to share your thoughts!