The prompt engineering fashion is over. Now what is important is loop engineering

In the last three years we have seen how if you wanted to be an advanced user of AI, you had to become a prompt engineer: The way you ask the AI ​​things was vital to achieving the best results. That idea is now becoming obsolete, because an even more promising technique is beginning to emerge to make the most of chatbos.

From prompts to loops. The new paradigm that has become a viral trend among developers is that of the so-called “loop engineering” (“loop engineering”) that assumes something important: that the AI ​​is going to hallucinate or make mistakes. And with this method a feedback system is implemented: a subagent generates a response, another audits it and looks for errors, and then the system automatically reruns the process until the result meets the quality standards specified by the user.

AI Gurus Recommend Loops. Boris Cherny, creator of Claude Code, explained in a recent talk how he no longer writes prompts in Claude Code, but instead writes loops. “Loops do the job. My job is to write loops.” Peter Steinberger, creator of OpenClaw, agreed and commented on X that “you should not write prompts for scheduling agents. You should design loops that create prompts for your agents.” Addy Osmani, head of Google Cloud, exactly stated same idea: “loop engineering is replacing you as the person who creates the prompts for the agent. You design the system that does that instead of you.”

Implacable cycle. This type of approach is what has managed to succeed in AI agents such as Claude Code or OpenClaw. The model can run code in a safe environment, test it, read error messages if they exist, and then fix those failures to get back to the beginning. AI already “reasoned”, but now it is capable of self-assessment and self-correction autonomously and independently. Steinberger put a clear example how to design one of these loops.

Goodbye to the chat window. The technique is being very popular among developers, but at the same time it poses a potential disappearance of the traditional chatbot in the browser window. The value was previously in chat with AI and experiment with promptsbut now the idea is to propose automated workflows. The user only sees the initial problem and the final solution, there are no constant questions and doubts unless the user wants to refine after that final solution.

Be careful with costs. The problem with this idea is that by designing a loop one can launch several subagents that work in parallel. This implies an expenditure of tokens that can be considerable, which threatens to be very expensive. The recommendation, of course, is to use subagents and loops when it makes sense.

Another stage in the evolution of AI. The passing of the prompts to loops poses a new phase in the evolution of AI. ChatGPT amazed us by creating quick poems, but the process was inefficient because talking is not always the optimal route to achieve the desired result. The profession of ‘prompt engineer’ could therefore be threatened after that initial phase in which knowing how to talk to the AI ​​was the important thing. Now the powerful thing is knowing how to design those loops that end up doing everything for the user.

Image | Compagnons

In Xataka | Claude Code is being the big favorite among programmers. So much so that he already signs 4% of everything that is uploaded to GitHub

Leave your vote

Leave a Comment

GIPHY App Key not set. Please check settings

Log In

Forgot password?

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

Add to Collection

No Collections

Here you'll find all collections you've created before.