The point of this post is that this is explicitly not the case. If the metric is measured, the agent finds a way eventually (around 5 total tries typically unless it gets stuck), and learns from iterations where changes caused a regression after a revert.
In one case I used a made-up metric (since I didn't know the exact name or if it existed) and it somehow optimized that too.
I was actually emphasizing a methodology like yours. There is a lot more going on in your post than "the metric is measured." And even then, there's no guarantee the model will do anything except burn all your tokens trying stuff, it just won't commit the failed attempts.
"Attempting" implies a high risk of failure. That is not the case with the workflow described in the article, and from other comments, the approach is generally reliable as well.
It's also not terrible on token usage for smaller projects.
I don't know why I have to say this again, but I am telling you that the workflow you underlined in the article is good. But the more you argue about it, the more it sounds like you want people to take a more generalized conclusion than what you actually demonstrated.
> "Attempting" implies a high risk of failure.
Of course it does? Your safeguards also imply a high risk of failure. You have restrictions that just rollback everything the LLM "attempts" to do.
That is not to say that the overall workflow is failure prone, but obviously you have setup an apparatus that allows the LLM to just shotgun attempts, whether it understands it or not. And sometimes it's not going to be able to find any solution. So it's not really appropriate for people to leave with the impression that anything measurable can be successfully optimized with LLMs.
In one case I used a made-up metric (since I didn't know the exact name or if it existed) and it somehow optimized that too.