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
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
240
Direct Preference Optimization
zchenry
0
440
Diffusion Model with Perceptual Loss
zchenry
0
500
レンズの下のLLM / LLM under the Lens
zchenry
0
220
Go with the Prompt Flow
zchenry
0
210
Mojo Dojo
zchenry
0
250
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
690
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
310
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
180
Other Decks in Programming
See All in Programming
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
710
Don't Prompt Harder, Structure Better
kitasuke
0
680
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
270
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.8k
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
150
飯MCP
yusukebe
0
500
AIエージェントで業務改善してみた
taku271
0
510
Rethinking API Platform Filters
vinceamstoutz
0
11k
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
240
感情を設計する
ichimichi
5
1.4k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
Into the Great Unknown - MozCon
thekraken
40
2.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Navigating Team Friction
lara
192
16k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
97
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
360
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Agile that works and the tools we love
rasmusluckow
331
21k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
690
Designing Powerful Visuals for Engaging Learning
tmiket
1
330
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