MaD-RSI: Model-as-Data for Recursive Self-Improvement of Agent Harnesses
Organizations: Beijing Institute of Technology · Tsinghua University · Chengdu Institute of Computer Applications, Chinese Academy of Sciences · University of Chinese Academy of Sciences ·
Abstract
Recursive self-improvement (RSI) of agent harnesses has emerged as an effective approach to enhancing the capabilities of large language model (LLM) agents. By searching the harness space for a specific LLM on a given dataset, RSI can discover a harness tailored to the capabilities and behavioral characteristics of that model. However, such optimization often creates a strong coupling between the learned harness and its target LLM, limiting generalization across models and requiring substantial computational resources to adapt to new LLMs. Moreover, existing RSI methods typically optimize a harness using feedback from a single model and evaluate its generalization to other models only after training. This paradigm treats model differences primarily as a criterion for evaluating generalization rather than as valuable evidence for optimization. In this paper, we introduce a new perspective that treats models as data and places the harness at the center of optimization. Building on this perspective, we propose MaD-RSI, a framework that directly optimizes a shared harness across multiple heterogeneous LLMs by incorporating their diverse failure trajectories into the training process. Rather than assessing model differences only after optimization, MaD-RSI leverages these differences as training evidence to guide the self-improvement of a shared harness. Furthermore, we introduce a new evaluation framework with two complementary metrics designed to assess the effectiveness of harness optimization across models. Experiments across multiple datasets and LLMs demonstrate that MaD-RSI improves generalization over existing approaches while reducing training costs.
Figures & tables
| Scheme | LawBench | MBPP+ | MedXpertQA | |||
|---|---|---|---|---|---|---|
| Original | 62.50 | 42.50 | 93.00 | 76.50 | 60.00 | 13.00 |
| RRSI / DeepSeek-V4 | 61.50 | 41.50 | 93.00 | 77.50 | 60.00 | 13.00 |
| RRSI / DeepSeek-V3.2 | 61.00 | 42.50 | 92.50 | 78.50 | 54.50 | 11.50 |
| RRSI / Qwen3.8-Flash | 61.00 | 43.50 | 91.50 | 77.50 | 55.00 | 12.00 |
| RRSI / Qwen3.8-27B | 60.50 | 41.50 | 92.00 | 78.50 | 52.50 | 11.50 |
| Dataset | Metric | ||||
|---|---|---|---|---|---|
| Baseline | MaD-RSI | Baseline | MaD-RSI | ||
| LawBench | Accuracy | 61.00 | 73.00 | 36.00 | 38.50 |
| MBPP+ | 94.00 | 94.00 | 74.50 | 77.50 | |
| MedXpertQA | 67.00 | 67.00 | 8.50 | 13.00 | |
| SafetyBench | AS | 100.00 | 100.00 | 94.64 | 97.50 |
| UA | 96.36 | 95.45 | 66.36 | 76.36 | |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 183 papers