How to Use LangSmith to Achieve a 30% Accuracy Improvement with No Prompt Engineering

LangChain
2 May 202415:50

Summary

TLDRビデオの要約を以下のようにまとめます。ハリソン氏は、Lang chainのチームメンバーであるdosuが、プロンプトエンジニアリングを行わずにアプリケーションのパフォーマンスを30%向上させた方法について、ブログをリリースしたと語ります。彼らが使用したのは、Lang Smithというプラットフォームで、これはLang chainとは別であり、オープンソースで作動します。Lang Smithは、アプリケーションのデータフローを改善するためのツール群を組み合わせています。これには、アプリケーションを通過するデータのログ記録、トレース、テスト、バリデーション、プロンプトハブ、人間による注釈などが含まれます。彼らは、分類タスクに取り組み、OpenAIクライアントを直接使用して、問題のタイプを分類しました。また、Lang Smithを使用して、実行に関連付けられたフィードバックを残す方法を説明し、その後、そのフィードバックを使用してアプリケーションのパフォーマンスを向上させるプロセスを紹介します。さらに、彼らは、セマンティック検索を介して、類似した例を通じて入力に応じた出力を提供する手法も使用しました。この方法は、分類タスクにおいては単純な例ですが、より複雑なタスクにも適用可能です。

Takeaways

  • 🚀 ハリソンからランチェーンのブログを紹介。dosuがアプリケーションのパフォーマンスを30%向上させた方法について解説します。
  • 🛠️ dosuが使用したのはLang Smithというプラットフォームで、ロギング、トレース、テスト、バリデーションを統合したツールを使用しました。
  • 🔍 Lang Smithは、アプリケーションのデータフローを改善するための機能を組み合わせたものです。
  • 📈 dosuは分類タスクを30%向上させるために、Lang Smithの機能を活用してフィードバックを収集し、アプリケーションを改善しました。
  • ⚙️ 環境変数の設定から始め、Lang Smithプロジェクトにデータをログする方法を学びます。
  • 📝 アプリケーションはOpenAIクライアントを使用して分類タスクを実行し、Lang Smithで追跡します。
  • 🔁 フィードバック機能を使って、実行結果に問題がある場合に修正を提案できます。
  • 🔢 Lang Smithで自動化ルールを設定し、フィードバックを持つデータをデータセットに移動させます。
  • 🔧 データセットから良い例を引き出し、アプリケーションに取り入れることでパフォーマンスを向上させます。
  • 🤖 モデルは以前のパターンから学習し、新しい入力に対しても適切な分類を行えるようになります。
  • 🔍 dosuは、類似した例を用いたセマンティック検索を行い、入力に最も関連性のある例を適用しました。
  • 📚 フィードバックループを構築し、アプリケーションのパフォーマンスを継続的に改善していく方法が示されています。

