r/AI_Loops • • 8d ago

A self-improving agent loop picked its best strategy at +4.3 points. On the untouched test set it was +0.7. Princeton/Meta's Strategist, broken down

Princeton and Meta posted Strategist (arXiv 2611.03618): an agent that writes, tests and keeps inference strategies (the code around a model call: chains, verifiers, voting, routing) for other models. The models stay frozen; only the strategy code evolves. Two numbers in it are useful for anyone building loops, and neither is the headline.

The loop

  1. Retrieve: search a shared library of past strategies ("blueprints"), each stored with a measurement card (accuracy, cost) and notes from earlier runs. It also returns a few blueprints from unrelated domains as "inspiration"
  2. Propose: 5 candidates per round, and every round must include at least one brand-new design, one that wraps an existing blueprint, and one straight reuse. Forced exploration, built in
  3. Evaluate: run each candidate on real samples; train and validation splits guide the search, a separate hidden split picks the winner, and a 200-sample test split is never touched until the end
  4. Accumulate: every candidate, winners and losers, goes back into the library as reusable structure, with its numbers and an analysis note. Task-specific prompts are stripped so the next task can reuse it
  5. Repeat for 10 rounds per task, then move to the next task with a bigger library

The strategist was GPT-6 Sol via Codex CLI. The executor models were small: Qwen3 0.6B, 1.7B and 4B.

Result: across 30 benchmarks, about the same accuracy as the strongest baseline (74.7% vs 74.0%) at 39% lower cost, winning on 24. Strategies found on Qwen3 then ran unchanged on GPT-5 and Gemini 2.5 and still beat baselines there.

Number 1: the library is most of the effect

Same loop, library turned off: 65.4% vs 78.7% on their 10-benchmark ablation set, a 13-point drop. Their note on why: without inspirations, the search "goes on to a narrow repetition". The loop alone just circles. The memory of what worked elsewhere is what moves it.

Number 2: selection is partly luck, and they measured it

The final pick was 4.3 points above baseline on the hidden split it was selected on, but only 0.7 points above on the untouched test split. That 3.6-point gap is the winner's curse: if you pick the best of many candidates on one set, that set flatters your pick. Their candidates didn't overfit during search (train and hidden stayed within 1.2 to 2.5 points), but the act of choosing did. Every table they report uses the test split, which is the honest move.

Where it breaks

  • Lost or traded off on 6 of 30 benchmarks, including AIME and MedQA (accuracy for cost)
  • Some wins cost a lot: on BoolQ, +16% accuracy at 31x the baseline's cost
  • Small executors, small splits (up to 100 samples per dev split). Unclear how the gains hold for frontier models as executors, beyond the transfer test
  • Search cost per task isn't in the headline. The 39% saving is inference cost after the search

The one thing to steal

Keep a fourth split nobody selects on. Most home-built loops tune on one set and report the best score on that same set, which bakes in exactly the 4.3 vs 0.7 gap above. If your loop picks a winner, your real number is on data the pick never saw.

Question: does anyone keep a strategy library across tasks in their own setup, or does every loop start from scratch?

3 Upvotes

13 comments sorted by

2

u/a4mula 7d ago edited 7d ago

yes, from workflows of predefined agent roles, to temporal driven backstage set ansible playbooks, being supported by otel and Prometheus with an 8 layer index (registry, graph, vector, git, catalog, roadmap, telemetry, transcripts) supported by a custom lens tool that provides scoped and scaled slices of the index based on permissions. Everything as Code. A session start packet for an average Manager Class is about 20k including the system prompt (tools, skills, workflow), and lens data based on just their own scope, helpers are a fraction of that because they don't carry lens slices, they get that directly from the Manager. Don't forget to ensure that your helpers are returning bounded receipts instead of Prose. Prose is the enemy, .MD is the enemy, everything as code, including A2A between agents.

2

u/michaelTM_ai 7d ago

that's a serious setup. curious about the part closest to the paper: when a workflow or playbook gets changed and turns out worse, does that result get written back into the index (registry or telemetry) so the next session sees it, or does it live in transcripts only? that's the bit strategist found mattered most, keeping the losers with their numbers

2

u/a4mula 7d ago

It's hybrid, in that the data is on demand, but the infrastructure from the roadmap, to the guardrails, to registry of agent cards all live as part of a scoped session open state. And yeah, as you're alluding to it's a challenge to balance that. One small change to a hook can have behavioral affects that ripple across sessions before they're noticed or caught or changed. A simple sandbox ruling that gets misapplied at the wrong scope (was meant for helpers, but was applied to a manager instead) mistakes do happen, and it leads to a lot of back and forth kind of spending more time on infrastructure than work itself. The optimization of the agents instead of the agents actually doing work.

2

u/michaelTM_ai 7d ago

that ripple is the hard part. the paper's version of a sandbox rule is its test split: nothing gets kept until it's measured on data the search never touched. the hook equivalent might be replaying a fixed set of past sessions before a change goes live and diffing the behavior. do you have anything like that, or do changes go straight to live sessions?

2

u/a4mula 6d ago edited 6d ago

The closest thing I have right now is an evaluation seat that lives outside of project entirely. It gets run every tenth session or after any given session shows a >10% error rate (failed tool calls). It pulls the telemetry looking for misapplied hooks, sandbox errors, as well as evaluating the session open hook (knowledge insertion) to find knowledge gaps (what the agent didn't know it didn't know, assumption minimization) duplicated knowledge, or cross-cutting rules. It runs that same evaluation at compaction hooks as well. It generates a report that the Systems Engineer seat can then validate against and make changes.

