读见

别批准 AI 模型,要批准整套应用:Langfuse 的银行评估门禁实践

原题Don't Approve the AI Model. Approve the App - Doneyli De Jesus, Langfuse

约 14 分钟原文英文已翻译

视频由 YouTube 提供

推荐理由Langfuse 银行案例展示公共榜单之外的私有数据、计算工具和多维上线门禁,但与昨日银行安全评估相近,留作候补而不重复占用公开注意力。

看前速览

4 个要点

Langfuse 以银行案例说明,应通过私有数据集、计算工具、多维门禁和专家反馈认证整套 AI 应用,而非单独批准模型。

  1. 认证应用,而不是底层模型

    评估要覆盖私有业务上下文、工具变化和完整流程,不能只看公开能力榜。

  2. 用确定性工具弥补计算失败

    模型即使引用了正确依据,也可能算错,因此要针对失败模式添加计算工具。

  3. 关键维度应分别设置上线门禁

    平均分达标不能抵消合规失败或其他强制阈值未满足。

  4. 把领域专家反馈纳入评估循环

    标注队列呈现失败 trace,经过复核的案例可反哺黄金数据集和后续门禁。

完整摘要

Doneyli De Jesus 介绍协助一家前五大银行评估 AI 应用的经历。银行要求私有数据、受控访问和隔离部署,公共榜单不能替代具体业务验证。流程从黄金数据集出发,通过 trace 保存证据,再进行多维评分。一项示例的依据可靠性达到 97%,数值准确率却只有约 60%;团队为计算任务加入确定性工具,自述把准确率提高到 90% 以上,演讲也提到约 95%。门禁结合代码评分、执行路径与 LLM 评判,即使整体均值较高,合规单项失败仍可阻止上线。领域专家负责阈值、失败标注和反馈,提示、模型或工具变更后重新评估;这些结果属于实践者口述。

章节

文字稿

查看原文

简要描述Brief Description

不要批准 AI 模型,要批准应用 - Doneyli De Jesus,LangfuseDon't Approve the AI Model. Approve the App - Doneyli De Jesus, Langfuse

目录Table of Contents

  • 简介
    Intro
  • 银行并不在意公开基准测试
    Banks don't care about public benchmarks
  • 认证应用,而非模型
    Certify applications, not models
  • 本地部署、访问受控且与外网物理隔离
    On-prem, gated and air-gapped
  • 证明应用已准备就绪
    Proving an app is ready
  • 黄金数据集和追踪记录
    Golden data sets and traces
  • 脚踏实地,但数学不好
    Grounded, but bad at math
  • 为整个工作流设置门控
    Gating the whole workflow
  • 构建数据集
    Building the data set
  • 评分:代码、路径和 LLM 评判器
    Scoring: code, path and LLM judge
  • 与领域专家共同设定门槛
    Setting gates with domain experts
  • 标注队列与反馈
    Annotation queues and feedback
  • 从几周缩短到几分钟
    From weeks to minutes

引言Intro

呃,我在 ClickHouse 旗下的 LangFuse 负责 AI 工程解决方案。呃,我们是一个智能体可观测性和评估平台,很多用户都在使用我们的开源产品。呃,今天我想和大家分享我们与一家五大银行之一合作的经历,帮助他们了解如何在将 AI 应用部署到生产环境时设置安全护栏。Uh I'm leading AI engineering solutions at LangFuse uh by ClickHouse. And uh we are an a agent observability and e-boss platform that a lot of users use open source. And uh I'm here to talk to you about an experience that we had with one of a top five bank helping them getting through how they can put a safety uh guardrails whenever they were shipping AI applications into production.

还有,呃,要确保他们在这方面进行适当的评估。And uh to make sure that they are running with the e-proper e-vals on that.

银行并不在意公开基准测试。Banks don't care about public benchmarks

我我想先从一个方面谈起,嗯,你知道,我们在与这位客户合作的过程中了解到,受监管行业未必在意公开基准测试。我知道,每周,嗯,每当有新模型发布时,我们都会看到各种基准测试结果。你知道,Opus 5 现在在多个维度的基准测试中都处于领先地位,这很好。嗯,这些结果能告诉我们模型在哪些方面表现出色,也就是它们的技术能力,以及它们在某些情况下如何利用现有的开放数据集。I I like to start with uh you know, something that we learned with the experience with this customer is that regulated industries they don't necessarily care about the public benchmarks. I know that every week uh when anytime a new model comes out um we see all the benchmarks, you know, uh Opus 5 is now leading the benchmarks in a in a multitude of dimensions and that's great. Um that tells us what the models are really good at in terms of like the technical capabilities and maybe using sometimes like open data sets that are out there.

但有时,这并不意味着它能有效适配你们组织内部的数据和应用场景。尤其是在金融服务领域,银行对自己的数据和应用场景非常敏感;在很大程度上,他们认为这些就是自己的独门秘诀:他们如何构建自己的模型、创建自己的数据集,以及避免将大量数据暴露给公众。But sometimes that doesn't mean that it will translate effectively to internal data and use cases that you have in in your organization. Specifically around you know, financial services where banks are very very sensitive to the their data, their use cases and for the most part they like to believe that that's part of their secret sauce, the way that they you know, build their own models, build their own uh data sets and also not exposing a lot of that data to uh to the public.

所以这就是为什么我们需要想办法,让金融服务机构,尤其是这家银行,能够这样说:“听着,我们不一定关心模型能做什么。我们真正关心的是,我们正尝试构建的这个应用能否部署到生产环境中。一个很好的例子是,他们当时试图为投资银行家构建一个 10-K 分析师。”Um so that's why we needed to figure out a way that the you know, financial services and this bank in particular that they can then say, "Look, we don't necessarily care what the model can do. What we care about is really whether this application that we're trying to build can ship into production. A good example would be like a 10K analyst that they were trying to build for their investment bankers.

你知道,每次业绩电话会结束后,他们都希望团队能够加快行动、充分利用现有的所有信息,并且尽快分析所有会议文字记录。但这并不是简单地拿到通话记录、做个摘要之类的事情,因为分析师掌握着大量知识,也了解银行和公司如何运营的背景,而这些内容未必已经融入模型,或是模型开箱即用时就具备的。You know, every time an earnings call is is out there, they want to make sure that their teams can accelerate and get leverage from all the information that is out there and as soon as an earnings call is done, they can get an analysis on all the transcripts and all that. However, that is not just a simple task of just taking that the call transcript and just like summarizing it and what not because there's a lot of knowledge that the analyst has and a lot of context about how the bank and the firm operates that is not necessarily ingrained or trained in the models out of the box.

那么,你们如何将这些知识和上下文引入模型?进一步说,完成这一步之后,你们又如何可靠地评估模型给出的输出是否正确,并确保这些输出能够通过你们设置的那些关卡?So, how do then you bring that knowledge and that context into the model? And then furthermore, once you've done that, how do then you reliably are able to evaluate that the output that is giving you are the the the correct ones and that you can kind of clear those gates that you have put in place.

认证应用,而非模型Certify applications, not models

所以,这又是我们的一大收获。他们也直接告诉我们:“听着,我们这里不认证模型,我们认证的是应用,对吧?它可以是一个 10K 分析师,也可以是投资分析之类的。”So, that was that was again a kind of a a big learning for us that they and they told us directly, "Look, we don't certify models here. We certify applications, right? So, it it could be a 10K analyst, it could be an investment analysis and what not."

本地部署、访问受限且网络隔离On-prem, gated and air-gapped

从这次经历中得到的另一个启示是,在受监管行业,尤其是金融业,构建解决方案时有三项主要要求。第一,他们往往更希望把系统部署在自己的场所。嗯,这可以是在他们自己的数据中心,因为事情的发展挺有意思的,仿佛一切又回到了中心化:我们此前一直在向云端迁移,但如今由于 AI,以及我们输入这些模型的信息有多敏感,尤其是银行,正在重新考虑并重新利用他们原有的许多数据中心,实际上又把它们重新搭建起来,并部署 GPU 基础设施,在本地运行模型,因为这些模型处理的数据非常敏感。The other learning from this experience is that in regulated industries and in finance in particular, there are three main requirements when it comes to building the solutions. The first one that more more often than not, they wanted to stay on their own premises. Um and this could be either their own data centers because it's it's funny how things are kind of coming back to to to center because we have done we have been doing all this movement into the cloud, but now because of AI and how sensitive the information that we're feeding these models is, then especially banks are rethinking and repurposing a lot of their data centers that they had and actually standing it up again and and kind of standing up GPU infrastructure to run models locally because of the sensitivity of the data that they are dealing with on these models.