Q & A

  • dosuがアプリケーションのパフォーマンスをどのように改善しましたか?

    -dosuは、プロンプトエンジニアリングなしでアプリケーションのパフォーマンスを30%向上させました。これは、Lang chainが過去数ヶ月間に構築したツールを大幅に使用して行われました。

  • Lang Smithとは何ですか?

    -Lang Smithは、Lang chainとは別個のプラットフォームで、Lang chainと一緒に使用したり、独立して使用したりすることができます。アプリケーションのデータフローを改善するための機能の組み合わせを提供しています。

  • Lang Smithの強力な点は何ですか?

    -Lang Smithの強力な点は、ロギング、トレース、テスト、バリデーション、プロンプトハブ、人間アノテーションキューなどの機能がすべて別々のものではなく、一つのプラットフォームに統合されていることです。

  • チュートリアルでdosuが30%の増加を実現するために行ったタスクは何ですか?

    -チュートリアルでdosuが行ったタスクは分類です。これは、LLM(大規模言語モデル)の標準で比較的簡単なタスクです。

  • アプリケーションで使用されているプロンプトテンプレートとは何ですか?

    -アプリケーションで使用されているプロンプトテンプレートは、問題のタイプを以下のトピックの1つとして分類するというものです。トピックには、バグ、改善、新機能、ドキュメンテーション、または統合が含まれます。

  • Lang Smithでフィードバックを残す方法とは何ですか?

    -Lang Smithでは、実行に関連付けられたフィードバックを残すことができます。これは、特定の実行IDを使用して行われ、後からその実行に関連付けられたフィードバックを残すことができるように設計されています。

  • データセットにデータを移動するために設定されたルールは何ですか?

    -データセットにデータを移動するために設定されたルールは、フィードバックが関連付けられたデータポイントをデータセットに移動させるものです。正しいフィードバックは「user score is one」で、これは正しい分類を意味し、修正されたフィードバックは「correction」を使用して行われます。

  • ルールがトリガーされるまで待つ必要がありますか?

    -はい、ルールはデフォルトで5分ごとに実行されます。ルールが設定された後には、同じデータポイントを再実行し、ルールが適用されるまで待つ必要があります。

  • アプリケーションのパフォーマンスを向上させるために使用されるデータポイントは何ですか?

    -アプリケーションのパフォーマンスを向上させるために使用されるデータポイントは、Lang Smithのデータセットから取得される正しい値のデータセットです。これには、フィードバックに基づく修正された値が含まれます。

  • アプリケーションで使用されるプロンプトテンプレートはどのように変更されましたか?

    -アプリケーションで使用されるプロンプトテンプレートは、新しい方法で変更されました。具体的には、2行の例が追加され、その後に例のプレースホルダーが置かれています。これは、以前のパターンから学習し、新しい入力に対して応じて応答をカスタマイズするようにモデルに学習させます。

  • dosuが行った意味のあるセマンティックサーチとは何ですか?

    -dosuが行ったセマンティックサーチは、数百のデータポイントの良いフィードバックと修正済みフィードバックをlsmithに記録し、その中から5つまたは10つの例をランダムに選択するのではなく、現在の入力に最も類似している例を選択することでした。これは、類似した入力を持つ場合、出力を同じまたは似たものにするべきであり、新しい入力に適用されるべきロジックが、それらの入力に適用されるロジックに似ていることを意味します。

  • このチュートリアルで説明されているプロセスはどのようにして他の複雑なタスクにも適用できますか?

    -このチュートリアルで説明されているプロセスは、分類タスクに適用されており、比較的単純な例です。しかし、Lang chainのチームは、これらの同じ概念がより複雑なタスクにも関連性があると信じており、それらを試すことに興味を持っています。

Outlines

00:00

🚀 アプリケーション性能向上の事例紹介

HarrisonがLang chainから紹介し、dosuというチームがアプリケーションの性能を30%向上させた事例について話しています。彼らはLang Smithというプラットフォームを使い、オープンソースのLang chainとは別で動作します。Lang Smithはアプリケーションのデータフローを改善するためのツール群を提供し、ログ記録、トレース、テスト、バリデーション、プロンプトハブ、人間アノテーションキューなどが含まれています。dosuは分類タスクを改善し、Lang Smithのフィードバック機能を使って改善を進めていました。

05:00

🔍 Lang Smithでのフィードバックと自動化

Lang Smithで実行したタスクにフィードバックを付け、それを使ってデータセットを作成し、アプリケーションの性能を向上させる方法が説明されています。正しいフィードバックと誤ったフィードバックの両方に対してルールを設定し、データセットにデータを追加するプロセスが紹介されています。また、ルールがトリガーされるまで待機し、その後データセットにアクセスして結果を確認する方法も説明されています。

10:02

📈 アプリケーションへのフィードバックの取り込み

アプリケーションに取り込まれた正しい出力を用いて、性能を改善する方法が説明されています。具体的なコード例とともに、入力と出力を交互に並べた文字列をプロンプトに使用し、モデルが以前のパターンから学習して汎化する方法が紹介されています。また、GitHubイシューのように新しいタイプの質問に対してフィードバックを残し、アプリケーションを改善するプロセスが示されています。

15:02

🔧 フィードバックループの構築と応用

Lang Smithで実行とフィードバックをキャプチャし、それらをデータセットとして保存することでフィードバックループを構築する方法が説明されています。自動化を使って良い例のデータセットを作成し、それをアプリケーションに取り込んで性能を向上させるプロセスが紹介されています。さらに、分類タスク以外にもこれらの概念を応用できる可能性についても触れられており、より複雑な例にも適用できると述べています。

