Dataset Splits | LangSmith Evaluation - Part 22

LangChain
28 May 202406:40

Summary

TLDRランスは、言語モデルの評価にデータセット分割を使用する意義を説明します。ドキュメントのバージョンアップにより、以前の評価セットが新しいドキュメントと後方互換性があるか検証するために、新しいデータセットを作成します。旧バージョンのドキュメントに基づく20の質問と新バージョンに基づく5つの新しい例を比較評価します。評価結果から、旧評価セットのパフォーマンスが低下していることがわかり、ドキュメントロードの調整が必要であると気づきます。この例では、分割を使用して、ドキュメント構造の変更による影響を評価し、データロードを最適化する方法を示しています。

Takeaways

  • 📚 LanceはLang chainというプロジェクトで、データセットの分割に関する評価を行っていると紹介しています。
  • 🔍 データセット分割の動機は、ドキュメントのアップグレードにより、評価セットが後方互換性を持っているかを確認するためです。
  • 📈 Lanceは、言語表現言語(Lang CH expression language)のドキュメントがv0.1からv0.2にアップデートされたため、評価セットの互換性を検証したいと述べています。
  • 🗂️ 彼は新しいデータセットを作成し、CSVファイルを取り込み、質問と回答のセットを分割して保存するプロセスを説明しています。
  • 🔑 データセット分割は、評価セットの互換性だけでなく、トレーニングとテストのサンプルを分割するなど、ファインチューニング時の有用なアプリケーションにもなると指摘しています。
  • 📝 Lanceは、20の質問を含む初期の評価セットを新しい分割に追加し、v0.1ドキュメントからの質問と回答の例を特定する新しい分割を作成しました。
  • 🆕 次に、v0.2ドキュメントに基づいて新しく5つのサンプルを作成し、それらを別の分割に追加して、新しい構造での評価をテストしています。
  • 📉 評価の結果、古い分割(v1)でのパフォーマンスが低下していることが示され、ドキュメントの構造が大きく変わったことを指摘しています。
  • 🛠️ ドキュメント構造の変更により、質問に関連する情報が取得できなくなる可能性があるため、ドキュメントのロード方法を調整する必要があると結論づけています。
  • 🔬 分割を使用することで、ドキュメントの変更が評価セットにどのような影響を与えるかを測定し、必要に応じてデータロードを調整することができます。
  • 📊 最後に、Lanceは評価結果を比較し、新しい分割と古い分割のパフォーマンスの違いを分析しています。

Q & A

  • なぜデータセットの分割を使用する必要があるとランスは説明していますか?

    -ランスは、言語表現言語のドキュメントがアップデートされた際に、アプリが後方互換性を持っているかどうかを確認するためにデータセットの分割を使用する動機を説明しています。

  • ランスはどのようにして新しいデータセットを作成しましたか?

    -ランスは、CSVを選択し、既存のデータセットをインポートして新しいデータセットを作成しました。

  • ランスが作成した新しいデータセットの名前は何ですか?

    -ランスは新しいデータセットに'LC QA'という名前を付けました。

  • データセット分割の目的は何ですか?

    -データセット分割は、アップグレードされたドキュメントと互換性があるかどうかを評価し、必要に応じてアプリを変更するかどうかを判断する目的で使用されました。

  • ランスはどのようにして新しい分割を追加しましたか?

    -ランスは20の質問を分割に追加し、新しい分割を作成しました。この分割は'LEL v0.1'という名前で、v0.1ドキュメントからの質問と回答の例を識別するために使用されました。

  • ランスが追加した新しい例は何ですか?

    -ランスは新しいv0.2ドキュメントに基づいて5つの新しい例を素早く作成しました。

  • 評価のためにランスはどのようにして2つの分割を使用しましたか?

    -ランスはデータセット名を使用して評価を開始し、新しい分割と古い分割の両方を指定して評価を実行しました。

  • 評価の結果、新しい分割と古い分割のパフォーマンスの違いは何ですか?

    -評価の結果によると、新しい分割ではパフォーマンスが良好でしたが、古い分割ではパフォーマンスが悪くなっていました。

  • ドキュメント構造の変更が原因でランスが直面した問題は何ですか?

    -ドキュメント構造の変更により、ランスは古い評価セットに対する質問に答えることができない可能性があるという問題に直面しました。

  • ランスはどのようにしてドキュメントの変更に対応する必要性を特定しましたか?

    -ランスは評価結果を分析し、パフォーマンスの低下を確認することで、ドキュメントの変更に対応する必要性を特定しました。

  • 分割を使用するもう一つの例は何ですか?

    -分割を使用するもう一つの例として、ファインチューニングを行う際にトレーニング例とテスト例を分割することが挙げられます。

