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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Henry Cui
June 24, 2023
Programming
0
180
{{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
230
Direct Preference Optimization
zchenry
0
410
Diffusion Model with Perceptual Loss
zchenry
0
470
レンズの下のLLM / LLM under the Lens
zchenry
0
200
Go with the Prompt Flow
zchenry
0
190
Mojo Dojo
zchenry
0
230
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
640
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
290
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
160
Other Decks in Programming
See All in Programming
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
180
Grafana:建立系統全知視角的捷徑
blueswen
0
310
Architectural Extensions
denyspoltorak
0
250
Vibe codingでおすすめの言語と開発手法
uyuki234
0
200
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
550
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
160
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
130
Python札幌 LT資料
t3tra
7
1.1k
Data-Centric Kaggle
isax1015
2
710
CSC307 Lecture 03
javiergs
PRO
1
480
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
260
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Building Applications with DynamoDB
mza
96
6.9k
WCS-LA-2024
lcolladotor
0
430
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Designing Experiences People Love
moore
144
24k
Designing for Timeless Needs
cassininazir
0
120
Claude Code のすすめ
schroneko
67
210k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Faster Mobile Websites
deanohume
310
31k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
420
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