RHO Lets AI Agents Rewrite Themselves Without Any Labeled Data
RHO lets LLM agents rewrite their own tools and skills from past failures — no labeled data needed — lifting SWE-Bench Pro from 59% to 78% in one pass.
Takeaways
- What: Researchers from City University of Hong Kong and Microsoft Research Asia introduce RHO, a method that improves LLM agent harnesses using only unlabeled past trajectories.
- No labels needed: RHO requires zero ground-truth validation data, unlike all prior harness optimization methods (DSPy, TextGrad, Meta-Harness).
- Key result: A single RHO optimization round lifts SWE-Bench Pro pass rate from 59% to 78% — a +19 point absolute gain with no external grading.
- How it works: Three stages — DPP-based coreset selection, parallel group rollout with self-validation and self-consistency signals, then best-of-N harness proposal via pairwise self-preference.
- Beats supervised baseline: RHO (0.78) outperforms Meta-Harness (0.62) at matched compute budget, even though Meta-Harness uses labeled validation data.
- Open source: Code is available at github.com/wbopan/retro-harness under MIT license; requires resettable task environments to apply.
Every AI agent ships with a harness , the bundle of system prompts, tool scripts, and workflow instructions that shape how it behaves. Getting that harness right matters enormously, but improving it after deployment has always required one uncomfortable thing: labeled ground-truth data to tell you whether a proposed change actually helped. A new paper from researchers at City University of Hong Kong and Microsoft Research Asia argues you don't need labels at all. Their method, Retrospective Harness Optimization (RHO), lets an agent audit its own past failures and rewrite its own harness , with no external grading, in a single offline pass.
The label problem nobody talks about
Existing optimization methods typically require ground-truth validation sets, yet such labeled data is difficult to acquire in practical deployment settings. That's a real constraint. When you deploy an agent to handle customer tickets, write code, or navigate web environments, you rarely have a curated benchmark sitting next to it scoring every run. What you do have is a growing pile of past trajectories , the step-by-step logs of everything the agent tried and how it went.
Harness optimization improves an agent by editing the prompts, program parameters, or workflow code that surround a fixed model. Prior work in this space , DSPy, TextGrad, ADAS, Meta-Harness , all share the same dependency: although these methods differ in the surface they edit, all of them steer the search with a labeled validation metric. RHO departs from this paradigm, requiring no validation feedback and improving the harness in a single retrospective pass over unlabeled past trajectories.
The distinction matters beyond benchmarks. In production, the cost of curating a representative labeled validation set is often prohibitive, and a validation set collected at deployment time may not reflect the distribution of tasks the agent will face six months later.
How RHO works
RHO is a self-supervised method that optimizes the agent harness using only past trajectories. Specifically, RHO selects a diverse coreset of challenging tasks from past trajectories and re-solves them in parallel. The agent analyzes these rollouts using self-validation and self-consistency, then generates candidate harness updates and selects the most effective one by its own pairwise self-preference. The whole loop runs in three stages: