没有标准答案时,Netflix 怎么评估 AI?
原题How Netflix Evaluates AI When There's No Right Answer - Cameron Wolfe, Netflix
推荐理由Netflix 针对没有唯一正确答案的生成任务建立人工质量定义和线上验证,适合内容类产品评估设计,作为银行评估之外的候补视角。
看前速览
Netflix 研究员 Cameron Wolfe 介绍如何用人工评审定义质量,验证自动评分的可靠性,再到线上检验 AI 在主观任务里的表现。
先定义什么叫做得好,再衡量人和人有多一致
让专家写出具体标准和示例,请多位评审给同一批样本打分,再根据分歧修订含糊的条款。评审之间的一致程度也可以作为检验自动评分的参照。
自动评分通过人工校验后,再用它扩大测试规模
通用准则可以跨任务复用,专用评分清单则逐项核对特定要求。两种做法都需要用可信的人工评分作对照,并按任务特点选择一致性指标。
评测设计要能把真实进步和随机波动区分开
挑选贴近实际、能区分模型能力的任务。根据想检测的差异、观测到的波动和目标显著性水平估算样本量,报告误差条,并重复采样模型或评分器的输出以降低方差。
用线上数据独立检验质量
全面上线前做 A/B 测试,观察用户主动反馈以及中途退出等行为信号。上线后继续监测,把新发现的失败场景补进评测集。
完整摘要
评估主观任务时,模型和评分器的输出都可能波动,同一套测试跑两次也可能得到不同结果。Cameron Wolfe 建议先请领域专家明确质量标准,让多位评审给同一批样本打分,再根据分歧修订准则。团队随后可以用可靠的人工评分检验大模型评委或任务专用的评分清单,并借助统计功效分析、误差条和重复采样判断小幅变化是否可信。上线前用 A/B 测试观察真实使用表现,上线后继续监测,把新发现的失败案例补进评测集。
章节
文字稿
简要说明Brief Description
当没有正确答案时,Netflix 如何评估 AI——Cameron Wolfe,NetflixHow Netflix Evaluates AI When There's No Right Answer - Cameron Wolfe, Netflix
目录Table of Contents
- 简介Intro
- 为什么评估很难:噪声Why evals are hard: noise
- 可验证任务的范围The spectrum of verifiable tasks
- 一个由三部分组成的框架A three-part framework
- 以人工评估为指引灯塔Human evaluation as the North Star
- 校准人工审核人员Calibrating human reviewers
- 数据量有多大,是什么类型的?How much data, and what kind
- 离线评测:LLM 评审与评分标准Offline evals: LLM judges and rubrics
- 将评判模型与人类进行比较Checking the judge against humans
- 用统计学对抗噪声Fighting noise with statistics
- 生产环境监控与 A/B 测试Production monitoring and A/B tests
- 持续改进这个循环Keep improving the loop
- 回顾Recap
简介Intro
好了,大家好。我是 Cameron Wolfe,是 Netflix 的资深研究科学家,同时也撰写一份专注于深度学习的通讯。希望大家读过。今天我想谈谈评估,具体来说,是如何评估高度主观的任务。All right, well, hi everybody. I'm Cameron Wolfe. I'm a staff research scientist at Netflix. I also write the deep learning focused newsletter. Hopefully you read it. And today I'm going to be talking about evaluations and more specifically trying to evaluate highly subjective tasks.
我们将介绍很多信息,内容大致相当于一份概述。如果你想深入了解其中的任何内容,可以扫描这个二维码,它会带你查看幻灯片。我还写了很多材料,详细阐述了所有这些不同的概念。因此,如果你在整个演讲过程中对某些内容感兴趣,也有很多机会可以进一步阅读。We're going to go over a lot of information. It's supposed to be kind of like an overview. If there's anything that you want to look into in more depth, you could scan this QR code. It'll take you to the slides. I've also written a lot of stuff that outlines all of these different concepts in detail. So there's plenty of opportunity for further reading if there's anything that you're interested in throughout the talk.
为什么评估很难:噪声Why evals are hard: noise
所以,我们都知道评测很难。在 AIEE 期间,我们听过很多关于这个主题的报告。如果我们思考一下为什么会这样,就会发现 AI 研究社区中到处都有相关证据。大家一直在讨论基准测试。几乎每天都有新的评测发布,同时现有评测也在不断修订。所以,我们都知道评测很难。但如果我们退一步,想想这背后的原因,就会发现有几个不同的因素。其中一个主要原因,也是我们今天要重点讨论的,是噪声。在评估模型时,我们要处理多个非确定性组件。这会导致行为出现很大波动,也让我们很难根据评测结果得出可靠的结论。So, we all know evaluations are difficult. We've seen a lot of presentations on this during AIEE. And if we think about why this is the case, there's evidence of this everywhere within the AI research community. People are talking about benchmarking constantly. There's new evals being released like every day, along with revisions to existing evals. So, we all know that evaluations are difficult. But if we step back and think about why this is the case, there are a couple of different reasons. And one of the primary reasons and the one that we're going to focus on a lot today is noise. We're working with several non-deterministic components when we're trying to evaluate models. This creates a lot of fluctuations in behavior and it just makes it really difficult to draw reliable conclusions from eval results.
要理解为什么会这样,我们只需看看一次评测试验的结构。这里有我们的评测套件,它由许多不同的任务组成,我们希望尝试解决这些任务。我们将这些任务交给一个非确定性智能体,它会生成一段执行轨迹,并最终给出一个解决方案。然后,我们把这个解决方案交给评分器,评分器会给出某种通过/未通过的结果。所以归根结底,我们只是想让智能体解决这些任务,并查看它们是否通过。由于评测成本很高,你知道,运行一些近期的基准测试可能要花费五万到十万美元。我们无法对那么多任务进行评测。因此,评测基准中的任务集通常会相对较小。And to understand why this is the case, we can just look at the structure of an evaluation trial. So, we have our evaluation suite here. It's composed of a bunch of different tasks that we want to try and solve. We pass those tasks to a non-deterministic agent that gives us a rollout and eventually a solution. And then we take this solution and pass it to a grader which will give us just some kind of pass/fail result. So, at the end of the day we're just trying to get our agents to solve these tasks and seeing if they're passing them or not. And because of the cost of evaluation, you know, some of these recent benchmarks will cost like, you know, 50 to 100 thousand dollars to run them. We can't evaluate over that many tasks. So, the set of tasks within our evaluation benchmark typically is going to be relatively small.
再加上我们已经在使用非确定性智能体,这本身就让我们很难在任何程度上依赖评测结果。除此之外,如果看看大家在评测方面做的大多数工作,我们主要关注的是可验证任务。比如屏幕底部的这个评分器,它是通过某种确定性检查实现的,可能是字符串匹配、符号验证、测试用例等等。因此,我们主要关注的是可验证任务,也就是可以通过一个函数来判断通过或失败的任务。And this combined with the fact that we're already working with a non-deterministic agent, it already just makes it difficult to have any sort of like reliance on the eval result. And on top of this, if we look at most of the stuff that people are working on in terms of evals, we're primarily focusing on verifiable tasks. So, this grader that we see at the bottom of the screen here, it's implemented as some sort of like deterministic check, whether it be string matching, symbolic verification, test cases, and so on. So we're mostly focusing on verifiable tasks, where pass/fail is something that we can evaluate with a function.
可验证任务的范围The spectrum of verifiable tasks
但如果我们看看智能体在现实世界中会尝试完成的各种任务,就会发现这些任务的可验证性各不相同。并非所有任务都能验证。可验证性的一端是数学这类任务,我们可以通过字符串匹配或符号验证等方式确定性地验证答案;另一端则是创意写作这类非常主观的任务。在这种情况下,及格与否的定义极其主观且开放,即使是人类也很难可靠地进行评估。因此,我们通常不得不借助某种类似 LM 评判器或评分标准的东西来帮助评估。这样一来,我们就把原本确定性的组件——评分器——替换成了另一个基于 LM 的非确定性组件。But if we look at the different things that an agent will try and do in the real world, it kind of lies on a spectrum of verifiability. Not all tasks are verifiable. So, on one end of the spectrum, we have things like math where we can verify solutions deterministically with things like string matching or symbolic verification. But on the other end of the spectrum, we have super subjective tasks like creative writing. And here, the definition of pass-fail is extremely subjective and open-ended, and it's hard even for humans to evaluate reliably. So, usually we're going to have to draw upon some type of like LM judge or rubric to help us with this. And what we end up with is that we're taking a component that was previously deterministic, this grader, and we're replacing it with another non-deterministic LM-based component.
所以,最终我们只会在一个本来就很难开展的评估过程中,遇到大量噪声和主观因素。结果就会变成这样:我们被这些噪声淹没,完全看不出我们的智能体表现到底好不好。所以,今天这场演讲的目标,就是想办法避免变成这样的人。So, we just end up with a lot of noise and subjectivity within an evaluation process that was already difficult to begin with. So, what we end up with with this is just something that looks like this. We're drowning in all this noise. We're completely blind to if our agent is like doing well or not. So, the goal of the talk today is to try and figure out how to not become this person.
一个由三部分组成的框架A three-part framework
那么,我们要做的是概述一个可重复使用的三部分框架,用于评估高度主观的任务。这三部分分别是离线评估、人工评估和生产环境监控。接下来,我们会介绍每个部分的最佳实践,这些实践既适用于主观任务,也适用于一般的评估。过程中,我们还会介绍一些不同的技巧,帮助我们减少噪声、提高对评估结果的统计信心,并根据评估结果得出尽可能可靠的结论。那我们就开始吧。So, what we're going to do is we're going to outline a repeatable three-part framework for evaluating super subjective tasks. This will consist of offline evaluation, human evaluation, and production monitoring. And then we're going to outline the best practices for each of these components, which applies both to subjective tasks and just to evaluation in general. And then along the way we're going to cover a bunch of different tricks that we can use to reduce noise, have more statistical confidence in these evaluation results, and draw the most reliable conclusions that we can from our evaluation results. So, let's get into it.
以人工评估为北极星Human evaluation as the North Star
因此,当我们处理一项非常主观或开放式的任务时,第一步是建立人工评估流程。这将成为我们定义、衡量并持续改进任务质量的北极星。不过,要建立人工评估流程,我们首先需要明确界定什么是质量。通常,我们会与少数领域专家合作,制定质量指南。在针对任务的质量指南中,我们会定义一小组我们关注的标准,说明最终解决方案应满足哪些要求;我们还会定义如何对这些标准进行评分,通常采用二元评分或李克特量表评分。然后,我们会提供大量细节,说明每项标准的具体含义、如何对其评分的具体示例等。So, when we're working on a very subjective or open-ended task, the first step is to set up a human evaluation process. And this is going to be the North Star for defining, measuring, and improving the quality of our task over time. But, in order to set up human evaluation, we need to first create a clear definition of what quality means. And usually the way that we do this is by partnering with some small number of subject matter experts to create quality guidelines. And within these quality guidelines for our task, we define a small set of criteria that we care about in terms of what should be in the final solution. We define how to rate these criteria, usually using some type of like binary or Likert score. And then we just provide a ton of details defining what each of these criteria are, specific examples of how to rate them, and things like this.
因此,我们希望尽可能多地向人们提供信息,从而最大限度地减少这一人工评估过程中的主观性。So, we want to provide humans as much information as possible so that we can minimize the subjectivity of this human evaluation process.
校准人工审核员Calibrating human reviewers
但是,即使我们编写了尽可能完善的人工评估指南,也不能想当然地认为人工评估流程一定可靠。因此,我们需要对它进行充分校准。具体来说,就是针对同一份数据获取多份人工评估结果,查看它们之间的一致程度,然后根据发现的分歧来源更新指南。这其实是一个迭代过程:你会直接与评估人员沟通,试着弄清楚指南中是否存在某些问题,导致他们不清楚该如何评估。随着时间推移,我们希望质量指南能够尽可能清晰,从而让所有评估人员之间达成高度一致。只要正确完成这些工作,最终就能得到经过校准的人工评估流程,以及非常清晰的质量指南。But, even if we write the best possible human evaluation guidelines, we can't just assume that the human evaluation process is going to be reliable. So, we need to calibrate it extensively. And what this means concretely is that we take multiple human evaluation samples for the same data, look at the agreement between them, and then update our guidelines based upon the sources of disagreement that we see. So, this is kind of an iterative process where you're literally just talking with humans and trying to see, you know, is there some issue in my guideline that makes it unclear how to evaluate this? And over time, we want to make our quality guidelines as clear as possible so we can get high agreement between all of these different humans. So, if we do this properly, then we end up with a calibrated human evaluation process and very clear quality guidelines.
而且我们现在已经可以用它开始进行评估了。And we can already use this to start performing evaluations.
数据量有多大,是什么类型的?How much data, and what kind
但如果我们想从这些人工评估中得出某种可靠的结论,就还需要考虑如何抽样数据。因此,我们需要考虑一些因素,比如要将多少数据纳入评估流程、要评估哪类数据,等等。对于数据量,我们可以借助一个叫作统计功效分析的概念,来帮助我们了解需要向评估流程中输入多少数据。统计功效是一个非常有意思的领域,但就本次演示而言,我们只需了解其基本思路:功效分析可以帮助我们估算需要纳入评估流程的数据量,从而有意义地判断两个不同模型在性能上的差异。But if we want to draw some sort of reliable conclusion from these human evaluations, we also need to think about how we sample data. So, we need to think about things like the amount of data that we're going to put into the evaluation process, the type of data that we will evaluate on and so forth. And for the amount of data, we can draw upon a statistical concept called power analysis, which will help us understand the amount of data that we need to pass into the evaluation process. And power is a really interesting area of statistics, but for the purposes of this presentation, the high-level idea is that power analysis allows us to estimate the volume of data that we need to put into the evaluation process to make a meaningful conclusion about the difference in performance between two different models.
我们可以根据想要检测的效应量、评估结果中观察到的噪声水平等因素来进行估算。我们可以通过对模型生成结果进行重采样等方式来估计噪声,并确定期望的显著性水平。也就是说,我们希望有多大的把握确信两个模型性能之间的差异确实存在,而不是由噪声造成的。综合这些因素,我们可以通过功效分析估算出,要得出可靠结论所需的评估规模。 至于要抽取哪类数据,影响因素有很多。但从总体上看,如果你阅读多份不同的基准测试报告,了解大家的做法,就会发现他们通常会关注评估的多样性和真实性。我们希望所有用于评估的数据,都能准确反映智能体在生产环境中要解决的任务类型。And we make this estimation by looking at things like the effect size that we want to detect, the level of noise that we observe in our eval results. You can estimate this with like resampling model completions and so forth, and the desired significance level. So, how confident we want to be that a difference in two models' performance is actually legitimate and not due to noise. So, we can use power analysis with these factors to estimate the size of our eval that we need for a reliable conclusion. And then in terms of the type of data that we want to sample, there are a bunch of different factors, but at a high level, if you read a bunch of different benchmark reports and see what people do, generally they're going to focus upon diversity and the realism of the evaluation. So, we want all of the data that we evaluate on to accurately reflect the types of tasks that the agent is solving in production.
我们希望评测足够困难且有区分度,也就是说,能够区分不同模型的能力。通常,我们会通过某种形式的能力分析来评估这一点:抽样一些运行轨迹,看看模型实际能解决哪些类型的问题,哪些又解决不了。我们还希望评测尽可能准确,这通常是随着时间推移,结合模型筛选和人工筛选来实现的。而这些关于如何恰当地抽样数据的概念,并不只适用于人工评估。其实,你可以在很多场景中使用它们。因此,之后我们讨论离线评估时,可能还会用到非常相似的数据抽样技术。到这一步,我们就有了一套可靠的人工评估流程。We want it to be difficult and discriminative, meaning that it differentiates between the capabilities of different models. Usually, this is assessed via some form of like profiling, just sampling rollouts and seeing what types of problems a model can actually solve versus not. And then we want it to be as accurate as possible, which is usually accomplished via some combination of like model and human-based filtering over time. And these concepts for sampling data properly, they're not only applicable to human evaluation. You can kind of use these anywhere. So, we'll also see again in the future when we talk about offline evals, we'll probably use like very similar data sampling techniques. So, at this point, we have a reliable human evaluation process.
离线评估:LLM 评审员与评分标准Offline evals: LLM judges and rubrics
但如果我们希望人类评估每一个新推出的智能体或模型,很快就会形成瓶颈,导致我们无法足够快速地迭代。因此,我们需要投入资源来构建离线评估或自动评估。这里的核心思路是:我们需要找到某种自动化的替代指标,而不是让人类来验证解决方案的质量。在这种情况下,这通常会是某种语言模型评审器或评分标准。本次演讲不会深入讨论语言模型评审器和评分标准之间的差异,但从整体上来说,语言模型评审器通常会获得高层次的质量准则,这与人类评估任务的方式非常相似。我们会把质量准则提供给它们,由它们评估解决方案是否符合这些准则。而且,对于我们要评估的所有不同任务,我们关注的都是同一套质量准则。But if we want to have humans evaluate every new agent or model that we're looking into, it's quickly going to become a bottleneck, and we can't iterate fast enough. So, we need to invest into creating offline or automatic evaluations. And the key idea here is that instead of verifying the solution quality with a human, we need to find some sort of automatic proxy for this, which in this case is usually going to be some LM judge or rubric. And we won't talk deeply about the differences between LM judges and rubrics in this talk, but at a high level, basically LM judges tend to be given high-level quality guidelines, and it's very similar to how humans evaluate tasks. We give them our quality guidelines, and they're going to evaluate whether the solution adheres to that. And it's the same set of quality guidelines that we look at across all different tasks that we're trying to evaluate.
另一方面,评估量表则更加具体。它会针对特定任务列出一份检查清单,其中的各个条目都由 LM 评审器分别进行核验。DR Tulu 论文中的这个例子就很能说明问题:我喜欢这个例子,因为它既极具主观性,又涉及如何将一本书改编成符合当地文化的 Netflix 电影。不过,如果我们看看模型在这里依据的所有量表检查项,就会发现我们关注的并不是诸如“质量”之类的高层次准则,而是列出一份具体清单,明确指出 LM 评审器需要在它所评估的解决方案中核验哪些内容。因此,这些检查项针对特定任务,我们会逐项独立核验,从而让评估更加客观。最终,我们得到的是一组自动指标,可以用类似人类评估解决方案的方式来核验解决方案的质量。Rubrics, on the other hand, are a little bit more specific. So, they define a task-specific checklist of individual items that are each separately verified with an LM judge. So, one example of this from the DR Tulu paper up here, I like this example cuz it's both super subjective, and it's also talking about trying to culturally adapt a book into a next Netflix film. But if we look at all the rubric checks that the model is looking at here, we're not looking at some high-level like quality guideline. We're outlining a checklist of specific things that the LM judge needs to verify within the solution that it's looking at. So, it's task-specific, and we're looking and verifying each of them independently to make the evaluation way more objective. And what we end up with here is automatic metrics that we can use to verify solution quality in a similar way to how a human would evaluate a solution.
将评判器与人工评判进行对比Checking the judge against humans
但问题在于,这些都是自动指标。它们只是代理指标,因此并不完美。为了解决这个问题,我们需要进行某种元评估,以确保我们的评判器足够准确。具体来说,我们会采用人工评估过程中得到的数据,也就是黄金数据。这些是由人工给出的评估示例,我们对其质量有信心,知道它们是优质的评估示例。然后,我们要衡量评判器或评分标准给出的结果与这组黄金数据之间的一致性。基本上,我们只需查看相关性指标、二元准确率等基础指标。不过,元评估的范围相当广,有很多不同的做法。我喜欢举一个自己参与过的 Netflix 项目作为例子:我们实际使用了一个 LLM 评判器,并证明它的输出与弃看率等关键流媒体指标存在因果相关性。But the problem with this is that these are all automatic metrics. They're just a proxy, so they're going to be imperfect. So, to solve this, we need to do some sort of meta-evaluation to ensure that our judge is accurate. And what this means is that we'll take data from the human evaluation process, golden data. These are going to be evaluation examples from humans that we're confident in their quality. We know these are good evaluation examples. And then we want to measure the agreement between what our judge or rubric is telling us and this golden data set. So, we basically just want to look at basic things like correlation metrics, binary accuracy, and so forth. But meta-evaluation is like a pretty wide space and there's a bunch of different ways that you could approach this. One example that I like to pull on from Netflix, a project that I worked on, we actually took an LLM judge and showed that the outputs of this LLM judge were causally correlated with key streaming metrics like abandonment.
所以,如果你的 LLM 评审告诉你某个节目不好,那么很可能有人看过之后就会弃剧。评估评审的方法有很多种,如果你对此感兴趣,我建议你看看这篇博客。最后,在结束元评估之前,一个常见的问题是:怎样才算达到了良好的一致性水平?这在很大程度上取决于具体任务。比如,对于更主观的任务,能够达到的一致性水平会低很多。但我们可以把人工评估作为基准:看看不同的人在评估这项任务时彼此的一致程度,然后争取让评审与人类达到相近的一致性水平。也就是说,评审与人类之间的相互一致程度,以及人类彼此之间的一致程度,都要大致相当。So, if your LLM judge tells you something is bad, it's likely that somebody will abandon the show after trying to watch it. So, there's a bunch of different possibilities for how to evaluate judges and I'd encourage you to look into this blog if you're interested in them. And then finally, before moving on from meta-evaluation, one common question is how to figure out what agreement level is good. And for this, it depends a lot on the task. Like more subjective tasks, the level of agreement that you can achieve is going to be a lot lower. But what we can do is just use human evaluation as a baseline. So, we can look at the amount of agreement between different humans who are trying to evaluate this task, and we can shoot for a similar level of agreement of our judge with the humans. So, similar levels of agreement both between judges and humans and mutually between humans.
接下来,我们有一些已知效果良好的自动验证器。因此,我们可以围绕这些验证器开始构建基准。具体做法与人工评估非常相似:我们使用刚才讨论的相同技术来恰当地抽样数据,然后利用 LLM 评判器或评分标准来验证这些输出,并持续修订和改进用于评估的数据。And then from there, we have automatic verifiers that we know work well. So, we can just start to create benchmarks around all of these verifiers. To do this, it's pretty similar to human evaluation. We just sample data properly using the same techniques we just talked about, and then we use LLM judges or rubrics to verify these outputs and then just try and continually revise and improve the data that we're evaluating on over time.
用统计学对抗噪声Fighting noise with statistics
我们还需要讨论的一点是,现在我们面对多个非确定性组件。在人工评估中,只有 LLM 是非确定性的。现在,模型和评估器都具有非确定性。因此,我们需要设法处理大量噪声。为此,我们可以把各种统计方法都用上,尝试为这些结果计算置信区间。与人工评估类似,我们可以通过功效分析来确定基准测试集的规模。我们可以在所有评估结果中同时报告误差线,还可以使用重采样等技术——基本上就是从 LLM 或评审模型那里进行多次生成,以降低方差。The only point that we still need to talk about is that we now have multiple non-deterministic components that we're working with. In human evaluations, we only had a non-deterministic LLM. Now we have a non-deterministic model and a non-deterministic evaluator. So, we have a lot of noise that we need to figure out how to handle. And in order to do this, we can just apply the kitchen sink of different like statistical methods to try and put confidence intervals on all of this. So, similarly to human evaluation, we can use power analysis to tell us what the size of our benchmark should be. We can report error bars along with all of our evaluation results and then use techniques like resampling, which basically just means taking multiple rollouts from your LLM or from the judges as well to reduce variance.
最终,我们得到的不只是评估结果,还会在报告评估结果时提供明确的置信度信号,并采取干预措施,尽可能缩小这些信号的范围。把这些信息放在一起报告,就能更有意义地检测模型能力是否提升。我们可以确认,某项评测的分数变高,是因为模型确实变得更好了,而不是噪声或类似因素造成的。现在,我们已经建立了一套经过校准的人类评估流程,也创建了离线评估和经过校准的评判器,可以用来自动运行评估。这样,我们就能反复运行评估,测试大量不同的想法,从而扩展实验过程。然后,我们可以把效果好的方案交回人类评估,让人来判断它是否确实有效。And what we end up with is we don't just report evaluation results. We report our evaluation results with clear confidence signals and then we take interventions to try and make all of these confidence signals as tight as possible. And if we report those together, we can basically more meaningfully detect capability improvements in our model. We know if one score on an eval is better, it's because the model is actually better, not because of noise or something like this. So now we have a calibrated human evaluation process. We've created offline evaluations and calibrated judges that we can use to run this automatically. So we can just run this a bunch of different times and test out tons of different ideas to scale the experimentation process. And then from there, we can take whatever is working well and pass it back to human evaluation to have humans evaluate whether this is actually going well.
生产监控与 A/B 测试Production monitoring and A/B tests
此时,我们可能会问自己,是否已经准备好部署这个模型了。答案可能是肯定的,但如果我们此时就说“是”,实际上就会跳过评估流程中一个至关重要的环节,那就是生产监控。这里的思路是,我们可以为智能体定义并跟踪生产指标。也就是说,我们可以通过观察智能体在生产环境中的使用情况,来进一步评估它是否正常运行。为此,你可以查看各种不同的指标。其中一些是明确的,比如点赞、点踩反馈、偏好反馈等。这类做法在聊天机器人中很常见。但也可以是隐式指标,比如会话时长、用户放弃率等。你可以定义各种指标,只要它们与智能体的表现好坏存在某种关联即可。And at this point, we might be asking ourselves whether we're ready to deploy this model or not. And the answer could be yes, but if we if we say yes at this point, we'd actually be skipping a super important part of the evaluation process, which is production monitoring. And the idea here is that we can define and track production metrics for our agent. So we're using how the agent is used in production as another mechanism for evaluating whether it's working properly or not. And to do this, you can look at a variety of different metrics. Some of them are explicit like thumbs up, thumbs down feedback, preference feedback and so forth. You'll see this done in like chatbots all the time. But it could also be implicit metrics like the length of a session, abandonment rate and so on. So you can define these different metrics that are somehow correlated to whether the agent is performing well or not.
这些基本上就是来自生产环境的质量信号,我们可以用它们来判断我们的智能体表现是否良好。我们可以利用这些生产指标进行 A/B 测试,从而相对地评估智能体的表现。也就是说,与现有方案相比,当前智能体的表现是否更好?此外,我们还可以运用许多统计方法,来确定这项 A/B 测试需要运行多久,等等。这与我们之前讨论过的功效分析有关。A/B 测试的好处在于,我们基本上可以把它当作一种渐进式的模型部署流程。因此,我们不必直接把模型推送给所有用户,而是可以通过 A/B 测试,在生产环境中检验模型的质量,确保一切运行正常后,再进行全面推广。And these are basically just quality signals from production that we could use to see if our agent is doing good. And what we could do is we can take these production metrics and measure them in an A/B test to gain a relative sense of how our agent is doing. So, seeing compared to what we already have in place, is the current agent doing better than that? And again, we can use a lot of statistical techniques to tell us how long we need to run this A/B test and so forth. This is related to power analysis, which we talked about before. And the nice thing about A/B testing is that what we could do is basically treat this as a soft model deployment process. So, instead of just sending the model out to everybody, we can vet the quality of this model in production with an A/B test and make sure everything's going well before pursuing a full rollout.
即使模型上线后,我们仍有很多机会持续监控生产环境。我们可以观察性能是否出现任何令人担忧的趋势,甚至找出智能体失效的情况、新的用例,等等,并以生产环境为依据,让其他评估步骤贴近现实。因此,生产监控对于扩展评估、发现新的失败案例以及完成所有这些工作都极为有用。我们希望找出所有这些情况,然后将它们反馈给评估流程的其他环节。And even after we roll out the model, there's a lot of opportunities to just continually monitor production. We can look for any concerning trends in performance or even find cases where the agent is failing, new use cases and so forth, and use production to ground the other evaluation steps in the real world. So, production monitoring is incredibly useful for extending evals, finding new failure cases, all of these things. We want to find all of these cases and then pass them back to the other parts of the evaluation process.
持续改进这个循环Keep improving the loop
所以,从这个角度来说,我们只需要不断努力,随着时间推移逐步改进各个评估组成部分。我们已经了解了这次演讲要涵盖的所有不同组成部分,但我们总能把它们做得更好。比如,我们可以定义新的或更优质的评估标准,提升人工评估者或评判模型的校准效果,也可以查看生产环境,寻找新的错误案例,并将其纳入离线评估,等等。或者,我们可以把整个流程应用到一个新领域,再重复一遍,也就是构建一套完全不同的评估方案。So, in this way, we just have to continually work towards improving all of the evaluation components over time. We've seen all of the different components that we're going to cover in this talk, but we can always make all of them better. So, we could define new or better quality criteria, we can improve calibration of humans or judges, or we could look at production to find new error examples that we can work into offline evals and so forth. Or we could just take this entire process and repeat it in a new domain. So, just build an entirely different eval.
回顾Recap
总而言之,评估很困难,而对于主观任务来说尤其困难,因为我们要面对更多噪声来源。我们已经了解了一套路线图,以及各种能够尽可能减少噪声、从而得出更可靠结论的组件和技巧。在这套路线图中,人工评估是衡量质量的北极星,它提供了一个经过人类认可的明确质量定义。基于此,我们可以用这个定义来校准 LLM 评审或评分标准,将它们作为人工评估的替代手段,从而扩大实验规模。对于效果良好的方案,我们可以再交由人工评估,最终进行部署。部署之后,我们还可以通过 A/B 测试和生产环境监控作为另一种评估机制,确保一切在真实环境中运行良好。So, to sum everything up, evaluation is difficult, but for subjective tasks, it's especially difficult because we're dealing with more sources of noise. And we've seen a roadmap and all of these different components and tricks that we can use to reduce the amount of noise as much as possible to draw more confident conclusions. And in this roadmap, human evaluation serves as our North Star for quality. It provides a clear quality definition that humans agree on. And then from this, we could use this definition to calibrate LLM judges or rubrics as a proxy to human evaluation, and this allows us to scale the experimentation process. Then anything that goes well, we can pass it to human evaluation and eventually deploy it. And when we deploy, we can use A/B testing and production monitoring as another evaluation mechanism to make sure everything's going well in the real world.
归根结底,我们必须在每一步都与噪声作斗争。由于我们处理的是主观评估,我们知道其中必然存在噪声。因此,我们需要对评估结果保持高度审慎,并尽量借助统计方法,尽可能准确地了解引擎的表现。我们可以采用功效分析、置信区间、重采样等技术,尽可能降低评估过程中的方差,并提供更清晰的置信信号。 把这些方法结合起来,最终形成的就是一个多步骤评估流程:我们会进行大量离线评估,初步判断哪些方案可能表现良好;再将表现最好的方案交由人工评估,以更高保真度地了解其效果;然后通过 A/B 测试试探其在生产环境中的表现,最终再进行部署。And this basically is something where we have to fight noise at every step. So because we're working with subjective evaluations, we know that they're going to be noisy. We need to be very skeptical of evaluation results and try and use statistics to give us like the best picture of how our engine is performing. So we can use techniques like power analysis, confidence intervals, resampling and more to reduce the variance of the evaluation process as much as possible and provide clearer confidence signals. And if we put all of this together, we basically just end up with a multi-step evaluation process. We run tons of offline evals to give us an idea of what's going to go well. We pass the best ones to human evaluation to give us a higher fidelity view of how something is doing. And then we A/B test it to kind of test the waters in terms of well whether it's doing well in production and eventually deploy it.
部署之后,我们可以继续监控失败案例,并将这些案例反馈到流程中的其他所有步骤中。好,我知道这些信息很多,但如果有任何让你感到困惑,或者你想深入了解的地方,我在这里创建了这个索引。它链接到更多阅读资料,几乎涵盖了我们讨论过的所有内容,资料来自我本人和其他人。如果你感兴趣,我鼓励你深入了解这些细节。非常感谢,希望这些内容对你有所帮助。And once we deploy, we can continue to monitor for failure cases that we then work back into all of the other steps of the process. All right. So I know that's a lot of information, but for any areas that were confusing or you want to read more deeply into, I created this index here. So this links out to further reading on pretty much everything that we talked about both from myself and other people. So I encourage you to look into all of these details if it's interesting to you. Thank you so much and I hope it was helpful.