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
350
LangGraphを用いたマルチエージェント
yuto2000
2
2.5k
Prompt FlowによるLLMOps
yuto2000
1
1.4k
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
Patterns of Patterns
denyspoltorak
0
1.4k
SourceGeneratorのススメ
htkym
0
190
組織で育むオブザーバビリティ
ryota_hnk
0
170
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
190
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
AgentCoreとHuman in the Loop
har1101
5
220
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
Oxlintはいいぞ
yug1224
5
1.3k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Ethics towards AI in product and experience design
skipperchong
2
190
Exploring anti-patterns in Rails
aemeredith
2
250
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Into the Great Unknown - MozCon
thekraken
40
2.2k
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アプリケーションの開発を支える多様な機能 があり、開発サイクルを合理化している 是非、使ってみてください!