读见

Anthropic 如何构建 Claude API,支持前沿模型与智能体开发

原题Building the Claude API for the Frontier

约 18 分钟原文英文已翻译

视频由 YouTube 提供

推荐理由Claude API 团队解释默认配置、缓存冲突与 Beta 迁移取舍,适合需要在模型更新时评测整套智能体运行逻辑的开发者。

看前速览

4 个要点

Claude API 团队介绍了模型控制、提示缓存和安全限制如何影响生产环境中的智能体工作流。

  1. 产品默认配置来自研究判断

    研究团队先发现模型具备计算机操作等能力,客户需求则会影响后续模型的研发方向。开发者可以先用默认配置,再按工作流需要调整模型投入程度。

  2. 升级模型时重新评测整套智能体逻辑

    模型标识符和 API 版本对应不同类型的变化。从扩展思考迁移到自适应思考的例子说明,平台为何会暂时保留兼容选项,以及用户为什么应在切换前重跑自己的评测。

  3. 按成功完成任务的总成本算账

    提示缓存会复用请求中重复出现的内容块。每个 token 更贵的模型可能消耗更少的 token,也可能完成便宜模型无法完成的任务,所以要结合实际任务结果比较成本。

  4. 访问控制和评测影响发布

    两位讲者介绍了 Mythos 和 Fable 在访问与分类器策略上的差别,也谈到为增加蒸馏难度而调整思考输出的保护措施。团队通过内部实验与评测观察安全措施的影响。

完整摘要

Anthropic 的 Claude API 团队把 Messages API 作为构建智能体的基础,为开发者提供开箱即用的默认配置,也开放思考、投入程度和工具等控制项。团队解释了研究发现和客户需求如何影响功能发布,为什么在对话中途调整投入程度或系统提示可能与提示缓存冲突,以及如何借助 Beta 请求头和临时兼容选项迁移。两位讲者建议,每次更换模型都要评测整套智能体运行逻辑,同时比较单次任务成功的总成本和每个 token 的价格。他们也讨论了如何通过分类器、受控访问和对思考输出的保护来应对滥用和模型蒸馏。

章节

文字稿

查看原文

简要说明Brief Description

为前沿构建 Claude APIBuilding the Claude API for the Frontier

目录Table of Contents

  • 简介
    Intro
  • Messages API 的工作原理
    How the Messages API works
  • 决定发布哪些功能
    Deciding what features to release
  • 处理模型版本管理和迁移
    Handling model versioning and migrations
  • 成本管理的最佳实践
    Best practices for managing cost
  • 使用 Mythos 和 Fable 平衡访问与安全性
    Balancing access and safety with Mythos and Fable
  • API 接下来会怎样?
    What’s next for the API

简介Intro

很多条路都通向提示缓存——虽然并非所有情况都是如此,但对于我们接触的每一位客户,缓存都是我们首先给出的建议。A lot of roads lead to prompt caching, not all, but for any customer that we talk to that caching is the first recommendation we give.

Messages API 的工作原理How the Messages API works

今天我们要聊聊 Messages API,以及更广泛地聊聊 Claude 平台。嗯,对于之前没有基于 Claude Platform 进行开发的人来说,Messages API 是什么?We're going to be talking about the Messages API today and the Claude platform more generally. Um, for folks who have not built on top of Claude Platform before, what is the Messages API?

最简单的理解方式,就是把它看作我们 API 的基石。因此,你可以对它进行定制,用它构建几乎任何你能想象的东西。我们采用了一种非常常见的结构,如今任何在这个行业里开发过产品的人都已对此习以为常:其中包含 assistant 轮次和 user 轮次,中间还有工具调用。从最基础的角度来看,你可以以此为起点,构建任何想要的东西;而在 API 本身中,我们还内置了许多工具,让你能够进一步定制,并调节 Claude 的行为。其中有些工具可以大幅改变 Claude 的行为,比如 effort。使用同一个模型,分别设置高 effort 和低 effort,感觉就像是[无法辨清的比较]。你可以从基本原理出发,构建任何想要的东西;而借助我们加入 Claude API 的这些工具,我们为你提供了更轻松的途径,帮助你打造心目中理想的应用。The easiest way to see it is as the cornerstone of our API. So, it allows you to customize it and build almost whatever you can imagine with it. So, we have this very normal structure that anyone who has been building in the industry is used to by now, in which you have assistant turns and user turns and tool calls in the middle. On a bare-bones perspective, you can take it from there and build whatever you want, but into the API itself, we have built a lot of tools to allow you to further customize and have knobs into Claude's behavior. One of those can change Claude's behavior pretty dramatically, like the effort. You take the same model in high effort and low effort, it feels like [unclear comparison]. You can from first principles build anything you want, but with all these tools we have put into the Claude API, we're giving you a lot of easier path into getting to the ultimate app you want to build.

