Datasets From Traces | LangSmith Evaluations - Part 4
Summary
TLDRこの動画スクリプトは、Langs Smith評価に関するシリーズの第4回。前回までの動画で評価の重要性や基礎概念を学んだ後、今回はユーザーログからデータセットを作成する方法について説明。簡単なアプリの例を通じて、ユーザーの質問とアプリの回答を記録し、それらをデータセットとして保存する方法を紹介。このデータセットは、評価や微調整のために後で使用できる。
Takeaways
- 📌 評価的重要性と興味深さについて説明された(视频一)
- 🛠️ Langs Smithの基礎となるPrimitivesについての解説(视频二)
- 📈 データセットの作成方法についての具体例の説明
- 🔍 ブログ記事から手動でQ&Aデータセットを作成する例の紹介
- 🛠️ SDKを使ったデータセットの構築と更新の方法
- 🖥️ UIを使ったデータセットの作成方法
- 🤔 生産環境でのアプリケーションのトレースログからデータセットを作成する方法の探求
- 🎯 ユーザーのインプットを趣味深く活用してデータセットを作成する例
- 🔗 シンプルなAPIを使用したアプリケーションの例と、それに関連するユーザーの質問
- 🗂️ Lang Smithでのトレースの確認とデータセット化の方法
- 🔄 チャットデータセットの作成と、将来のファインチューニングのための入力形式の説明
- ✂️ データセットのエディット方法と、AIが提供した回答をGROUND TRUTHに変更する手法
- 🔍 ユーザーのインタラクションをログに記録し、それを高品質の評価セットに転換する手法の説明
Q & A
動画の第1部で説明されたevalsの興味深い点は何ですか?
-動画の第1部では、evalsが重要である理由について説明されています。
Langs Smith Primitivesとは何ですか?
-Langs Smith Primitivesは、Langs Smithの評価を理解するための基礎的な要素です。
データセットの作成についてどのような例が説明されていますか?
-例として、最近のデータブレークLMに関するブログ記事から質問と回答のペアのデータセットを作成する方法が説明されています。
SDKを使用してデータセットをどのように構築および更新するのですか?
-SDKを使用することで、データセットを構築し、更新することができます。
本番環境で動作中のアプリからデータセットを作成する方法は何ですか?
-本番環境で動作中のアプリからデータセットを作成するには、ユーザーのログを利用する方法が提案されています。
新しいプロジェクトの名前は何ですか?
-新しいプロジェクトの名前は「dbrx」です。
シンプルなアプリの機能は何ですか?
-シンプルなアプリは、オープンAPIを使用して、ユーザーの質問に対して答えを提供するものです。
ユーザーの質問とアプリからの回答の例は何ですか?
-ユーザーの質問の例は「トレーニング効率の主な違いは何ですか?」という質問です。アプリからの回答の例は「ここでは主な違いについて説明します」といった回答です。
ユーザーのインタラクションを記録するためにどうすればいいですか?
-ユーザーのインタラクションを記録するために、Lang Smithのデータセット機能を使用して、ユーザーの質問とアプリからの回答を保存することができます。
データセットの作成後に何ができますか?
-データセットの作成後に、データを編集、改善することができます。また、データセットをファインチューニングや評価のために使用することができます。
この動画スクリプトの主要なポイントは何ですか?
-この動画スクリプトの主要なポイントは、ユーザーログからデータセットを構築する方法と、質問回答ペアを手動でキュレートする方法を紹介しています。
Outlines
📈 データセットの作成と評価
この段落では、LanceがLangs Smith評価の重要性と興味深い点について説明し、データセット作成の方法についても議論しています。動画の前半では、Langs Smithの基本的な要素とデータセットの作成方法について学び、後半では、実際のユーザーログに基づいてデータセットを作成する方法について説明しています。Lanceは、ブログ記事をもとにした質問と回答のペアからデータセットを作成し、それを用いて評価を行うデモンストレーションを行いました。また、実際のアプリケーションからのユーザーログを利用して、データセットを作成し、将来の評価に活用する方法についても説明しています。
🔍 ログからのデータセット構築と評価
この段落では、Lanceはログからのデータセット構築方法について詳しく説明しています。具体的な例として、ユーザーがアプリケーションとインタラクションする様子を捉えたログから、データセットを作成する方法について説明しています。Lanceは、簡単な質問に対する回答を自動的に生成するアプリケーションを例に取り、そのアプリケーションからのユーザーログをもとにデータセットを作成し、評価を行う方法を説明しています。また、データセット作成後に、不正解を正しい答えに修正して、高品質な評価セットを作成する手法についても触れています。この方法は、今後の動画でさらに掘り下げられる予定であり、データセットの構築と評価における重要なステップを示しています。
Mindmap
Keywords
💡Langs Smith evaluations
💡Data set creation
💡SDK
💡User logs
💡Question-answer pairs
💡Chat data set
💡Fine tuning
💡Ground truth
💡Mock user
💡Evaluation sets
Highlights
视频系列介绍了Langs Smith评估的重要性和方法。
第一个视频解释了评估的趣味性和重要性。
第二个视频讨论了Langs Smith Primitives,即Langs Smith评估的核心基础知识。
第三个视频涉及了数据集创建,特别是如何从博客文章中构建问答对数据集。
本视频(第四个)探讨了如何从生产环境中的应用日志中构建数据集。
展示了如何使用SDK和用户界面(UI)来构建和更新数据集。
介绍了一个名为dbrx的新项目,用于演示数据集的创建。
演示了如何从用户与简单问答应用的交互中提取有趣的输入。
讨论了如何将用户交互转换为可用于未来评估的数据集。
展示了如何将用户交互日志转换为聊天数据集格式。
强调了这种数据集类型对于未来如微调等高级用例的实用性。
说明了如何创建和保存数据集,以便后续工作和评估。
提供了编辑数据集的示例,以构建高质量的评估集。
讨论了通过记录和清理AI提供的答案来构建高质量评估集的常见技巧。
总结了如何从用户日志和手动策划的问答对中构建数据集的两种不同方法。
Transcripts
hi this is Lance langing this is the
fourth video on Langs Smith evaluations
so in video one we kind of laid out why
evals are interesting and important
video two we talked about the Langs
Smith Primitives like the core
foundational pieces to understand about
Langs Smith
evaluation and we just talked about data
set creation um we talked about an
example of building a question answer
pair data set from this blog post on
that recent data breaks LM um so again
we showed how to build like a manually
curated uh data set here's our qu here's
our inputs and our outputs um we use the
SDK to build the data set and to update
it we also showed how to use UI now a
question I'd ask is okay that's great
but what if I have an app in production
I have traces being you know logged over
to um to lsmith how to build a data set
based on for example user logs so for
example let's say there's a bunch of
generations or user inputs I thought
were interesting I want to build a data
set from those so I can do future
evaluations again it so let's do a kind
of a toy example here let's create a new
project we'll call this
dbrx um and what I'm going to do is I'm
going to load that blog post here we go
so the same blog post we've been working
with on the on the recent data breaks
model now I'm going to Define here's my
little toy app so it's just answer a
question I'm using just open API not
using Lang chain at all here really
simple answer the user question based on
two or three sentences given the context
that's really it there we go
so let's say this is like an app I have
this in production somewhere users are
just interacting with it um and I get a
question here what are the main
differences in training efficiency and
you know they app answers here's another
one cool so let's actually go over and
we created uh a a project for
this this
over so I'm go to my projects so you can
see those two generations that I just
ran here are going to be logged to this
project dbrx so now we're in this
project and we see those two generations
you can look at the time it matches
roughly the time that is right now
Pacific that's great so you know okay
this is what we just saw this is
actually kind of interesting to look at
so here you can see this is the trace
effectively so in this case the trace
only has a single run so again we talked
about there's runs and runs roll up into
traces Trace contains all the different
runs in a given like application this
case it's a simple prompt response so
there's only a single run and indeed the
trace only has that single run in it so
again you can kind of look over here
here's your system prompt it plums in
that whole blog post and you know the
human prompt where what here is the
question and then the output so very
simple now let's say these are examples
of user interactions with your app you
want to capture them for posterity or
for revaluation or whatever just click
on the two so we're in Lang Smith now um
and you see this thing down here adding
data set so I click on that um I'm going
to move this over so I'm going to call
this a new data set let's just call it
like
dbrx uh QA
testing
testing here we go now it's
automatically flaggs a chat data set
recall previously we built a key value
data set based with basically question
answer uh key value pairs for the inputs
and outputs in this case this is derived
from chat session so it's a bit a
different data set type and this is
useful for example if you want something
like fine tuning in the future the
inputs are already in chat and
serialized chat message format which is
useful for for that which that's a more
advanced use case we'll talk about
later so you know that's really it we
can just hit create and I'm going to go
down to my data sets and let's just
search
dbrx boom and here it is you can see
it's a chat data set it's derived from
those inputs that my mock user provided
um and you get the output so it's kind
of basis set of input prompt output
pairs from my app which I've now saved
the data set which I could do work on uh
accordingly and again just like before
you can see you can edit these so for
example if here's a really good use case
you have a bunch of user um you know
interactions or inputs to your system
but your system produced the wrong
answers if you want to turn this into
like an EV eval set you could actually
edit these to be ground truth answer but
you still have the real user inputs in
there so it's just a very kind of common
trick for building high quality
valuation sets um is to do this kind of
logging and then potentially to clean
the answers provided by the AI so set
they then ground truth so that's really
it so again if I zoom all the way back
out what did we do we just showed how to
build data sets from user logs from this
little toy app that I built that's
asking answering questions about a blog
post so we're going to be kind of
building on this in in some future
videos but what we've really covered
here is ability to build data sets from
logs and uh manually curate them from
like question answer pairs or it could
really doesn't have to be question
answer pairs but in that in this case I
did um but you know developer curated
versus in this particular case you know
logge from a hypothetical user so two
different ways of building data sets
thanks
Browse More Related Video
Custom Evaluators | LangSmith Evaluations - Part 6
Manually Curated Datasets | LangSmith Evaluations - Part 3
Pre-Built Evaluators | LangSmith Evaluations - Part 5
Why Evals Matter | LangSmith Evaluations - Part 1
RAG Evaluation (Answer Hallucinations) | LangSmith Evaluations - Part 13
Evaluation Primitives | LangSmith Evaluations - Part 2
5.0 / 5 (0 votes)