TL;DR
EfficientSkill is a two-phase framework that optimizes LLM agents for both task accuracy and token efficiency. By first discovering a reliable "anchor" skill and then applying accuracy-guarded pruning—including offloading complex logic into workspace utilities—it slashes output tokens by up to 80% while simultaneously boosting accuracy across diverse benchmarks.
What Problem Does This Paper Address?
As we move toward autonomous agents, we often use "reflective optimizers" to help them learn. These systems look at failed attempts and revise the agent's instructions to fix mistakes. However, this creates a "prompt bloat" problem: as the agent encounters more edge cases, its instructions grow longer and more complex.
In multi-turn environments, this bloat is catastrophic for two reasons:
- Quadratic Cost: Most APIs resend the entire conversation history at every turn. Bloated prompts and long reasoning chains cause input tokens to grow quadratically, driving up latency and bills.
- Multi-Turn Drift: Over-fitted, verbose prompts often confuse the agent. Instead of acting decisively, the agent falls into "hesitant re-inspection loops," where it deliberates endlessly or repeats the same failing actions.
Existing efficiency methods often fail because they penalize token usage from the very start. If an agent is penalized for being "wordy" before it even knows how to solve a task, it may never find the successful trajectory needed to learn the skill in the first place.
Methods
The authors introduce EfficientSkill, a sequential two-phase framework:
- Phase 1: Discover Anchor ($A^*$): This is the "unconstrained" phase. Starting from a minimal seed, the system repairs failed rollouts without any length penalties. The goal is simply to establish a high-accuracy baseline (the "anchor").
- Phase 2: Learn Efficient ($S^*$): This is the "guarded pruning" phase. Starting from the anchor skill, the system evolves the prompt to minimize output tokens. Crucially, it uses a validation gate: it only accepts a more efficient version if the accuracy remains within 90% of the anchor's performance.
The "Zero-Body-Cost" Trick:
A key innovation in EfficientSkill is offloading reusable code into a tools.py file in the agent's workspace. By moving deterministic logic (like data parsing or verification) out of the natural language prompt and into an executable script, the agent can call these functions with minimal tokens. The "body" of the code exists on disk, not in the system prompt, effectively costing zero tokens during the reasoning phase.
Datasets
The framework was evaluated across three distinct interactive benchmarks:
- MATH-500: Competition-level mathematics requiring Python execution for symbolic derivation.
- ALFWorld: A text-based environment for household navigation and object manipulation.
- SpreadsheetBench: A real-world task involving programmatic editing of Excel workbooks via Python scripts.
The authors tested these on four models: Claude Opus 5.5, Gemini 3.8 Flash, Grok 4.1 Fast, and the open-weight Gemma 4 26B.
Key Insights and Ideas
- Learning Order Matters: You cannot optimize for brevity until you have achieved competency. Pruning directly from a "seed" (minimal instructions) usually leads to a dead end because the agent lacks the "exploratory" instructions needed to succeed.
- Efficiency as Regularization: Surprisingly, making prompts shorter often made the agents smarter. By trimming "bloated" rules and conversational scaffolding, the authors reduced over-fitting. This prevented agents from falling into the "no-code loops" that plague verbose models.
- Offloading vs. Compression: Traditional prompt compression just shortens sentences. EfficientSkill changes the architecture of the skill by moving logic to workspace utilities, which fundamentally changes the token economics of multi-turn interactions.
Key Results
EfficientSkill outperformed the unconstrained baseline (EvoSkill) on 11 out of 12 model-benchmark configurations:
- Token Reduction: It cut output tokens by 38% to 80% in most cases.
- Accuracy Gains: On SpreadsheetBench, it didn't just save money; it raised accuracy by +14.3 percentage points for Gemini 3.8 Flash and +17.5 points for Grok 4.1 Fast.
- Cost Savings: Total serving costs (including input tokens) dropped by 25% to 67% for uncached requests. Even with full-prefix KV caching, savings remained significant (up to 75%) because the pricer output tokens were reduced.
- Reliability: In SpreadsheetBench, the "concise" agents were 60% less likely to hit 20-turn timeouts compared to their "bloated" counterparts.
Limitations and Future Work
- Dollar vs. Token Optimization: The current gate optimizes for token count ($E_{out}$), which is a good proxy for cost but doesn't account for specific provider pricing models (e.g., different rates for cached vs. uncached tokens).
- Meta-Optimizer Overhead: The process uses a high-end model (Claude Opus) to optimize the skills. While the resulting skills are efficient to run, the training process itself carries a cost that requires a certain volume of tasks to "break even."
- Noisy Verifiers: The study relied on deterministic binary verifiers (right/wrong). Applying this to open-ended tasks where "success" is graded by a noisy LLM judge remains a challenge for future research.
Summary updated