另一件事是,其他要求也必须经过门控。The other thing is the other requirements that it has to be gated.

显然,出于显而易见的原因,不能只是把数据发送到互联网上。他们不希望哪怕看起来像是某个模型提供商会用他们的数据进行训练,尽管对方承诺完全不保留数据,并提供各种保证。银行对此非常敏感,他们想确保一切都在自己的掌控之中。有时,甚至有些银行设有自己的研究部门,专门投入时间,聘请博士来训练自有模型、对模型进行微调,等等。It cannot be just going out to the internet obvious for obvious reasons. They don't want to have even the the appearance that some model provider will train on their data even if there is like zero data retention and all and all these, you know, guarantees. But banks are very sensitive to that and they want to make sure that that stays within their control and sometimes you have even banks that actually have kind of research divisions that actually spend time and have PhDs training their own models and fine-tuning them and all that.

第三个方面是,整个部署需要采用物理隔离的方式,对吧?这样只有需要查看这些数据的人才能访问,而且数据会保留在他们自己的基础设施内。这一点非常非常关键。And the third aspect is with all of this is that the deployment needs to be air-gapped, right? So that only the people that needs to see that data and it's within their infrastructure. That is very very critical.

证明应用已准备就绪Proving an app is ready

另一个问题是,当我们和他们交流时,情况大概是这样:“好,现在你们有了这些平台,我们也有了这些模型,但接下来我们需要证明,应用确实按照我们希望的方式运行。第一,应用确实能按我们的预期运行;第二,它确实满足我们作为受监管行业所必须遵守的合规要求;第三,用户不会跑来抱怨它不好用。因为那样的话,你知道,就会导致用户不愿意采用,进而对使用 AI 赋能的解决方案产生不满和负面情绪。”The The other thing is when when we were talking to them it's like, "Okay, now you have all these platform, we have all these models, but then we need to prove that the application is actually working to the way that we want. One, second, that is actually meeting the compliance requirements that we have as a regulated industry. And third, that our users are not going to come to us complaining that is not usable because then, you know, it becomes a situation where you don't get user adoption and then there's a dissatisfaction and a bad sentiment about using AI-enabled solutions.

因此,我们需要想办法帮助他们制定一套框架和方法,让他们能够对应用或 AI 智能体的配置变更进行审核,并给出通过或不通过的结论。这些变更可能涉及系统提示词、所用模型,或者新增工具。但面对我们提供给他们的这些变更,我该如何判断并告诉他们:“这已经可以投入生产了,还是还不行?”So we needed to find a way to help them come up with a framework and a methodology for them to have like a stamp of approval pass fail if an application or an AI agent had any change on their configuration. That could be the system prompt, that could be the model that they're using, a new tool, but then how do I give that, "Okay, this is ready to go into production or not based on on these changes that we have given them?"

黄金数据集和跟踪记录Golden data sets and traces

那么,如果我们从非常宏观的层面来看,它在机制上是如何运作的?对吧?我们首先需要构建一个黄金数据集。And then if we go like very high-level, how does that work mechanically? Right? The first thing that we need is to build a golden data set.

这是第一点,也是某种意义上的锚点。嗯,很多好消息是,这些银行通常已经有一套他们想用来进行测试的黄金数据集。That's the first thing. That's kind of the anchor. Um a lot of this good good news is a lot of these banks they typically already have a golden data set that they want to test against.

但有时缺少的是,他们如何将针对该数据集测试这些测试用例这件事落地执行。不过对我来说,这通常是核心。如果你有软件工程背景,我喜欢这样来理解:这些就是你的测试用例,对吧?But sometimes what is missing is how they can operationalize the testing of the test cases against that data set. But that's to me typically is the anchor. The way that I like to think about this if you're coming from a software engineering background is is these are your test cases, right?

你绝不会在没有经过 QA 的情况下就把任何东西推送到生产环境,对吧?所以这遵循的是同样的原则。然后,一旦你运行这个流程,并将其投入实际运营,就会生成大量追踪记录。You will never push anything into production without passing it through QA, right? So this is the same principle. Then once you run this um and and you operationalize it, you're going to generate a bunch of traces.

