Why Evals Matter | LangSmith Evaluations - Part 1

LangChain
8 Apr 202406:47

Summary

TLDRこの動画スクリプトでは、評価の考え方と実装方法について解説されています。新しいモデルがリリースされた際には、公開されている評価が多数報告されます。評価を考えると、データセット、評価者、タスク、結果の解釈という4つの要素に分けることができます。動画では、Human EvalやChatbot Arenaなどの評価の例を挙げ、それらの評価方法と解釈の方法について説明されています。また、個別のテストや評価を実装する方法についても触れており、Langsmithというプラットフォームを紹介しています。Langsmithを使うことで、データセットの作成、評価者の定義、結果の分析を行いやすくなります。

Takeaways

  • 📝 評価の考え方と実装方法についてシリーズを開始する予定
  • 🔍 評価はデータセット、評価者、タスク、結果の解釈の4つの要素から考えられる
  • 👨‍💻 Human EvalはOpenAIが公開した、プログラミング問題を解決するデータセット
  • 📊 結果は通常バーチャートで報告され、正解率を示す
  • 🤖 Chapad Arenaは動的に生成されるデータセットで、ユーザーがLLMSの応答を比較して選択
  • 🏆 Chapad Arenaは比較的評価で、ELOスコアのような統計情報を提供
  • 💡 個別のテストと評価に興味があり、自分でベンチマークを構築したい人が増えている
  • 🛠️ データセットの作成には手動でのキュレーションやアプリでのユーザーインタラクションの利用などがある
  • 👩‍🔬 LMを評価者として使うと、基準なしの評価や相対的な評価が可能
  • 🔧 単純なアサーションチェックから比較的複雑な評価まで、様々な評価方法がある
  • 🔗 Lang Smithは評価を簡単に実行できるプラットフォームで、データセットの作成や評価器の定義が容易
  • 🌐 Lang SmithはLang Chainと一緒に使用することもできるが、必要はなく、柔軟性がある

Q & A

  • 最近のユーザーの関心をどのように評価するのに役立つ4つの要素は何ですか?

    -データセット、評価者、タスク、結果の解釈方法の4つの要素が役立ちます。

  • Cloud 3のような新しいモデルがリリースされた際に、公開されている評価とは何ですか?

    -新しいモデルがリリースされた際に、公開されている評価は、様々なLMSを比較し、不同なタスクやデータセットに対してのパフォーマンスを示すものです。

  • Human Evalとは何であり、どのような評価方法を用いていますか?

    -Human Evalは、OpenAIが2021年に制作したプログラミング問題に基づく評価方法です。評価方法是、各コード問題に真実の正解があり、ユニットテストやプログラム的な方法で正確さを指定します。

Outlines

00:00

🔍モデル評価の基本とその実装方法

このパラグラフでは、最近の評価に対する関心の高まりを受け、評価の基本的な考え方とその実装方法についてのシリーズを開始することを紹介しています。具体的には、Langmiを使用して評価を自分で実装する方法について説明しています。評価について考えるための4つの要素、すなわちデータセット、評価者、タスク、結果の解釈方法について説明し、これらの要素を用いて公開モデルの様々な評価を具体的に見ていきます。例として、OpenAIによって制作された165のプログラミング問題を含む「Human Eval」という評価方法や、Chatbot Arenaのような動的に生成されるデータセットに基づく評価方法が挙げられています。評価の異なるアプローチや、個別のテストや評価の重要性についても触れています。

05:01

🛠Langmiを使った評価の実装

第二のパラグラフでは、評価を実装するための具体的なステップとしてLangmiプラットフォームの紹介が行われます。Langmiは、評価の実行を簡単にするためにLang Chainチームによって構築されたプラットフォームであり、データセットの構築、評価者の定義、結果の比較分析などを行うためのUIとSDKを提供します。Langmiを使用することで、ユーザーは自分自身の評価を容易に実装し、バージョニングや編集、カスタム評価器の使用など、評価プロセスの様々な側面を管理できるようになります。このツールはLang Chainと一緒に使用することができますが、必須ではないため、柔軟性が高い点も強調されています。このシリーズの後続のビデオでは、これらの概念をさらに詳しく説明し、スクラッチから自分自身の評価を構築する方法について解説する予定です。

