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
160
{{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
190
Direct Preference Optimization
zchenry
0
370
Diffusion Model with Perceptual Loss
zchenry
0
370
レンズの下のLLM / LLM under the Lens
zchenry
0
180
Go with the Prompt Flow
zchenry
0
160
Mojo Dojo
zchenry
0
200
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
550
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
240
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
110
Other Decks in Programming
See All in Programming
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
130
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
520
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
660
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
230
カクヨムAndroidアプリのリブート
numeroanddev
0
430
人には人それぞれのサービス層がある
shimabox
3
680
複数アプリケーションを育てていくための共通化戦略
irof
10
3.9k
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
C++20 射影変換
faithandbrave
0
490
Java on Azure で LangGraph!
kohei3110
0
150
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
830
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
730
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
68
11k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Unsuck your backbone
ammeep
671
58k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Automating Front-end Workflow
addyosmani
1370
200k
Scaling GitHub
holman
459
140k
GraphQLとの向き合い方2022年版
quramy
46
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
480
Visualization
eitanlees
146
16k
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