Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
プロンプトのプロに! / Become a Prompt Professional
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Henry Cui
March 25, 2023
Technology
330
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プロンプトのプロに! / Become a Prompt Professional
Henry Cui
March 25, 2023
Transcript
21 slides
プロンプトのプロに! 機械学習の社会実装勉強会第21回 Henry 2023/3/25
プロンプトに興味 ▪ 研究上 • 大規模言語モデル(Large Language Model, LLM)の研究が広がりつ つある •
テキスト生成・画像生成の基盤になる • モデルにテキスト入力(プロンプト!)が要だが、入力テキストにどのよ うに反応している詳しい仕組みが不明 ▪ 応用上 • みんなChatGPTについて話している • LLMベースのいろんな新興サービスが出ている • プロンプトを書くだけの仕事がとんだ高給 ▪ 目標:プロンプトについて詳しくなる 2
紹介する内容 ▪ Learn Prompting • https://github.com/trigaten/Learn_Prompting にて公開されている入 門コース • 今日はこれのBasic部分を紹介
▪ Large Language Models are Zero-Shot Reasoners, Kojima et al., NeurIPS 2022 • プロンプトを工夫することで、より良い解答を得る手法を提案 3
まずシンプルに英語で命令すれば良い ▪ 例えば Write an essay about the benefits of
AI 4
プロンプトは短くても長くても良い 5 数値計算はLLMの弱い分野とされて、正 しく答えてもらうためにプロンプトの改良 (プロンプトエンジニアリング)を行うのが 定番でした。 ChatGPTはプロンプトの改良を意識しなく ても正確に答えてくれるようになった。 プロンプトが長くても大丈夫です。
もっと複雑な命令も与えられる 6
例をより具体的に与えることで性能向上 7
ルールをより具体的に説明することで性能向上 8
プロンプトの形式は多種多様 ▪ 標準形式 • What is the capital of France?
▪ Q&A形式 • Q: What is the capital of France? A: 9
プロンプトの形式は多種多様 ▪ Few Shot形式 • What is the capital of
Spain? Madrid What is the capital of Italy? Rome What is the capital of France? ▪ Few Shot Q&A形式 • Q: What is the capital of Spain? A: Madrid Q: What is the capital of Italy? A: Rome Q: What is the capital of France? A: 10
背景説明、Q&Aなどを色々含めても大丈夫 11
生成文のスタイル変換 ▪ 何もスタイルを指定しない場合 12
生成文のスタイル変換 ▪ 生成スタイルを指定する場合 13
生成文のスタイル変換 ▪ 生成スタイルと生成言語を指定する場合 14
形容詞で細かく指定 ▪ "Funny", "Curt", "Unfriendly", "Academic Syntax"などの形 容詞で指定できる 15
より詳しく指定するために ▪ https://twitter.com/gijigae/status/1629834619184111618 16
チャットボットの特性を活用 ▪ 会話履歴にある文も後の生成文を影響する ▪ 何も前置きなくて、いきなり聞く場合 17
チャットボットの特性を活用 ▪ 会話冒頭で設定を入れた場合 18
Kojima et al., NeurIPS 2022 ▪ Chain of Thoughts (CoT)
• LLMが弱いとされている論理的推論を改善する手法 ▪ 二段階の推論を行う 19
ChatGPTはこの点において改善された ▪ プロンプト:Roger has 5 tennis balls. He buys 2
more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? 20
まとめ ▪ プロンプトの基本 ▪ Chain of Thoughts 21
More Decks by Henry Cui
See All by Henry Cui
プロダクション言語モデルの情報を盗む攻撃 / Stealing Part of a Production Language Model
zchenry
1
270
Direct Preference Optimization
zchenry
0
500
Diffusion Model with Perceptual Loss
zchenry
0
550
レンズの下のLLM / LLM under the Lens
zchenry
0
260
Go with the Prompt Flow
zchenry
0
270
Mojo Dojo
zchenry
0
300
ことのはの力で画像の異常検知 / Anomaly Detection by Language
zchenry
0
780
驚愕の事実!LangChainが抱える問題 / Problems of LangChain
zchenry
0
360
MLOps初心者がMLflowを触る / MLflow Brief Introduction
zchenry
0
240
Other Decks in Technology
See All in Technology
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
230
コーディングできない僕にBobが舞い降りた
shumpei3
0
190
Amazon Bedrock AgentCore の基礎とセキュリティ・ガバナンス
ren8k
0
270
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
180
閉域網でのAPI公開の選択肢全部比較!
takano0131
5
700
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
6k
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
180
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
400
[DBRE Summit 26] DBRE はデータベース運用をどう変えたのか
_awache
0
130
そのイメージ、どのCIが作った? Artifact Attestationsで来歴を固定する / Which CI system created that image? Pinning provenance with Artifact Attestations
chmikata
0
250
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
1
500
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
360
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
600
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Code Reviewing Like a Champion
maltzj
529
40k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
A Soul's Torment
seathinner
9
3.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540