读见

Claude Code 的答案看着正确,却漏了 80 万美元|AlixPartners 合同分析复盘

原题Claude Code Looked Right but Missed $800K - Natalia Connolly & Kevin Madura, AlixPartners

约 14 分钟原文英文已翻译

视频由 YouTube 提供

看前速览

3 个要点

AlixPartners 复盘一次采购分析,说明为什么 Claude Code 的答案看起来可信,却漏掉了一份涉及 80 万美元的合同修订,并报错了行动截止日期。

  1. 用原始凭据核对答案

    漏算来自一份没有关联到主合同的修订。智能体还读了终止条款,而问题需要按续约条款计算。

  2. 先整理输入,再把业务规则写进工具

    给合同分类,提取金额和跨页表格,再把理解业务含义的查询封装成工具。自定义工具和 MCP 可以复用这些规则。

  3. 把无法访问与数值为零区分开

    返回明确的权限错误,并允许改查权威数据源。汇总多个智能体的节省建议时,还要去重并核对管理层已经启动的项目。

完整摘要

分享用一家医疗企业收购的模拟案例复现了两个错误。Claude Code 给出的合同总额相差约 80 万美元,并把阻止自动续约的最后期限从 11 月 1 日报成了 12 月 1 日。团队花两周搭建结构化管道,随后一夜处理了四万多份合同。两位分享者解释了为什么智能体要引用原文、识别合同与修订的关系、明确报告权限错误,并对重叠的节省机会去重。

章节

文字稿

查看原文

简要说明Brief Description

Claude Code 看起来没问题,却错失了 80 万美元——Natalia Connolly 和 Kevin Madura,AlixPartnersClaude Code Looked Right but Missed $800K - Natalia Connolly & Kevin Madura, AlixPartners

目录Table of Contents

  • 简介
    Intro
  • 这笔交易:两家公司,40,000份合同
    The deal: two companies, 40,000 contracts
  • 看起来正确的答案
    Answers that looked right
  • 为什么合同数据杂乱无章
    Why contract data is messy
  • 一个五阶段处理管道
    A five-stage processing pipeline
  • 图表、表格和结构化输出
    Charts, tables and structured output
  • 内置业务规则的自定义工具
    Custom tools with built-in business rules
  • 将行之有效的做法打包
    Packaging what works
  • 教训:日期错了
    Lesson: the wrong date
  • 课程:孤立的修订
    Lesson: orphaned amendments
  • 课程:访问错误看起来像零值
    Lesson: access errors look like zeros
  • 课程:储蓄去重
    Lesson: de-duplicating savings
  • 课程:了解企业目前正在做什么
    Lesson: know what the business is already doing
  • 要点
    Takeaways

引言Intro

主持人:大家好,很高兴见到各位。我叫凯文·马杜拉。我和我的同事娜塔莉娅来自 AlixPartners,这是一家全球管理咨询公司。我们的主要业务领域包括破产与重组、业务与技术咨询,以及风险与合规。我是该公司的 AI 工程团队成员。Host: Hey everybody. Nice to see you here. My name is Kevin Madura. My colleague Natalia and I are from AlixPartners, which is a global management consulting firm. We focus primarily on bankruptcy and restructuring, business and technology advisory and risk and compliance. And I'm part of the AI engineering team there.

嘉宾:太棒了。谢谢你,Kevin。我是 Natalia Connolly,来自 AlixPartners 的人工智能与数据团队。今天,我们想和大家分享一下使用 Claude Code 开展实际采购分析的经验。我们的演讲分为三个部分:首先介绍业务背景,然后讲讲我们采用的方法,最后分享一些经验教训。好,我们开始吧。Guest: Awesome. Thanks, Kevin. Natalia Connolly, part of the AI and data team at AlixPartners. And today we'd like to share our experience with putting Claude Code on a real procurement analysis with you. Our talk will have three parts. So we'll talk about the business context and then our approach and then some lessons learned. All right, let's get to it.

这笔交易:两家公司,40,000 份合同The deal: two companies, 40,000 contracts