Mindmap

Keywords

💡評価

評価は、ある事象や成果を定量的または定性的に測定し、その価値や性能を判断するプロセスです。このビデオでは、AIモデルの性能を測定するための様々な評価方法について説明されています。

💡データセット

データセットは、評価プロセスにおいて使用される一連のデータまたは情報を指します。AIモデルの評価においては、データセットが問題と解答のペア、またはユーザーのインタラクションを含み、モデルの性能を正確に測定する上で非常に重要です。

💡評価者

評価者は、評価プロセスにおいて結果を判断する主体です。人間やAIモデルが評価者として機能し、特定の基準に従って結果を評価します。

💡タスク

タスクは、AIモデルが実行すべき特定の活動や課題を指します。評価プロセスにおいては、タスクが明確に定義されていることで、モデルの性能を正確に測定できます。

💡結果の解釈

結果の解釈は、評価プロセスにおいて得られた結果を分析し、その意味や重要性を理解する作業を指します。このプロセスは、評価の結果を適切に説明し、改善のための指針を提供する上で必要不可欠です。

💡Chatbot Arena

Chatbot Arenaは、異なるAIモデルの対話的応答を比較し、ユーザーがどちらが優れているかを判断する動的な評価プラットフォームです。

💡ELOスコア

ELOスコアは、チェスや他のボードゲームで使用されるランキングシステムであり、モデルの勝利確率を示す数値です。このシステムは、AIモデルの性能を比較するために使用され、高いELOスコアを持つモデルは他のモデルよりも優れていると判断されます。

💡Lang Smith

Lang Smithは、評価を実行するためのプラットフォームで、データセットの構築、評価者の定義、結果の分析を行いやすくします。

💡ユニットテスト

ユニットテストは、ソフトウェア開発において、個々の機能やコンポーネントが正しく動作することを確認する単純なテストです。AIモデルの評価でも、ユニットテストはシンプルな断言チェック機能を実行し、問題がないことを確認するために使用されます。

💡ABテスト

ABテストは、製品やサービスの異なるバージョンを比較するために使用される比較評価の方法です。このプロセスでは、ユーザーがランダムに2つのバージョンに分けられ、それぞれのパフォーマンスが測定され、どちらが優れているかを判断します。

💡カスタマイズされたテスト

カスタマイズされたテストは、一般的な公開ベンチマークに加えて、個々のユーザーが自分の要件に基づいて独自のテストを作成することを指します。これにより、AIモデルはより適切な基準に従って評価され、より適切なパフォーマンスを示すことができます。

💡評価の改善

評価の改善は、より正確で信頼性の高い結果を得るために評価プロセスを向上させる取り組みを指します。このビデオでは、コミュニティ内の興味を持つ人々が、より良い評価方法を模索していることが示されています。

Highlights

Series introduction on evaluation from scratch and implementation using Langsmith.

Public evaluations reported on new models like Cloud 3.

Evaluation as four pieces: dataset, evaluator, task, and interpretation of results.

Human evaluation by OpenAI with 165 programming problems.

Evaluation method with ground truth and unit tests for correctness.

Chatbot Arena's dynamic evaluation through user interactions.

Comparative assessment in Chatbot Arena with human judges.

Interest in personalized testing and evaluation.

Building benchmarks and testing models with personalized datasets.

Categories of datasets: manually curated, user interaction, synthetically generated.

Evaluators can be human, LMs, or unit tests against ground truth.

Reference-free evaluation with LMs as judges.

Application of evaluations: unit tests, proper evaluations, and AB testing.

Langsmith platform for easy evaluation with UI and SDK.

Langsmith supports building datasets, versioning, editing, and custom evaluators.

Langsmith facilitates trace inspections, comparative analysis, and more.

Langsmith does not require Langchain but can be used together for flexibility.

Transcripts