其中一部分是因为我们有着非常鲜明的观点。所以我们彼此非常接近,处在同一个研究圈子里,对吧?我们共用一栋楼,在 Slack 上有很多交流,也参加很多会议。Some of it comes from us having a very opinionated take. So, we're very close, we're in the same room of research, right? We share building, we share a lot of Slack conversations, a lot of meetings.

有了它,我们对究竟是什么让 Claude 大放异彩,也有了不少很好的见解。我们把这些设为 API 的默认值。所以,你只要从我们的文档里复制粘贴最基本的请求,就能获得我们认为开箱即用的最佳体验。不过,API 里还有各种可调参数,比如 effort,你可以尝试通过提示词让 Claude 表现出某种特定行为,也可以不这么做;但借助这些参数,你能做到的,远远超出单靠提示词所能实现的范围。实际上,它解锁了其他方式无法提供的定制能力。And with it, we have a lot of good take on what actually makes Claude shine. We put those as the default in the API. So, if you just take and you take copy-paste from our documentation, the most basic request, and it's going to carry what we think is the best out of the box experience. But with it, there's also like all those knobs, so such as effort, that you can try to prompt Claude into having a certain type of behavior or not, but with those knobs, you can do more than any prompting outside could ever do. So, it actually unlocks a level of customization that's just not available otherwise.

决定发布哪些功能Deciding what features to release

跟我聊聊我们是如何决定具体推出什么的,比如说,我们会开放哪些调节选项,才能真正释放 Claude 的最佳智能水平?Talk to me about how we decide sort of like what to ship, like what knobs and dials do we allow to actually unlock the best Claude intelligence?

这是一个……与这家公司研究人员之间非常双向的对话。一方面,信息从他们那里传到我们这里:他们不断进行实验、构建,并开始发现 Claude 擅长做什么。这些想法一开始都非常原始。比如,哦,你知道,很久很久以前,他们开始注意到 Claude 越来越擅长使用计算机。It's a it's a very two-way conversation with the researchers at this company. So, one way comes from them to us in which they are experimenting and building and they start finding out things that Claude is good at. And it comes as a very raw thought. Like, oh, you know, once upon a time a long time ago, they started noticing that Claude is getting better at using computers.

是啊,我记得那天。Yeah, I remember that day.

最终,这就变成了我们 API 中的计算机操作工具。但有时情况正好相反:我们会和客户交流,了解他们想要什么、希望我们多做些什么,然后把这些需求转化为研究请求,用来训练新一代 Claude 模型——显然不是过去的 Claude 模型,而是新的 Claude 模型,因为这始终是一个持续推进的流程。因此,我们收到的任何用户请求或用户需求,最终都可以放进 API 中。这个过程会一直持续下去。这是我工作中相当重要的一部分,也是我们每次努力打造出最优秀的 Claude 的方式。And then, ultimately, that became the computer-use tools we have in the API. But sometimes it goes the other way, in which we are talking to our customers and we're understanding what our customers want and ask us more for, and we convert those into actually asks for research to train into Obviously not the past Claude models, but the new Claude models, because there's always a pipeline. So, any user ask or user need we have, we can eventually put it in API. And that keeps going. It's a good chunk of my job. And it's how we actually try to get that best Claude out each time.

是啊,你知道,我们做了些什么,才做出这样一个选择,让我们觉得它确实能赋能开发者,把 Claude 最好的能力也带给他们的终端用户。Yeah, and you know, what have we done to make a choice that we felt like really, you know, empowers developers to bring the best of Claude to their end users as well.

挺有意思的是,这两项听起来都很小,但实际影响很大。对我来说,能在对话过程中调整 effort 和系统提示词,这两点真正体现了以后还能有一个可调旋钮的强大之处。你当然一直可以修改系统提示词,也一直可以调整 effort,但这样就会破坏提示词缓存。对用户来说,这可是无法接受的。It's funny cuz these two feel so small, but they are very big in practice. So, being able to change effort and system prompts mid-conversation are two things for me that really show the power of being able to have a knob later on. And you could always change your system prompt. You could always change effort, but then you break prompt caching. And that's for the users like a deal breaker.

对,因为这是我们在那里能够提供的独特价值。那么,如何做出这些改变?如何在保持成本低廉的同时,打造你想要的体验,或者说,释放出最佳智能能力?Yeah, cuz that's the unique thing that we can provide there, which is okay, how do you make these changes? How do you, you know, empower the experience you want to while, you know, keeping costs low or otherwise, you know, unlocking the best intelligence.

没错。而且你知道,有时候用户的智能体工作流一直以高 effort 运行,他们也知道下一个请求其实更简单,但如果把 effort 改成低,缓存就会失效,这就违背了他们节省成本的初衷。而能够在对话中途调整 effort,确实让它更有用。Exactly. And you know, sometimes a user has an agentic flow that has been operating under high effort, and they know that the next request is actually easier, but if they change the effort to low, the cache is broken and that defeats the whole purpose of their saving cost. But being able to change effort mid-conversation really gives it that power.

