Build Your Own ChatGPT Presentation
Build Your Own ChatGPT Presentation
Alyssa Hwang
1
ChatGPT became a public phenomenon…
chat.openai.com 2
…in large part because of its interface.
chat.openai.com 3
So let’s make our own.
4
This tutorial has two main parts.
5
This tutorial has two main parts.
🤖Overview of GPT-3
6
This tutorial has two main parts.
🤖Overview of GPT-3
🔍
Design Critique
7
This tutorial has two main parts.
🤖Overview of GPT-3
🔍 Design Critique
👩💻 Code Examples
Codebase | Fine-Tuning Notebook
8
GPT-3 is the brain of our chatbot.
🤖 👩💻
9 🤖🔍
You can use GPT-3 by giving it a prompt.
prompt completion
The following is a
conversation with an AI
persona. The AI is a dog.
I'm good, how are you?
👩💻: Hi, how are you?
🤖:
The following is a
conversation with an AI
persona. The AI is a dog.
The following is a
conversation with an AI
persona. The AI is a dog.
prompt
✨
completion
🤖🔍
Learning to Speak and Act in a Fantasy Text Adventure Game (Urbanek et al., EMNLP-IJCNLP 2019)
OpenAI logo from openai.com 17
Fine-tuning can help if prompting isn’t enough.
🧙: ... \n
🤖🔍
Learning to Speak and Act in a Fantasy Text Adventure Game (Urbanek et al., EMNLP-IJCNLP 2019)
OpenAI logo from openai.com 18
Fine-tuning can help if prompting isn’t enough.
🤖🔍
Learning to Speak and Act in a Fantasy Text Adventure Game (Urbanek et al., EMNLP-IJCNLP 2019)
OpenAI logo from openai.com 19
See the results for yourself!
Wizard Persona without Fine-Tuning Wizard Persona with Fine-Tuning
👩💻: Hi, what are you doing? 👩💻: Hi, what are you doing?
🤖: I am casting a spell. 🤖: Just practicing my spells.
👩💻: What kind of spell? 👩💻: What kind of spells?
🍰? 🤖: I am casting a spell to make a cake. 🤖: Mostly what I learned from my master.
👩💻: Why? 👩💻: What is your favorite spell?
🤖: I want to make a cake because I am hungry. 🤖: I really like the one that turns everything into gold. 👑!
👩💻: What kind of job do you have? 👩💻: Why?
🤖: I am a wizard. 🤖: It's just my favorite.
👩💻: Tell me how to cast a spell. 👩💻: What job do you have?
🥣? 🤖: First, you have to gather some ingredients. You need 🤖: I am a wizard, I make gold and cast spells.
sugar, our, eggs, and butter. Then, you have to mix 👩💻: Tell me how to cast a spell.
the ingredients together. After that, you have to cook 🤖: First you must have a wand, and then you must 🪄!
the cake in a pan. After that, you have to frost it with remember your name.
frosting. 👩💻: Then what?
👩💻: Then what?
🤖: Then you must say the spell.
🤖: You have to eat the cake.
20 🤖🔍
fl
Fine-tuning is straightforward with the API.
https://openai.com/blog/openai-api 21 🤖🔍
Fine-tuning is straightforward with the API.
1 Create a JSON lines le with your ne-tuning data.
{
prompt: "The following is a conversation between mice and knight.",
completion: “mice: Can you spare some cheese?\nknight:I would love to give you some cheese ... ###”
}
...
https://openai.com/blog/openai-api 22 🤖🔍
fi
fi
Fine-tuning is straightforward with the API.
1 Create a JSON lines le with your ne-tuning data.
https://openai.com/blog/openai-api 23 🤖🔍
fi
fi
fi
fi
fi
Fine-tuning is straightforward with the API.
1 Create a JSON lines le with your ne-tuning data.
24 🤖🔍
fi
fi
fi
Now, how do we interact with GPT-3?
🤖 👩💻
hi!
25 🤖🔍
Human-centered design focuses on…
How do I gure out
👩💼
what I can do with
this interface?
discoverability
+
understanding
🔎
👩💼
discoverability
mean?
+
understanding
🔎
👩💼
making their a ordances
discoverable through
signi ers and feedback.
🔎
a ordance
📷
The Design of Everyday Things. Donald A. Norman, 1988. 29 🤖🔍
ff
A signifier tells the user about an affordance.
👩💼 📷 🔎
👩💼 📸
🔎
Ability-based design
de nes ability as “the
possession of the
means or skill to do
something.”
🤖🔍
“Pointing, hand, cursor Icon” by Luc Chaissac from https://icon-icons.com/icon/pointing-hand-cursor/100160
Ability-Based Design (Wobbrock et al., Communications of the ACM 2018) 35
fi
Ability has a source…
internal external
ephemeral long-lasting
🤖🔍
“Pointing, hand, cursor Icon” by Luc Chaissac from https://icon-icons.com/icon/pointing-hand-cursor/100160
Ability-Based Design (Wobbrock et al., Communications of the ACM 2018) 36
↔︎
↔︎
…and a duration.
internal external
ephemeral long-lasting
🤖🔍
“Pointing, hand, cursor Icon” by Luc Chaissac from https://icon-icons.com/icon/pointing-hand-cursor/100160
Ability-Based Design (Wobbrock et al., Communications of the ACM 2018) 37
↔︎
↔︎
Designing for a wider range of
abilities, regardless of context,
leads to more usable systems for
everyone.
💪🦾
38 🤖🔍
Let’s evaluate our chatbot.
$("#textInput").keypress(function (e) {
if (e.which == 13 && $("#textInput").val().length > 0) {
getResponse();
}
});
$("#send").click(function () {
if ($("#textInput").val().length > 0) {
getResponse();
}
});
$("#textInput").keypress(function (e) {
if (e.which == 13 && $("#textInput").val().length > 0) {
getResponse();
}
});
$("#send").click(function () {
if ($("#textInput").val().length > 0) {
getResponse();
}
});
💭 💬
👩🔧 🤖
Heuristic Evaluation of Conversational Agents (Langevin et al., CHI 2021) 47 🤖🔍
🆗 Context Preservation
function getResponse() {
...
var output = JSON.parse(botReplyJSON);
var botReply = output.response;
if (!output.success) {
botHTML.style.backgroundColor = "yellow";
}
$("#chatbox").append(botHTML);
var chatbox = document.getElementById('chatbox');
chatbox.scrollTop = chatbox.scrollHeight;
…
}
function getResponse() {
...
var output = JSON.parse(botReplyJSON);
var botReply = output.response;
if (!output.success) {
botHTML.style.backgroundColor = "yellow";
}
$("#chatbox").append(botHTML);
var chatbox = document.getElementById('chatbox');
chatbox.scrollTop = chatbox.scrollHeight;
…
}
💬
🤖
Amazon Echo Dot image courtesy of Home Depot 56
Thank you for listening!
Questions + Discussion
🙋
Ask me about
GPT-3, design,
or my chatbot!
57