好,先介绍一些业务背景。假设有一家大型医疗保健公司,刚刚收购了一家规模较小、业务较为细分的公司,而后者在某个特定领域表现出色。母公司在这个领域也有一些经验,但并不多。因此,交易完成后,采购团队需要面对两家公司数百家供应商、超过 4 万份不同的合同文件,以及多个彼此并未真正连通的数据库。这样一来,他们实际上无法全面了解每家供应商及其合同关系。好,接下来我们就来看一个模拟案例。情况是这样的:Harbor Health 是我们的大型母公司,它收购了 Summit Health Plan。后者是一家小型区域性企业,在这个特定领域表现出色。Okay, so some business context first. Let's consider a very large healthcare company and it just acquired a smaller sort of niche player that's extremely good in one particular area. And the parent company has some experience in that area, but just not that much. So with that deal handed, the procurement team faced hundreds of vendors across the two companies, over 40,000 distinct contract documents and multiple databases that really were not linked to one another. So there was no holistic view really of each vendor and each contract relationship. Okay. From here on now, let's deal with a synthetic replica of the situation. So here it is, right? So Harbor Health is our big parent company and it acquired Summit Health Plan. That's the small regional player that's extremely good in this one area.

他们双方都与某个特定供应商有合作关系。我们就叫它 Acme Health Services 吧。好。那么合并之后,Harbor Health 的采购团队真正想要的是弄清楚一些问题,比如:既然我们已经合并了,能不能从 Acme 那里争取到更好的条款?如果可以,能不能估算一下能省多少钱?而且我得多快采取行动,才能实现这些节省?对吧?这就是最关键的问题。我们的工作是确保 Harbor Health 的采购负责人在谈判时坐在 Acme 对面,能够充分准备好应对对方可能提出的任何问题、异议等等,对吧?并且所有答复都要附上具体合同页码或发票条目作为引用。因此,每一项内容都必须能够追溯到来源。And both of them have a relationship with a particular vendor. Let's call it Acme Health Services. Okay. So after the merger, what the procurement team at Harbor Health really wants is answers such as, well, can we maybe get better terms from Acme now that we've merged? And if so, can you maybe size up the savings? And how quickly do I have to act in order to realize those savings? Right? So that's sort of the bottom line. And our job is to make sure that procurement lead from Harbor Health, who'll be sitting across from Acme during negotiations, is well equipped to answer any questions that they might raise, any objections, anything, right? With citations to a specific contract page or invoice line. So everything needs to be traced back to the source.

看起来正确的答案Answers that looked right

好的。所以最初我们让 Claude Code 处理这件事时,它给出的结果就是这样,对吧?它给了我们这些答案。看起来很完整,格式也确实很规范,似乎也足够合理。于是我们回到数据仓库,逐一核查了每个答案。结果发现,年度总支出、两家公司之间的分摊情况以及合同数量都正确,这部分没问题。不过,合同总价值差了大约 80 万美元,对吧?这是第一处问题。第二处问题是,为了防止即将到期的合同中最早到期的那份自动续约,我们必须采取行动的截止日期也错了。智能体说是 12 月 1 日,实际日期是 11 月 1 日,对吧?所以,如果我们就这么相信智能体,等到 12 月 1 日,那份合同就会自动续约——不管我们愿不愿意,对吧?Okay. So originally when we put Claude Code to it, this is what it gave us, right? It came back with these answers. They look complete. They're certainly well formatted. They look plausible enough. You know, and so then we went back to the warehouse and we checked every single answer. Here's what we found out. The total annual spend, the split between the two companies and the contract counts were all correct, so that was fine. However, the total contract value was wrong by approximately $800,000. Right? So that's one. The second one was the date by which we had to act in order to prevent the soonest expiring contract from auto-renewing was also wrong. The agent said December 1st. The actual date was November 1st, right? And so if we just kind of believe the agent and waited until December 1st, the contract would have auto-renewed and you know, whether we wanted it or not, right?

为什么合同数据杂乱无章Why contract data is messy

Claude Code 是怎么把那两个答案答错的?当然,首先要检查的就是数据。我们先简单聊聊数据。乍一想,从合同中提取数据似乎很简单,对吧?但实际上,合同数据比看起来要混乱得多。下面说说合同数据可能出问题的一些情况。比如,合同可能很长,在预处理过程中卡住,一直挂在那里。你也许捕获了超时异常,然后照常继续处理,完全不知道这份合同根本没有进入数据库。这是一种情况。另一种是孤儿修订协议。比如,有一份修订协议是针对某个主合同的,但出于某种原因,它没有正确关联到主合同。How did Claude Code get those two answers wrong? Well, the first thing to check of course would be the data. So let's talk about the data just for a second. And when you think about it just seems so straightforward to extract data from contracts, right? In reality though, contract data are a lot messier than they appear. So just some things that can potentially go wrong with contract data. For instance, you can have very long contracts and they just get kind of stuck in preprocessing and they just hang there. And maybe you catch the exception with the timeout and you kind of go on and go on your merry way, you never even know that the contract never made it into the database. That's one. Another one is orphan amendments. So for instance, there's an amendment to a parent contract, but for whatever reason it's just not linked properly to its parent.