那么,我们正在做这些改变。我们与研究团队、推理团队以及许多其他团队(包括安全保障团队)之间保持着紧密的协作闭环。要怎样才能把一个想法通过 API 推向发布,并赋能我们的用户使用 Claude 呢?So, we're we're making these changes. We have like this tight loop with research, with inference, with a bunch of other teams, safeguards included. What does it take to get from idea to launch in the API and empowering, you know, our users to leverage Claude?

有了想法之后,首先要了解 Claude 的表现如何。这通常需要在流程的每个阶段进行评测。After the idea, the first thing you need is some sense of how well Claude works. And that usually goes around evals in each step of the process.

这正是我想深入聊的。比如说,你知道,我们有这么多变更陆续推出,该怎么做才能确保,第一,工作流不会出问题;第二,能充分发挥我们带来的这些各种调节选项的作用?This is what I was hoping to get into. Like, you know, how do you like we have all these changes coming through? Like, what do we need to do to ensure that one, workflows aren't breaking or otherwise, you know, you're getting the best from any of these knobs and dials we're bringing?

是的,我们会进行大量评测,也建议每个采用这些参数的客户都自行进行评测,因为你知道,归根结底,我们提供的是一个 API,适用范围很广,旨在服务所有人。而对于基于它进行构建的客户来说,他们有自己的使用场景,也有专属于他们、只适用于他们的个性化需求。Yeah, and we run a lot of evals and we recommend each customer who is adopting each of these knobs to run their own evals because, you know, ultimately we are an API, we're very generic, we're trying to serve everyone. And for a customer building on top, they have their own use case, they have their own personalization that applies to them and only them in the world.

处理模型版本管理与迁移Handling model versioning and migrations

所以,我们经常会谈到,随着智能能力不断释放,如何调整 API,让 Claude 始终处于前沿。但你知道,传统上,API 都有版本管理,也会有不兼容的变更;我们通常会以迁移的方式来考虑这些事情。比如,用户 X 需要修改 API Y,然后将变更逐步推送给他们的用户。这需要一些时间。而对于模型,情况其实大不相同。那么,当你考虑 API 的新变更时,你会如何确保迁移相对缓慢、发布相对迅速,同时用户也能顺利接纳这些变更?So, we talk a lot about changing things in the APIs as a result of unlocking intelligence, sort of staying at the frontier with Claude. But, you know, traditionally APIs have been versioned, there are breaking changes, and you know, we think about these things in a way of migrations. It's like, okay, user X needs to make a change in API Y and so on and roll it out to their users. It takes some time. With models, it's actually been quite different. So, describe like, you know, in your mind, as you're thinking about new changes in the API, how do you actually ensure that, you know, migrations are relatively slow, you know, that rollouts are relatively fast, and otherwise, you know, users can ingest the changes well?

是的,实际上我也很想听听你对此的看法。我之后会再来看看。Yeah, I'm very curious about your thoughts on this as well, actually. I'm going to check back.

嗯,是的,我觉得很有意思的一点是,你知道,我来自其他领域,也担任过其他角色,在那些地方,API 版本管理相对重要,但也相当令人头疼。模型为我们提供了一种很有意思的版本机制,对吧?我的意思是,你有模型字符串,有 API 版本,这两者相互交织;你还要考虑提示词的稳定性,以及各种变更或开关,让你能够把新的改动带给终端用户。其实很幸运,模型一直处于智能发展的前沿,因此用户更愿意做出调整,因为这些调整带来的价值很高。我认为,这对用户和我们来说,都是一种非常强大的机制,能够确保我们始终提供最先进的智能。Um yeah, I think um one thing that's been very interesting is, you know, I come from other worlds and other roles where API versioning has been relatively important, but also relatively painful. Models provide such a an interesting version mechanism for us, right? I mean, you have this model string, you have an API version, you have an intertwining of these two things, you have prompt stability, you have buckets of changes or switches, rather, that allow you to bring new changes to your end users. And it's actually been very fortunate that models have been able to be really on this frontier of intelligence and because of that, you know, users are more willing to make adjustments because the value is so high for making those adjustments. And I think that is such a powerful mechanism both for our users, but also for us to ensure that we're bringing the best intelligence forward.

所以你知道,我们会花很多心思考虑如何确保 API 版本管理策略跟得上模型智能的发展;同时也会考虑,模型字符串实际上就相当于一个版本,这是否意味着我们能非常迅速地把最强的智能带给用户。不过话说回来,这又回到了你刚才描述的那一点:你的测试框架仍然需要评估、测试,并验证这些变更是否运行良好。你知道,从使用的 token 数量、智能水平到任务结果,所有这些都需要衡量。我认为,任何终端用户都应该认真考虑这些方面。And so, you know, we think a lot about, you know, how to make sure our API versioning strategy keeps up with model intelligence, but also how model strings that effectively is a version may mean that we're bringing the best intelligence very quickly to users. But again, it comes back to what you just described, which is your harness still needs to be evaled, it needs to be tested, it needs to be validated that these changes are working well. And you know, anything from number of tokens used to intelligence to outcome from the task are all measured and I think are very important for any end user to really think about.

