Even better, have it write code to describe the right thing then run its code against that, taking yourself out of that loop.