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
Go with the Prompt Flow
Search
Henry Cui
November 25, 2023
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go with the Prompt Flow
Henry Cui
November 25, 2023
More Decks by Henry Cui
See All by Henry Cui
プロダクション言語モデルの情報を盗む攻撃 / Stealing Part of a Production Language Model
zchenry
1
250
Direct Preference Optimization
zchenry
0
460
Diffusion Model with Perceptual Loss
zchenry
0
520
レンズの下のLLM / LLM under the Lens
zchenry
0
230
Mojo Dojo
zchenry
0
270
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
720
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
320
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
210
{{guidance}}のガイダンス / Guidance of guidance
zchenry
0
200
Other Decks in Programming
See All in Programming
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
400
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
dRuby over BLE
makicamel
2
320
Oxcを導入して開発体験が向上した話
yug1224
4
290
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.4k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
590
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
290
ふつうのFeature Flag実践入門
irof
7
3.6k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
Practical Orchestrator
shlominoach
191
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
30 Presentation Tips
portentint
PRO
1
320
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
Exploring anti-patterns in Rails
aemeredith
3
390
For a Future-Friendly Web
brad_frost
183
10k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Transcript
Go with the Prompt Flow 機械学習の社会実装勉強会第29回 Henry 2023/11/25
内容 ▪ Azure Machine Learning Prompt FlowというLLM開発全サ イクルをサポートするツールが先日MITライセンスで公開され た •
https://github.com/microsoft/promptflow ▪ Prompt Flowがもたらす開発の効率向上 • フローで速いプロトタイピング • テストと評価 • デプロイ 2
Prompt Flowの基本概念 ▪ Flow:Toolの有向グラフ ▪ Tool:LLM | Python | Prompt
▪ Variants:LLM Toolの違うバージョン ▪ Connections:外部認証データの保存 3
Flowの構成 ▪ 公式レポジトリの examples/flows/standard/web-classification を例に ▪ 主なファイル • flow.dag.yaml:flowを定義するファイル ←
主に見ていく • requirements.txt:ライブラリ依存 • pyファイル:Python関数の定義ファイル ▪ 書き方に従う必要がある • jinja2ファイル:プロンプトのテンプレートファイル 4
Flowをローカルに動かす ▪ Connectionを作る必要がある ▪ 今回はAzureじゃないOpenAIのほうを使う • connection.yamlを用意 • Ubuntu等の場合はpip install
keyrings.alt 5
PromptのTestとRun ▪ フォルダ内に以下のコマンドでテスト • pf flow test --flow . •
pf flow test --flow . --inputs url='https://www.youtube.com/watch?v=kYqRtjDBci8' ▪ フォルダ内に以下のコマンでRun • run_name="classification_accuracy_"$(openssl rand -hex 12) • pf run create --file run.yml --stream --name $run_name • run visualize --name $run_name ▪ 可視化用のhtmlファイルを生成 6
まとめ ▪ Prompt Flowの基本概念 ▪ Prompt Flowをローカルで動かした 7