跳到正文
DEV Community· Kent Alstad·· 2 小時前AI 評分39

AI 智能體開發:我不再衡量智能體接收多少上下文,改為計算需要重複糾正它們多少次

I stopped measuring how much context reaches my agents. Now I count how often I have to correct them twice.

AI 導讀

作者停止以上下文工具是否進入智能體工作階段作為主要指標,改為追蹤智能體重複犯已糾正錯誤的次數。系統會把獲批准的糾正轉成專案規則,在相關工具呼叫前觸發;基線約每日 3–4 次,規則啟用首 2.6 天約 23 次,作者表示下一步會制定更具體的規則並重新計算。

正文

A short update from the series on evidence-based agentic development.

For months the question was reach: does our context tool get into the agent's session? We fixed that. It pushes into every prompt, file read, shell command and SDLC step. And when I checked what agents did with it, the answer was: almost nothing. A note in, the same work out.

So I've dropped that measure as the headline.

What I kept doing was correcting them. Use the cached tools, not raw gh. Don't restart my running apps. Verify the UI by screenshotting it. The problem is that a correction lives in one session. The next session, the next runtime, the next machine makes the same mistake, and I say it again.

That's the measure now: how often I have to correct an agent for something I've already corrected. It should fall toward zero.

What we've built around it:

  • Corrections are captured when I make them and, once I approve them, turned into rules for the project.
  • Rules fire at the moment they apply — before the tool call they're about, not as a wall of text at the start of a session.
  • Guards stop the repeat outright when a rule says an action is never allowed.

The first count, from my own sessions in mid-October, judged message by message the same way as the baseline the rulebook was built from:

Repeat corrections per day
Baseline, the 45 days before the rules (a usual week) about 3–4
The first 2.6 days with the rules live about 23

It went up. Most of it is the same three things — follow what I actually said, keep moving once I've approved, check the facts before stating them — and most of it came from a few long sessions, a release day among them, where I was correcting in bursts.

So a rule that fires at the right moment isn't enough yet. The rules are the broad ones, and broad rules are easy for an agent to read and still miss. The next step is narrower rules for the specific moments I keep correcting, and counting again.


Talking about this at Build Stuff 2026

This is one of the write-ups behind my talk at Build Stuff in Vilnius this December, the 15th edition, under the theme The Age of Agency.

Control Your Fate at the Metal
Wednesday 2 December, 15:00, Zeta 2. 45 minutes.

If you're coming, say hello. If you're not yet, 2026SPEAKER_20 takes 20% off a ticket.

#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf https://buildstuff.events

來源:DEV Community · dev.to