而这些轨迹就是模型训练所依据内容的证据。或者,抱歉,是模型接受评估所依据内容的证据,对吧?就是基于这个数据集。And the traces are the evidence of what the model was trained on. Or sorry, what the model was evaluated on, right? Against this data set.

所以你在 trace 上有这些证据。然后最后,基于 trace 中你拥有的这些证据,就可以生成评分,并根据你选择的不同维度给出通过或失败的结果。So you have that evidence on the trace. And then at the end with the trace as the as the as the kind of the uh as that, you know, evidence that you have, you can then generate the scores that are going to give you the pass fail across different dimensions that you uh select.

脚踏实地,但数学很差Grounded, but bad at math

当我们和这位客户开启这段旅程时,最初我们先用了几个……嗯,一批模型,包括小模型和大模型,它们的智能水平各不相同。然后我们注意到一个有意思的现象,对吧?这里有个具体例子,其中有两个数字尤其引起了我们的注意。When we started out this journey with this customer, it was we first started with a couple of with a bunch of models, um a small large models with different levels of intelligence. And we noticed something interesting, right? So this one is is a particular example of two numbers that stood out for us.

第一个,第一个是事实依据度达到 97%,也就是说,这个模型非常擅长从内部来源提取信息,并以银行实际拥有的数据为依据生成回答。太棒了。97% 达到了及格线。真不错。The The first one, 97% in groundness, is that this model was really good at extracting information from, you know, internal sources and grounding the responses on actual data that the bank had. Perfect. 97% That is a passing bar. Amazing.

但到了给出准确数字的时候,模型就会出错。因为再说一次,大语言模型本质上不擅长数学,它们只是下一个 token 的预测器。But then when it came down to give, you know, a accurate numbers, then the number was trip the model was tripping up. Because again, LLMs inherently are not great at math. They're just next token predictors.

接下来发生的情况是,尽管它的回答是基于银行的实际信息,但每当需要给出财务数字或进行简单计算时,模型都会出错。And then what happened was that even though it was grounded the responses on actual information from the bank, whenever it needed to give financial numbers or just do simple math, the model was failing.

接下来,我马上会向你展示我们是如何做到这一点的。这也再次引出了我之前说过的话:他们审批的不是模型,而是应用。And then, I'll show you in a minute how we were able to go about that. And this leads us to then, again, what I said before, that they don't approve models. They approve applications.

那么,他们如何围绕这个模型搭建一套配套框架或控制机制,从而无论明天是否更换模型,应用的质量都能保持不变。现在,我们正在拓展到帮助他们建立相关流程。So, how they can put a harness or controls around this model, so irrespective of if tomorrow I swap a model, then the quality of my application will still remain the same. Now, we're expanding into kind of the process that we help them establish.

对整个工作流进行门控Gating the whole workflow

你从左侧的黄金数据集开始,然后进入智能体内部。智能体会执行一系列任务,并经历一个规划阶段。You're starting from the left with the golden data set, then you go into the inside of the agent. The agent is going to do a bunch of tasks. It's going to have a planning phase.

它会从你的官方官方来源检索数据。然后你会看到那个蓝色圆圈圈出的小方框,它会进行计算。在这个例子中,我们为模型提供了一个工具,用来处理模型表现不够好的那些领域,对吧?It's going to retrieve data from your official official sources. And then, you see the little box that is is circled in blue, he's going to calculate. In this case, what we did, we gave the model a tool for those areas where the model was com- coming up short, right?

对于那60%表现不佳的部分,我们就说:“你知道吗?这项任务模型没必要自己完成。我们可以直接给它一个工具,因为数学嘛,你知道,是确定性的。”The 60% where it was not scoring well, then we said, "You know what? This is a task that the model doesn't need to do on its own. We can just give it a tool because math, you know, is deterministic.

它会一直都一样。然后,我们可以提高模型的准确性。”但与此同时,如果你注意到我们考量的所有维度,就会发现我们是在多个维度上评估应用,而不仅仅是一个维度。It's it's going to be the same all the time. And then, we can improve the the accuracy of the model." But at the same time, if you notice all the dimensions that we have, we are evaluating the application against a multitude of dimensions, not just one.

我们不会说:“嗯,因为平均下来所有指标都超过了 90%,所以它就能通过。”情况未必如此。对于这里的不同类别,比如准确性、合规性等,你可能会设定不同的等级或阈值。最后,你需要在这里定义通过门槛。We're not going to say, "Well, because everything in the average is giving me above 90%, then it's going to pass." That might not be the case. You might have different degrees or thresholds for the different categories that you have here in terms of the accuracy, regulatory compliance, and whatnot. And then, at the end is where you define your gate.