是的,进一步展开你刚才提到的一点:有时候,从一个模型切换到另一个模型时,我们需要做一些隐式版本管理。隐式版本管理中比较容易的一种情况是新增功能,没人会抱怨。但有时候,如果你需要弃用某项有人非常依赖的功能,就会比较棘手。Yeah, so to elaborate on something you said there, sometimes we need to do, you know, some implicit versioning when you go from one model to the other. And the easy part of implicit versioning is when you're adding new capabilities, no one complains. It's difficult sometimes when you need to deprecate one capability someone relies a lot on that.

[关于弃用和增量式变更的评论不明确。][Unclear comment about deprecation and additive changes.]

是的。我想到的一个例子是,我们把大家习惯的常规扩展思考改成了自适应思考。那时我们已经知道,自适应思考在评测中的表现更好,而且我们想把它推出去。我们也希望它能成为未来进行思考的方式。所以我们确实推出了它。不过有一段时间,我们仍然把它保留为另一种思考模式,开发者仍然可以切换回旧的思考模式。Yeah. One that comes to mind is when we change the thinking to from regular extended thinking that everyone is used to adaptive thinking. We knew by then that adaptive thinking was already performing better in evals and we wanted to roll that out. And we wanted to be, you know, the way to do thinking for the future. So, we did roll it out. But for a while we kept it as this other type of thinking that you can still switch back as a developer, toggle back to the old thinking.

而且我还没提到这些。我们有 Beta 标头和其他机制,如果你需要时间更新测试框架,可以用它们回滚到之前的更改。And I didn't even touch on these. We have beta headers and other mechanisms for you to roll back to uh previous changes if you need time to update your harness.

没错。嗯,我们也试着争取了这段时间。嗯,到了某个时候,我们还是需要更坚决地弃用旧方式,因为模型终有一天会停止针对这种旧方式进行训练。到那时,如果我们提供的 API 什么也做不了,或者无法按预期工作,对开发者的危害会更大。所以,这就是迁移的截止日期。大体上是这样,不过我们确实会尽可能让过渡平稳一些。你总是可以先逐步迁移一两个模型,我们也会调整推荐方案,但你仍然可以继续用旧方式。Exactly. And uh we tried to buy that time. Uh some of that at some point we need to do a harder deprecation because at some point models stop being trained for this old way. And then for us to put an API that doesn't do anything or doesn't do what it's supposed to would be even more harmful to the developer. So, that's the end date of the migration. Essentially, but we do try to smooth it out as much as we possibly can. You always have a model or two to slowly migrate and we change what is recommended, but you can still go, you know, stay at your old way.

是的。Yeah.

那么,我直说吧,你觉得能力迭代的这个循环是怎样的?开发者在升级到这些新版本时,应该考虑些什么?他们的评测(Evals)循环大概是什么样的?So, let me state it plainly, you know, how do you think about the sort of loop of capability comes out? Like what should a developer think about as they're up upgrading to these new versions? Like what does that sort of loop with their Evals look like?

是的,我觉得总的来说,你应该把这种思路应用到工作流程的每一个环节。即使是在使用应用时,比如你在用 Claude Code,也最好定期重新评估围绕自己的产品所搭建的整套循环和配置,因为模型会不断变化,而模型可能特别擅长某件事,这会让你工具链中的某个环节需要有所不同。这实际上也引出了一个关于如何构建工具链的更广泛话题。我们一直很擅长利用模型的能力,但有时候,如果一个模型比前一个聪明 10 倍,那么工具链就可能开始成为限制因素。所以我觉得,哪怕只是这些变化,也能很好地促使我们重新评估工具链中的某些部分,看看它们是否已经不再必要。至于这个新功能能不能帮你改善提示词缓存:如果提示词缓存效果更好,你就能节省更多成本。Yeah, I think in general you should like apply this thinking for every single part of your workflow. Even as you're using an app, if you're using Claude Code, it's always good to periodically re-evaluate uh all the loop and set up you have around your own product when this models change cuz models can be really good at one thing that makes one part of your harness different. And this is actually goes into a whole conversation about building harnesses in general. We were very good at leveraging capability from the model, but at some point if a model is 10 times smarter than the previous model was, then the harness can start to be a limitation. So, I think even these changes are a good forcing function to re-evaluate parts of the harness that maybe don't need to be there anymore. Whether this new feature can help you get better prompt caching: if you get better prompt caching, you get better cost savings.

成本管理最佳实践Best practices for managing cost