所以它就这么孤零零地悬在那里,成了一份找不到关联的修订协议。我们举例中 Claude Code 漏掉 80 万美元,实际情况正是如此,因为它找不到这份孤立的修订协议。这是另一个潜在问题。 另一个很常见的问题是,有多份修订协议重述了原合同条款。比如这里有一份 MSA(主服务协议),以及两份重述了合同总金额的修订协议。如果你只提取结构化输出,也就是美元金额,对吧?那么 Claude Code 就会很轻易地把这些金额加起来,然后说:“哦,合同总金额大约是 1700 万美元。”但如果你读的是实际文本,而不只是看数字,也就是美元金额,对吧?文本里说的是,每份修订协议都会重述合同总金额。So it's just kind of floating out there as an orphan. And this is actually exactly what happened in our example where Claude Code missed the $800,000. That's because it couldn't find that orphan amendment. So that's another potential issue. Another one, and this is pretty common, is where you have multiple amendments restating the original contracts terms. So here you have one MSA, Master Service Agreement, and two amendments that restated the total contract value. And if you just extract the structured outputs, the dollar amounts, right? Then your Claude Code will very happily go and just sum up those dollar amounts and go, oh, the total contract value is about $17 million. But if you read the actual text, not just look at the numbers, the dollar numbers, right? The text says that every amendment restates the total contract value.

所以正确答案是七,也就是最新修订案中的数值。这是另一个需要注意的陷阱。最后,有时会遇到这种情况:表格非常长。比如说,这些是各项服务的费率表,对吧?它们跨越了好几页。如果你看第二页,页面一开始只有一些数字,却没有表头。Claude Code 未必能了解上下文。我的意思是,它只会尽力猜测,但可能不知道每个数值具体代表什么。这些只是一些例子。这些问题都不算罕见,但它们说明,真实的合同组合里充满了各种问题,而你刚开始这段旅程时,未必能察觉到它们。So the correct answer is seven, which is the most recent amendment's value. That's another sort of gotcha to watch out for. Finally, you can have situations like that where you have very long tables. Let's say these are the tables of rates for various services, right? And they go across multiple pages. And so if you look at page two, it just starts out with, you know, some numbers and there's no header. And Claude Code might not necessarily know the context. I mean, it will just do its best to kind of guess, but it might not know what each value really means. These are just some examples. And none of this is exotic, but it just shows that real contract portfolios are full of issues that may or may not be apparent when you first started out on this journey.

一个五阶段处理流程A five-stage processing pipeline

这就是为什么一开始我和 Kevin 花了相当长的时间,真正搭建起一套超稳健的数据处理流水线。我们用了大约两周时间,确保像你刚才看到的这些细节,以及更多其他内容,都得到了妥善处理。效果确实非常好。我们花了两周搭建这套稳健的流水线,完成后,一夜之间就处理了四万多份合同。我想,如果靠人工处理,所需团队规模肯定会远远超过我们两个人,而且可能也要花更多时间。 简单概括一下,这条流水线分为五个阶段。第一个阶段主要是预处理,包括文档智能处理、OCR 等。第二步是分类:每份合同分别是什么?And that's why Kevin and I spent quite some time really building a super robust data processing pipeline in the beginning. We spent about two weeks on it just making sure that every single little thing like that you just saw and more, all of that stuff was accounted for. And so it was really great. So we spent those two weeks just building that robust pipeline and then 40,000 plus contracts were processed overnight once it was done. I imagine if we did it by hand, it would have required probably a much larger team than just us two and probably a little bit more time than that. But just a summary of the pipeline, it was a five stage pipeline. The first one was mostly preprocessing, so document intelligence, OCR, that kind of stuff. The second step was classification. So what is each contract?

