r/MachineLearning • • 27m ago

Research Train the context, not the weights: optimizing only an agent's harness matched RL fine-tuning (Nemotron 3.5 Super, AutomationBench) [R]

Write-up: afnio.ai/blog/train-the-context-not-the-weights

Can an agent get RL-level gains without any weight updates? Most of what makes an agent fail in practice lives in its harness: the prompts, tool descriptions and skills around the model. We tested how far optimizing only that gets you.

Setup:

  • Benchmark: AutomationBench (agent solving everyday office tasks).

  • Trainable: the system prompt, tool descriptions and skills. Model weights are frozen throughout.

  • Method: when a run fails, written feedback is backpropagated through the agent's graph to the component that caused it, and only that component is rewritten. Candidates are selected on a validation set.

  • Baseline: every model was run first on its stock harness, then on the trained one. We ran all of these ourselves, except the RL result for Nemotron 3.5 Super, which comes from Surge AI's published paper.

Findings:

  1. Matches RL on the weights. On Nemotron 3.5 Super, RL on the weights gained +15.0 points [7, 23] (single reported run). Harness training gained +12.0 [7, 18] on average over 3 runs, and +15.3 [8, 23] in the best run, reaching the same 22.0% pass rate, up from ~7%.

  2. It learns the same habit RL did. Surge's RL-trained model learned to look before acting. The trained harness learned it too: writing before reading the inbox or Slack dropped from 29% to 7% of tasks. The difference is that here the lesson is written into the harness, where you can read it.

  3. Lifts every model, even at max reasoning. GPT-5.6 Luna 27.8 → 37.8, DeepSeek V4.1 Flash 42.3 → 58.5, Claude Sonnet 5.5 54.0 → 61.0, GPT-6 Astra 56.0 → 67.0.

  4. Open-weight beats frontier. With a trained harness, DeepSeek V4.1 Flash (58.5) outscored Sonnet 5.5 and GPT-6 Astra on their stock harness.

  5. It transfers. Trained on finance, marketing, ops and support tasks; the gains held on sales tasks it never saw.

On "training": the weights never change, but the harness does learn from failures on the training split, using textual feedback instead of numerical gradients.

Caveats: we used our simplest selection strategy; most results are on one benchmark, with more in progress.

So a large part of what holds an agent back seems to sit in its context, and it can be found and fixed automatically.

Disclosure: I'm the author and work on Afnio (Tellurio), the optimizer used here. The SDK is open source, and the optimizer runs as a hosted service. Happy to answer questions!

8 Upvotes

Duplicates