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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuto Urushima
July 09, 2024
Programming
1.7k
2
Share
Prompt FlowによるLLMアプリケーション開発
Yuto Urushima
July 09, 2024
More Decks by Yuto Urushima
See All by Yuto Urushima
Webエンジニアから生成AIエンジニアへ
yuto2000
10
420
LangGraphを用いたマルチエージェント
yuto2000
2
2.7k
Prompt FlowによるLLMOps
yuto2000
1
1.4k
Other Decks in Programming
See All in Programming
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
270
Swift Concurrency Type System
inamiy
0
480
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
130
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
840
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
200
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
200
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
150
Featured
See All Featured
Everyday Curiosity
cassininazir
0
190
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Prompt Engineering for Job Search
mfonobong
0
260
Designing Powerful Visuals for Engaging Learning
tmiket
1
340
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
100
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Designing for Timeless Needs
cassininazir
0
190
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
WCS-LA-2024
lcolladotor
0
530
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
97
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
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アプリケーションの開発を支える多様な機能 があり、開発サイクルを合理化している 是非、使ってみてください!