你看,任何没有根据你的阈值通过门槛的内容,都不会被推送到生产环境。这只是代码的一小段,最后我会附上代码仓库和博客文章的链接,方便你深入了解我们在这里所做的工作。但归根结底,你应该构建自己的基准测试,而不是依赖现有的公开基准。You see, not anything that doesn't clear the gate based on your thresholds, doesn't get promoted into production. This is just a a snippet of the code and and at the end I'll link to the repo and to the blog post so you can read more in depth about the work that we did here, but it's effectively you want to build your own benchmark instead of relying on the public ones that are available there.

构建数据集Building the data set

首先,你需要做的第一件事就是像我之前说的那样构建数据集。这是一个典型数据集的示例。它们是键对。And the the first thing you need to do that is to build the data set like I said before. This is an example of what a typical data set would look like. It's They are key pairs.

你有输入、预期输出以及一些元数据,然后会用这些内容来评估智能体的表现,包括质量、行为以及它给出的回答。这就是对一次智能体运行进行评分或评估后的结果。你会注意到我圈出了 calculate 工具调用,因为在这个例子中,我们给模型提供了一个工具,数值准确率就从 60% 提升到了大约 95%。You have inputs, expected outputs, and some metadata that you are then using to evaluate how the agent is performing both in terms of quality, behavior, and the responses that it's giving you as well. This is how it looks after we have a scored or evaluated one agent run. And you notice that I circled the calculate tool call because in this case now, this is how we were able to get the model from 60% in numerical accuracy all the way down to like 95% because we gave it a tool.

只要有数字需要计算,就用这段小小的 Python 代码,马上就能搞定。这样一来,你就能改进提供给客户的结果。Anytime there's a number that needs to be calculated, just use this little Python code and off you go. In In that way, you can improve the the results that you're giving back to your to your customers.

评分:代码、路径与 LLM 评判Scoring: code, path and LLM judge

这方面的另一个步骤是评分。如何为我之前告诉你的每个维度打分?有几种方法可以做到这一点。The other step on on this is about scoring. How do you score each of the dimensions that I was telling you before? We have a couple of ways that you can do this.

你可以使用确定性评分,顾名思义,它非常非常简单。这不是基于 LLM 的。你只需要运行一段代码,对于相同的输入,它每次都会生成相同的输出。You can have deterministic scores that again, like the name implies, is, you know, very very simple. This is This is not LLM based. You just have a code that is running and it's for the same inputs, it's going to generate the same outputs all the time.

我们注意到,随着这些解决方案变得越来越复杂,你需要结合使用确定性和非确定性的评分与评估器;否则,完全依赖 LLM 评判是不够的。嗯,第二项是路径:你还想弄清楚智能体是否选择了正确的路线或路径来得出答案。And what we've noticed is with these solutions as they get more complicated, you need a blend of scores and evaluators that are deterministic and non-deterministic because otherwise relying 100% just on LLM judges is not going to cut it. Um and then this the second one, the path, is you also want to figure out if the agent is taking the right, you know, route or path to get to the answer.

因为答案看起来可能还不错,或者完整、半完整,但它得出答案的过程或许并不恰当,也可能遗漏了一些步骤。所以,你也可以对此进行评估。Because it might be that the answer might look okay or complete uh or semi-complete, but then maybe the route it took to get there, it might not be the appropriate one. Might be missing steps. So, you also can evaluate that.

