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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Henry Cui
June 24, 2023
Programming
200
0
Share
{{guidance}}のガイダンス / Guidance of guidance
Henry Cui
June 24, 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
450
Diffusion Model with Perceptual Loss
zchenry
0
510
レンズの下のLLM / LLM under the Lens
zchenry
0
230
Go with the Prompt Flow
zchenry
0
220
Mojo Dojo
zchenry
0
260
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
700
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
320
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
190
Other Decks in Programming
See All in Programming
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
460
How Swift's Type System Guides AI Agents
koher
0
320
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
18
8.2k
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
280
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
940
Road to RubyKaigi: Play Hard(ware)
makicamel
1
520
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
230
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
390
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
The Less-Told Story of Socket Timeouts
coe401_
3
860
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
Firefoxにコントリビューションして得られた学び
ken7253
2
150
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Automating Front-end Workflow
addyosmani
1370
200k
First, design no harm
axbom
PRO
2
1.2k
Fireside Chat
paigeccino
42
3.9k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
230
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
290
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
KATA
mclloyd
PRO
35
15k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
290
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
Balancing Empowerment & Direction
lara
6
1.1k
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