这是主服务协议吗?是修订协议吗?是保密协议吗?类似这样的文件。接下来是条款、费率和支出信息的提取。然后我们会处理可能跨页的超长表格等情况。接着,我们会把所有服务映射到支出类别。只有完成这些之后,Claude Code 才会审查提取出的数据,开始发挥作用。构建这些结构化表格非常重要,不仅因为它们能帮助 Claude Code,也因为这样一来,我们之后就能更轻松地用代码以程序化方式检查每个答案。好,接下来请 Kevin。Is it a master service agreement? Is it an amendment? Is it an NDA? Something like that. Then there was the terms rates and spend extraction. That's the next step. And this is where we would account for things like very long tables that could break across page boundaries. And then we would map all the services to spend categories. Only then would Claude Code go over the extracted data and sort of do its thing. It was very important to have those structured tables, not only because it helped out Claude Code, but also because it made it that much easier for us later on to go and check every answer programmatically in code. All right, so Kevin.

图表、表格和结构化输出Charts, tables and structured output

主持人:好的,谢谢你,Natalia。显然,合同数据以文本为主,但也不总是如此。有时其中会包含多模态元素,比如图表或其他内容。如果只是用简单的 OCR 流程处理,可能只能得到右侧所示的坐标轴信息,却会丢失图表中包含的实际信息。我们现在讨论的很多内容,如果你是“Bitter Lesson”派,可能在六到十二个月后就不再相关了——到时再看。不过,为了解决这个具体问题,我们把合同页面作为图像,通过 DSPy 处理,得到高度结构化的输出,也就是右下角所示的内容。这样,你就能把一大堆非结构化数据,转化为一个由各种元素构成的数据库,而你知道这些元素对后续工作会很有用。Host: Sure, thanks Natalia. And so obviously contract data is very text heavy, but not always. And so there's sometimes there's multimodal elements. There might be charts or graphs or other things that if you just run it through a naive OCR process, you might get what you see on the right in terms of the axes, but you actually lose the information that's contained within the chart. And so a lot of what we're talking about now, if you're bitter lesson pill, this will likely not be relevant maybe like six to 12 months, we'll see. But what we did here to solve this specific problem was take the contract pages as images and feed them through using DSPy to arrive at a highly structured output, which is what you see on the bottom right there. So you go from this large unstructured data set to basically a database of elements that you know are going to be relevant for the balance of your work.

所以,很容易就想让 Claude 直接处理那些非结构化数据,让它自己摸索出结果。这种做法也没问题,但有些项目,比如这个,我们一开始就知道需要费率档位、返利以及某些数据元素。因此,可以先把其中一部分结构搭好,再让 Claude 在这个框架下补全内容。And so it's very tempting to just let Claude rip, you know, on the unstructured data and kind of have it figure it out, which is a valid approach, but there's certain engagements like this one where we know upfront we want rate tiers, we know we want rebates, we know we want certain data elements. So you structure some of that upfront and then let Claude fill in that framework behind it.

内置业务规则的自定义工具Custom tools with built-in business rules

这样,一旦你把所有内容都整理成这种高度结构化的格式,就可以使用 Claude Code 动态地为自己构建工具。当然,也有一些常见工具,比如执行 SQL、列出表格之类的。不过我们发现,对于后续的实现工作,或者后来刚接触这些数据的智能体来说,能够使用其中一些工具非常有帮助。因此,正如我之前提到的,要在前期投入大量时间来整理数据:基本上,就是从合同数据、其他支出数据或发票中创建派生数据库。将这些数据全部归一化后,再让 Claude 构建这些定制工具,这样它就能走捷径,快速获取某些特定信息——在这个例子中,就是与这笔交易相关的信息。And so once you have everything in this highly structured format, you can then use Claude Code to dynamically build tools for itself. And so you have common ones, of course, like execute SQL or list tables or things like that. But we found that it was really helpful for later implementations or later agents when they're coming in fresh to the data to have some of these tools available to them. So invest a lot of time upfront to structure the data, as I mentioned previously, where you essentially create these derivative databases off of contract data or other spend data or invoices. You normalize all of that together, and then you have Claude build these custom tools so that it has you know, kind of a shortcut, if you will, to get certain information that are specific, in this case, to this deal.