所以,你知道,我们在这方面做了很多事情。我们会进行很多调整,也会针对智能表现做很多更新。同时,我们也会进行很多成本优化。你知道,提示词缓存是我们用来控制成本的最大杠杆之一。除此之外,你觉得在 API 以及其他方面,还有哪些成本控制方法?提示词缓存是我们独特的价值主张之一,我们可以加以控制,并帮助终端用户。So, you know, we do a lot of things on our end. A lot of make a lot of changes, make a lot of updates for intelligence. We also make a lot of them for cost as well. And you know, prompt caching is one of the largest levers that we have in order to control for cost. What are some other, you know, ways that you think about like cost controls in the API and otherwise? Prompt caching is one of our unique value propositions that we can control and help our end users with.

我认为很多路径都会通向提示缓存,虽然不是所有路径都是如此。不过,先花点时间聊聊提示缓存本身。对于我们接触到的任何尚未优化提示缓存的客户,我们给出的第一个建议就是优化它,因为这能显著降低成本。I think a lot of roads lead to prompt caching, not all, but to take a second to talk about prompt caching itself. Uh for any customer that we talk to that still hasn't optimized their prompt caching is the first recommendation you get cuz they're the one that can bring your cost down meaningfully.

那么,什么是提示缓存?它是如何运作的?And what is prompt caching? Like, how does that work?

提示词缓存是个很好的方法,可以看出你是否正处于一个智能体交互轮次中:你的第二个请求与第一个请求非常相似,或者更像是在原有内容后追加。你每次只是在添加新内容。我们会缓存那些已经运行过一次的区块。你知道,每当我们的销售团队与客户交谈时,最先被问到的总是:“你们在提示词缓存费率方面做了多少工作?”Prompt caching is a good way to see if you're if you're in the middle of an agentic turn in which your second request is very similar to your first request or it's more like an append. You're just adding new things each time. We cache those blocks that already ran once. Whenever, you know, our sales teams are talking to customers, it's the first thing that comes up like, "How much have you worked on your prompt caching rates?"

是的。Yeah.

能把提示缓存率提高到 90% 吗?因为那才是我们理想的目标,而且这确实会影响成本,整体来说是双赢。还有其他一些方面,你也可以告诉我你对此总体上怎么看,比如:“你如何看待每项任务的成本与每个 token 的成本之间的关系?”因为我们有些功能不会改变模型每个 token 的成本,但会改变最终使用的 token 数量。Can you get it to up to 90% prompt caching? Cuz that those are the dream numbers to achieve and it really translates to cost and it's a win-win all around. The other ones are like and you can tell me what you think about this in general like, "How do you approach cost per task versus cost per token?" Cuz some of these features we have, they don't change the cost per token of the model, but they change the number of tokens ultimately used.

呃,这是个挺难的问题,因为我觉得你知道,token 和每个 token 的成本只是一种很多人会关注的计量单位。但我们在很多次评测中发现,许多用户也通过大量评测发现,每个 token 的成本还需要结合每个 token 所承载的智能程度来考量。呃,每个 token 的智能程度,指的是你选用的模型能多快实现预期结果。所以,你知道,我们的高智能模型之一,比如 Fable 版本,相较于 Haiku 版本,为了实现同样的结果,所用的 token 数量可能会有天壤之别。因此,我觉得我们又回到了评测这个话题上:“好,太好了。你要如何确保充分发挥所选模型的能力?无论你把这些参数旋钮往哪个方向调,或用什么方式来描述,都要把它们调整得足够好,让你对评测结论有信心:‘哦,实际上,如果我升级到这个新模型,或者调整我正在考虑的这个参数,或者采取其他做法,我仍然能实现同样的结果,只不过成本曲线可能有所不同,而且这种曲线对你更有利。’”Uh it's a it's a tough one because I think you know, tokens and cost per token is just a unit of measurement that a lot of people look at, but a lot of times we've found in many evals and so of our own users have found through many evals that the cost per token um also needs the dimension of intelligence per token. Uh and intelligence per token is how quickly can the outcome be achieved as a result of the model that you've chosen. So, you know, one of our higher intelligence models maybe a Fable version versus a Haiku version is going to be wildly different in terms of the number of tokens used to achieve that same outcome. And so, I think we're almost back to this eval's point of, "Okay, great. How do you make sure that you harness the model that you've chosen, the knobs and dials that you've pushed on, pulled on, however you want to frame it, are tuned and tweaked well enough where you have confidence in your eval story that, "Oh, actually, if I upgrade to this new model or change this dial I'm thinking or otherwise, that you're still achieving the same outcome, but potentially on a different cost curve, one that's favorable to you."

嗯,我们经常看到这种情况:用户会用 Haiku 或 Sonnet,有些情况下这当然很好,但他们没意识到:“哦,其实如果我直接用这些更智能的模型之一,效果会好得多。”我很希望能看到更多人这样做,也希望我们能围绕这一点打造产品,帮助最终用户比现在更轻松地做到这一点。Um we see that a lot with you know, users using um you know, Haiku or Sonnet uh in some cases, which is great, but then not realizing, "Oh, actually, if I were to just use one of these higher intelligent models that it'd be in a in a much better place." That's something that I'd love to see more of and you know, even have us build product around and help our end users do that even easier than they can today.

