跳到正文
Ado· @adocomplete · X·AI 评分54

Anthropic 的 Ado Kukic 讲解 Claude Code 中用 define_outcome 事件按评分标准驱动智能体迭代

AI 导读

作者演示发送一个 user.define_outcome 事件(含描述、markdown 评分标准和 max_iterations,默认 3、上限 20)即可让智能体开始工作。每轮后由独立上下文窗口的 grader 评估交付物,避免智能体的偷工理由影响评分,流式返回 needs_revision、satisfied、max_iterations_reached、failed 或 interrupted 及说明。评分标准越具体越好,如“Prices 列是数字”优于“数据看起来不错”。

正文 · 原文

You send one user.define_outcome event: a description, a markdown rubric, and max_iterations (default 3, max 20). The agent starts on receipt.

After each pass a grader evaluates the deliverable. It runs in its own context window, so the agent's reasons for cutting a corner never reach it. The stream reports needs_revision, satisfied, max_iterations_reached, failed or interrupted, with an explanation.

Vague criteria make noisy grades. "Prices column is numeric" beats "data looks good".

来源:Ado · x.com