Mindmap

Keywords

💡Lang chain

「Lang chain」は、オープンソースのプラットフォームで、アプリケーションのパフォーマンスを向上させるためのツールを提供しています。このビデオでは、Lang chainで開発されたツールを使ってアプリケーションのパフォーマンスを30%向上させた事例が紹介されています。

💡dosu

「dosu」は、コードエンジニアリングチームのメンバーであり、アプリケーションのパフォーマンスを改善するためにLang Smithというツールを使用しました。ビデオでは、dosuがどのようにしてアプリケーションのパフォーマンスを向上させたかについて説明しています。

💡Lang Smith

「Lang Smith」は、Lang chainとは別個のプラットフォームで、アプリケーションのデータフローを改善するためのツールです。ビデオでは、Lang Smithがログ記録、トレース、テスト、バリデーションなどを行う際にどのように役立つかが説明されています。

💡データフロー

「データフロー」とは、アプリケーションが処理するデータの流れを指します。ビデオでは、Lang Smithがデータフローを改善することで、アプリケーションのパフォーマンスを向上させる方法を探求しています。

💡チュートリアル

「チュートリアル」とは、ビデオ内で提供される手順書やガイドであり、どのようにしてアプリケーションのパフォーマンスを改善するかを学ぶことができます。ビデオでは、dosuが30%のパフォーマンス向上を実現した手順をチュートリアルとして提供しています。

💡分類

「分類」とは、機械学習のタスクの1つで、データをカテゴリーにグループ化するプロセスです。ビデオでは、分類タスクを使ってアプリケーションのパフォーマンスを改善する方法が説明されています。

💡フィードバック

「フィードバック」とは、アプリケーションの実行結果に対するユーザーのフィードバックを指します。ビデオでは、Lang Smithでフィードバックを残すことが、アプリケーションのパフォーマンス向上にどのように役立つかが説明されています。

💡自動化

「自動化」とは、手動での操作を必要とせずにプロセスを実行するプロセスです。ビデオでは、Lang Smithで自動化ルールを設定し、データをデータセットに移動させる方法が紹介されています。

💡データセット

「データセット」とは、アプリケーションの学習やテストに使用されるデータの集まりです。ビデオでは、Lang Smithで生成されたフィードバックをもとに、データセットを作成し、アプリケーションのパフォーマンスを向上させる方法が説明されています。

💡プロンプトテンプレート

「プロンプトテンプレート」とは、入力データを提示し、機械学習モデルに応答を促すためのテンプレートです。ビデオでは、プロンプトテンプレートを使って、分類タスクを実行し、アプリケーションのパフォーマンスを改善する方法が説明されています。

💡埋め込み型検索

「埋め込み型検索」とは、類似性の高いデータを検索するプロセスです。ビデオでは、dosuが埋め込み型検索を使用して、類似した入力に対する類似した出力を求める方法が説明されています。これは、多数のデータポイントから最適な例を選択し、アプリケーションのパフォーマンスを向上させるための重要な手法です。

Highlights

Dosu, a code engineering teammate, improved application performance by 30% without any prompt engineering.

They utilized tools developed at Lang Chain over the past few months.

Lang Smith, a separate platform from Lang Chain, was used to improve data flow efficiency.

Lang Smith combines logging, tracing, testing, validation, and human annotation cues in one platform.

A tutorial is provided to teach others how to replicate the 30% performance increase.

The task Dosu focused on was classification, a relatively simple task by LLM standards.

They used OpenAI directly without using Lang Chain for the classification task.

The application uses a prompt template to classify issues into topics like bug, improvement, new feature, etc.

Incorporating feedback from users is crucial for improving the application's performance.

Lang Smith allows leaving feedback associated with runs to collect data over time.

The feedback can be used to create a data set of good examples to improve the application.

Automations can be set up in Lang Smith to move data with feedback into a data set.

The data set of good examples can be pulled into the application to enhance its performance.

Using few-shot examples from the data set allows the model to learn from previous patterns.

Semantic search over examples can find the most similar examples to the current input.

Passing in a few relevant examples instead of many random ones can improve the application's performance.

