←新闻详情

邵猛更新于 10月21日 22:46

Grok Bot 团队提出信任 AI Agent 的四层倒金字塔框架

怎么才能更信任你的 Agent 的工作呢?

AI 导读

Grok Bot 团队的 Lauren(@poteto)提出一套信任 AI Agent 工作成果的四层倒金字塔框架,主张把最多精力放在改造代码库本身,而非管教 Agent。四层按投入递减依次为代码库改进(架构、类型与不变量、模块边界)、静态分析(Lint、测试、CI、TLA+ 等形式化验证)、文字性指导(注释、AGENTS.md、Skills 描述)和人工审查。她认为越靠上层手段越确定、越省 token,越靠下层越依赖 Agent 不可靠的理解和难以规模化的人力,提示词本身只是第三等手段。

推荐理由

AI 评分 60

这套四层倒金字塔把信任 Agent 的着力点从提示词移到代码库结构,给出了可迁移的工程优先级。

主题

标签

引用

lauren

@poteto

how do you trust your agents' work more? copy this post/link and give it to your @bot or agent! 1. codebase improvements: this is just good software engineering - better architecture, stronger types and invariants, clear boundaries. agents love to copy what exists and take the shortest path, so make the easy thing the right thing. categorically eliminate…

展开完整原文

how do you trust your agents' work more? copy this post/link and give it to your @bot or agent! 1. codebase improvements: this is just good software engineering - better architecture, stronger types and invariants, clear boundaries. agents love to copy what exists and take the shortest path, so make the easy thing the right thing. categorically eliminate problems through code and you won't need to think about it again. 2. static analysis: lint rules, tests, CI, verification (eg TLA+). very token efficient ways to catch issues ahead of time. 3. prose: comments, rules, AGENTS.md, skills - anything that can't be enforced and requires agent judgment. use it minimally, but do use /create-verification-skill. 4. human review: the hardest to scale. at the rate agents land code, it's pretty much impossible to thoroughly review every PR, so spend that effort on the highest leverage point, designing an environment where agents do the right thing by default. this forms an inverse pyramid: you want most of your effort at the top, least at the bottom. codebase improvements are deterministic, making it more token efficient, and lets you sleep more soundly at night. install https://t.co/u9xIlN3eN0 and create a new Project: 1. look through my slack/chat messages and code review comments where i've given feedback on PRs, code, architecture 2. use /recall on my past transcripts to learn how i steer agents 3. /poteto-mode use /correct and /architect on past commits to find the most common pitfalls agents fall into, then propose a plan to rearchitect the code i own so it's more agent friendly. answer open questions with prototyping rather than defer to me, and back the plan with real data. 4. before you begin, use /sharpen + /in-your-own-words and confirm this prompt with me

查看原帖

正文

怎么才能更信任你的 Agent 的工作呢?

Grok Bot 团队 @poteto 提出了一套如何信任 AI Agent 工作成果的四层“倒金字塔”框架。她认为,与其花精力“管教” Agent,不如花精力改造代码库本身!

# 四层倒金字塔 (精力投入从上到下递减)

第一层:代码库改进 (投入最多) 更好的架构、更强的类型系统与不变量、清晰的模块边界。

Lauren 认为这本质上“就是好的软件工程”。理由在于 Agent 的天性:Agent 倾向于复制已有代码、走最短路径;所以与其对抗这个天性,不如让最短路径本身就是正确路径。

第二层:静态分析 Lint 规则、测试、CI、形式化验证(如 TLA+)。这是性价比很高的第二道防线,用极低的 token 成本在问题早期就拦截它,出错反馈是确定性的,不依赖 Agent “理解”了什么。

第三层:文字性指导 (最少使用) 代码注释、规则文件 (如 AGENTS.md)、Skills 描述等。这一层的共同弱点是无法强制执行,它要求 Agent 自行判断是否遵守,而 Agent 的判断并不总是可靠,所以只能作为补充,用在确实需要主观判断的场合。

第四层:人工审查 (最难规模化) 人的精力有限,不应消耗在逐行检查 Agent 产出上,而应投向更上游的事:设计出让 Agent 默认就做对的环境。

为什么金字塔是“倒置”的? 传统上团队把大量精力放在金字塔底部 (写规范、人工审查),而 Lauren 主张反转: · 越往上层,手段越是确定性的 (代码结构直接决定 Agent 能走什么捷径) 且token 高效的(不需要反复沟通纠偏); · 越往下层,越依赖不可靠的理解与不可扩展的人力。

这和业界近年 “从 prompt engineering 转向 context/engineering 工程” 的共识是同一方向;但 Lauren 把它推到了更根本的层面:连提示词本身都只是第三等手段,真正的杠杆在代码库里。

来源

邵猛