第三种方法是使用 LLM 作为评判器,评估答案中一些更偏定性的方面。通过这一系列做法,我们把这个原本表现不佳、准确率只有 60% 的小模型提升到了 90% 以上,最终也超过了银行针对这一特定用例设定的 85% 门槛。这既得益于我们添加了那个工具,也得益于我们在此基础上引入了评估框架,从而能够从多个不同维度衡量智能体的准确性和质量。这一点非常重要,因为现在你可以回过头来展示证据,说明你究竟是如何衡量智能体质量的;更重要的是,你还能将这些指标与对智能体本身及其配置所做的改动联系起来,包括系统提示、模型和所用工具。然后你就可以说:“看,添加这个工具、更换这个模型之后,我们的准确率从 60% 提升到了 90% 以上,达到了 95%。”And the third one how you use an LLM as a judge to judge some of the more qualitative aspects of that answer. And by doing all of this, then we got to taking this little model that was failing with 60%, we got it to over 90% and then we are clearing the 85% gate that the bank had for this particular use case by adding that tool, but also by adding this evaluation framework on top that then we can measure the accuracy and the quality of the agent across many different dimensions. And this is something very important because now you can go back and show the evidence of how you actually measure the quality of the agent, but also more importantly, you can link it to the changes that were made into the agent, into the configuration, system prompt, model, tools that were used, and then you say, "Oh, but look at how by adding this tool, changing this model, we went from 60% accuracy over to 95, 90 plus percent accuracy."

与领域专家共同设定门槛Setting gates with domain experts

现在你就要开始定义你的关卡了,对吧?这时候,与领域专家合作就变得非常、非常关键。你不希望在这件事上只依赖技术能力。And now this is where you start defining your gates, right? And this is where working with your domain experts becomes very, very critical. You don't want to just rely on technical kind of ability for this.

你要确保,如果你要交付一个风险类用例,并且它将处于启用状态,就让风险团队参与进来,告诉你它需要达到什么标准,他们才会放心将它用于内部,或展示给客户?而且,根据用例的不同,这个标准可能也会有所不同。所以,你首先需要确定评估这个应用时要考察的维度或评分项。You want to make sure that if you're delivering uh an a risk use case that is going to be in a in a enabled, that you have the risk people involved to tell you what is the bar that it needs to meet for them to feel comfortable putting this either internally or in front of customers? And that bar might be different depending on the use case. So, that is why you need to have first the dimensions or the scores uh on which you're going to evaluate this application.

然后,对于其中的每一项以及每个用例或应用,最终都会有不同的门槛需要智能体达到,这样它才能获得“批准印章”,呃,也就是获准投入生产。And then for each of those and for each use case or application, you end up with different thresholds that the agent needs to meet in order for it to have {quote} that stamp of approval uh for it to go into production.

这就是当我们进行一次完整端到端运行时的情况:我们有一个数据集,大概包含 150 个问题;另一个则大约有 1,500 个问题。现在,你可以从这些不同的维度和顶点来衡量智能体的配置。你会发现,尽管它在事实依据性和完整性方面表现合格——你可能会说:“好吧,如果我把这些指标取个平均值,那应该就没问题。”但它在法规合规性方面得了零分。And this is what it looks like when you we have like a full end-to-end run across, you know, we had one data set that it was like 150 questions, another one was like 1,500. So, but now you can measure the configuration of the agent across these different dimensions and vertices. And you see how even though it is passing on groundness, completeness to use, you might say, "Well, if I take the average of all of these, then it should be okay." But in regulatory compliance is getting a zero.

所以,这是一个纯二元的指标,要么是零,要么是100。如果你是一家银行,可能会违反任何监管合规要求,就不想投入任何东西,因为你可能会受到处罚、造成声誉损害,等等。So, that is one that is just binary. It's just either zero or 100. You don't want to put anything if you're a bank out there that is going to violate any regulatory compliance requirement that you have because you might get penalties, you might incur into reputational damage, and all of that.

所以,可能某个维度会彻底关闭这道关卡,让你无法将其投入生产。So, it might be that one dimension actually completely shuts down the gate for you to move this into production.

所以,对智能体进行评估时,采用多管齐下的视角至关重要。So, that's why it's critical to have a multi-pronged view on how you evaluate your agents.

标注队列与反馈Annotation queues and feedback

而当你开始逐渐发现这些失败,或者我们所说的失效模式时,让主要专家参与进来就至关重要了。你可以为他们整理一个我们称之为“标注队列”的队列。比如说:“每当出现监管合规方面的失败时,我都希望把相关的轨迹或证据整理出来,用于评估,并放到一个地方,让我的领域专家可以查看轨迹、了解发生了什么,然后给我反馈。”And this is where when you start to kind of picking up all these failures or what we call them failure modes, this is where bringing back to the main experts is really critical. You can curate for them what we would call an annotation queue. So, then say, "Anytime that there is a failure on regulatory compliance, I want to curate those specific traces or evidence, right, for my evaluation and put it in a place that my domain expert can come in and look at the trace, look at what happened, and then give me feedback.