因此,你会有一些类似“获取费率卡页面”或“获取特定供应商支出”的功能。在这里,你可以嵌入一些业务逻辑,例如你可能了解的某些注意事项,或者合同数据中不会立刻显现、也不那么明显的背景信息。你可以把其中一些逻辑嵌入工具调用本身;工具查询数据或提取数据的方式,有助于落实其中一些更定制化的逻辑。Claude Code 非常适合这类场景,因为它擅长在有些杂乱的代码库中自主导航。这是类似的概念,只不过处理的是合同数据和支出数据。因此,这些数据大多都是表格形式的。不过,它也可以动态探索并提取我之前提到的不同元素。然后,一旦我们发现了有用且可行的方法,就会把它封装起来,放进提示词中的某个特定部分;不过我认为,我们更多依赖数据库中的自定义工具和自定义视图,通过代码来落实一些业务逻辑,而不是单纯依赖提示词。and so you have things like get rate card page or get specific vendor spend. And that's where you can embed some of the business logic where you might know of some gotchas or some context that isn't immediately apparent or obvious in the contract data. You can start to embed some of that in the tool calls themselves, the way that it queries data or pulls things back is very helpful to enforce some of those, you know, more custom pieces of logic. and Claude Code was perfect for something like this because it's used to navigating autonomously around kind of messy code bases. This is a similar concept. It's just contract data and spend data. So it's all largely in tabular format. but it can dynamically explore and pull in the different elements that I mentioned previously. and then once we found something that was useful, that would work, we would package that up either into something specific in the prompt, but I think we lean more on these custom tools and custom views within the database to enforce some of that business logic in code versus just relying on a prompt.

将行之有效的方法打包成型Packaging what works

一旦把所有这些内容整合成一套,你就可以开始开发能够长期运行的自定义 MCP 服务器和配置了。这包含许多不同的要素,核心在于如何在整个生命周期中持续积累知识——这里具体指某个特定项目的生命周期。不过,如果你是在做内部项目,你也会希望积累知识和某些业务规则,以便之后加以执行。所以,这是一种不错的实现方式。当然,你还可以更好地管理对底层数据的访问,从而阻止某些调用。在这之前,刚好有一场很棒的演讲,谈到了智能体与其余环境交互时的安全问题。归根结底,我觉得这其实相当简单。and once you have all that package together, you can start to develop custom MCP servers and configurations that live on. And it's a bunch of different elements that really get at how do you perpetuate and accrue knowledge across the life cycle, in this case for particular engagement. But if you're working on something internally, you right, you want to accrue the knowledge and accrue certain business rules that you want to enforce later down the line. So that this is a nice way to do it. And then of course, you have the ability to better govern access to the underlying data so you can block certain calls. There was a great talk right before this regarding the security of how agents interact with the rest of the environment. It's actually pretty simple, I think, at the end of the day.

你只允许一组明确且你熟悉的操作,并阻止其他所有操作,而且可以提前强制执行这一规则。You just have a defined set of operations that you're comfortable with and you block everything else and you can enforce that up front.

教训:错误的日期Lesson: the wrong date

我们先快速过一下几个经验教训。Natalia 之前提到过,智能体用错了日期。这是一个很好的例子,说明有些外部业务背景信息很有帮助,也很适合提前嵌入智能体。因为在这个例子中,它确实提取了终止条款中的日期,但我们实际要问的问题应该使用根据续约条款计算出的日期。这看起来像是个小问题,但正是许多这类细微差异不断累积,导致错误率上升。因此,越是能提前构建这类规则,最终效果当然就会越好。So we'll walk through just a couple of lessons here very quickly. Natalia mentioned previously about the agent using the wrong date. And so it's a good example of again, some external business context that is helpful and useful to embed into the agent up front because in this case, yes, it had pulled out the date from the termination clause, but actually the question we were asking was supposed to use the date from calculated from the renewal clause. And so it seems like a minor thing, but it's a lot of these nuanced issues which compound your error rates. And so the more you can build these sorts of rules in up front, the better the result ultimately of course will be.

教训:孤立的修正案Lesson: orphaned amendments