Building a feedback loop by capturing feedback, creating data sets, and using examples can significantly enhance application performance.

The same concepts demonstrated for classification can be applied to more complex examples.

Lang Chain is eager to explore these concepts further and help others implement them.

Transcripts

play00:00

hi y this is Harrison from Lang chain

play00:02

today we released a Blog about how dosu

play00:05

a code engineering teammate improved

play00:08

some of their application performance by

play00:10

30% without any prompt engineering and

play00:14

it's using a lot of the tools that we've

play00:16

built at laying chain over the past few

play00:19

months and so today in this video I want

play00:22

to walk through roughly how they did

play00:25

that and walk through a tutorial that

play00:27

will teach you how you can do it on your

play00:30

application as well so specifically what

play00:33

they used was Lang Smith and so Lang

play00:36

Smith is our separate platform it's

play00:37

separate from Lang chain the open source

play00:39

it actually works with and without Lang

play00:40

chain and actually dosu doesn't use

play00:42

linkchain but they use Lang Smith and

play00:44

what lsmith is is a combination of

play00:46

things that can be aimed at improving

play00:49

the data fly whe of your application so

play00:51

this generally consists of a few things

play00:53

this generally consists of logging and

play00:55

tracing all the data that goes through

play00:57

your applications testing and valuation

play01:00

and Lance is doing a whole great series

play01:02

on that right now there's a promp hub

play01:05

there's some human annotation cues but

play01:07

the real power of Lang Smith comes from

play01:10

the fact that these aren't all separate

play01:12

things these are all together in one

play01:14

platform and so you can set up a really

play01:17

nice flywheel of data to to start

play01:20

improving the performance of your

play01:22

application so let's see what exactly

play01:26

that

play01:27

means there's a tutorial that we put

play01:30

together that walks through in similar

play01:33

steps some of the same things that dosu

play01:35

did to achieve a 30% increase um and the

play01:38

task that they did it for was

play01:40

classification um which is a relatively

play01:42

simple task by llm standards but let's

play01:44

take a look at what exactly it involves

play01:47

so we're just going to walk through the

play01:48

tutorial the first thing we're going to

play01:50

do is set up some environment variables

play01:53

here these this is how we're going to

play01:55

log uh data to our laying Smith project

play01:58

I'm going to call it classifier

play02:00

demo um set that up let me let me

play02:04

restart my kernel clear all previous

play02:07

ones now set that up

play02:10

awesome so this is the simple

play02:12

application that mimics uh some of what

play02:15

uh dosu did um so if we take a look at

play02:17

it um we can see that we're using open

play02:20

AI we're not even using Lang chain we're

play02:22

just using open AI client directly and

play02:24

we're basically doing a classification

play02:26

task we've got this like F string prompt

play02:28

template thing that's class classify the

play02:30

type of the issue as one of the

play02:31

following topics we've got the topics up

play02:33

here bug Improvement new feature

play02:35

documentation or integration we then put

play02:37

the issue text um and and then we really

play02:41

just wrap this in the Langan Smith

play02:43

traceable this just will Trace things

play02:46

nicely to Lang Smith um and this is our

play02:49

this is our

play02:50

application if we try it out we can see

play02:54

that it does some classification steps

play02:57

so if I paste in this issue fix bug in

play03:00

lell I would expect this to be

play03:02

classified as a bug and we can see

play03:04

indeed that it is um and if I if I do

play03:09

something else like let's do H like fix

play03:12

bug in documentation so this is slightly

play03:14

trickier because it touches on two

play03:16

concepts it touches on bug and it

play03:18

touches on documentation now in the

play03:20

Linkin repo we would want this to be

play03:22

classified as a documentation related

play03:24

issue but we can see that off the bat

play03:26

our prompt template classifies it as a

play03:28

bug adding even more complexity in here

play03:32

the fact that we want it classified as

play03:34

documentation is something that's maybe

play03:36

a little bit unique to us if if pantic

play03:39

or some other project was doing this

play03:41

maybe they would want this to be

play03:42

classified as a bug and so Devon at dosu

play03:45

has a has a really hard job of of trying

play03:47

to build something that'll work for both

play03:49

