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
250
Direct Preference Optimization
zchenry
0
450
Diffusion Model with Perceptual Loss
zchenry
0
510
レンズの下のLLM / LLM under the Lens
zchenry
0
230
Go with the Prompt Flow
zchenry
0
220
Mojo Dojo
zchenry
0
260
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
700
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
320
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
190
Other Decks in Programming
See All in Programming
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
150
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
20260514_its_the_context_window_stupid.pdf
heita
0
860
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
AI-DLC Deep Dive
yuukiyo
9
5.7k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
tRPCの概要と少しだけパフォーマンス
misoton665
2
270
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
110
AIと共に生きる技術選定 2026
sgash708
0
130
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
Back to the roots of date
jinroq
0
780
Featured
See All Featured
Leo the Paperboy
mayatellez
7
1.8k
Being A Developer After 40
akosma
91
590k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Context Engineering - Making Every Token Count
addyosmani
9
870
WENDY [Excerpt]
tessaabrams
10
37k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
The Language of Interfaces
destraynor
162
26k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
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