有了这些反馈之后,我就可以回过头来把反馈提供给智能体,帮助它改进。这就是在之前的流程基础上接入它的方式,只不过在中间加入了一位人类专家。你会注意到下面有几种情况:每当提示词被升级,或者配置发生变化时,就会触发重新运行关卡审批流程或评估流程。And with that feedback, I can then go back and, you know, feedback into the agent to improve it. And this is what it would look like connecting it to the process before, but including that human expert into the middle. If you notice down below, that anytime a couple of things are happening here, anytime a prompt gets promoted or a change in the configuration, then it triggers a rerun of the gate clearance process or the evaluation process.

但之后,每当有改写者或人类专家给我反馈时,这些反馈都有可能被重新纳入我的黄金数据集。因为现在我们有了经过审核的智能体运行结果作为证据,所以我们可以说:“哦,实际上,这一项更适合作为评估智能体这一特定维度的标准。”这大致就是从头到尾的整个流程,既要确保领域专家参与其中,也要确保我们通过质量关卡。But then, anytime a rewriter or a human expert comes in and gives me feedback, that is a potential candidate to go back into my golden data set. Because now we have evidence from runs of the agent that have been reviewed, and now we can say, "Oh, actually this one piece is a better, you know, bar to evaluate this particular dimension on the agent." And this is kind of the whole process end to end to make sure that we are including the the domain experts, but also making sure that we're clearing our our quality gates.

从几周缩短到几分钟From weeks to minutes

这让我们能够帮助他们把评估申请所需的时间从几周缩短到几分钟,尤其是在风险与合规领域,而这类评估通常有时甚至要花上几个月。这个流程会变得非常迭代。我们可以非常具体地聚焦于希望智能体处理的领域。Then this got us to a place where we were able to help them go from weeks to minutes when it comes to, you know, evaluating a applications, especially in like risk and compliance, which typically take even months sometimes. So, this process it becomes very iterative. We can be very specific and focus on the areas that we want on the agent.

所以这方面还没有现成的模板。嗯,你知道,这个行业目前还在发展中。因此,通常你需要明确自己想评估什么,也就是那些对你来说重要的指标。Then there's no template for this. Um, you know, this industry's been been developed right now. So, typically you need to define what is it that you want to evaluate in in in kind of the metrics that matter to you.

我想留给你们的三件事是:你需要编写自己的基准测试,因为正如我所说,公开的基准测试对你的数据其实没什么意义,因为严格来说,它们并不是基于你的数据完成的。第二,你必须对应用进行门控,而不是对模型进行门控。And the three things that I like to leave you with is you need to write your own benchmark because like I said, the public ones don't really matter for your data because they were not done on your data per se. The second one, you got you have to gate the application, not the model.

这样一来,如果明天你想更换模型,就会有更大的灵活性:你已经在应用程序和智能体配置中设置了所有控制项,因此之后调整起来也会更容易。第三点,我要确保领域专家参与进来,设定你认为合理的标准或阈值,以便将其部署到生产环境中。最后,要使用你自己的数据、标准和门槛,尤其是在受监管行业中——你可能希望将所有内容保留在自己的内部环境中,也可能不会依赖公开可用的信息。That gives you more flexibility if tomorrow you want to swap a model, you have already all the controls in the application and in the configuration of the agent, and then it becomes easier for you to adjust. And then the third, let me make sure that the domain experts come come in and set the bar or the thresholds that you are deem reasonable in order for you to promote this into production. And finally, you know, use your data, use your bar, use your gates, especially in regulated industries where you want to keep things in your premises and you're probably not relying on publicly available information.

那么,感谢大家抽出时间。我知道我讲得稍微超时了,不过我想把我们这项工作的详细博客文章分享给大家。文章里还附有代码仓库链接,你可以自行复现这项工作。如果有任何问题,欢迎随时找我。So, thank you for the time. I know I'm a little bit over, but I wanted to give you with the detailed blog post of this work that we did. It also links to the repo that you can reproduce this yourself, and I'm around if you have any questions.

那么,谢谢。So, thank you.

值得记下

  1. 我们在这里不认证模型,而是认证应用,对吧?
  2. 因此,首先需要确定评估这款应用的维度或评分标准。
  3. 这就是为什么必须从多个角度评估智能体。

← 回到本期 · 第 15 条