play00:03

hi this is L blank chain we've heard a

play00:05

lot of interest users on evaluation in

play00:07

recent weeks and months and so we want

play00:09

to kick off a short series laying out

play00:11

kind of how to think about evaluation

play00:13

from scratch and how to implement it

play00:15

yourself using

play00:16

langmi so it kind of set the stage when

play00:18

new models release like Cloud 3 you

play00:20

often see a bunch of public evaluations

play00:22

reported so on the left here is the clog

play00:25

through blog post showing a bunch of

play00:26

different evals in the various rows and

play00:29

compared to other popular LMS in the

play00:31

various columns you've also seen maybe

play00:33

things like chatbot Arena um which now

play00:37

has claw three Opus at the top but the

play00:39

question here is like what are these

play00:41

evaluations how to think about them and

play00:42

how could I Implement them

play00:44

myself so maybe a nice way to think

play00:47

about evaluation is just four pieces

play00:49

there's a data set there's some kind of

play00:51

evaluator there's a task and there's

play00:54

some means of interpreting the results

play00:56

so let's actually make this concrete and

play00:58

look at the various evaluations that

play01:00

have been run on some of these public

play01:01

models um so human eval is a really good

play01:04

one it's was produced by open AI back in

play01:07

I think 2021 it has 165 programming

play01:10

problems so it's basically related to

play01:11

the task of Coden you can see that at

play01:13

the bottom and what's interesting is the

play01:15

evaluation method here you can think of

play01:17

it in two ways what's like the judge of

play01:19

who's actually judging the result and

play01:21

like what's the mode of evaluation in

play01:23

this case the mode is like ground truth

play01:26

there's a ground truth correct answer

play01:27

for every coding problem and using unit

play01:30

test some kind of programmatic way of

play01:32

specifying correctness um interpretation

play01:35

typically just reported as bar charts in

play01:37

this case I'm showing some results from

play01:39

the recent data bricks model um which

play01:41

they report a human eval on um but let's

play01:44

look at another one so here's an

play01:46

interesting kind of comparative example

play01:48

on chapad Arena so in this case there's

play01:51

actually no static data set this is more

play01:54

dynamically generated from user

play01:55

interactions and the way it works is a

play01:57

user is presented with two different

play01:59

llms they prompt them both and they

play02:02

choose which response they like better

play02:03

so it's more of like an an arena or like

play02:05

a a battle format in that sense so again

play02:09

the in this case the judge is a human

play02:11

the mode in this case is not really

play02:13

ground truth so much as is a comparative

play02:15

assessment in terms of metrics they

play02:18

often report these par wives plots which

play02:20

basically show one model versus all

play02:22

other models and then the statistics

play02:24

tell you the likelihood of one model

play02:26

beating the other they roll these up

play02:28

into things like ELO scores which kind

play02:29

of tell you the likelihood of a model

play02:31

beating another one um kind of taken

play02:33

from chess so anyway you can see that

play02:36

you can look at different evaluation

play02:38

like benchmarks using these four

play02:40

different kind of buckets and just group

play02:42

them that way and think through them in

play02:44

that way but we kind of seen an interest

play02:46

in personalized testing and evaluation

play02:49

um so for example like of course models

play02:51

are are are you know published with you

play02:53

know hundreds of different public

play02:55

benchmarks but people often want to

play02:57

build their own benchmarks um and and

play03:00

kind of hack on and test models

play03:02

themselves um we've actually seen some

play03:04

interest in the community around this so

play03:06

karpathy tweeted about one nice

play03:07

Benchmark from a scientist at at Google

play03:10

deepmind um will Dew from open AI

play03:13

mentioned there's kind of a lot of

play03:14

opportunity in better

play03:16

evaluations so you know if you kind of

play03:19

talk about those four buckets and and

play03:20

break them down a little bit there's

play03:22

like a few different things to to kind

play03:24

of cover here there's a lot of surface

play03:25

area for building your own evaluations

play03:27

so when you think about data sets

play03:29

there's a few categories like one is

play03:31