us and pantic and part of the the way

play03:53

that he's able to do that is by starting

play03:55

to incorporate some feedback from us as

play03:58

and users into his applic

play04:01

so one of the things that you can do in

play04:04

uh laying Smith is leave feedback

play04:06

associated with runs um so for this

play04:10

first run that gets a positive

play04:13

score so if we if we run this again

play04:16

notice one of the things that we're

play04:17

doing is we're passing in this run ID um

play04:21

and so this run ID is basically a uu ID

play04:24

that we're passing in the reason that

play04:25

we're creating it up front is so that we

play04:27

can associate feedback with it over for

play04:29

time um so if we run

play04:32

this and then if we create our L Smith

play04:37

client and if we create the feedback

play04:40

associated with this this is a pretty

play04:42

good one so we can assume that that it's

play04:45

been marked as good um we've collected

play04:47

this in some way if you're using like

play04:49

the GitHub interface that might be you

play04:51

know they they don't change the label

play04:54

they think it's good and so we'll mark

play04:56

this as user score

play04:57

one and we're using the run ID that we

play05:00

create above and pass in so we're using

play05:02

this to collect feedback now we've got

play05:04

this followup fix bugging documentation

play05:06

it creates the wrong uh kind of like

play05:08

label we can leave feedback on that as

play05:10

well so we can now call this create

play05:13

feedback function and notably we're

play05:16

leaving a

play05:17

correction so so uh this key can be

play05:20

anything I'm just calling it correction

play05:22

to line up but then instead of passing

play05:24

in score as we do up here I'm passing in

play05:27

this correction value and this corre C

play05:29

value is something that's a first uh

play05:31

first class citizen in lsmith to denote

play05:35

the corrected values of what a run

play05:37

should be and so this should be

play05:39

documentation and let's assume that I've

play05:41

gotten this feedback somehow maybe as an

play05:43

end user I correct the label in in

play05:45

GitHub to have it say documentation

play05:48

instead of bug so let's log that to link

play05:51

Smith okay awesome so this is generally

play05:54

like what I set up in my code I now need

play05:57

to do a few things in Lang Smith in

play05:59

order to take advantage of this data

play06:01

flywheel so let's switch over to link

play06:03

Smith I can see I've got this classifier

play06:07

demo project if I click in I can see the

play06:08

runs that I just ran if I click into a

play06:11

given run I can see the inputs I can see

play06:13

the output I can click into feedback and

play06:16

I can see any feedback so here I can see

play06:18

correction and I can see the correction

play06:20

of documentation if I go to the Run

play06:22

below I can see that I've got a score of

play06:25

one because this is the input that was

play06:27

fixed bug and lell and output of that

play06:30

okay awesome so I have this data in here

play06:31

I've got the feedback in here let's

play06:33

start to set up some Automation and what

play06:35

I'm going to want to do is I'm going to

play06:37

want to move data that has feedback

play06:40

associated with it into a data

play06:43

set so I'm going to do that by I'm I'm

play06:45

going to click add a rule I'm going to

play06:47

call this posit positive feedback I'm

play06:52

going to say sampling rate of one I'm

play06:54

going to add a filter um I'm going to

play06:56

add a filter of where feedback is is

play07:01

user score is one um and I can see that

play07:06

actually actually let me switch out my

play07:08

view so I can see one thing I can one

play07:09

thing that's nice to do is just preview

play07:11

what the filters that you add to the

play07:13

rule are actually going to do so I can

play07:15

do that here I can go

play07:17

filter feedback user score one and I can

play07:21

see that when applied this applies to

play07:23

one run so I can basically preview my

play07:25

filters here I can now click add rule it

play07:27

remembers that filter

play07:30

let's call this positive feedback and if

play07:33

I get this positive feedback I just want

play07:35

to add it to a data set so I just want

play07:37

to add it to a data set let me create a

play07:38

new one let me name it uh

play07:42

classifier demo um it's going to be a

play07:45

key value data set which basically just

play07:47

means it's going to be dictionaries in

play07:49

dictionaries out and let me create

play07:52

this and I've now got this rule um I am

play07:56

not going to click use Corrections here

play07:58

because remember this is the positive

play08:00

feedback that I'm collecting okay great

