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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
460
Diffusion Model with Perceptual Loss
zchenry
0
520
レンズの下の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
710
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
320
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
200
Other Decks in Programming
See All in Programming
Modding RubyKaigi for Myself
yui_knk
0
470
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
350
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
110
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
560
AIとRubyの静的型付け
ukin0k0
0
130
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
140
iOS26時代の新規アプリ開発
yuukiw00w
0
200
OSもどきOS
arkw
0
160
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
300
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
130
inferと仲良くなる10分間
ryokatsuse
1
260
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
280
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
What's in a price? How to price your products and services
michaelherold
247
13k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
340
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
430
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
920
Scaling GitHub
holman
464
140k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
310
Visualization
eitanlees
151
17k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
810
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
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