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
180
{{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
230
Direct Preference Optimization
zchenry
0
410
Diffusion Model with Perceptual Loss
zchenry
0
470
レンズの下のLLM / LLM under the Lens
zchenry
0
200
Go with the Prompt Flow
zchenry
0
180
Mojo Dojo
zchenry
0
230
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
640
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
290
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
160
Other Decks in Programming
See All in Programming
ThorVG Viewer In VS Code
nors
0
670
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
240
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.1k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
780
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
320
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
4
730
dchart: charts from deck markup
ajstarks
3
960
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
270
チームをチームにするEM
hitode909
0
450
Featured
See All Featured
Design in an AI World
tapps
0
120
Discover your Explorer Soul
emna__ayadi
2
1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
Darren the Foodie - Storyboard
khoart
PRO
2
2.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Skip the Path - Find Your Career Trail
mkilby
0
42
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
140
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
78
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
39
The Language of Interfaces
destraynor
162
26k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Unsuck your backbone
ammeep
671
58k
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