The AI world is getting ‘loopy’
The AI world is getting ‘loopy’
AI 世界正变得“循环”起来
On Friday, Claude Code creator Boris Cherny made an appearance at Meta’s @Scale conference and, surprisingly, the first question from the audience was about loops. “Are loops the next hype cycle,” the questioner asked, “or are they for real?” Cherny’s answer was an emphatic, “Yes, they’re for real.”
上周五,Claude Code 的创建者 Boris Cherny 出席了 Meta 的 @Scale 大会。令人惊讶的是,观众提出的第一个问题就是关于“循环”(loops)的。“循环是下一个炒作周期吗?”提问者问道,“还是说它们是来真的?”Cherny 给出了肯定的回答:“是的,它们是来真的。”
“Two years ago, we wrote source code by hand. We started to transition so agents write the code. And now we’re transitioning to the point where agents are prompting agents that then write the code,” he continued. “As big as the step from source code to agents was, loops are just as important and as big a step.”
“两年前,我们还是手工编写源代码。后来我们开始转型,让智能体(agents)来写代码。而现在,我们正进入一个新阶段:由智能体去提示(prompt)另一个智能体,进而由后者编写代码,”他继续说道,“从源代码到智能体的跨越有多大,循环的重要性与跨越幅度就有多大。”
Later in the talk (around the 32:00 mark in the YouTube video posted above), Cherny got specific about the loops he keeps running in his own work. One agent is continually looking for ways to improve the code architecture, while another looks for duplicated abstractions that can be unified. They submit pull requests like any other coder, and since the code is constantly changing, they never stop running.
在演讲的后半部分(上述 YouTube 视频约 32:00 处),Cherny 具体介绍了他在工作中持续运行的循环。一个智能体不断寻找改进代码架构的方法,而另一个则寻找可以统一的重复抽象。它们像其他程序员一样提交合并请求(pull requests),由于代码在不断变化,它们永远不会停止运行。
It’s a powerful idea, particularly with a figure as significant as Cherny behind it. With the shift to agentic AI, the focus for most users has been managing their agents as well as possible: establish clear goals, check in on discrete units of progress, and don’t let them stray too far beyond the prompt. The loop takes it a step further by authorizing a swarm of agents to work continuously in the background, endlessly. It’s a lot of trust to place in AI — but with models getting better fast, it could be the next step in getting AI to handle real work.
这是一个强有力的理念,尤其是在像 Cherny 这样重要人物的推动下。随着向智能体 AI 的转变,大多数用户的关注点在于尽可能好地管理他们的智能体:设定明确的目标,检查离散的进度单元,并确保它们不会偏离提示词太远。而“循环”更进一步,授权一群智能体在后台持续、无休止地工作。这需要对 AI 寄予极大的信任——但随着模型快速进化,这可能是让 AI 处理实际工作的下一步。
The first thing to recognize is that this isn’t entirely new. Recursive loops — functions that call themselves in order to repeat an action, along with a condition that stops the loop — are a mainstay of intro computer science courses. These loops are following a non-deterministic logic — that is, it’s a subagent that chooses when to stop the loop instead of a clear condition — but the same basic approach is at work. As soon as programmers started using AI to complete tasks, some version of the recursive loop, with AI overseeing AI, was bound to come up.
首先要认识到,这并非完全新鲜事物。递归循环——即函数调用自身以重复某个动作,并配有停止循环的条件——是计算机科学入门课程的基石。这些循环遵循的是非确定性逻辑(即由子智能体而非明确的条件来决定何时停止循环),但其基本方法是一样的。一旦程序员开始使用 AI 完成任务,某种形式的递归循环(即 AI 监督 AI)就必然会出现。
Unlike classic computing, agentic loops can be maddeningly simple. One of the most popular tricks is the Ralph Loop (named for Ralph Wiggum), which basically sums up all the work that the model has done and asks if it’s accomplished its goal. It’s a way of dealing with AI models getting lost as they run for too long — essentially bouncing the model back and forth until the task is complete.
与传统计算不同,智能体循环可以简单到令人抓狂。最流行的技巧之一是“拉尔夫循环”(Ralph Loop,以《辛普森一家》中的 Ralph Wiggum 命名),它基本上是总结模型所做的所有工作,并询问它是否完成了目标。这是一种应对 AI 模型因运行时间过长而“迷失”的方法——本质上是在任务完成前让模型反复确认。
Another way to think of loops is as part of the general push for more test-time compute. As OpenAI researcher Noam Brown observed earlier this month, contemporary models can solve nearly any problem if you throw enough compute at them. That means one way to ensure a problem gets solved is to just keep throwing compute at it until it’s finished. That’s particularly true for hill-climbing problems like improving a code base, where the model can just keep making incremental improvements until it reaches a given threshold. Or, as in Cherny’s example, it can just keep making incremental improvements for as long as there’s compute to spend on it.
另一种理解循环的方式是将其视为对更多“测试时计算”(test-time compute)的普遍追求的一部分。正如 OpenAI 研究员 Noam Brown 本月初所观察到的,如果投入足够的计算资源,当代模型几乎可以解决任何问题。这意味着确保问题得到解决的一种方法就是不断投入计算资源,直到任务完成。对于像改进代码库这样的“爬山问题”(hill-climbing problems)尤其如此,模型可以不断进行增量改进,直到达到预设阈值。或者,正如 Cherny 的例子,只要有计算资源可供消耗,它就可以一直进行增量改进。
If that sounds expensive, it should. Like agentic AI before it, AI loops burn through tokens a lot faster than simple Q&A chatbots — and because the point is to keep the loop running all the time, there’s no ceiling to how much you can spend. That’s fine for Anthropic, which is ultimately in the token-selling business, but for everyone else, it may be a pricey way to work. Still, depending on the problem the agentic loop is trying to solve, and the right setup that allows for oversight of token spend, drift, and other classic AI issues, the benefits could be staggering enough to outweigh the costs.
如果这听起来很昂贵,那确实如此。和之前的智能体 AI 一样,AI 循环消耗 Token 的速度远快于简单的问答聊天机器人——而且由于其核心在于让循环持续运行,你的支出可能没有上限。这对 Anthropic 来说没问题,毕竟他们最终是靠卖 Token 为生的,但对其他人来说,这可能是一种昂贵的工作方式。不过,根据智能体循环试图解决的问题,以及能够监控 Token 消耗、模型漂移和其他经典 AI 问题的合理设置,其带来的收益可能足以抵消成本。