Outlines

00:00

📚 データセット分割の重要性と評価

ランスはLang chainの評価シリーズを続け、データセット分割の重要性を説明しています。彼は言語表現言語のドキュメントを更新し、バージョン0.1から0.2に変更したことで、評価セットの20の質問が新しいドキュメントと後方互換性があるかどうかを確認したいと話しています。データの読み込みが異なる可能性があるため、評価セットが新しいドキュメントで機能しなくなっているかもしれないと懸念しています。そこで、新しいデータセットを作成し、旧バージョンのドキュメントに基づく質問を分割して保存し、新しいドキュメントに基づく5つの新しい質問も追加しました。これにより、評価セットの後方互換性をテストし、必要に応じてアプリを更新することができます。

05:03

🔍 評価結果からの学びとドキュメント構造の変更への対応

ランスは分割されたデータセットを使用して評価を実施し、新しいバージョンのドキュメントに基づく質問と古いバージョンに基づく質問の両方に対する評価結果を比較しています。古い評価セットでのパフォーマンスが低下していることがわかり、ドキュメントの構造が大きく変更されたため、必要な情報が取得できていない可能性があると指摘しています。この評価は、本番環境で動作するアプリケーションがドキュメントの構造変更にどのように影響を受けるかを理解する上で非常に重要です。ランスは、ドキュメントの読み込み方法を調整して、元の評価セットに対する完全なカバレッジを確保する必要があると結論付けています。

Mindmap

Keywords

💡データセット分割

データセット分割とは、データセットを複数のサブセットに分けることです。このビデオでは、データセットのバージョンアップに伴い、古いバージョンのデータセットと新しいバージョンのデータセットを比較し、評価するために分割が行われています。分割は、データのバックワード互換性を確認する上で非常に重要な役割を果たしており、ビデオの主題に密接に関連しています。

💡Lang chain

Lang chainは、ビデオの中で言及されている可能性のあるツールまたはフレームワークであり、言語モデルやデータセットの操作に使用される可能性があります。ビデオでは、Lang chainを使用してデータセットの分割と評価を行う方法が説明されています。

💡評価セット

評価セットは、モデルのパフォーマンスを評価するために使用されるデータのセットです。ビデオでは、v0.1ドキュメントに基づく20の質問からなる評価セットを作成し、新しいv0.2ドキュメントとの互換性をテストする目的で使用されています。

💡バックワード互換性

バックワード互換性とは、新しいバージョンのソフトウェアが古いバージョンとの互換性を保持する性質です。ビデオでは、ドキュメントのアップグレード後にアプリが引き続き機能するかどうかを確認するために、バックワード互換性が検討されています。

💡データローディング

データローディングは、アプリケーションが必要な情報をデータソースから読み込むプロセスです。ビデオでは、ドキュメントの構造が変更されたためにデータローディングが影響を受け、評価セットのパフォーマンスに影響を与える可能性があることが示されています。

💡CSV

CSVは、コンマ区切り値の略で、データの交換に使用される一般的なファイル形式です。ビデオでは、CSVファイルを使用してデータセットをインポートし、分割を作成しています。

💡キーバリューデータセット

キーバリューデータセットは、各データポイントが一対のキーとバリューを持つデータセットです。ビデオでは、質問と回答のペアがキーバリューデータセットとして扱われ、分割に使用されています。

💡分割

分割は、データセットを特定の基準に従って分割するプロセスです。ビデオでは、評価のためにデータセットを分割し、新しいドキュメント構造に基づく新しい評価セットを作成しています。

💡RAG

RAGとは、Retrieval-Augmented Generationの略で、特定のタスクに関連する情報をデータベースから取得し、生成モデルに組み込むアプローチです。ビデオでは、RAGアプリを作成し、評価セットを評価するために使用されています。

