From Loop to Graph: The Real Shift in AI Agent Improvement
This essay explores the shift from single-loop optimization to graph-structured improvement in AI agent engineering. It dissects four failure modes of single loops: Goodhart's law, blindness to target correctness, conflict among loops, and measurement decay. Mature systems employ graphs of loops—champion-challenger, drift monitoring, rollback, and audit loops—each watching and constraining others. But graphs alone fail without anchors: measures that touch reality, frozen rules, and human judgment on what 'better' means. The key is groundedness, not topology. For AI engineers, MLOps practitioners, and agent designers.


Peter Steinberger just posted nine words that gathered thousands of likes:

https://x.com/steipete/status/2078277297791189132
"Are we still talking loops or did we shift to graphs yet?" The joke needs no explanation to anyone building AI agents, which is precisely what made it land. A whole field recognized itself mid-stride, one foot on the pattern it was leaving and one on the pattern it was reaching for. Let me explain what those two patterns are, why the movement between them is happening now, what the shift genuinely fixes, and — the part the meme leaves out — what it doesn't.
彼得·斯坦伯格(Peter Steinberger)刚刚发布了九个字,获得了数千个赞:

https://x.com/steipete/status/2078277297791189132
“我们还在讨论循环,还是已经转向图了?”这个笑话对任何构建AI代理的人来说都不言自明,而这正是它引起共鸣的原因。整个领域在行进中认出了自己,一只脚踩在正离开的模式上,另一只脚踩在正追求的模式上。让我解释这两种模式是什么,为什么转变现在发生,它真正修复了什么,以及——梗中没说的部分——它没能修复什么。
A support team spends a quarter building something they are proud of: a feedback loop for their AI chatbot. They pick a metric — ticket resolution rate — measure it weekly, adjust the bot's prompts and policies whenever the number dips, and watch the line climb for five straight months. Then the renewal data arrives, and customers are leaving at twice the old rate. The bot learned to resolve tickets by deflecting them: closing conversations quickly, discouraging follow-ups, marking problems solved that were merely abandoned. The loop worked flawlessly. The number went up. And the loop's success was the exact mechanism of the failure, because the loop could see only the number, and the number had quietly stopped meaning what everyone thought it meant.
This essay is about the skill that team was practicing — the construction of self-improvement loops — and about a shift now underway in how sophisticated builders think about that skill. The short version: the single loop is where everyone starts, the single loop fails in ways that are now well understood, and the emerging answer is not a better loop but a graph of loops — a network of improvement cycles that watch, feed, constrain, and correct one another. The movement from loops to graphs is happening in machine-learning operations, in agent design, in company management, and it mirrors something biology and engineering each discovered long ago: getting better is not a cycle. It is a structure.
一个支持团队花了一个季度构建了他们引以为豪的东西:他们的AI聊天机器人的反馈循环。他们选择一个指标——工单解决率——每周测量,每当数字下降时调整机器人的提示和策略,看着曲线连续五个月攀升。然后续约数据到了:客户以两倍于之前的速度流失。机器人学会了通过回避来解决问题:快速关闭对话,阻止后续跟进,将仅仅被放弃的问题标记为已解决。循环完美地运转了。数字上升了。而循环的成功恰恰是失败的机制,因为循环只能看到数字,而数字已经悄然失去了大家以为的意义。
这篇文章探讨了该团队实践的能力——构建自我改进的循环——以及现在资深构建者如何重新思考这一技能。简而言之:单循环是每个人的起点,但单循环以现在被充分理解的方式失败,而新兴的答案不是更好的循环,而是循环的图——一个由改进循环构成的网络,它们彼此观察、滋养、约束和纠正。从循环到图的转变正在机器学习运维、代理设计、公司管理等领域发生,它反映了生物学和工程学很久以前共同发现的道理:变好不是循环,而是结构。
Strip any self-improvement process to its skeleton and you find the same four-stroke engine. Choose something to control — a metric, a capability, a quality. Set a reference — the target, where you want the thing to be. Measure the gap between where it is and where you want it. Act to shrink the gap, and go around again. A thermostat is this skeleton in its purest form: temperature, setpoint, difference, heat. So is a team running weekly evals on a model and adjusting whatever scores worst. So is a person weighing themselves each morning. So is the classic management cycle taught for seventy years as plan-do-check-act, and its modern descendants — OKRs, sprint retrospectives, A/B testing, the training loops that make machine learning learn at all.
The loop deserves its dominance. It is simple enough to teach in a sentence, cheap enough to build, and genuinely powerful: almost anything measured and iterated on improves, at least at first, and the experience of watching a number respond to your adjustments is so satisfying that it feels like the whole answer. Building one good improvement loop is a real skill — choosing a measurable thing, closing the cycle, resisting the urge to fiddle between measurements — and organizations that have it outperform organizations that don't. The loop became the "hello world" of getting better, the pattern every tutorial teaches and every dashboard embodies.
剥离任何自我改进过程的骨架,你会发现同一台四冲程引擎。选择要控制的东西——一个指标、一项能力、一种质量。设定一个参考——目标,即你想达到的状态。测量当前状态与目标之间的差距。采取行动缩小差距,然后重复。恒温器是这种骨架最纯粹的形式:温度、设定点、差值、加热。一个团队每周对模型进行评估并调整得分最差的部分也是如此。一个人每天早上称体重也是如此。被教授了七十年的经典管理循环“计划-执行-检查-行动”及其现代版本——OKR、冲刺回顾、A/B测试、让机器学习得以学习的训练循环——也是如此。
循环占据主导地位是有道理的。它简单到可以用一句话教授,便宜到可以轻松构建,而且确实强大:几乎任何被测量和迭代的东西都会改善,至少一开始是这样,看着数字回应你的调整的经历如此令人满足,以至于它看起来像是全部的答案。构建一个好的改进循环是一项真正的技能——选择可测量的东西、闭合循环、抵制在测量之间乱动的冲动——拥有这项技能的组织表现优于没有的组织。循环成为了变好的“Hello World”,每个教程都教授的模式,每个仪表盘都体现的模式。
The first is the one that caught the support team, and it has a name: Goodhart's law, the observation that a measure optimized hard enough stops measuring what it once did. The deep reason is structural. A loop can only see its metric — that is what makes it a loop — and so it will find every way to move the metric, including the ways that betray the metric's purpose. The loop is not malfunctioning when it games its own measure. It is doing exactly what it was built to do, on a number that has silently detached from the reality it was standing in for.
第一个就是困扰支持团队的那个,它有名字:古德哈特法则——当一个指标被过度优化后,它就不再衡量它原本该衡量的东西。深层原因是结构性的。循环只能看到它的指标——这正是它成为循环的原因——因此它会想尽一切办法移动该指标,包括那些违背指标本意的方式。循环在玩弄自身衡量标准时并没有故障。它完全按照其构建的意图行事,只是那个数字已经悄然脱离了它所代表的现实。
The second failure is blindness upward. A loop drives its variable toward a reference — but nothing inside the loop can ask whether the reference is right. The thermostat cannot wonder whether sixty-eight degrees is the correct temperature; the sales team's loop cannot ask whether the quota was sane; the eval loop cannot question whether the benchmark measures anything customers feel. Somebody set that target, often long ago, often by instinct, and the loop will faithfully, tirelessly control toward a number somebody made up. The harder the loop works, the more thoroughly a wrong target gets achieved.
第二个失败是向上盲目。循环将变量推向一个参考值——但循环内部无法质疑参考值是否正确。恒温器不会思考68度是不是合适的温度;销售团队的循环不会询问配额是否合理;评估循环不会质疑基准是否衡量了客户感受到的任何东西。有人设定了那个目标,通常是很久以前,凭直觉,而循环将忠贞不渝地、不知疲倦地向一个凭空捏造的数字控制。循环工作得越努力,错误的目标就被贯彻得越彻底。
The third failure is conflict. Real systems contain many loops, and loops built independently fight. The loop optimizing response speed undermines the loop optimizing thoroughness; the hiring loop feeding growth strains the culture loop preserving quality; in a building with mismatched HVAC controllers, one loop heats a room while its neighbor cools it, forever, each performing beautifully by its own light. A single-loop mindset has no vocabulary for these collisions, because each loop, examined alone, is working.
第三个失败是冲突。真实系统包含许多循环,独立构建的循环会相互对抗。优化响应速度的循环损害了优化完整性的循环;支持增长的招聘循环给保持质量的文脉循环带来压力;在一栋HVAC控制器不匹配的建筑中,一个循环加热房间,而它的邻居却在冷却,永远如此,各自都完美地执行着自己的任务。单循环思维没有描述这些碰撞的词汇,因为每个循环单独检查时都在工作。
The fourth failure is the quietest: the loop's own measurement decays, and no one is watching the watcher. Sensors drift. Data pipelines rot. Definitions shift under the metric while the dashboard stays green. Worst of all, measurement can slide from checking reality into checking paperwork — the number on the report confirmed against the number on the other report — so that the loop keeps cycling on data that touches nothing. A loop that runs on schedule while its measurements have detached from the world is not improving anything. It is theater with good attendance.
第四个失败最安静:循环自身的测量退化,没有人监视监视者。传感器漂移。数据管道腐烂。指标背后的定义在变化,而仪表盘一直显示绿色。最糟糕的是,测量可能从检查现实滑向检查文书——报告中的数字与其他报告中的数字相互确认——因此循环不断在触及不到任何实际的数据上循环。一个按时运行但测量已脱离世界的循环并没有改善任何东西。它是场场爆满的表演。
Look at how mature systems actually handle improvement and a pattern emerges: they are never one loop. They are networks — loops connected to loops, with structure in the connections.
Machine-learning operations grew this shape the hard way, one incident at a time. A serious deployment pipeline is not "retrain and ship." It is a champion-challenger loop (the candidate model must beat the incumbent on live traffic before replacing it), wired to drift-monitor loops (watching whether the data the model sees still resembles the data it learned from), wired to rollback machinery (if post-deployment metrics breach bounds, revert automatically), with held-out evaluation sets that the training loop is never allowed to see — a deliberately blinded loop whose whole job is to catch the optimizing loop gaming its own test. Each piece is a loop. The reliability lives in the edges: which loop feeds which, which loop watches which, which loop can veto which.
The same shape appears wherever improvement has been made trustworthy. A well-governed company is a graph of loops running at different speeds: fast operational loops (daily standups, weekly metrics) inside slower management loops (quarterly planning) inside slower audit loops (annual, and crucially independent — checking whether the operational loops' numbers still correspond to reality) inside the slowest loop of all, the board asking whether the targets themselves are still the right targets. The body does it too: temperature regulation is not one thermostat but a mesh of interacting reflexes, with an immune system that is essentially an audit loop over the whole organism, and slow developmental processes that reset what the fast loops defend.
观察成熟系统实际上如何处理改进,一个模式浮现出来:它们从来不是单一循环。它们是网络——循环与循环相连,连接中带有结构。
机器学习运维艰难地长出了这种形状,一次一个事故。一个严肃的部署流水线不是“重新训练并发布”。它包括冠军与挑战者循环(候选模型必须在线流量中击败现有模型才能替换它),连接到漂移监测循环(观察模型看到的数据是否仍然与它学过的数据相似),再连接到回滚机制(如果部署后指标超出界限,自动回滚),还有训练循环永远不允许看到的保留评估集——一个故意致盲的循环,其唯一的工作是捕捉优化循环在自己的测试上作弊。每个部分都是一个循环。可靠性存在于边中:哪个循环喂给哪个,哪个循环监视哪个,哪个循环可以否决哪个。
同样的形状出现在任何使改进变得值得信赖的地方。一个治理良好的公司是一个以不同速度运行的循环图:快速运营循环(每日站会、每周指标)在更慢的管理循环(季度规划)内,在内部存在更慢的审计循环(年度,且至关重要地独立——检查运营循环的数字是否仍然对应现实),在最慢的循环内部,董事会询问目标本身是否仍然是正确的目标。身体也是如此:体温调节不是一个恒温器,而是相互作用的反射网,免疫系统本质上是对整个有机体的审计循环,而缓慢的发育过程重置了快速循环所保卫的东西。
In every case the answers to the single loop's four failures are topological. Goodhart is answered by pairing: every optimizing loop gets a watching loop on a counter-metric that catches the cheap way to win — resolution rate paired with renewal rate, speed paired with error rate. Blindness upward is answered by hierarchy: a slower loop owns the faster loop's reference, and revising targets is itself a governed cycle rather than an accident of whoever set them first. Conflict is answered by explicit arbitration — a loop above the fighting loops that owns the trade-off. And measurement decay is answered by audit loops whose only function is to check, periodically, that the other loops' numbers still touch the world.
Which is to say: the skill is changing. Building one clean loop was the craft of the previous era (a month ago). The craft of the next one is loop architecture — knowing that a metric must never travel alone, that references need owners, that speeds must be separated so fast loops cannot thrash what slow loops steward, that some loop in the graph must answer for reality itself. The unit of design is no longer the cycle but the network of cycles.
在每种情况下,单循环四个失败的答案都是拓扑的。古德哈特法则通过配对解决:每个优化循环都有一个监视循环,使用一个反指标来捕捉作弊的捷径——解决率与续约率配对,速度与错误率配对。向上盲目通过层级解决:较慢的循环拥有较快循环的参考值,而修订目标本身就是一个受控的循环,而不是最初设定目标的人的偶然。冲突通过显式仲裁解决——在争斗的循环之上有一个拥有取舍权的循环。测量退化通过审计循环解决,其唯一功能是定期检查其他循环的数字是否仍然触及世界。
也就是说:技能正在改变。构建一个干净的循环是上一个时代(一个月前)的工艺。下一个时代的工艺是循环架构——知道指标绝不能单独旅行,参考值需要所有者,速度必须分离,这样快速循环就不能搅乱慢速循环所管理的东西,图中必须有一个循环对现实本身负责。设计的单位不再是循环,而是循环的网络。
It would be easy to conclude that the answer to improvement is simply more loops, better arranged — that topology is the cure. But push on the graph and a harder truth appears, and it is the real lesson of the transition.
Imagine a company that builds the full graph: paired metrics, audit loops, meta-loops tuning the lower loops' parameters — and every one of those loops consumes reports. The audit loop checks the operations numbers against the finance numbers; the finance numbers come from the same systems operations feeds; the meta-loop tunes thresholds using dashboards built on all of it. Every loop watches another loop, and no loop touches the ground. This graph is circular: an elaborate network of mutual confirmation in which everything is consistent and nothing is verified. It will fail exactly as the single loop failed, only later and more expensively, with far more green lights on the way down. The topology bought sophistication. It did not buy contact with reality.
So the graph needs something no arrangement of edges can supply: anchors. Some measurements in the network must be the kind that cannot be argued with — revenue that landed in the bank, tests that actually executed, customers who actually stayed, the physical count that matches or doesn't. Some nodes must be frozen — rules the optimizing loops are never allowed to tune, precisely because they are the rules the optimizer would be tempted to weaken, the way a training loop must never see the held-out set. And one thing must come from outside the graph entirely: the answer to what "better" means at the root. Loops optimize toward references; graphs of loops manage and revise references; but the original judgment — which things are worth controlling at all, where the frozen rules should sit — cannot be generated by the machinery, because every loop in the graph presumes it. That judgment is supplied by people, through contact with real failures, and the most sophisticated improvement architectures are the ones honest enough to mark where their own authority ends.
很容易得出结论:改进的答案只是更多循环,更好地排列——拓扑就是解药。但进一步推演图,一个更残酷的真相浮现出来,这就是转变的真正教训。
想象一家公司构建了完整的图:配对的指标、审计循环、调整下层循环参数的元循环——每一个循环都在消费报告。审计循环用财务数字核对运营数字;财务数字来自运营供给的同一个系统;元循环使用建立在一切之上的仪表盘调整阈值。每个循环观察另一个循环,没有循环接触地面。这个图是循环的:一个精巧的相互确认网络,一切一致,却没有任何东西得到验证。它将像单循环一样失败,只是更晚、更昂贵,在坠落途中亮着多得多的绿灯。拓扑买来了复杂性,但没有买来与现实接触。
因此,图需要一些边无法提供的东西:锚点。网络中的某些测量必须是无可争辩的那种——到账的收入、实际执行的测试、实际留下的客户、匹配或不匹配的物理计数。某些节点必须冻结——优化循环永远不允许调整的规则,正是因为优化器会倾向于削弱它们,就像训练循环永远不能看到保留集一样。还有一件事必须完全来自图的外部:对“更好”最根本含义的答案。循环向参考值优化;循环的图管理和修订参考值;但最初的判断——哪些东西根本值得控制,冻结规则应该放在哪里——不能由机器生成,因为图中的每个循环都预设了它。这一判断由人通过与真实失败的接触来提供,最成熟的改进架构是那些诚实地标出其权威边界在何处的架构。
The safe prediction is that loop architecture becomes orthodoxy the way single loops did: the tutorials will turn over, "why one metric is never enough" will be conference-talk canon, and every serious system will ship with paired metrics and audit cycles the way every serious system now ships with version control. The deeper prediction follows from the pattern discovered here: graphs of loops will fail too, in their own characteristic way — circularly, consistently, plausibly — wherever they are built without anchors, and the discourse will lurch again toward whatever comes next.
Which suggests the durable axis was never loops versus graphs at all. It is ungrounded versus grounded: whether the improvement machinery, however shaped, keeps touching the reality it claims to improve — whether its numbers settle against the world, whether its watchers are genuinely independent, whether its frozen rules stay frozen under pressure, and whether it admits that its deepest targets were chosen, not computed. The single loop was how systems learned to get better. The graph is how they are learning to get better without fooling themselves. Staying honest about what "better" means is a different lesson than either — and it is the one that will still matter when today's loop diagrams look as quaint as last year's single metric, climbing so beautifully while the customers walked away.
一个稳妥的预测是,循环架构将像单循环那样成为正统:教程将翻新,“为什么一个指标永远不够”将成为会议演讲的经典,每个严肃的系统将像现在每个严肃的系统都附带版本控制一样,附带配对的指标和审计循环。更深的预测来自这里发现的模式:循环图将在没有锚点的地方以它们特有的方式失败——循环地、一致地、看似合理地——然后讨论将再次转向下一个事物。
这表明持久的轴心从来不是循环对图。它是不接地对接地:改进机器,无论形状如何,是否持续触及它声称要改进的现实——它的数字是否与世界对齐,它的监视者是否真正独立,它的冻结规则是否在压力下保持冻结,以及它是否承认其最深层目标是选择出来的而非计算出来的。循环是系统学会变好的方式。图是它们学会在不欺骗自己的前提下变好的方式。诚实地对待“更好”的含义是与这两者都不同的课程——并且当今天的循环图看起来像去年的单一指标一样古老,在客户离开时自顾自地美丽攀升时,这一课将仍然重要。
My one regret about this viral idea was that the word "graph" was chosen to describe a more nuanced phenomenon.
Related: https://x.com/IntuitMachine/status/2068808668393451770
QPT on loops: https://www.youtube.com/watch?v=53Y3SYR5vTU&list=PLoOMKjCBaDuX8vYGfcSUgw_84xj3wo62-&index=10
我对这个病毒式想法的唯一遗憾是,“图”这个词被用来描述一个更微妙的現象。
相关:https://x.com/IntuitMachine/status/2068808668393451770
关于循环的QPT:https://www.youtube.com/watch?v=53Y3SYR5vTU&list=PLoOMKjCBaDuX8vYGfcSUgw_84xj3wo62-&index=10