Slide 1

Slide 1 text

LangSmith入門🔰 トレーシング・プロンプト管理を試す 立野 祐太 ©BLUEISH 2025. All rights reserved.

Slide 2

Slide 2 text

立野 祐太 Yuta Tateno 普段はOCRやRAGを用いたアプリケーション開発に従事しています エンジニア 自己紹介 ©BLUEISH 2025. All rights reserved.

Slide 3

Slide 3 text

©BLUEISH 2025. All rights reserved. 目的 LangSmithの機能・導入のイメージを掴んでもらう

Slide 4

Slide 4 text

©BLUEISH 2025. All rights reserved. 目次 1. LangSmithについて a. 主な機能 b. なぜ必要なのか c. その他特徴 d. プラン比較 e. Langfuseとの比較 2. LangSmithを試してみる a. トレース b. プロンプト管理 3. まとめ

Slide 5

Slide 5 text

©BLUEISH 2025. All rights reserved. LLMアプリケーション開発での課題 LLMは非決定的であり、非確実性を伴い品質担保が困難 出力を監視し継続的な評価が必要 👉 LangSmithを利用

Slide 6

Slide 6 text

©BLUEISH 2025. All rights reserved. 🦜⚒LangSmithとは LLMアプリケーションの開発の開発運用を支援するツール

Slide 7

Slide 7 text

©BLUEISH 2025. All rights reserved. 主な機能 ❏ オブザーバビリティ トレーシング、メトリック、アラート ❏ 評価    データの収集・管理、継続的な自動評価 ❏ プロンプト管理 プロンプトの管理、テスト

Slide 8

Slide 8 text

非決定性の課題を改善 1. トレーシングによって入出力を分析 2. 継続的に出力を評価&改善し、出力の非決定性を最小化し品質を担保 ©BLUEISH 2025. All rights reserved.

Slide 9

Slide 9 text

©BLUEISH 2025. All rights reserved. その他特徴 ❏ フルマネージド・セルフホストどちらも対応 ❏ 個人利用であれば無料枠がある ❏ フレームワークに依存しない ❏ LangChain・LangGraph環境だと簡単に導入できる

Slide 10

Slide 10 text

©BLUEISH 2025. All rights reserved. プラン比較

Slide 11

Slide 11 text

©BLUEISH 2025. All rights reserved. LangSmithとLangfuseの簡単な比較 引用: LangChainから使用する LangSmithとLangfuseの詳細比(https://zenn.dev/aidemy/articles/13ceca39b0ea6c) ※ Enterpriseプラン (最上位プラン )に加入することでセルフホストも可能 どちらもLLMアプリケーションの開発・運用・改善を支援するツール

Slide 12

Slide 12 text

©BLUEISH 2025. All rights reserved. LangSmithを試してみる 簡易的なチャット機能を構築

Slide 13

Slide 13 text

©BLUEISH 2025. All rights reserved. LangSmithを試してみる LangSmithを導入。 HPにアクセスしサインアップ

Slide 14

Slide 14 text

©BLUEISH 2025. All rights reserved. LangSmithを試してみる APIキーを発行

Slide 15

Slide 15 text

©BLUEISH 2025. All rights reserved. LangSmithを試してみる 環境変数をアプリケーションに設定

Slide 16

Slide 16 text

©BLUEISH 2025. All rights reserved. LangSmithを試してみる 以上、環境変数を設定するだけでLangSmithが使えるようになる

Slide 17

Slide 17 text

©BLUEISH 2025. All rights reserved. トレース チャットでやり取りをして、トレースされているか確認する

Slide 18

Slide 18 text

©BLUEISH 2025. All rights reserved. トレース 環境変数で設定したプロジェクト単位で監視

Slide 19

Slide 19 text

©BLUEISH 2025. All rights reserved. トレース 個々のやり取りのトレースが記録

Slide 20

Slide 20 text

©BLUEISH 2025. All rights reserved. トレース 入力プロンプトと生成された出力、メタデータ

Slide 21

Slide 21 text

©BLUEISH 2025. All rights reserved. トレース アプリ全体としてモニタリング

Slide 22

Slide 22 text

©BLUEISH 2025. All rights reserved. トレース 可視化して確認できる

Slide 23

Slide 23 text

©BLUEISH 2025. All rights reserved. プロンプト管理 プロンプト管理を使ってみる

Slide 24

Slide 24 text

©BLUEISH 2025. All rights reserved. プロンプト管理 プロンプトを作成。想定する変数、モデルを指定してプロンプトの出力をテスト

Slide 25

Slide 25 text

©BLUEISH 2025. All rights reserved. プロンプト管理 プロンプトテンプレートを保存。LangSmith上で管理できる。

Slide 26

Slide 26 text

プロンプトの変更をコミット履歴で管理 ©BLUEISH 2025. All rights reserved. プロンプト管理

Slide 27

Slide 27 text

©BLUEISH 2025. All rights reserved. プロンプト管理 保存したプロンプトはアプリケーションに簡単に呼び出せる

Slide 28

Slide 28 text

©BLUEISH 2025. All rights reserved. まとめ LangSmithはLLMアプリケーションの開発・運用・改善を支援し、簡単に導入できること がわかった