Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Prompt FlowによるLLMアプリケーション開発
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuto Urushima
July 09, 2024
Programming
2
1.7k
Prompt FlowによるLLMアプリケーション開発
Yuto Urushima
July 09, 2024
Tweet
Share
More Decks by Yuto Urushima
See All by Yuto Urushima
Webエンジニアから生成AIエンジニアへ
yuto2000
10
360
LangGraphを用いたマルチエージェント
yuto2000
2
2.5k
Prompt FlowによるLLMOps
yuto2000
1
1.4k
Other Decks in Programming
See All in Programming
CSC307 Lecture 10
javiergs
PRO
1
690
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
290
TipKitTips
ktcryomm
0
150
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
330
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
450
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
540
atmaCup #23でAIコーディングを活用した話
ml_bear
4
730
文字コードの話
qnighy
43
17k
CSC307 Lecture 15
javiergs
PRO
0
210
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
SourceGeneratorのマーカー属性問題について
htkym
0
130
Featured
See All Featured
How GitHub (no longer) Works
holman
316
140k
Designing for Performance
lara
611
70k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
180
The Language of Interfaces
destraynor
162
26k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
280
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
BBQ
matthewcrist
89
10k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
It's Worth the Effort
3n
188
29k
Transcript
Prompt Flowによる LLMアプリケーション開発 宇留嶋勇人
自己紹介 web系エンジニアで、最近はLangChainや Prompt Flowを使った生成AI周りの開発業務を 行ってます。 X: @3anlqblueE ウルシマ ユウト 宇留嶋 勇人
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
= 大規模言語モデル (LLM) によって動作する AI アプ リケーションの開発サイクル全体を合理化するために 設計された開発ツールのこと。 Prompt Flowは、AI
アプリケーションのPoC作成、実 験、デバック、デプロイのプロセスを簡素化する包括 的なソリューションを提供します。 https://learn.microsoft.com/ja-jp/azure/ai-studio/how-to/prompt-flow フロー例 Prompt Flowとは
Prompt Flowとは プロンプト Python処理 コード管理 可視化 Azure AI Studio
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
Prompt Flowでできること - フロー、特にLLMとのインタラクションを簡単にデバッグ可 - フローを評価し、品質とパフォーマンスのメトリクスを計算 - テストと評価をCI/CDシステムに統合し、フローの品質を保証 - 選択したサービスプラットフォームにフローをデプロイするか、アプリ
のコードベースに簡単に統合可能 - Azure AI Studioにてチームで共同作業可能 https://microsoft.github.io/promptflow/index.html
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
LLMアプリケーションの開発 開発方法 • Azure AI Studio • VS Code 拡張機能
• CLI
LLMアプリケーションの開発 Azure AI Studio Azure AI Studio上で ツール(プロンプトフ ロー)を使う
LLMアプリケーションの開発 VS Code 拡張機能 Azure AI Studio同様に可視 化しながらローカル環境で 開発できる
LLMアプリケーションの開発 CLI フローの初期化、バリデーション、テスト、バッチ実行、トレース、 ビルド、エンドポイント作成 $ pf $ pfazure pfコマンドのAzure AI版
https://microsoft.github.io/promptflow/reference/pf-command-reference.html#
LLMアプリケーションの開発 バリアント(プロンプトチューニング) →生産性を高める、生成の質を高める、比較を容易にする
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
評価、トレース 評価 1. 自動評価 2. カスタム評価
評価、トレース 自動評価 Microsoftが監修したメトリックを使うことがで きる • パフォーマンスと品質メトリック ◦ 根拠性、関連性、コヒーレンス、流暢 性、GPTの類似性、F1 •
リスクと安全メトリック ◦ 自傷行為、悪意のある不公平、暴力的、 性的な内容、コンテンツ
評価、トレース カスタム評価 入力値、システムメトリックを出力 評価用フローを作成 (例: 固有表現抽出) ground truthとのマッチ度
評価、トレース トレース OpenTelemetry仕様に従っ て、LLMコールや関数、 LangChainやAutoGenなどの LLMフレームワークをトレー スできるトレース機能を提供 from promptflow.tracing import
start_trace start_trace() https://microsoft.github.io/promptflow/how-to-guides/tracing/index.html
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
デプロイ - CLIで開発サーバーデプロイ - Docker - オンラインエンドポイント - 関数として実行
デプロイ - CLIで開発サーバーデプロイ - Docker $ pf flow serve --source
<flow-folder> --port 8080 --host localhost $ curl http://localhost:8080/score --data ‘{“hoge”: … $ pf flow build --source <flow-folder> --output <output-dir> --format docker
デプロイ - オンラインデプロイメント Azure上に仮想マシンとインスタンス数を設定し簡単にデプロイ可能 - 関数として実行(既存アプリと統合し易い) from promptflow.client import load_flow
f = load_flow(“./example_flow/”) data = json.loads(request.get_data()) result_dict = f(**data)
Agenda Prompt Flowとは Prompt Flowでできること LLMアプリケーションの開発 評価、トレース デプロイ まとめ
まとめ Prompt FLowはLLMアプリケーションの開発を支える多様な機能 があり、開発サイクルを合理化している 是非、使ってみてください!