Understanding the Challenges in Iterative Generative Optimization with LLMs
Organizations: Google DeepMind · CNRS · Stanford University · Carnegie Mellon University ·
Abstract
Generative optimization uses large language models (LLMs) to iteratively improve artifacts (such as code, workflows or prompts) using execution feedback. It is a promising approach to building self-improving agents, yet in practice remains brittle: despite active research, only 9% of surveyed agents used any automated optimization. We argue that this brittleness arises because, to set up a learning loop, an engineer must make ``hidden'' design choices: What can the optimizer edit and what is the "right" learning evidence to provide at each update? We investigate three factors that affect most applications: the starting artifact, the credit horizon for execution traces, and batching trials and errors into learning evidence. Through case studies in MLAgentBench, Atari, and BigBench Extra Hard, we find that these design decisions can determine whether generative optimization succeeds, yet they are rarely made explicit in prior work. Different starting artifacts determine which solutions are reachable in MLAgentBench, truncated traces can still improve Atari agents, and larger minibatches do not monotonically improve generalization on BBEH. We conclude that the lack of a simple, universal way to set up learning loops across domains is a major hurdle for productionization and adoption. We provide practical guidance for making these choices.
Figures & tables
| Batch | Dyck | Shapes | Linguini | Causal | Disambig | Bool Expr | Movie | Boardgame |
|---|---|---|---|---|---|---|---|---|
| 1 | 0.183 0.049 | 0.343 0.039 | 0.149 0.024 | 0.375 0.146 | 0.537 0.036 | 0.177 0.005 | 0.889 0.038 | 0.341 0.032 |
| 3 | 0.063 0.010 | 0.389 0.040 | 0.234 0.012 | 0.408 0.097 | 0.295 0.091 | 0.238 0.006 | 0.683 0.119 | 0.278 0.009 |
| 5 | 0.190 0.031 | 0.200 0.099 | 0.170 0.030 | 0.531 0.018 | 0.526 0.035 | 0.154 0.034 | 0.810 0.016 | 0.276 0.007 |
| Framework | Batch | Boardgame | Causal | Movie |
|---|---|---|---|---|
| LangGraph | 1 | 0.208 0.152 | 0.425 0.082 | 0.680 0.031 |
| 3 | 0.278 0.012 | 0.430 0.109 | 0.703 0.035 | |
| 5 | 0.280 0.020 | 0.493 0.139 | 0.737 0.028 | |
| DSPy | 1 | 0.288 0.035 | 0.472 0.027 | 0.448 0.351 |
| 3 | 0.377 0.025 | 0.341 0.031 | 0.189 0.251 | |
| 5 | 0.299 0.035 | 0.278 0.015 | 0.495 0.173 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Name | Repo |
|---|---|
| Deep RL Repo (CleanRL) | https://github.com/ameliakuang/cleanrl_obj_centric |
| LLM Code Repo | https://github.com/ameliakuang/LLM-Game-Playing-Agents |
| Wandb Log for DQN Training | https://wandb.ai/kuangzy-amelia-stanford-university/obj-dqn-5trials-new |
| Wandb Log for PPO Training | https://wandb.ai/kuangzy-amelia-stanford-university/obj-ppo-5trials-flatten |
| Game | One-Step | Multi-Step | Optimizer Steps | Evaluation Protocol |
|---|---|---|---|---|
| Pong | 1 step | 400 steps | 20 | 10 episodes 4000 steps |
| Breakout | 1 step | 300 steps | 30 | 1 episode 4000 steps |
| Space Invaders | 1 step | 25 steps | 20 | 1 episode 4000 steps |
| Freeway | 1 step | 100 steps | 30 | 3 episodes 2500 steps |
| Asterix | 1 step | 100 steps | 30 | 3 episodes 20000 steps |
| Enduro | 1 step | 100 steps | 30 | 1 episode 5000 steps |
| Performance Level | Feedback |
|---|---|
| High (Reward 300) | “Great job! You’re performing well with an average score of 320 . Try to improve your shooting accuracy and dodging .” |
| Medium (100 Reward 300) | “Good progress! Your average score is 180 . Focus on better timing for shooting and avoiding enemy projectiles .” |
| Low (Reward 100) | “Your average score is 70 . Try to improve your strategy for shooting aliens and dodging projectiles .” |
| Parameter | Value |
|---|---|
| Training examples per task | First 15 examples |
| Validation examples per task | Next 10 examples |
| Held-out test examples per task | Remaining examples (typically 175+) |
| Batch sizes compared | 1, 3, 5 |
| Total optimizer update steps | 15 |
| Number of trials (seeds) | 3 |
Large Language Model-Guided Optimization
Large Language Model-Guided Optimization uses language models to propose, steer, and refine solutions to hard search and design problems.
See all 605 papers