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
160
{{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
190
Direct Preference Optimization
zchenry
0
370
Diffusion Model with Perceptual Loss
zchenry
0
390
レンズの下のLLM / LLM under the Lens
zchenry
0
180
Go with the Prompt Flow
zchenry
0
160
Mojo Dojo
zchenry
0
210
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
560
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
240
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
120
Other Decks in Programming
See All in Programming
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
740
GPUを計算資源として使おう!
primenumber
1
190
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
190
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
840
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
230
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
12k
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
260
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
3
150
ニーリーにおけるプロダクトエンジニア
nealle
0
880
Hack Claude Code with Claude Code
choplin
5
2.4k
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
695
190k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Gamification - CAS2011
davidbonilla
81
5.4k
Side Projects
sachag
455
42k
Navigating Team Friction
lara
187
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Bash Introduction
62gerente
613
210k
A Tale of Four Properties
chriscoyier
160
23k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
The Cult of Friendly URLs
andyhume
79
6.5k
Documentation Writing (for coders)
carmenintech
72
4.9k
The World Runs on Bad Software
bkeepers
PRO
69
11k
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