play08:04

let's save that now let's add another

play08:06

rule let's go back here let's remove

play08:08

this filter and let's add another filter

play08:10

which is instead when it has Corrections

play08:12

so now I'm saying anytime there's

play08:13

corrections I can see the filter applied

play08:16

again go here add

play08:18

rule I can now uh let's call it

play08:22

negative feedback I'm going to add it to

play08:25

a data set let's call it classifier demo

play08:28

and now I'm going to click use

play08:29

Corrections cuz now when this gets added

play08:32

to the data set I want it to basically

play08:35

use the corrections instead of the True

play08:36

Value so let's save this and now I've

play08:39

got two rules

play08:43

awesome okay so now I've got these rules

play08:45

set up these rules only apply to data

play08:48

points and feedback that are logged

play08:50

after they are set up so let's go in

play08:54

here and we basically need to rerun and

play08:57

and have these same data points in there

play08:58

so that the rule rules can pick them up

play09:00

so let's run this this is the one with

play09:03

positive feedback so let's leave that

play09:04

correction let's rerun

play09:06

this this is the one with negative

play09:08

feedback so let's leave that correction

play09:10

um and now basically we need to wait for

play09:12

the rules to trigger by default they run

play09:15

every 5 minutes we can see now that it

play09:17

is 11:58 just 1159 and so this will

play09:21

trigger in about a minute so I'm going

play09:22

to pause the video and wait for that to

play09:26

trigger all right so we're back it's

play09:29

just after noon which means the rules

play09:32

should have run the way I can see if

play09:34

this happened by the way I can click on

play09:35

rules I can go see logs so I can see

play09:38

logs and I can see that there was one

play09:40

rule um or there was one run that was

play09:42

triggered by this rule I can go to the

play09:44

other one I can see again there was one

play09:46

run that was triggered by this Rule and

play09:48

so basically that's how I can tell if

play09:49

these rules were run and what data

play09:51

points they were run over so now that

play09:54

they've been run I can go to my data

play09:56

sets and testing I can search for

play09:58

classify

play10:00

demo I can look in and I can see that I

play10:01

have two examples I have this fixed bug

play10:04

in lell with the output of bug and so

play10:05

this is great this is just the the

play10:07

original output and then I also have

play10:09

this other one fix bug and documentation

play10:11

with this new output of documentation

play10:13

and this is the corrected value so we

play10:15

can see that what I'm doing is I'm

play10:16

building up this data set of correct

play10:19

values and then basically what I'm going

play10:21

to do is I'm going to use those data

play10:24

points in my application to improve its

play10:27

performance so let's see how to do do

play10:29

that and so we can go back to this nice

play10:31

little guide we've got it walks through

play10:33

the automations here and now we've got

play10:36

some new code for our application so

play10:38

let's pull it down and let's take a look

play10:40

at what's going on so we've got the

play10:42

Langs Smith client and we're going to

play10:43

need this for our application because

play10:45

now we're pulling down these uh these

play10:47

examples in the data set I've got this

play10:50

little function this little function is

play10:51

going to take in examples and it's

play10:53

basically going to create a string that

play10:54

I'm going to put into the prompt so it's

play10:56

basically going to create a string

play10:57

that's just alternating inputs and then

play11:00

outputs super easy and that's that's

play11:03

honestly most of the new code this is

play11:05

all same code as before here we Chang

play11:07

The Prompt template so we add these two

play11:10

lines here here are some examples and

play11:11

then a placeholder for

play11:13

examples okay and we'll see how we use

play11:15

that later on and now what we're doing

play11:17

is inside this function we're pulling

play11:19

down all the examples that are part of

play11:22

this classifier demo um

play11:26

project so I'm listing examples that

play11:28

belong to the this data set and then by

play11:32

default it returns an iterator so I'm

play11:33

calling list on it to get a concrete

play11:35

list I'm passing that list into my a

play11:37

function that I defined above create

play11:39

example string and then I'm formatting

play11:41

The Prompt by passing in uh the examples

play11:44

variable to be this example string all

play11:47

right so let's now try this out with the

play11:49

same input as before so if we scroll up

play11:52

and we take this same input fix bug and

play11:55

