Best Prefix Selection Algorithm for Cost-Aware LLM Agent Skill Loading
August 21, 2026
Best Prefix Selection (BPS) optimizes skill selection for LLM agents by maximizing a submodular benefit function under a hard token budget. This approach avoids the performance degradation and high costs associated with greedy top-k semantic retrieval in bounded context windows.
HOW THIS AFFECTS YOU
●
builderYou can reduce token costs and improve agent performance by optimizing how you pack skill documents into context windows.
●
researcherThis provides a provable bicriteria guarantee for skill selection performance and cost.