Test Run Comparisons
LangSmith が、LLM 評価への信頼性課題を解決するため、手動データ検証と自動スコアリングを組み合わせた「テスト実行比較」機能を正式に発表した。
キーポイント
LLM 評価の限界と人間の直感の重要性
LLM による自動評価は便利だが完全な信頼は置けず、優れた研究者は手動でデータを精査することで問題の本質的な洞察を得ている。
孤立したテストから比較分析へ
従来の単発テスト実行では不十分であり、ユーザーは過去のイテレーションとの側面比較や、スコアリング後の詳細なデータ探索を強く求めている。
新しい UX の実装とワークフロー
新機能により、LLM 評価で初期スコアを取得した上で、特定のデータポイントを手動で迅速に精査・比較できる直感的な UI が提供される。
影響分析・編集コメントを表示
影響分析
この発表は、LLM アプリ開発の品質保証プロセスにおいて「ブラックボックス化された自動評価」から「人間が関与するハイブリッド検証」へのパラダイムシフトを示唆しています。LangChain が提供するツールが、開発者の直感を支援し、モデル改善の根拠をより確実なものにすることで、実運用レベルでの LLM 信頼性向上に寄与すると考えられます。
編集コメント
LLM アプリ開発の現場では、自動評価ツールの限界を認識し、人間の判断を組み合わせた検証プロセスが不可欠となっています。LangSmith のこの機能強化は、その課題に対する実用的かつ即効性のある解決策と言えます。
私が気づいた一つの傾向は、優れた AI 研究者たちは多くのデータを人手で精査する用意があるということです。それ以上に、彼らは迅速にデータを人手で精査できるインフラストラクチャを構築します。派手さはありませんが、データを人手で検討することは問題に対する貴重な直観をもたらしてくれます。- Jason Wei, OpenAI
評価は、LLM アプリケーションを構築する上で最も難しい部分の一つであり続けています。プロンプト、チェーン、またはエージェントへの変更がもたらす影響を定量的に評価するのは本当に困難です。私たちは LLM 支援型評価 に楽観的ですが、同時に、それらに対する完全な信頼を持つことが難しいことも確かに認識しています。
上記の Jason のツイートは、私たちが多くの最優秀な研究者(およびエンジニア)が何をしているかを要約したものです。彼らは問題に対する直観を得るためにデータを人手で精査したいと考えています。LangChain では、それを実現するためのインフラストラクチャを構築することを目指しており、そのため今日「Test Run Comparisons」の発表に興奮しているのです。
LangSmith の初期リリースでは、テストの実行と LLM 支援フィードバックによるスコアリングのサポートがありましたが、各テストは個別に実行されていました。私たちはすぐに二つの利用パターンが浮上するのを確認しました:
- LLM 支援フィードバックをそのまま信頼することにまだ慎重な人がいる
- ユーザーは単にテスト実行を孤立して評価するだけでなく、過去の反復と比較したいと考えていたことが多い
Test Run Comparisons(テスト実行比較)機能を開発する際、私たちはこれらの洞察の両方を念頭に置いていました。複数のテスト実行を並べて表示できる簡単な UX を作成したかったのです。また、LLM 支援評価(または正規表現/その他の評価)を使用して初期スコアを取得し、その後、そのデータポイントを手動で探索してさらなる知見を得られるような簡単な UX も作りたかったです。
では、どのように機能するのでしょうか?
まず、データセットを設定していくつかのテストを実行する必要があります。その手順については こちら のドキュメントをご覧ください。新しいことは何もありませんので、既存プロジェクトで既にこれを行っていれば問題ありません。
データセット内では、2 つ(またはそれ以上)のテスト実行を簡単に選択し、「Compare(比較)」をクリックできます。

そこから、Test Run Comparison(テスト実行比較)ビューに移動します。これは以下のような外観になります。

各データポイントの入力、参照出力、実際の出力を簡単に確認できます。また、その実行に関する 評価指標、所要時間、レイテンシも表示されます。
このビューは、同じ入力に対するテスト実行をすばやく比較しやすくするために設計されています。特定のデータポイントについてより深く知りたい場合は、その行をクリックするとサイドバーが表示され、その実行の詳細を詳しく調べることができます。

