Improving Performance by Modifying the Harness

Retraining LLM weights every time an agent underperforms is prohibitively expensive. Google Research’s RRSI framework keeps model weights frozen and optimizes the surrounding execution environment instead. Agents recursively refine their own harness - prompts, control flow, tool interfaces, and memory management - while regularizing the search trajectory to prevent benchmark overfitting.

Dual Regularization Across Proposal and Selection

RRSI splits optimization into a proposal stage that generates candidate edits and a selection stage that filters them. During proposal, the system gradually anneals how many components change at once, checks edit history to avoid repeating failed hypotheses, and redirects exploration toward long-untouched modules.

During selection, a critic pre-validates domain logic and accepts only gains that clear evaluation noise margins. Any candidate that adds inference token overhead must deliver a bigger accuracy jump to survive, and low-impact modules get pruned back out. Across out-of-distribution (OOD) evaluations, this dual regularization outperformed prior baselines by up to 22.9% while cutting policy token usage by more than 30%.

Open-Ended Exploration Managed in Git Worktrees

RRSI tracks every harness mutation directly in Git. Candidate harnesses run inside isolated Git worktrees (git worktree), and only changes that pass evaluation merge back into the main branch, keeping the active harness tied to clean commits. Swapping domain adapters lets teams apply the same optimization loop to terminal coding agents, document pipelines, or engineering design tasks.

Released on GitHub under the Apache 2.0 license, RRSI offers a structured blueprint for improving agent systems without touching model weights.

Summary

  • Freezes LLM weights and recursively optimizes prompts, tools, and control flow inside the agent harness
  • Prevents benchmark overfitting and cuts policy token spend by over 30% via dual proposal-and-selection regularization
  • Isolates and validates candidate harnesses in Git worktrees so every accepted change maps to a clean commit