Natalia 还提到了不同修订文件之间那种悬空引用的问题。这是我们经常遇到的情况。很多组织都有合同生命周期管理系统,也就是 CLM。它本来应该是一个高度结构化的合同数据数据库,对吧,记录供应商名称、提取终止日期等信息。但这些系统几乎从来没有得到妥善维护。因此,我们通常不得不利用现有数据,同时采取一种自下而上的方法,让 Claude 阅读合同内容,找出可能没有在 CLM 中正确记录的信息。为此,你得让 Claude 梳理出这些文件之间的层级关系。比如,一份 MSA 关联着若干 SOW,而这些 SOW 又有多个修订文件;有时它们的整理方式就是不太规范。Natalia mentioned also the kind of the dangling references for different amendments. and so this is something that we run across a lot. So many organizations have a contract lifecycle management system, a CLM. It's intended to be a highly structured database of your contract data, right, the vendor name and ex extraction of termination dates and whatnot. They're almost never maintained properly or well. And so we often find we have to of course use the data that's available to us, but take somewhat of a bottoms-up approach to actually have Claude read through the contents of the contracts to find instances of where it might not be properly captured in the CLM. And so you have to go through and have Claude kind of build out this hierarchy of relationships. So you have an MSA that is tied to SOWs and then there are multiple amendments to those SOWs, and sometimes they're just not organized properly.

因此,再说一次,预先把所有内容都结构化,之后就能很轻松地补充这类零散文档;如果你在寻找节省成本的机会,这会产生重要影响。在这个案例中,涉及的是并购,也就是整合。你不希望重复计算某些内容,但也希望掌握与供应商关系的最新状态,而这类流程正好能让你做到这一点。所以 Claude 在这方面做得非常好。And so again, structuring everything up front makes it really easy to tack on these kind of loose documents later on, which has a meaningful impact if you're looking for savings opportunities. In this case it was a an M&A, you know, consolidation. So you don't want to double count something, but you also want to capture the latest kind of state of the relationship with the vendor, which this kind of process allows you to do. So Claude was very good at doing that.

教训:访问错误看起来像零值Lesson: access errors look like zeros

我之前提到过数据访问治理。这也可能给你带来麻烦,因为这里实际上是把两个独立的实体整合到了一起。我们访问实体 A 和实体 B 的数据时,采用的方式并不相同。因此,我们遇到过几次这样的情况:返回值格式错误、为零,或者出现了某种访问权限问题。Claude 调用工具时并没有收到正确类型的反馈,于是它就继续往下处理,以为发票金额可能是零,或者得出了其他错误的数值。因此,我们吸取的教训是:每当发生某种治理问题、访问被拒绝或类似错误时,都应该向 Claude 提供更多关于问题所在的反馈,这样它才能优雅地处理失败,或者设法恢复,比如将问题标记给人工处理,或者说明:“我知道这条信息其实在另一个权威数据库中,可以去那里查找。”I made a point before about governed access to the data. This can come back to bite you as well because there were two separate entities that were being put together here. The way that we accessed data from entity A versus entity B was different. And so we ran into a few instances where the returned value would have been something that was malformed or zero or there was some type of access permission. And Claude when making the tool call didn't really get the right type of feedback, and so it kind of just went forward thinking that maybe an invoice was zero or, you know, basically an incorrect value. And so a lesson learned there for us was anytime there's some sort of you know, governance failure or access denied error or something like that, giving Claude more feedback about what went wrong allows it fail gracefully or otherwise recover, maybe flag something to a human or say, okay, I know this information is actually in this other authoritative database I can go to instead.

因为当你依靠它来进行某种储蓄分析或类似的事情时,当然希望 Claude 尽可能多地掌握相关背景信息。because when you're relying on it for some sort of savings analysis or something similar, you want Claude to have as much of that context of course as possible.

课程:对储蓄进行去重Lesson: de-duplicating savings

我们做的另一件事是,针对不同的节约机会派出智能体。我们的同事做这类工作已经有 20 年左右了,他们积累了一整套识别节约机会的方法。有些方法比其他方法更显而易见。不过,假设你要把两家公司合并:它们可能有相同的供应商,也可能供应商不同,但采购的是相同的服务。因此,你可以从一整套不同的活动和分析中进行选择。于是,我们派出智能体并行执行其中的每一项,结果相当不错。当然,之后还需要对返回的发现进行去重。比如,如果某项潜在节约来自同一个来源或同一个供应商,就不能重复计算。Another thing we did was dispatch agents for different savings levers. So our colleagues who have been doing this for 20 years or whatever it is, they have a whole library of ways to identify savings. Some are more obvious than others, but okay, you're putting two companies together. Maybe they share vendors, maybe different vendors but same services. So you have a whole library of different activities and analyses that you could do. So we dispatched agents to do each of those in parallel and they came back with actually pretty good results, but there's of course this step afterwards where you need to deduplicate the findings that come back. So you can't ultimately double count in this case a potential savings if you know if it's coming from the same source or the same vendor as an example.