documentation and if we run it through

play11:57

this new method we can see that we get

play12:00

back documentation notice here that the

play12:03

input is the same as before so it's just

play12:05

learning that if it has the exact same

play12:07

input then it should output the same

play12:10

output the thing that we're doing by

play12:13

using this as a few shot example is it

play12:15

can also generalize to other inputs so

play12:18

if we change this to like address bug in

play12:22

documentation we can see that that's

play12:23

still classified as documentation

play12:25

there's still these conflicting kind of

play12:26

like bug and documentation ideas but

play12:30

it's learning from the example and it's

play12:32

learning that there should be

play12:33

documentation um let's see what some

play12:36

other okay so now you know like does

play12:39

this fix all issues no let's let's try

play12:42

out some things like make Improvement in

play12:44

documentation is this going to be

play12:46

classified as a Improvement or as

play12:49

documentation so it's classified as

play12:51

Improvement we probably want it to be

play12:53

classified as documentation so one thing

play12:55

we can do is we can leave more feedback

play12:58

for it and so this this imitates exactly

play13:00

what would happen um in real life in

play13:02

GitHub issues like you keep on seeing

play13:05

these new types of questions that come

play13:07

in that aren't exactly the same as

play13:09

previous inputs because obviously

play13:10

they're not and then you can start to

play13:13

capture that as feedback and use them as

play13:16

examples to improve your application so

play13:18

we can create more feedback for for this

play13:21

run like hey we want this to be about

play13:23

documentation great so that's a little

play13:26

bit about how we can start to capture

play13:28

these examples use them as few shot

play13:30

examples have the model learn from

play13:32

previous patterns about what it's about

play13:35

what it's

play13:36

seen the last cool thing that uh dosu

play13:39

did that I'm not going to walk through

play13:41

or I'm not going to replicate it in code

play13:43

but I'll walk through it is they

play13:45

basically did a semantic search over

play13:46

examples and so what is this and why did

play13:49

they do this first they did this because

play13:51

they were getting a lot of feedback so

play13:54

they had hundreds of data points of good

play13:57

and corrected feedback that they they

play13:59

were logging to lsmith and so at some

play14:01

point it becomes too much to pass in

play14:03

hundreds or thousands of examples so

play14:06

rather what they wanted to do was they

play14:08

only wanted to pass in like five or 10

play14:09

examples but they didn't want to just

play14:11

pass in five or 10 random examples what

play14:13

they wanted to do was pass in the

play14:15

examples that were most similar to the

play14:17

current input and so the rationale there

play14:20

is that if you look for examples that

play14:22

are similar to the input the outputs

play14:25

should also be similarish or there

play14:27

should be like the logic that applies to

play14:30

those inputs should be similar to the

play14:33

logic that applies to the new input so

play14:36

basically what they did was they they

play14:37

took all the examples um they created

play14:40

embeddings for all of them they then

play14:42

took the incoming uh kind of uh uh they

play14:46

they took the incoming input created

play14:48

embeddings for that as well and then

play14:50

basically found the examples that were

play14:51

most similar to that and so this is a

play14:54

really cool way to have thousands of

play14:58

examples but still only use five or 10

play15:00

for your application for a given point

play15:02

in

play15:03

time hopefully this is a nice overview

play15:06

of how you can start to really build the

play15:08

feedback loop you can capture feedback

play15:11

associated with runs and store those in

play15:14

link Smith you can set up automations to

play15:17

move those runs and sometimes their

play15:19

feedback as well to create data sets of

play15:22

good examples and you can then pull

play15:24

those examples down into your

play15:25

application and use that to improve the

play15:27

performance going forward

play15:30

doing this with classification is a

play15:31

relatively simple

play15:33

example however there are lots more

play15:35

complex examples that we think these

play15:37

same exact Concepts can be relevant for

play15:40

and so we're very excited to try those

play15:42

out if you have any questions or if you

play15:44

want to explore this more please get in

play15:46

touch we' love to help

Rate This

5.0 / 5 (0 votes)

関連タグ
アプリケーション性能チュートリアルフィードバック活用データセット自動化改善事例分類タスクオープンAILangSmithLangChainコードエンジニアパフォーマンス向上