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
{{guidance}}のガイダンス / Guidance of guidance
Search
Henry Cui
June 24, 2023
Programming
0
170
{{guidance}}のガイダンス / Guidance of guidance
Henry Cui
June 24, 2023
Tweet
Share
More Decks by Henry Cui
See All by Henry Cui
プロダクション言語モデルの情報を盗む攻撃 / Stealing Part of a Production Language Model
zchenry
1
210
Direct Preference Optimization
zchenry
0
390
Diffusion Model with Perceptual Loss
zchenry
0
420
レンズの下のLLM / LLM under the Lens
zchenry
0
190
Go with the Prompt Flow
zchenry
0
170
Mojo Dojo
zchenry
0
220
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
590
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
260
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
130
Other Decks in Programming
See All in Programming
CSC509 Lecture 02
javiergs
PRO
0
410
株式会社 Sun terras カンパニーデック
sunterras
0
250
ソフトウェア設計の実践的な考え方
masuda220
PRO
3
500
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
180
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
1.9k
XP, Testing and ninja testing ZOZ5
m_seki
3
380
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
360
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.4k
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
0
400
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
130
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
Why Our Code Smells
bkeepers
PRO
339
57k
Producing Creativity
orderedlist
PRO
347
40k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Mobile First: as difficult as doing things right
swwweet
224
10k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Being A Developer After 40
akosma
91
590k
Code Review Best Practice
trishagee
72
19k
Fireside Chat
paigeccino
40
3.7k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Transcript
{{guidance}}のガイダンス 機械学習の社会実装勉強会第24回 Henry 2023/6/24
背景 ▪ LLM (Large Language Model、大規模言語モデル)は世界を 席巻している ▪ OpenAIのChatGPT等だけでなく、オープンソースのLLMも含 めて、より効率的に扱うためのライブラリ
guidance がマイクロ ソフトが先日リリース ▪ langchainとsemantic-kernelがすでにある中で、guidanceに ついて見ていく 2
内容 ▪ テンプレート言語 ▪ 基本文法 ▪ gen関数 3
テンプレート言語 ▪ guidanceはHandlebarsというテンプレート言語を採用してい ます • しかし文法は完全に一致しているわけでもない ▪ Handlebarsは元々HTMLなどを構成するためのフロントエンド で使われるテンプレート言語 •
https://handlebarsjs.com/guide/#what-is-handlebars 4
基本文法 ▪ どのLLMを使うかを先に指定 • 後で引数として渡せるが、事前に指定したほうがわかりやすい ▪ テンプレートの文字列を渡して、オブジェクトを定義 • ここの自由度が高い •
入出力とgen関数 ▪ 呼び出して実行する 5
gen関数 ▪ gen関数に色々な引数が渡せる • name • stop • n •
temperature • max_tokens • … 6
まとめ ▪ LLMを扱うライブラリ guidance の紹介 ▪ 基本文法と肝心な関数の基本的な紹介 ▪ guidance の他の便利な機能やより高度な使い方も紹介した
い 7