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
150
{{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
0
120
Direct Preference Optimization
zchenry
0
330
Diffusion Model with Perceptual Loss
zchenry
0
300
レンズの下のLLM / LLM under the Lens
zchenry
0
160
Go with the Prompt Flow
zchenry
0
140
Mojo Dojo
zchenry
0
180
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
460
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
200
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
95
Other Decks in Programming
See All in Programming
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
570
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Honoとフロントエンドの 型安全性について
yodaka
7
1.3k
PHP ステートレス VS ステートフル 状態管理と並行性 / php-stateless-stateful
ytake
0
100
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
170
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
270
GoとPHPのインターフェイスの違い
shimabox
2
190
Formの複雑さに立ち向かう
bmthd
1
850
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Gamification - CAS2011
davidbonilla
80
5.1k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Done Done
chrislema
182
16k
Why Our Code Smells
bkeepers
PRO
336
57k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Facilitating Awesome Meetings
lara
52
6.2k
A designer walks into a library…
pauljervisheath
205
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
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