最明显的信号是:更强的模型价格更高,但它能解决你之前无法解决的测试。The biggest tell is when the stronger model is more expensive, but then it solves a test that you couldn't solve before.

也许反过来也成立,对吧?随着各类模型变得越来越智能,有时候你可能会使用一个智能程度稍低的模型,而它现在也能处理同样的工作流。Maybe the inverse is true, too, right? Where as the models on all classes get more and more intelligent, you know, there are times where you might use a model with slightly less intelligence that is now capable of handling that same workflow.

对,正是这样。所以,也许你之前用 Fable 5 来处理某件事,因为它是唯一能解决这个问题的模型,但现在 Opus 5 也能帮你解决了。Yeah, exactly. So, maybe you're using Fable 5 for something because it's the only model that could solve this, but now Opus 5 can solve it for you.

对,没错。嗯,我们或许稍微换个话题吧。Yeah, exactly. Well, let's maybe shift gears slightly.

借助 Mythos 和 Fable 平衡访问与安全性Balancing access and safety with Mythos and Fable

我很想聊聊这个话题。我们谈过 API,谈过如何利用智能,也谈过评估流程。但我们还没有真正讨论过,应该如何看待潜在的善意使用者与恶意使用者,以及 API 的滥用问题。因为我知道,对大多数使用这些 API 的人来说,这是个非常受关注的话题;而安全是 Anthropic 的首要使命。那么,你怎么看待模型中的善意行为与恶意行为之间的区别?也想聊聊我们最近做的一些调整。这些调整旨在防范什么?为什么这如此重要?I would love to talk about, you know, we talk about the API, we talk about leveraging for intelligence, we talk about eval flows. What we haven't really talked about is how to um think about good actors versus bad actors potentially and misuse of the API. Because I know, you know, a very top-of-mind topic for most folks um that are using these APIs and safety is our number one mission, you know, as Anthropic. So, how do you think about the difference between good acting and bad acting in the models and maybe some of the changes we've been making recently. What are those intended to protect and why is that so important?

每当我们获得一个新模型,就会开始看看它有多聪明。最初的感受就是兴奋,心想:“哇,这个模型能做到以前做不到的事。”我总是提醒自己,公司里的每个人也都会这样提醒自己:我们有很多想法,但我们的客户群体非常庞大,他们能想到的点子会比我们更多。所以,我们拿到这个模型后,首要任务就是让用户也能用上它,这样他们就能打造各种令人惊叹的产品。有人正在用这个模型做科学研究,所以他们需要获得使用权限。第二种本能则是从另一个角度出发:你会担心不法分子会用这个模型做什么。如何在两者之间取得平衡,是很多人关注的重点。Whenever I get a new model, we start seeing how smart it is. We got the first feeling is that this excitement, like, "Wow, this model can do things that it couldn't do before." And the thing that I always tell myself and everyone in this company tells themselves is we have a lot of ideas, but we have such a large pool of customers that they're going to have more ideas than we do. So, we take this model and it is our number one mission to also like get it in front of users so they can build all these amazing products. We have users who are doing science research with the model. So, they need to get their access to this. And the second instinct is the other side of that in which you worry about like what will a bad actor do with this model? And, you know, navigating that balance is the focus of a lot of people.

这是我们的重点之一。你也能从 Mythos 和 Fable 模型之间非常清晰的区分中看出来。It's one of our focuses. And you see it in the very clear split of the Mythos and Fable models.

好,我们来谈谈这件事。Yeah, let's talk about that.

你知道,API 中的每个模型都运行着许多分类器,而其中很多都是为了防止模型被不当使用。You know, every model in the API runs with a lot of classifiers. And a lot of these classifiers is trying to prevent bad usage of it.

是的。Yeah.

你知道,这源于网络空间还有很多有益的事情可以做。You know, it was born of the fact that there's a lot of cyber good to be done.

这正是我们所相信的。我的意思是,我们的使命是保障安全,利用这种智能为社会带来最好的智能和最好的成果。比如如何治愈下一种疾病,如何更好地阻止网络安全问题。你知道,这会带来很多好处。Which we believe. I mean, we like our mission is safety, to bring the best intelligence, you know, best outcomes to society based on that intelligence. How to cure the next disease, how to, you know, ensure that we're having a better blockage on cybersecurity issues. You know, there's a bunch of good to come from it.