因此,我们采用的方式,本质上是搭建一个额外的流程,以及一套非常具体、精确的工作流:让 Claude 自行处理、进行分析,然后再进行协调校验。这个步骤最终是围绕 DSPy 构建的,你需要非常明确地规定要评估哪些数据点、如何进行协调校验,以及流程中什么才是可接受的下一步。今天上午还有一个相当不错的演讲,讲的是如何用 DAG 执行策略。思路是一样的:这类工作需要高度结构化的工作流。and so the way that we did this was essentially build out an additional process and a very specific and precise set of workflows where you would kind of let Claude do its thing, do its analysis, but then the reconciliation step is very it's built around kind of DSPy ultimately where you're very prescriptive about which data points you're evaluating, how you do the reconciliation, and what's an acceptable next step in the process. There was another pretty good talk this morning about using DAGs for policy execution. It's the same idea. You have a highly structured workflow for this sort of work.

课程:了解业务目前正在做什么Lesson: know what the business is already doing

然后,回过头来看,最常见、也最显而易见的一点,我想就是确保智能体了解你想要实现的目标以及相关的整体背景;更重要的是,要了解当时业务中实际发生的情况。比如这个案例中,正在进行一项并购交易。你知道,管理层已经开始采取一些行动了。因此,在我们寻找潜在节省成本机会的过程中,智能体会提出一些很棒的建议,但这些建议马上就会被否决,因为——嘿,这件事我们三个月前就已经开始做了。乍看之下,这似乎显而易见,但要在流程的恰当阶段,把正确的背景信息和相关要素提供给 Claude,实际上是个相当棘手的问题:既不能一开始就束缚分析,又要避免到头来提出无关或不切实际的建议。and then the most common one in retrospect and the most obvious I suppose is just making sure that the agent has general context about what you're trying to achieve, but more importantly, like what's actually going on in the business at the time. So, in this case, it's an active M&A deal. You know, there were things that management had already started actioning. And so, in our pursuit of potential savings opportunities, it will come up with these great recommendations, but it would be shot down immediately because, hey, we already started that 3 months ago. So, seems obvious on its face, but it's actually a pretty tricky problem to try and get the right context and the right elements into Claude at the right point in the process such that you don't hamstring the analysis up front, but you don't come out with recommendations that are irrelevant or invalid at the end of the day.

所以,这又回到了知识积累这个话题:从分析入手,把一路上标记过的内容积累起来,比如“嘿,这是一个已经在推进中的项目”,或者其他与你最终目标相关的事情。然后,让 Claude 拥有某种机制——无论是记忆系统,还是将这些信息嵌入工具中,或是类似的方式——这样 Claude 就不必再花 token 去重新发现你已经指出过的同一批问题。这些信息已经融入它的工作方式中了。and so, it goes back to the point about knowledge accrual of just starting with an analysis, accruing things that you've kind of tagged along the way as, hey, this is a project that's already in motion or something else that's relevant to the ultimate objective of what you're trying to do. And having Claude have some sort of, whether it's a memory system or you embed it in your tools or something similar where you don't have Claude kind of spending tokens to rediscover the same problems you've already flagged. It's already just embedded in the way that it does its work.

要点Takeaways

最后,我们想给大家留下两个主要启示。第一,值得在一开始就投入一些 token、精力和资金,先把数据整理好,这样 Claude 就不必白费力气、消耗额外的 token 来重新摸索环境。因此,高度结构化的数据非常有帮助。当然,归根结底,上下文仍然最重要。我们还没有 1 亿 token 的上下文窗口。没错,我们有 RLM。我知道后排的 Raymond 是它们的忠实粉丝,但这并不能帮你理解业务上下文。因此,提供恰当的业务上下文至关重要。这也是我们在这次合作中发现的。之后欢迎大家提问,非常感谢各位抽出时间。And so, I'll leave you or we will leave you with two main takeaways. The first is it's worthwhile to invest some tokens and effort and money upfront to structure your data first precisely so that Claude doesn't have to spin its wheels and spend additional tokens rediscovering the environment. So, highly structured data is very helpful. And then ultimately, of course, context is still king. We don't have 100 million token context windows. Yes, we have RLMs. I know Raymond in the back is a big fan of those. but that doesn't help you with the business context. So, putting in the right business context is incredibly important. and that's what we found during this engagement. So, happy to take any questions afterwards, but thanks so much for your time.