最新资讯
bloomberg.com Nvidia 加强东南亚芯片追踪以打击走私 thestack.technology 模型路由需求升温,Agent Router 推出开源替代方案 unite.ai Cashfree 为 AI Agent 的托管结账加入 WebMCP 工具 dev.to 我们在 DolphinBench 上测试记忆检索:纯关键词搜索暴露了自身回归 dev.to 别再把 Agent 写成 while 循环,把它建模为状态机 analyticsindiamag.com 小语言模型可能重塑企业 AI 部署方式 bloomberg.com Rightmove 与 Scout24 借 AI 产品应对低迷房市并上调展望 stackoverflow.blog 欢迎来到芯片时代:半导体制造、AI 数据中心与芯片设计的未来 www.youtube.com AI Agent 总犯同样的错:CentralAgent AI 将记忆重构为经验系统 pub.towardsai.net Netflix 科学家建议重采样 LLM 评判:5 次仅将误差棒缩小 13% pub.towardsai.net Jev 作为 LLM 前的静默层:构建提示感知的模型路由器 reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准
多元动态
登录 注册
大模型 x.com · @bcherny

Anthropic 的 Boris Cherny:Claude 生成代码的质量分层与护栏实践

原文 我的收藏

Boris Cherny 认为一次性原型代码可当作黑盒处理,而 Claude 编写的生产代码应比人类代码有更高标准。他提到 Anthropic 内部通过大量 lint 规则、测试、Claude 驱动的端到端测试、每日运行的 Claude 模糊测试、自动代码审查与安全审查、自动重构等护栏来保证质量,否则会积累难以维护的债务。若代码不达标,可尝试使用最新前沿模型(Opus 5 或 Fable 5.1)、提高 effort 到 high 或 xhigh、投入 CLAUDE.md 和 skills 教会 Claude 适配代码库,或更多人工引导、让 Claude 偿还技术债并重写代码库。

AI推荐理由 Anthropic 的 Boris Cherny 给出 Claude 生成代码质量分层的实践观点:一次性原型可当黑盒,生产代码标准应高于人类代码,并列举 lint、测试、Claude 驱动的端到端测试与模糊测试、自动代码审查与安全审查、自动重构等护栏,以及提升模型版本、effort、CLAUDE.md/skills 等具体手段。属于一线从业者的经验性观点而非可验证数据,无量化证据,但信息密度较高、对使用 AI 编码的团队有直接参考价值。

72 浏览 103,161 点赞 1,631 评论 100 转发 66

正文

Hey ████, I think there is room for both. 1. Prototypes and other throw-away code can be treated as totally black box. If you’re going to throw it away anyway, and if the blast radius of it breaking is low, it doesn’t need to be perfect. 2. Production code written by Claude should have a higher bar than if it was written by a human. At Anthropic, we have many guardrails in place to make sure this is happening: lots of lint rules, lots of tests, Claude-driven end to end tests, Claude-powered fuzzers running daily, automated code reviews and security reviews, automated code refactoring, and so on. Without these, you can end up with a mess that is hard to maintain down the line. Luckily, the model makes it increasingly easy to do these well — run a few daily routines, use Claude Code Review, etc. Your job is to hold the bar on code quality. If Claude’s code doesn’t meet the bar, try: - Using the latest frontier model (Opus 5 or Fable 5.1) - Increase effort to high or xhigh - Invest in your CLAUDE.md and skills to succinctly teach Claude how to work in your codebase If all else fails, steer Claude more when you work with it, or have Claude fix accumulated debt and rewrite your codebase to make it easier to work with. Or, wait for the next model. Best, Boris

来源报道 · 3 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容