manually curate like we saw with human

play03:32

eval build a data set of question answer

play03:35

pairs or like code solution pairs right

play03:37

so there like highly curated you define

play03:40

it yourself another is like if you have

play03:42

an app out in production you have a

play03:44

bunch of user inter rtion with your app

play03:46

you can roll those into a data set for

play03:48

example of user lobs and you can use LMS

play03:51

to synthetically generate data sets for

play03:53

you so these are all really interesting

play03:54

modes of data set kind of creation Now

play03:57

in terms of evaluation we saw examples

play04:00

of you c as a judge like in the case of

play04:02

chap Vina in that case with comparison

play04:05

as the mode we talked about using like

play04:08

unit test or heris sixs as the judge

play04:10

against like a ground truth correct code

play04:13

solution in the case of human eval you

play04:15

can also use lm's as judges and there's

play04:16

a lot of cool work on this um lm's as

play04:19

judges can you know judge for General

play04:21

criteria which you might think of as

play04:22

reference free like there's no ground

play04:25

truth but you give the llm like I want

play04:27

to assess a few different things like

play04:29

you know brevity or something so it's

play04:32

kind of like a reference free mode of

play04:34

evaluation and of course an LM can also

play04:36

judge or an answer relative to ground

play04:38

truth

play04:39

so the final piece here is thinking

play04:42

about like how do the how are these

play04:43

typically applied you can think about a

play04:45

few different categories unit tests

play04:48

evaluations and AB testing so unit

play04:50

testing are kind of like simple

play04:52

assertion scrap functionality these are

play04:54

very routine in software engineering um

play04:56

they can be run online to give an

play04:58

application feedback it be run offline

play05:00

as part of for example Ci or other kinds

play05:02

of evaluation you can also have like

play05:05

again like we talked about before a

play05:06

proper evaluation with a judge in this

play05:08

case it's not just like um you know

play05:10

maybe a simple assertion in this case

play05:12

maybe it's a more involved like human

play05:14

feedback or Ln judge and again we talked

play05:17

a little bit about human evaluation and

play05:19

also Ln based evaluation and then AB

play05:22

testing this is just comparative

play05:24

evaluations popular one here is

play05:25

regression testing looking over time um

play05:28

or experimental testing in you know

play05:30

different parameters so a question might

play05:33

ask is like well how do I actually get

play05:34

started how do I Implement some of these

play05:35

ideas myself and this is kind of where

play05:37

lsmith comes in so the team at Lang

play05:39

chain built Lang Smith is a platform

play05:41

that makes it very easy to run

play05:42

evaluations um and so if you go to this

play05:46

link here Smith lch.com you'll be

play05:50

prompted to sign up I've already signed

play05:51

up so you can see this is just my like

play05:53

Lang Smith page we're going talk about

play05:54

this in a lot more detail in upcoming

play05:56

videos but the point is likith makes it

play05:58

very easy to instrument various

play06:00

evaluations we have a a uh a UI and SDK

play06:03

for building data sets versioning them

play06:05

editing them an SDK for defining uh your

play06:08

own evaluators or implementing or using

play06:11

custom evaluators um and we also have

play06:14

the UI for inspections for Trace

play06:15

inspections comparative analysis and

play06:17

we're going to kind of walk through in

play06:18

in in a few different videos these ideas

play06:21

kind of very carefully uh so you

play06:23

understand all these pieces and how to

play06:25

do each one from scratch and and of

play06:27

course Very importantly langth does not

play06:29

required Lang chain to use um but of

play06:32

course you can use it with Lang chain so

play06:34

that's an important point of flexibility

play06:36

I want to highlight and in the upcoming

play06:37

videos where we kind digging into each

play06:39

one of these bins uh like really

play06:41

carefully and like building up an

play06:43

understanding scratch as to how to build

play06:44

your own evaluations thanks

Rate This

5.0 / 5 (0 votes)

Related Tags
評価戦略機械学習データセット評価者タスク定義結果解釈Code評価対人評価比較評価エVALUATION
Do you need a summary in English?