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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Henry Cui
June 24, 2023
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
{{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
260
Direct Preference Optimization
zchenry
0
470
Diffusion Model with Perceptual Loss
zchenry
0
520
レンズの下のLLM / LLM under the Lens
zchenry
0
230
Go with the Prompt Flow
zchenry
0
230
Mojo Dojo
zchenry
0
270
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
720
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
330
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
210
Other Decks in Programming
See All in Programming
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.6k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
310
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
810
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
230
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
290
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
220
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
170
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
980
act1-costs.pdf
sumedhbala
0
120
ふつうのFeature Flag実践入門
irof
8
4.2k
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
Chasing Engaging Ingredients in Design
codingconduct
0
230
Believing is Seeing
oripsolob
1
160
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
GitHub's CSS Performance
jonrohan
1033
470k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
AI: The stuff that nobody shows you
jnunemaker
PRO
8
740
Optimizing for Happiness
mojombo
378
71k
Context Engineering - Making Every Token Count
addyosmani
9
990
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Automating Front-end Workflow
addyosmani
1370
210k
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