是的,没错。让合适的人真正获得访问权限,对我们的使命来说非常重要。Fable 则是这枚硬币的另一面:任何没有完成整套 KYC 流程的人都可以获得并使用 Fable。说到底,它们拥有相同的智能、相同的模型权重。区别只在于,基于分类器,你能用这个模型做多少事情。安全这枚硬币的另一面是,模型会被大量蒸馏。如果我们发布的模型被蒸馏出来,并据此创建了另一个模型,那么当然,它会弱一些,但仍然会是一个强大的模型。这样的模型在未经安全防护的情况下流入现实世界,对全世界来说都是极其危险的。我们为此投入了大量工作,试图阻止这种情况发生。我们也会坦诚地向用户说明这一点。Yeah, exactly. And it is very important for our mission to actually get the right people access to it. And then Fable is the other side of this coin: anyone who doesn't go through this entire KYC process can get and use Fable. And it's the same intelligence, the same model weights at the end of the day. And it's just about how much you can do with this model based on classifiers. The other part of the safety coin is there's a lot of distillation that happens. If we put a model out there that gets distilled but and created into another model, then sure, it'll be weaker but it'll still be a strong model. That model being unsafeguarded in the wild is an incredibly dangerous position for the world. And it is something that we work a lot on to try to stop. And we're very forthcoming and honest to users about this.

所以,我们刚推出了一批关于思维保护的改动,并将其记录为防止蒸馏所需采取的措施。So, we just rolled out a batch of changes on thinking protections. And we documented it as measures we need to do to prevent distillation.

是的,你知道,我们如何确保在开发者体验与这些保障措施之间取得平衡?我们会采用哪些机制来确保这一点?Yeah, how do you make sure, you know, we are balancing the developer experience with some of these safeguards? What are some mechanisms that we use to make sure that happens?

所以,我们会进行大量得离谱的评测。每一个最终公开发布的东西,背后都有另外 10 种版本,是我们在内部试验过的;我们只是想看看哪一种才是真正最好的。这是个很难解决的问题,但解决方案极其依赖数据。要经过很长一段时间,很多人反复查看大量数据,最终才能做出一个决定,做出这个功能,让它……So, we run an absurd amount of evals. Everything that eventually makes it public, there were 10 other variations that we experimented internally that we're just trying to see what is the actual best one. And it is a difficult problem but it's extremely data-driven solution. And it takes a lot of people looking at a lot of numbers over a long period of time to eventually make one decision and this one feature that makes it…

看这些数字其实也挺有意思的,对吧?而且现在模型在某些评测中可能已经表现得非常好了,即使我们做了这些调整也是如此,所以我们实际上不得不把评测做得更难一些,这样模型才能继续提升,或者说取得进步。It's actually quite fun to look at all these numbers as well, right? And even you're getting to the point where the model is maybe so good at one of these evals even in the face of some of these changes that we're making that we actually have to make the evals harder in order for the model to, you know, continue to help climb or otherwise improve.

是啊,评测饱和是个挺有意思、也挺好的问题,我们总是会遇到。Yeah, eval saturation is a very funny, good problem to have that we keep running into.

我们做过一次评测,但后来到了某个时候,它就失去了意义,因为每个模型都能解出来。We had an eval and then at some point it stops being meaningful cuz every model can solve it.

API 接下来会怎样?What’s next for the API

关于未来模型发布这方面,有哪一件事是你特别期待、当然也可以分享的?比如从更广泛的角度来说,有什么是你希望看到并继续推动的?What's one thing that you're excited about for the future when it comes to model launches generally that you can share of course. Things that, you know, maybe more broadly you'd love to see and continue to push on.

最令人兴奋的总是新能力。所以每当一个新模型刚出炉,内部就总会有一种推动力:它能做什么?我们能不能测试一下之前做出来、但一直失败的所有原型?我觉得归根结底,这一切都关乎模型智能。其他方面也很重要,但没有什么比模型智能更重要。所以我们经常做的一件事,就是重新评估所有功能。我们会重新评估许多以前没能推出的功能,因为它们还不够好。我们的备选功能中总有一些还没推出,因为它们的表现还没达到我们希望提供给用户的水平。The most exciting one is always new capabilities. So there's always this drive internally whenever a new model is fresh out of the oven, like how what can it do? Like can you test all the prototypes that you built before that were failing? And I think ultimately it's all about model intelligence. Everything else next to that matters, but nothing matters as much as model intelligence. So what we do a lot, we re-evaluate all of our features. We re-evaluate many features that we didn't launch before cuz they weren't good enough. We always have a few features in our set of options that we haven't launched yet because it's just not at the performance level we want to put out for users.

是啊。Yeah.

每次我们往 API 里添加东西,都得确保它,你知道,是有质量保证的。Every time we put something in the API it needs to be, you know, has a stamp of quality.

是的。Yes.

我们真的很在乎这件事。We really care about it.

是的。Yes.

新模型即将推出时,最让我兴奋的是,我们会对所有这些项目进行评测,看看现在有没有哪些达到标准了。只要有,我们就会把它发布出来。我们也会努力把同样的洞见传达给用户:那些以前已经很接近、但还没达标的项目,现在达标了吗?And the thing that excites me the most when we have a new model coming up is we run evals on all those, like do any of those clear the bar now? And when it does we actually put it out there. And it's something that we also try to pass that same insight to our users, like all these things that were very close but not there before, are they there now?

