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
310
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
190
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
150
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
660
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
150
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
4
1.2k
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.2k
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
220
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
450
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
150
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
170
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
660
Featured
See All Featured
Claude Code のすすめ
schroneko
67
220k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
300
Paper Plane (Part 1)
katiecoart
PRO
0
6.8k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.7k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Marketing to machines
jonoalderson
1
5.2k
Prompt Engineering for Job Search
mfonobong
0
280
The Cult of Friendly URLs
andyhume
79
6.8k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Music & Morning Musume
bryan
47
7.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
Imperfection Machines: The Place of Print at Facebook
scottboms
270
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