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
170
{{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
210
Direct Preference Optimization
zchenry
0
390
Diffusion Model with Perceptual Loss
zchenry
0
420
レンズの下のLLM / LLM under the Lens
zchenry
0
190
Go with the Prompt Flow
zchenry
0
170
Mojo Dojo
zchenry
0
220
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
580
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
260
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
130
Other Decks in Programming
See All in Programming
はじめてのMaterial3 Expressive
ym223
2
900
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
130
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
510
API Platform 4.2: Redefining API Development
soyuka
0
220
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
より安全で効率的な Go コードへ: Protocol Buffers Opaque API の導入
shwatanap
2
790
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
250
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
320
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
240
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
570
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
120
Kiroで始めるAI-DLC
kaonash
2
630
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
GitHub's CSS Performance
jonrohan
1032
460k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Practical Orchestrator
shlominoach
190
11k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Become a Pro
speakerdeck
PRO
29
5.5k
Building Adaptive Systems
keathley
43
2.7k
Automating Front-end Workflow
addyosmani
1370
200k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
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