TL;DR
RSI-Router is a novel framework that slashes the cost of running LLM agents by intelligently routing subtasks between large and small models. By recursively evolving both routing strategies and model-specific "execution skills," it achieves better-than-GPT-level performance at roughly half the inference cost across complex, long-horizon tasks.
What Problem Does This Paper Address?
Building autonomous LLM agents is a balancing act between performance and price. While massive models like DeepSeek-V4.1-Flash are highly capable, using them for every single step of a 50-step interaction is prohibitively expensive. Conversely, smaller, cheaper models often stumble on specific, complex parts of a task, leading to total failure.
Existing "routing" solutions usually try to pick one model for an entire task (task-level) or decide step-by-step (step-level). Task-level routing is too blunt—it misses the chance to let a small model handle the "easy" parts of a hard task. Step-level routing is often too noisy and lacks the high-level context needed to make good decisions. The authors identify a missing middle ground: subtask-level routing combined with specific guidance to help smaller models succeed where they would otherwise fail.
Methods
The core of the paper is RSI-Router, a framework that uses recursive self-improvement to optimize agentic workflows. It operates in a four-stage evolution loop driven by a large "proposal" model (Codex) during training:
- Subtask Mining: The system analyzes successful and failed trajectories to identify reusable subtasks (e.g., "Locate Source Code" vs. "Verify Fix").
- Routing Strategy Evolution: It proposes different assignments—deciding which model (Large or Small) should handle which subtask.
- Model-Specific Skill Evolution: This is the "secret sauce." The system compares how the small model fails versus how the large model succeeds on the same subtask. It then generates "skills"—specific prompt instructions—that guide the small model to avoid its typical pitfalls.
- Pareto-Optimal Router Selection: It maintains a population of the best-performing routers, balancing the trade-off between success rate and cost.
At inference time, a small model acts as the "router," identifying the current subtask and invoking the assigned model with the appropriate evolved skill attached to the prompt.
Datasets
The authors evaluated RSI-Router on five diverse agentic benchmarks:
- ALFWorld: Household interaction tasks.
- ScienceWorld: Complex scientific experiments in a simulated environment.
- WebShop: Online shopping and product navigation.
- SWE-bench Verified: Real-world software engineering issue resolution.
- Terminal-Bench 2.0: Hard, realistic command-line interface tasks.
These benchmarks represent "long-horizon" tasks where an agent must make many sequential decisions to reach a goal.
Key Insights and Ideas
- Skills Change Capability: A small model isn't just "worse" than a large one; it often just lacks specific procedural knowledge. By evolving "skills" (like "Check open surfaces first" in ALFWorld), the framework effectively upgrades the small model's utility for specific subtasks.
- Subtasks > Steps: Routing at the subtask level provides a structural "map" that makes exploration much more efficient than trying to learn a routing decision for every individual token or step.
- The Pareto Frontier Moves: As the evolution loop progresses, the system doesn't just find one good router; it pushes the entire boundary of what is possible, finding routers that are both cheaper and more accurate than the original baselines.
Key Results
RSI-Router consistently outperformed both single-model baselines and nine other state-of-the-art routing methods.
- Cost Efficiency: On average, it reduced inference costs by 51.7% while matching or exceeding the performance of a large-model-only approach.
- Performance Gains:
- On ALFWorld, it increased the success rate from 90.62% to 98.44% while cutting costs by 75.3%.
- On ScienceWorld and WebShop, it achieved similar performance to the large model at roughly one-quarter of the cost.
- On Terminal-Bench 2.0, it achieved a 16.7% relative performance gain with 18% lower cost.
- Pareto Dominance: As shown in Figure 3, RSI-Router configurations (the green dots) consistently sit above and to the left of other routing methods, meaning they are strictly better in the cost-performance trade-off.
Limitations and Future Work
While highly effective, the framework currently relies on a powerful "proposal agent" (like Codex) to drive the evolution loop during the training phase. This offline evolution is computationally intensive, even if the resulting routers are cheap to run online.
The authors also noted that execution skills don't always improve performance; in some software engineering tasks, they actually improved performance but increased cost due to longer prompts. Future work could involve more dynamic, real-time subtask discovery and exploring how these evolved skills might generalize across entirely different model families.
Summary updated