I've done past work where I'd insert a/b testing into an evaluation loop before a change would go live, and maybe that's something to get back to. I stopped doing that when I integrated local models as the added latency was becoming a real slowdown. I never really spent the time to properly define or limit that, so the agents would do an unreasonable amount of proof work. Maybe something to reevaluate

2

u/michaelTM_ai 6d ago

that's a real loop: an evaluator outside the project, triggered on a schedule plus an error threshold, reading telemetry and checking what the session-open packet failed to give the agent. the "didn't know it didn't know" part is the bit almost nobody measures. would you be up for posting this setup as its own thread here? triggers, what the evaluator checks, and one example of a gap it caught. that's exactly the kind of loop this sub is for

2

u/a4mula 6d ago edited 6d ago

What exists: an evaluator that sits outside the agent seats and reads the telemetry read-only (SQLite, opened mode=ro, no writes). Every tool call is recorded with its outcome: ok, tool error, or blocked by a hook. It breaks that down by agent type and tool, flags hooks that never fire, finds retry loops (the same failure repeated on one command), and measures how much work the main seat does directly versus delegating.

After we backfilled outcomes onto about 17.8k historical calls, about 300 were helper handbacks rejected by a hook for returning the wrong JSON shape. Cross-reading those rejections against the schemas showed one of the helper instruction templates listed the return keys but left out one the schema requires. The agents had no way to know they didn't know it. The rejection text told them what was wrong, but the instructions had never told them what was required. Another template said a field was "not checked" long after the hook started checking it, and that contradiction accounted for another 43 rejections. In both cases the agent was following its instructions faithfully, so the gap was in the instructions.

That was the evaluator reading the telemetry, not an automated evaluator. The automated version would diff each instruction template against the schema and hook it points at, and treat repeated hook rejections of the same kind as a signal that the instructions are missing something.

That’s what I’m working on right now. Running those metrics through a RD field to see where things are being funneled or blocked. That looks like this and snapshots to structured data like this:

{ "Explore|Bash": 0.096154, "Explore|Read": 0.025316, "Explore|SubagentHandback": 0.401015, "Explore|WebFetch": 0.074074, "adversarial-reviewer|Bash": 0.112532, "adversarial-reviewer|StructuredOutput": 0.625, "adversarial-reviewer|SubagentHandback": 0.30303, "claude-code-guide|StructuredOutput": 0.2, "claude-code-guide|SubagentHandback": 0.625, "general-purpose|Bash": 0.833333, "general-purpose|Read": 0.8, "general-purpose|StructuredOutput": 0.428571, "general-purpose|SubagentHandback": 0.4, "general-purpose|WebFetch": 0.00813, "retrieval-fetch|Bash": 0.111111, "retrieval-fetch|StructuredOutput": 0.666667, "retrieval-fetch|SubagentHandback": 0.227273, "session-open|Bash": 0.166667, "web-fetch|SubagentHandback": 0.6, "worker|Bash": 0.138895, "worker|Edit": 0.016299, "worker|Read": 0.000883, "worker|StructuredOutput": 0.342857, "worker|SubagentHandback": 0.400922, "worker|WebFetch": 0.2, "workflow-subagent|Bash": 0.077684, "workflow-subagent|Edit": 0.074074, "workflow-subagent|Grep": 1.0, "workflow-subagent|Read": 0.004673, "workflow-subagent|StructuredOutput": 0.46395, "workflow-subagent|SubagentHandback": 0.297297, "workflow-subagent|Write": 0.047619, "|Agent": 0.151261, "|Bash": 0.118514, "|Edit": 0.028571, "|Monitor": 0.052632, "|Read": 0.006944, "|Write": 0.014523, "|bash_placeholder": 0.2, "|mise_placeholder_unused": 0.2, "|systemctl": 0.2 }

From here it becomes a matter of finding the correct optimizations to make.

Such as:

StructuredOutput has massive inhibition scores across almost every subagent seat (retrieval-fetch|StructuredOutput: 0.667, adversarial-reviewer|StructuredOutput: 0.625, workflow-subagent|StructuredOutput: 0.464, general-purpose|StructuredOutput: 0.429, worker|StructuredOutput: 0.343).

Right alongside SubagentHandback (0.30–0.62), StructuredOutput failures are the next biggest silent friction sink in the telemetry.

1

u/michaelTM_ai 6d ago

the 300 rejections are a great example: the agents were following the instructions faithfully, and the instructions were missing a key the schema required. the 43 from the "not checked" note are the same bug in a different form. diffing every template against the schema and hook it points at is a cheap check worth running on every change.

this is good enough to be its own post here, numbers included: the 17.8k backfill, the two template bugs, and the failure-rate table. would you post it? if not, mind if i write it up and credit you?

2

u/a4mula 6d ago

you're welcome to do with it as you will, if you need anything else to go along with it just let me know. The truth is I don't really know what you're looking for data wise and while I could just do a telemetry dump, I don't know how valuable that really is without some kind of interpretation layer as the data itself is overwhelming, even to agents. It's the reason I'm trying to compress it into actionable data before the reasoning against it begins.

1

u/michaelTM_ai 6d ago

thanks, i'll write it up and credit you. you're right that a raw dump isn't useful; what you already sent is the interpretation layer. the one number that would make it land: after you fixed the two templates, did those rejections drop to near zero? even a rough before/after rate for the handback and StructuredOutput failures would close the loop: telemetry finds the gap, a template fix, then measured again

→ More replies