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
明日から使える! プロンプトエンジニアリングのテクニック集
Search
Akira Sato
November 01, 2024
Technology
13
0
Share
明日から使える! プロンプトエンジニアリングのテクニック集
今すぐ試せる!生成AI LT大会 〜旬のトピックをさっと習得〜にて登壇した内容です。
https://tech-lab.connpass.com/event/334890/
Akira Sato
November 01, 2024
More Decks by Akira Sato
See All by Akira Sato
OpenAI Serviceの利用料金を細かく見える化するツール作ってみた
satodayo
0
140
MS Ignite 2025で発表されたFoundry IQをRecap
satodayo
3
430
AI Red Teaming Agentのご紹介
satodayo
0
140
そのアクセス層の変更本当にお得ですか?
satodayo
0
17
Difyの実行環境について
satodayo
0
22
CosmosDBのベクトル検索をご紹介
satodayo
0
16
AI技術で簡単にPDFや画像の文字起こし! 「AI Document Intelligence」の紹介
satodayo
0
16
Other Decks in Technology
See All in Technology
Modernizing Your HCL Connections Experience: Visual Report to chain, Profile Enhancements, and AI Integration
wannesrams
0
300
サービスの信頼性を高めるため、形骸化した「プロダクションミーティング」を立て直すまでの取り組み
stefafafan
1
260
鹿野さんに聞く!CSSの最新トレンド Ver.2026
tonkotsuboy_com
6
2.9k
カオナビに Suspenseを導入するまで / The Road to Suspense at kaonavi
kaonavi
1
450
Vision Banana: Image Generators are Generalist Vision Learners
kzykmyzw
0
360
変化の激しい時代をゴキゲンに生き抜くために 〜ストレスマネジメントのススメ〜
kakehashi
PRO
5
1.3k
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
220
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
320
20260507-ACL-seminar
satoshi5884
0
110
Every Conversation Counts
kawaguti
PRO
0
210
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
0
230
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
410
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
540
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
420
How to Ace a Technical Interview
jacobian
281
24k
Building Applications with DynamoDB
mza
96
7k
Design in an AI World
tapps
1
210
We Are The Robots
honzajavorek
0
220
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
540
Everyday Curiosity
cassininazir
0
200
The Pragmatic Product Professional
lauravandoore
37
7.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Exploring anti-patterns in Rails
aemeredith
3
350
Context Engineering - Making Every Token Count
addyosmani
9
870
Transcript
© SIOS Technology Inc. All rights Reserved. 明日から使える! プロンプトエンジニアリングのテクニック集 佐藤
陽 サイオステクノロジー株式会社
© SIOS Technology Inc. All rights Reserved. 自己紹介 2 佐藤
陽 / Sato Akira サイオステクノロジー株式会社 Professional Service SL in 静岡 仕事 Azureクラウド構築 生成AIを活用したアプリ開発 ブログ執筆 / 外部登壇 趣味 運動(ロードバイク/ランニング) 音楽(FUJI ROCK FESTIVAL) 読書(森博嗣/有栖川有栖) @satodayo1115
© SIOS Technology Inc. All rights Reserved. 今日の目的 ▪ プロンプトエンジニアリングとは何かを知る
▪ 明日から使えるテクニックを習得する ▪ 生成AIを明日から少しだけ有益に使えるようになる 3
© SIOS Technology Inc. All rights Reserved. 4 プロンプトとは
© SIOS Technology Inc. All rights Reserved. プロンプトとは 5 gpt-4o
日本の首都はどこですか? 東京です プロンプト≒質問
© SIOS Technology Inc. All rights Reserved. 6 プロンプトエンジニアリングとは
© SIOS Technology Inc. All rights Reserved. プロンプトエンジニアリングとは 7 AIに聞いてみよう
© SIOS Technology Inc. All rights Reserved. プロンプトエンジニアリングとは? 8 回答分かりづらいなぁ
gpt-4o
© SIOS Technology Inc. All rights Reserved. プロンプトエンジニアリングとは? 9 gpt-4o
納得! プロンプトエンジニアリング
© SIOS Technology Inc. All rights Reserved. プロンプトエンジニアリングとは? 10 あなたは小学校の教師です。
- 小学生にもわかるようにプロンプトエンジニアリングについて解説してください。 - 物腰やわらかい口調で回答してください。 - 回答内容は100文字以内で収まるようにしてください。 プロンプトエンジニアリングとは何ですか? プロンプトエンジニアリングは、AIに質問するための上手な言葉の使い方です。 質問を工夫することで、AIから良い答えを引き出すことができます。 プロンプトエンジニアリングを適用
© SIOS Technology Inc. All rights Reserved. 今日紹介するテクニック集 ▪ システムメッセージ
▪ Few-shot Learning ▪ Chain-of-Though(CoT) 11
© SIOS Technology Inc. All rights Reserved. 12 システムメッセージ
© SIOS Technology Inc. All rights Reserved. システムメッセージ 質問を投げかける前に、AIに対して ▪
Role(役割)を与える ▪ 回答に対して制約事項を設ける etc. 13
© SIOS Technology Inc. All rights Reserved. システムメッセージ 14
© SIOS Technology Inc. All rights Reserved. システムメッセージ 15 優しい
© SIOS Technology Inc. All rights Reserved. システムメッセージ 16 厳しい…
© SIOS Technology Inc. All rights Reserved. システムメッセージ 17 「回答させない」といった指示も可能
© SIOS Technology Inc. All rights Reserved. システムメッセージ ポイント ▪
求める回答に近づくよう、いかに上手く誘導するか ▪ 「回答させないこと」も可能 ▪ 可能性は無限大! ▪ システムメッセージを長くすることで 品質向上が期待できる一方、コストも増加する 18
© SIOS Technology Inc. All rights Reserved. 19 Few-shot Learning
© SIOS Technology Inc. All rights Reserved. Few-shot Learning 質問を投げかける前に、AIに対して
▪ いくつかの回答と質問の例(shot) を提示することでその場で学習させる 20
© SIOS Technology Inc. All rights Reserved. Few-shot Learning 21
例(=shot)
© SIOS Technology Inc. All rights Reserved. Few-shot Learning 22
© SIOS Technology Inc. All rights Reserved. Few-shot Learning 23
例(Shot)無し Zero-shot Learning 例が1つ One-shot Learning 例が2つ Two-shot Learning …とはあまり呼ばない気がします 2以上:Few-shot Learning
© SIOS Technology Inc. All rights Reserved. Few-shot Learning ポイント
▪ 例を与える事でその場でAIが学習して回答する ▪ 例を多く与えることで品質向上が 期待できる一方、コストも増加する 24
© SIOS Technology Inc. All rights Reserved. Few-shot Learning 25
© SIOS Technology Inc. All rights Reserved. 26 Chain-of-Though(CoT)
© SIOS Technology Inc. All rights Reserved. CoT 質問から回答に至るステップをAIに提示する →複雑な問題に対しても回答できる
27
© SIOS Technology Inc. All rights Reserved. CoT 28 A
さんには 2 人の弟がいます。 A さんは 10 個のたこ焼きを作って、 弟にそれぞれ 4 個ずつあげました。 追加で 20 個作って、弟に 5 個ずつ、 自分で 5 個食べました。 たこ焼きは残り何個ですか? 10個 – (4個/人 × 2人) + 20個 – (5個/人 × 2人) – 5個 = 7個
© SIOS Technology Inc. All rights Reserved. CoT 29 不正解!
Model:GPT35-Turbo
© SIOS Technology Inc. All rights Reserved. CoT 30 思考のプロセスを提示
正解!
© SIOS Technology Inc. All rights Reserved. Zoro-Shot CoT 31
正解! Give GPTs time to “think”
© SIOS Technology Inc. All rights Reserved. CoT 32 Model:GPT4o
(CoT無し) 正解!
© SIOS Technology Inc. All rights Reserved. CoT ポイント ▪
思考のプロセスを提示することで 生成AIがそのプロセスに従い回答を行う ▪ 生成AIに対して「よく考えてください」と伝える だけでも効果あり(Zero-shot CoT) ▪ 最近のModelならCoT要らないかも? 33
© SIOS Technology Inc. All rights Reserved. まとめ ▪ プロンプトエンジニアリングのテクニックを紹介
▪ システムメッセージ ▪ Few-shot Learning ▪ CoT ▪ そもそも最近の生成AIは頭が良い ▪ 凝ったプロンプトを投げなくても それなりに高い精度で回答してくれる ▪ 求める品質とコストのトレードオフを検討する 34
None