このサイドバーには、実行間をすばやく切り替えるために上下の矢印(▲および▼)も追加されています。
このビューにより、特定のデータポイントに対する実行の比較が容易になることを願っています。ただし、どのデータポイントを確認すべきかはどうやって知るのでしょうか?
各列にフィルターを追加しました。これは Excel と同様の機能です。これらのフィルターを使用すると、任意の基準に基づいて行をフィルタリングできます。
💡
開始時に使用することをお勧めする基準は、1 つのテスト実行について正解したデータポイントと、もう 1 つのテスト実行について誤答したデータポイントをそれぞれフィルタリングすることです。これにより、2 つのテスト実行間の顕著な差異がある箇所にすばやく焦点を当てることができ、変更点をより容易に発見できるようになります。

LLM アプリケーションを構築するのは困難です。その大きな理由は、特定のタスクにおいて LLM がどのように動作しているかを理解する必要があるからです。評価用データセットを設定し、その上で実行結果を容易に比較できる仕組みは、アプリケーションを改善するために必要な理解を深めるために不可欠です。LangSmith の Test Run Comparison はこの課題の解決を目指しています。ご意見・ご感想をお聞かせください!
LangSmith は現在プライベートベータ版です - こちらからサインアップ。今後数週間でアクセス権限を順次拡大していく予定であり、このような機能の追加も継続して行います。
原文を表示
One pattern I noticed is that great AI researchers are willing to manually inspect lots of data. And more than that, they build infrastructure that allows them to manually inspect data quickly. Though not glamorous, manually examining data gives valuable intuitions about the problem.- Jason Wei, OpenAI
Evaluations continue to be one of the hardest parts of building LLM applications. It's really tough to evaluate in a quantitative way the effect of changes to your prompt, chain, or agent. We're bullish on LLM-assisted evaluation, but, at the same time, we definitely recognize that it's hard to have complete trust in them.
Jason's tweet above sums up what we see a lot of the best researchers (and engineers) doing. They want to manually inspect data to gain intuition about the problem. At LangChain, we want to build the infrastructure to help do that - which is why we're excited to announce Test Run Comparisons today.
In the initial release of LangSmith we had support for running tests, including scoring them with LLM-assisted feedback. However, each test was run in isolation. We quickly saw two usage patterns emerge:
- People are still hesitant to trust the LLM-assisted feedback directly
- Users often wanted to not only score their test run in isolation, but also compare it to previous iterations
When building Test Run Comparisons, we kept both of these insights in mind. We wanted to create an easy UX to see multiple test runs side-by-side. We also wanted to create an easy UX where people could use LLM-assisted evals (or regex/other eval) to get an initial score, then manually explore those datapoints for further insights.
So how does it work?
First, you need to set up a dataset and run some tests. See documentation here for instructions on how to do that. Nothing new here, so if you've already done that for an existing project you're all good.
Inside a dataset, you can easily select two (or more) test runs, then click Compare.

From there, you will be brought into the Test Run Comparison view. This should look like the below

You can easily see the inputs, the reference output, and then the actual output for each datapoint - along with any eval metrics, time and latency for that run.
This view is designed to make it easy to quickly compare test runs across the same inputs. If you want a deeper look at a particular datapoint, you can click on that row and sidebar will pop up allowing you to drill down into the details of those runs.

On that sidebar, we've also added up and down carets (▲ and ▼) to easily flip between runs.
This view should hopefully make it easy to compare runs for a particular datapoint. But how do you know what datapoints to be looking at?
We've added filters for each column - similar to Excel. Using these filters, you can filter the rows according to any criteria.
💡
The criteria we recommend using to start? Filter one test run to datapoints it got correct, and the other one to datapoints that it got incorrect. This allows you to quickly drill on places of significant difference between the two test runs, which should more easily allow you to discover what has changed.

Building an LLM application is hard. A big part of that is understanding how the LLM is working on a particular task. Setting up an evaluation dataset and then being able to easily compare runs on that dataset is crucial for developing the understanding needed to improve the application. Test Run Comparison in LangSmith aimed at solving this problem. Please let us know any feedback you have!
LangSmith is in private beta - sign up here. We'll be rolling out more access over the next few weeks, as well as continuing to add features like this.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み