Chatgpt Slides
Chatgpt Slides
Time it took selected apps & services to gain one million users
ChatGPT 5 days
Spotify 5 months
Facebook 10 months
Twitter 2 years
Beyond ChatGPT
Coding
Foundation
Behind the
Setup Basic Usage
Scenes
Get The Most Out Of The Course!
At your pace: Use the video Pause & try things on your Ask & answer in the Q&A
player controls own section
How It Works
ChatGPT
based on
GPT LLM
is a Large Language Model
Generative Pretrained Transformer
AI model created & owned by OpenAI A machine learning model that performs
(which, despite the name, isn’t very open) natural language processing (NLP) tasks
ChatGPT can be used via the browser Trained to use probability distributions
over words & sequences of words to
GPT APIs can be used in code generate output
Natural Language Processing
lo How you
H e l
World
are
?
I’m M a x
NLP Model
(e.g., LLM)
What Are LLMs?
1, 2, 3, 4, 5
LLM
The 16th president was Abraham Lincoln
(e.g., GPT)
Prompt Prompt
1, 2, 3, Give me a list of three strengths of ChatGPT. Only use one word each.
Output Output
4 Adaptive, Informative, Responsive
Input 1
Input 2 Output
Input 3
175B
96
Training Data? Everything!
GPT
Tokens Instead Of Words
Tokens / Token IDs are used as inputs for the neural network
Predicting Word By Word Is Not Enough
building a nest
Fine-tuning & Moderation
ChatGPT
Output Prompt
User
ChatGPT Limitations
GPT ChatGPT
Limited to X tokens
(e.g., to 4,000 tokens)
Introduction & General Usage
Getting Started with ChatGPT
Andrew is free from 11 am to 3 pm, Joanne is free from noon to 2 pm and then 3:30 pm to 5 pm.
Hannah is available at noon for half an hour, and then 4 pm to 6 pm. What are some options for start times for
a 30 minute meeting for Andrew, Hannah, and Joanne?
What Should I Use?
* “Prompt Engineering” will be covered in great detail in the next course module
Beware of Hallucinations!
Write & Execute Code Directly in the Retrieve Latest Data by Connecting
Browser. ChatGPT to the Internet.
Prompt Engineering
Writing Good Prompts & Getting What You Want
Examples!
Why Prompt Engineering?
Good Prompts
=
Good Results
Core Prompt Elements
Context
Goal
(Additional Information)
Prompt Elements - A Closer Look
Goal Role
Special Constraint:
Output Format
It’s a chat!
Create a Python code snippet that searches & deletes all .png
2 & .jpg files in a given folder
0 1 N
“Write a tweet that explains the “Write a tweet that explains the
core idea behind ChatGPT. Use a core idea behind ChatGPT. Use a
“Write a tweet that explains the similar tone & structure as I do similar tone & structure as I do
core idea behind ChatGPT.” in my regular tweets. But don’t in my regular tweets. But don’t
use the content. use the content. Here are two
Here’s an example: …” example tweets: …”
Enhance Your Prompts!
Foundation Advanced
Constraints &
Role Goal
Information
“Before answering, I want you to first ask for any extra information
that helps you produce a better answer. If you got no questions,
please provide the answer instead.”
Perspective Prompting
Write a newsletter email that mentions two new posts on your Use Ask-Before-
2 website Answer Prompting
Many more!
Contextual Prompting
Context
Extra information on
cultural, historical, or
situational factors
Context
We need a complete NodeJS REST Set up a basic NodeJS API with the following
API that handles user authentication endpoints …
and then supports di!erent routes
for creating events, reading events, Connect a MongoDB database and set up Event &
deleting events and updating User models
events. All routes except for the
“read events” route should be Add the logic for signing users up & logging users in
protected and only accessible by
authenticated users. Add the logic for handling events
Data must be exchanged formatted
as JSON and stored in a MongoDB Protect the non-read event routes against
database on the backend. unauthenticated access
Let ChatGPT Write Better Prompts
CAN DAN
…
(Code Anything Now) (Do Anything Now)
Boosting Your Social Media Posts, Writing Cover Letters & More
Simplified Structured
(simple prompt) (complex prompt)
Adding Constraints
Target Audience
Article Length
Adding Images
Your Options are Unlimited!
Tutorials
Technology Unlocking the Power of Artificial Intelligence: A Beginner's Guide to Machine Learning
The Ultimate Guide to Cybersecurity: Protecting Your Digital Life in the 21st Century
Fitness & Sports Maximizing Your Endurance: Tips and Tricks for Long Distance Running
Beauty & Fashion Mastering the Art of Contouring: Tips and Tricks for a Flawless Face
Recent Developments Why I Believe the Push for Renewable Energy is More Important Than Ever
Pros & Cons The Great Debate: Is College Education Really Worth the Investment?
What Impacts our Lives? The Dark Side of Social Media: How it's Destroying our Mental Health
The Dangers of Fast Fashion: How Our Addiction to Cheap Clothing is Destroying the Planet
Your Options are Unlimited!
Deep Dives
Historical Developments From Slavery to Freedom: A Historical Journey of the Civil Rights Movement
The Rise and Fall of Empires: Understanding the Historical Significance of Ancient Civilizations
How Technology Evolved From Pong to PlayStation: The Evolution of Video Game Technology
Social & Econ. Research The Hidden Costs of Income Inequality: A Comprehensive Analysis of the Social and Economic
Impacts
The Power of Diversity in the Workplace: Examining the Research on Social and Economic
Benefits
And So Much More!
Adding Constraints
Video Length
Video Footage
Background Music
Copywriting
Emails
Diving Into Midjourney Prompts
Getting Full Control of the Images Created
“Unopinionated”
V5.1
V4 V5
RAW
Detailed Descriptions
Required
“Opinionated”
V5.1
AI Executes Idea Based
on Short Prompts
/imagine prompt photo of an elephant walking through the desert
Define the Basics &
Control the Details of the Output
that Should be Generated
5 Key Areas to Generate Amazing Output
/imagine prompt
Medium /
Subject Setting Background Atmosphere
Art Style
the ocean
cinematic
a photo of a pirate close-up in the
lighting
background
close-up selfie
Setting Perspective
mid-range fish-eye
fullbody panorama
portrait bird-eye view
/imagine
prompt a tiger running through the jungle, close-up, colourful —ar 16:9 —style raw
SEO
Add Images
(incl. Thumbnail)
SEO
Format as Markdown
Non-Developers Developers
Initial Task
(e.g., create a program that renames files)
Execute Program
(ask for help, if needed)
Iterative process until
the program is done
Image
List of hobbies
Building Block 1
Building Block 4
Use ChatGPT to speed up the development of Add more and more features by splitting your
the individual application building blocks requests across multiple prompts
Instead of deriving fancy prompts, consider Report errors & bugs (+ relevant code
performing fine-tuning tasks manually snippets) to ChatGPT to speed up debugging
Instruct ChatGPT to quickly explain & Let ChatGPT refactor code or use ChatGPT to
summarize unfamiliar code get improvement ideas
Don’t Limit Yourself To Just ChatGPT!
Description
It’s a turn-based game where the user (= player) fights a monster (= computer).
During every turn, the player can perform a regular or strong attack or heal.
The strong attack should only be available every three turns. Healing should only be
available every five turns.
After each turn, the monster attacks.
Damage & heal values are calculated randomly.
The first participant to go below 0 health loses.
Both participants start with 100 health.
Once the game is over, the winner should be displayed on the screen and the player should
be asked if a new game should be started.
Enhancing The “Monster Slayer” Game
Description
Add POST /signup & POST / Throw errors & use generic
login routes error handling middleware
ChatGPT API
Response
User Interface
User Interface = Your Website / Application
Request
ChatGPT API
Response
Recommended API Models
Model Sets
GPT-4 GPT-3.5
gpt-4 gpt-3.5-turbo
More Complex Tasks
Limited Beta Access Only
gpt-4-32k
Best Model to Get Started
Token
1 Token ~ 0.75 Words
or 4 Characters
https://platform.openai.com/tokenizer
gpt-4
8,192
gpt-4-32k
32,768
gpt-3.5-turbo
4,096
Python
Package Manager
e.g. pip
Open AI Library
pip install openai
API Endpoints
openai.ChatCompletion.create(
openai.Completion.create( model =“gpt-3.5-turbo”,
model =“text-davinci-003”, messages= [
prompt=“My Prompt”, {“role”: “user”, “content: “My Prompt”}
… ],
) …
)
Building Automated AI Workflows
Just Define The Goal, Not The Steps