💡パフォーマンス評価

パフォーマンス評価とは、システムやモデルの性能を測定するプロセスです。ビデオでは、新しいドキュメント構造に基づく評価セットと古い評価セットのパフォーマンスを比較し、アプリのアップグレードが必要なかどうかを判断しています。

Highlights

Lance from Lang chain introduces the concept of data set splits and their importance in evaluating changes in documentation.

Lang chain documentation has been updated from version 0.1 to 0.2.

A set of 20 evaluation questions related to v0.1 docs needs to be stored as a split.

Concerns about backward compatibility when upgrading documentation are discussed.

The potential need to change the app to load information from different sources due to documentation changes is highlighted.

Lance demonstrates the process of creating a new data set and selecting a CSV file.

A new data set split named 'LC QA rag QA' is created to store the 20 evaluation questions.

The significance of the data set split in identifying changes in documentation structure is explained.

Lance adds 20 questions to a split and creates a new split named 'LEL v0.1'.

A new split 'LC V v0.2' is created with five new examples based on the v0.2 documentation.

The evaluation of the new split shows good performance, suggesting compatibility with the new documentation.

Performance on the older split is worse, indicating potential issues with the new documentation structure.

The importance of investigating performance degradation on the original evaluation set is emphasized.

Lance suggests that document loading within the new documentation structure may need to be adjusted.

The practical application of data set splits in evaluating the impact of documentation changes is demonstrated.

The use of data set splits for partitioning test examples from training examples in fine-tuning is mentioned.

Lance concludes by showing how to set up data set splits using the UI easily.

Transcripts

play00:00

hi this is Lance from Lang chain we're

play00:02

continuing our Langs withi evaluation

play00:03

series Focus on data set splits so let

play00:06

me start by giving kind of a motivation

play00:08

for why we might want to use data set

play00:09

splits I have a rag app that I've been

play00:12

testing throughout this series focused

play00:13

on the Lang CH expression language

play00:15

documentation now very recently we

play00:17

updated those docs from V 0.1 to

play00:21

v0.2 so what's going to happen now is I

play00:24

have a eval set of 20 Questions related

play00:26

to Z v0.1 docs that I now want to store

play00:30

as a split and I want to see if I create

play00:33

an app using these newer v0.2 docs are

play00:36

they backwards compatible in terms of

play00:38

evaluation with my existing eval set or

play00:41

do I need to change my app to load

play00:44

information maybe from other sources

play00:45

because basically My worry is when we

play00:48

upgrade the docs things may have shifted

play00:50

around so what I was loading from here

play00:54

uh may be insufficient now with these

play00:57

v.2 docs so basically my concern is that

play01:00

the data loading is a bit different and

play01:04

I may have regressed in my existing eval

play01:06

set with this data set upgrade so what

play01:09

I'm going to do is I'm going to go

play01:11

ahead and I'm in my data sets here I'm

play01:14

going to create a new data set I'm going

play01:15

to select a CSV I'm going to pull this

play01:17

in so this is my existing uh data set so

play01:22

this is L lce question answer and I'm

play01:25

going call this split um splits for or

play01:30

LC QA rag QA I'm going to call it that

play01:35

it's a key value data set you can see my

play01:37

input and output Fields that's great so

play01:39

I create this data set nice that's all

play01:41

done now here's where things are kind of

play01:44

interesting I'll move this over here so

play01:47

I have 20 Questions here I'll open this

play01:49

up so we can look um 20 Questions here

play01:54

are related to uh are from my original

play01:58

data set so that's all these guys so

play02:01

this is my initial uh eval set that I've

play02:04

been using historically throughout this

play02:06

throughout the series related to to rag

play02:08

in Lang expression language I'm going to

play02:10

add these to a split and I'm going to

play02:12

create a new split and I'm going to call

play02:15

it um I'm going to call it uh LEL uh

play02:21

v0.1 to to identify that these uh

play02:24

question answer examples were taken from

play02:26

the originals v0.1

play02:28

docs um cool so now I have the split

play02:31

that's been created right here now I can

play02:33

go back and this is my original so this

play02:36

is um the original set of 25 examples

play02:40

now I have five new examples which you