是的。随着我们看到 AI 开始进入各种工作流,你们如何看待长时间运行的任务,以及如何不断演进 API 来支持这些自主流程?Yeah. How are you thinking a lot about long-running and evolving the API to power these autonomous flows as we see AI, you know, running into all these workflows?

归根结底,我们的很多 API 都是为智能体设计的。你知道,如果你打开我们的文档,很快就会看到 Claude Managed Agents 这项服务。关于它有很多可以说的,但它确实让你能非常轻松地快速创建功能强大的智能体。另一方面,正如我们之前谈到的,Messages API 本身是我们的基石,我们在其中提供了很多功能,而这些功能归根结底大多都是围绕智能体工作流设计的。这源于我们与许多构建智能体的客户进行了大量交流。我们提供的其他工具主要是客户端工具,都是我们知道效果不错的工具。这得益于我们大量的评测;你始终可以使用自己的 bash 工具或文本编辑器工具,也可以使用我们提供的工具。A lot of our API is designed at the end of the day about for agents. So you know, if you open our docs you'll very quickly see about our Claude Managed Agents offering. And there's a lot that can be said about that, but it's it gives you a really easy way to just spin up and have very, very powerful agents. But, on the other side being as uh as we talked a lot about the cornerstone of the Messages API itself, we have a lot of features there, but most of them they are at the end of the day about agentic flows. This comes from us talking a lot to customers who build agents. The other tools we have are a lot of in our client-side tools, and they are things that we know work well. And this is comes from our like our huge battery of evals, and you can always use your own bash tool or text editor tool, but you can also use ours.

其他的则是那些用来控制 Claude 智能程度的开关。显然,你可以控制它的思考,也可以控制它投入的努力程度。这些都很重要,因为它们真的会影响你的智能体能不能完成某件事。And the others being all those like toggles to control Claude's intelligence. Obviously, you can control thinking, you can also control effort. And those matter cuz they really change your agent from like being able to do something or not.

我觉得,这也是一个很好的迭代方向,也能很好地展示 Messages API 的能力:通过我们所有的第一方应用,比如 Claude Code、Claude AI。当然,我们还有 Claude Managed Agents。很高兴看到这一切正在发生:作为使用 Claude 平台的终端开发者,你可以把很多事情交给我们处理。随着你逐步使用更高阶的智能体抽象,我们也在不断让这一过程变得更简单,这真的很棒。所以,关于提示缓存、思考调优,以及持续关注我们对 API 所做的改进来提升效率、加快运行速度,我们还有很多工作要做。我认为,等这些改进陆续在我们的产品发布中落地后,我们会继续看到发展方向更多地转向智能体,并借助 Messages API 来实现这一点。And I think a good iteration of this, too, or a good showing of what the Messages API can do is through all of our first-party apps. You know, all Claude Code, Claude AI. But, also we have Claude Managed Agents as well. You know, it's been very great to see a lot of this, you know, happening where we can take off a lot of this from your plate as a as an end developer using the Claude platform, making that easier and easier for you as you go as you go into these higher-order agent abstractions, which is really cool. And so, yeah, prompt caching, there's, you know, thinking tuning, there's consistently looking at changes we're making to improve efficiency in the API and otherwise making things faster. So, once a lot of those things land in our launch, I think we're going to continue to see this evolution more towards agents and leveraging the Messages API to make that happen.

是的。实际上,Claude Managed Agents 是构建在 Messages API 之上的。所以,这也是一个例子,说明我们在内部实现了非常紧密的集成:因为我们正在构建这个 Agents API,在 Messages 这一层,我们很了解他们的许多需求。了解这些需求后,我们就会把相应的功能加入 API 并提供出来。无论是通过 Claude Managed Agents API 还是直接使用 Messages API 来构建智能体,所有人都能从相同的经验中受益。Yeah. And actually, Claude Managed Agents is built on top of the Messages API. So, it's also another case of us just being very tightly integrated in-house because we are building this Agents API, we at the Messages level understand a lot of what they need. And when we understand what they need, we put it in the API available, and everyone building agents, whether through the Claude Managed Agents API or just straight from Messages API, gets all the same lessons to them as well.

是啊,有道理。嗯,和你聊 Messages、API,以及 Claude 平台本身,真的很愉快。我们还有很多工作要做,不过听你分享如何看待模型发布、评测,以及如何确保每个人都能从 Claude 获得最强的智能,真的令人兴奋。谢谢。Yeah. Makes sense. Well, it's been awesome talking with you about Messages, about the API, and about just Claude platform generally. We have a lot of work ahead of us, but you know, it's very exciting to hear about the ways that you think about model launches and evalling and just making sure that everyone can get the best intelligence from Claude. So, thanks.

很高兴和你聊天。Great chatting.

值得记下

  1. 已经运行过一次的内容块,我们会缓存起来。
  2. 最能说明问题的是,更强的模型虽然更贵,却能通过你之前无法通过的测试。

← 回到本期 · 第 11 条