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
コードや知識を組み込む / Incorporate Code and knowledge
Search
Kenji Saito
PRO
April 27, 2024
Technology
0
260
コードや知識を組み込む / Incorporate Code and knowledge
早稲田大学大学院経営管理研究科「プロンプトエンジニアリング ─ 生成AIの応用」2024 春の第5-6回で使用したスライドです。
Kenji Saito
PRO
April 27, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
P 値と有意差/分散分析 / P-value, Significant Difference and Analysis of Variance
ks91
PRO
0
29
関連2群のt検定/独立2群のt検定 / Related 2-group t-test and independent 2-group t-test
ks91
PRO
0
51
A Guide to Paper Writing Support with Generative AI - A Joint Zemi
ks91
PRO
0
9
正規分布と簡単な統計理論/t分布と信頼区間 / Normal distribution, simple statistical theory, t-distribution and confidence intervals
ks91
PRO
0
43
じわじわ迫ってきている自動化社会 (その先にメタ・ネイチャー) / The Slowly Approaching Automated Society (and its beyond: Meta-Nature)
ks91
PRO
0
6
起こりうる誤った推論/平均・分散・標準偏差・自由度 / Possible false inferences, means, variances, standard deviations and degrees of freedom
ks91
PRO
0
59
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
23
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
12
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
13
Other Decks in Technology
See All in Technology
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
3
700
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
570
クレカ・銀行連携機能における “状態”との向き合い方 / SmartBank Engineer LT Event
smartbank
3
120
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
230
Qiita埋め込み用スライド
naoki_0531
0
5.4k
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
350
Fearsome File Formats
ange
0
440
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
480
MasterMemory v3 最速確認会
yucchiy
0
260
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
200
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
130
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
39k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
182
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Cost Of JavaScript in 2023
addyosmani
46
7k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Adopting Sorbet at Scale
ufuk
74
9.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
140
How to train your dragon (web standard)
notwaldorf
88
5.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Transcript
Generative, Volatile, Uncertain, Complex and Ambiguous — generated by Stable
Diffusion XL v1.0 — AI 2024 5-6 (WBS) 2024 5-6 — 2024-04-29 – p.1/57
https://speakerdeck.com/ks91/collections/prompt-engineering-2024-spring 4/29( ) Discord # 4/29( ) ( ID )
(Zoom) 2024 5-6 — 2024-04-29 – p.2/57
. . . name, description, instructions Discord ( ) (
) : name 2024 5-6 — 2024-04-29 – p.3/57
( ) 1 4 15 LLM • 2 4 15
• 3 4 22 I • 4 4 22 • 5 4 29 • 6 4 29 • 7 5 13 8 5 13 9 5 20 II 10 5 20 (1) 11 5 27 (2) 12 5 27 (3) 13 6 3 & 14 6 3 & W-IOI 2024 5-6 — 2024-04-29 – p.4/57
( 20 ) 1 • 2 • 3 Discord &
• 4 • 5 • 6 RPG • 7 “September 12th” • 8 9 10 ∼ 11 Linux (Windows )(Mac ) 12 Open Interpreter ∼ 13 14 AGI (Artificial General Intelligence) 7 (5/6 ) / (2 ) OK / 2024 5-6 — 2024-04-29 – p.5/57
( ) . . . 10∼20 · ( ) ·
. . . ( ) I AI 2024 5-6 — 2024-04-29 – p.6/57
( ) code interpreter open interpreter file search ( )
2024 5-6 — 2024-04-29 – p.7/57
2024 5-6 — 2024-04-29 – p.8/57
2. (1) AI (2) 2024 4 25 ( ) 23:59
JST ( ) Waseda Moodle 2024 5-6 — 2024-04-29 – p.9/57
. . . . . . 57(+2) 48(+1) ( )
( ) . . . ( ) AI ( ) 2024 5-6 — 2024-04-29 – p.10/57
T T Moodle ⇒ ( ) . . . 2024
5-6 — 2024-04-29 – p.11/57
T GPT ⇒ . . . ^^; 2024 5-6 —
2024-04-29 – p.12/57
I AI ⇒ ( ) ( Zoom) ( Zoom) 2024
5-6 — 2024-04-29 – p.13/57
S ( ) ⇒ ( ) ( ) 2024 5-6
— 2024-04-29 – p.14/57
A GPT GPT GPT Generative AI ⇒ ( ) ^^;
AI ( ) 2024 5-6 — 2024-04-29 – p.15/57
M GPTs ⇒ 2024 5-6 — 2024-04-29 – p.16/57
K ⇒ develop 2024 5-6 — 2024-04-29 – p.17/57
F AI AI ChatGPT GPTs A A GPTs B ⇒
Assistant API ( ) ( ) gptbot GPTs ( ) 2024 5-6 — 2024-04-29 – p.18/57
I ? ⇒ . . . <(_ _)> 2024 5-6
— 2024-04-29 – p.19/57
H ID thread_id /chat thread_id:XXXXXXXX assistant_id None ⇒ assistant_id Discord
2024 5-6 — 2024-04-29 – p.20/57
M ⇒ 2024 5-6 — 2024-04-29 – p.21/57
O ( ID AI) ⇒ 2024 5-6 — 2024-04-29 –
p.22/57
M ⇒ /show # 2024 5-6 — 2024-04-29 – p.23/57
U Description Instructions Instructions ⇒ description (name ) name description
2024 5-6 — 2024-04-29 – p.24/57
N GPTs Code Interpreter GPT GPTs GPT GPTs ⇒ function
calling ( ) 2024 5-6 — 2024-04-29 – p.25/57
M “ ” 2 ⇒ 1 : ( ) 2
: ( ) 3 : ( ) 4 : ( ) ( ) 2024 5-6 — 2024-04-29 – p.26/57
P 1 ⇒ 0 1 1 AI 2024 5-6 —
2024-04-29 – p.27/57
I ⇒ DAIR.AI. 2023. Prompt Engineering Guide. https://www.promptingguide.ai 2024 5-6
— 2024-04-29 – p.28/57
Y 1 2 3 1 ⇒ 1 2 2024 5-6
— 2024-04-29 – p.29/57
S GPT GPT ⇒ 2024 5-6 — 2024-04-29 – p.30/57
( ) ← 2024 5-6 — 2024-04-29 – p.31/57
( ) 2024 5-6 — 2024-04-29 – p.32/57
: ɾ ࣌ܭͷετοϓΥονػೳ ɹͷ͍ํͰ͢ ɾ ϘλϯΛԡ͢ͱɺ ঢ়ଶ͕มΘΔ ɹ༷ࢠΛඳ͍͍ͯ·͢ ɾ ঢ়ଶʹԠͯ͡ɺ
Ϙλϯ ɹҧͬͨҙຯΛ࣋ͪ·͢ ܭଌΛ࢝Ί·͢ ͕࣌ؒܦա ͕࣌ؒܦա ܭଌΛετοϓ ͠·͢ ϥοϓλΠϜ Λදࣔ͠·͢ ϥοϓλΠϜ ΛΫϦΞ͠·͢ ܭଌΛετοϓ ͠·͢ ܭଌΛ࠶։ ͠·͢ ܭଌΛ࠶։ ͠·͢ Ϧηοτ͠·͢ ա ܭଌத ϥοϓλΠϜ ϥοϓλΠϜ ܭଌ ࣌ؒ ج४࣌ؒ ϥοϓλΠϜ ΛΫϦΞ͠·͢ run : A ( )→ B ( ) → B ( )→ A ( ) → B ( ) 2024 5-6 — 2024-04-29 – p.33/57
( 3 ) (1) /chat assistant_id: asst_OUIhymbGuI1siXVaLs7evkaJ — (2) /chat
search: (2) /build name: ( ) ( ) ( ) ( ) — /update ID (3) /chat assistant_id: ID — 3 2024 5-6 — 2024-04-29 – p.34/57
( ) /chat assistant_id asst_OUIhymbGuI1siXVaLs7evkaJ 2024 5-6 — 2024-04-29 –
p.35/57
(/build ) /build name: description ( ) instructions ( )
( ) code interpreter 2024 5-6 — 2024-04-29 – p.36/57
/build EFTDSJQUJPO આ໌ ʁ ਓؒͷ ͨΊͷ ͍આ໌Λ ॻ͘ ϓϩϯϓτ
Λॻ͘ Ξγελϯτʹ ໊લΛ͚Δ &OBCMFPS %JTBCMF :FT /P ϑΝΠϧ ܈Λ·ͱ Ίͯυϩ οϓ͢Δ &OBCMFPS %JTBCMF͔ͭ 'JMFT༗ޮ %JTBCMF͔ͭ 'JMFTແޮ JOTUSVDUJPOT ࢦࣔ ʁ 'JMFT ϑΝΠϧ ಡΈࠐΈ ༗ޮʁແޮʁ $PEF*OUFSQSFUFS ϓϩάϥϜͷ ੜɾ࣮ߦ ༗ޮʁແޮʁ ϑΝΠϧΛ Ճ͢Δʁ ϑΝΠϧͪ Ξγελϯτ ੜྃ 2024 5-6 — 2024-04-29 – p.37/57
(/update ) /update assistant_id: ID “.” ( ) 2(3?) GPTs
/update (/build 1 ) 2024 5-6 — 2024-04-29 – p.38/57
/update EFTDSJQUJPO આ໌ ʁ ਓؒͷ ͨΊͷ ͍৽͍͠ આ໌Λॻ͘ มߋ͠ͳ͍
ͳΒlz Λଧͭ มߋ͠ͳ͍ ͳΒlz Λଧͭ ৽͍͠ ϓϩϯϓτ Λॻ͘ Ξγελϯτ *% Λ ࢦఆ͢Δ &OBCMFPS %JTBCMF :FT :FTPS /P /P ϑΝΠϧ ܈Λ·ͱ Ίͯυϩ οϓ͢Δ &OBCMFPS %JTBCMF͔ͭ 'JMFT༗ޮ %JTBCMF͔ͭ 'JMFTແޮ JOTUSVDUJPOT ࢦࣔ ʁ 'JMFT ϑΝΠϧ ಡΈࠐΈ ༗ޮʁແޮʁ $PEF*OUFSQSFUFS ϓϩάϥϜͷ ੜɾ࣮ߦ ༗ޮʁແޮʁ ࠓ͋ΔϑΝΠϧ Λอ࣋͢Δʁ ϑΝΠϧΛ Ճ͢Δʁ ϑΝΠϧͪ Ξγελϯτ ߋ৽ྃ 2024 5-6 — 2024-04-29 – p.39/57
Ϗϧμʔͱ͢ εϨου ૬ஊ͢Δ ର͢Δ ͪΐͬͱ ҧ͏ͳ ςΩετνϟϯωϧ ͔Β %JTDPSE͔Βίϐʔͨ͠ ༰ΛϝϞாͰ
ฤूͯ͠ ίϐϖ͢Δͱ Α͍͔ ˣ ߋ৽εϨου͔Β ςΩετνϟϯωϧ ͔Β ςΩετνϟϯωϧ ͔Β Α͠ࢼͯ͠ΈΑ͏ ॳճDIBU DIBU ॳճ CVJME ߋ৽ VQEBUF આ໌ ࢦࣔΛ ೖྗ͢Δ ΞγελϯτΛ࡞Γ ߋ৽͢ΔεϨου ΞγελϯτΛ ࢼ͢εϨου 2024 5-6 — 2024-04-29 – p.40/57
(1/2) ([ ] ) /build name: ( Discord ) /chat
[assistant_id: ID][thread_id: ID] [search: ] ( Discord ) ID Discord 20 /delete assistant_id: ID ID 2024 5-6 — 2024-04-29 – p.41/57
(2/2) ([ ] ) /list [offset: ][max: ] [search: ]
( ) 20 ( 0) 1 1,500 /show assistant_id: ID 1 1,500 /update assistant_id: ID ( Discord ) /build 2024 5-6 — 2024-04-29 – p.42/57
( ) /update /build 2024 5-6 — 2024-04-29 – p.43/57
code interpreter open interpreter 2024 5-6 — 2024-04-29 – p.44/57
( ) ( ) ( ← ChatGPT ) (Python )
( ) API (Application Programming Interface) ( ) 2024 5-6 — 2024-04-29 – p.45/57
Code Interpreter GPT (Python) ҧ͍Ͳ͜ʹʁ : asst_8cOUcKMZHWImBFOzv38gxANR : asst_QxUkyrymu9It05FV0ZQYFwk6 2024
5-6 — 2024-04-29 – p.46/57
1 ∼ 14 Discord OK 10 2024 5-6 — 2024-04-29
– p.47/57
Code Interpreter ( 22 ∼ ) https://www.pref.chiba.lg.jp/kenshidou/toukeidata/kakushukousei/documents/r01tfr_hyou1.xlsx 22 ∼ 58
59 ∼ . . . CSV ( ) code interpreter enable ( Open Interpreter ) <(_ _)> OpenAI Assistant API v1 v2 2024 5-6 — 2024-04-29 – p.48/57
Open Interpreter Code Interpreter (CLI ) CLI : Command Line
Interface UNIX Python R Javascript ( ) ( Linux (Ubuntu Desktop) ) 2024 5-6 — 2024-04-29 – p.49/57
Open Interpreter $ python3 -m venv oi [Python ] $
source oi/bin/activate [Python ] (oi) $ pip install -U pip [ ] (oi) $ pip install open-interpreter [Open Interpreter ] (oi) $ interpreter --model gpt-4-turbo-preview [Open Interpreter ] [ 1] > 1 100 [ 2] > 1 : Python 2 : 2024 5-6 — 2024-04-29 – p.50/57
A X M. MIT 2013 LEGO X A A X
A X X X (2013 ) ⇒ 10 Open Interpreter A . . . 1 2024 5-6 — 2024-04-29 – p.51/57
file search ( ) . . . /build /update 2024
5-6 — 2024-04-29 – p.52/57
File Search (1) GPT transformer.pdf: gpt1.pdf: GPT gpt2.pdf: GPT-2 gpt3.pdf:
GPT-3 gpt4.pdf: GPT-4 how-assistants-work.pdf: OpenAI Assistant API 22:0 source 1:1 GPT GPT (10 ) 2024 5-6 — 2024-04-29 – p.53/57
File Search (2) Files enable & ( ) (10 )
2024 5-6 — 2024-04-29 – p.54/57
2024 5-6 — 2024-04-29 – p.55/57
3. (1) name, description, instructions (tutor) ( ): https://ja.wikipedia.org/wiki/ /update
/delete (2) 2024 5 9 ( ) 23:59 JST ( ) Waseda Moodle 2024 5-6 — 2024-04-29 – p.56/57
( ) 2024 5-6 — 2024-04-29 – p.57/57