play02:43

can see down here

play02:49

um cool say these These are examples

play02:54

that I've added um I'm going to call

play02:57

this

play02:58

LC V

play03:00

v0.2 so these are five examples I just

play03:02

very quickly put together that are on

play03:05

that main page of the v0.2 docs so it's

play03:07

kind of like a test these should

play03:09

definitely work reasonably well because

play03:11

I created them newly my bigger question

play03:14

is do I see regression on the initial

play03:17

split so right now what I have here is

play03:20

two data splits so one these are five

play03:23

questions I put together pretty quickly

play03:25

based upon the newer structure of the

play03:27

docs um it's kind of like a test so this

play03:29

is actually what the new structure of

play03:31

the docs looks like this is the new

play03:32

landing page for Lang expression

play03:34

language um and you know it's it's

play03:37

pretty nice it has like lots of Rich

play03:39

information here that's great now here

play03:42

is the old landing page and it's just

play03:43

different right different instructure

play03:46

this old landing page kind of fanned out

play03:48

to a bunch of subsections um which is

play03:50

where my initial eval set Drew all its

play03:52

information right so if I kind of Zoom

play03:55

back out what do we have here we have

play03:58

two splits for my data set this l c V1

play04:01

is my new is is my initial set of

play04:04

questions my initial 20 questions um and

play04:08

this lv2 are five new questions that I

play04:11

derive from this newer version of the

play04:13

docs so this is kind of like my earlier

play04:16

original eval set this is a new eval set

play04:20

okay but they're all related to Lang

play04:21

expression language so I'm just going to

play04:22

store them as two splits within this

play04:25

project cool so I've go ahead and I've

play04:29

created rag app here that's all set I

play04:32

have my rag bot now we've used this

play04:33

previously that's all set um we kind of

play04:36

skip through some of

play04:38

this

play04:39

and the key point is simply this right

play04:43

now all I need to do is I can just take

play04:46

this this data set name here

play04:50

cool and I can kick off an evaluation I

play04:52

can specify the two splits I want to

play04:55

work

play04:56

great so both evaluations ran I ran one

play04:59

on the newer split I went R I ran the

play05:02

other on the older set of questions my

play05:05

my original set of you questions um so

play05:08

cool here's the two results I can see

play05:11

the split names here so this is V2 or

play05:13

the newer ones V1 or the older ones

play05:16

performance is a lot worse on the older

play05:17

ones it looks fine on the new ones so

play05:20

what this tells me is I can investigate

play05:21

this a little bit more deeply and I can

play05:23

see that performance is pretty bad on my

play05:26

original uh set of uh eval question

play05:29

answer pair

play05:30

and what this kind of would tell me is

play05:32

okay I need to do a little bit of work

play05:34

to make sure that my document loading

play05:36

within the new Doc structure um as you

play05:39

can see what we do right here we should

play05:42

then make sure that this is actually

play05:43

Gathering all the information necessary

play05:45

to actually perform well um on our

play05:48

individual ebal set so if you actually

play05:50

should go to the docs here we can see

play05:52

the doc structures changed a lot so it's

play05:54

very possible that we're no longer kind

play05:56

of getting the right documentation or

play05:57

Pages necessary to answer all the

play05:59

questions that are relevant so this kind

play06:01

of thing would be really important if

play06:02

for example I have a production app

play06:04

that's loading from you know setup

play06:06

documentation the documentation

play06:07

structure changes I want to actually

play06:09

determine o how much of regression do I

play06:11

see with this documentation change and

play06:14

how do I then need to modify uh my data

play06:16

loading to um to actually make sure that

play06:19

I have full coverage on the questions in

play06:22

my original eval set so that's kind of a

play06:24

good example of where you might use

play06:25

splits also things like partitioning you

play06:28

know test examples from trainer examples

play06:30

if you're doing fine tuning is another

play06:31

very kind of very classic application

play06:33

for using splits um but anyway this

play06:35

really just shows the how you can

play06:37

actually set them up using the UI really

play06:39

easily thanks

Rate This

5.0 / 5 (0 votes)

Related Tags
データセット分割言語モデルアップグレード互換性評価CSVキーバリュー構造変更情報収集テスト例訓練例
Do you need a summary in English?