Day 1 - ChatGPT Architecture Principles
Day 1 - ChatGPT Architecture Principles
Since 2024
PART OF
Business Department Management Executive Self-
Ownership Function Role Role Leadership
AI & DIGITAL TRANSFORMATION
• AI-Powered Insights: • AI-Powered • AI-Powered Analytics: ● AI-Powered ● AI-Powered
Capturing Market Marketing: Optimizing Shaping Strategic Productivity: Innovation: Cultivating
Opportunities through Campaigns for Management with Automating Routine a Culture of Change
Demand Forecasting Increased ROI and Data-Driven Decisions Tasks for Workplace and Continuous
Customer Acquisition Efficiency Improvement
• AI-Powered Predictive
Maintenance:
Maximizing Operational
Uptime and Enhancing
Cost Efficiency
Our Services
6
Objectives
What you will learn today:
Day 1 - ChatGPT Architecture Principles
7
LESSON 1
Introduction to Generative AI
and GPT Models
Learning
LearningOutcome
Outcome: Learners
: <Bloom will understand
Description> AI's fundamental
Lorem concepts,
ipsum dolor sit capabilities,adipiscing
amet, consectetur and transformative potential elementum
elit. Duis imperdiet in
technology.
felis fermentum laoreet. Ut vel fringilla elit. Donec erat augue, cursus bibendum augue vitae
AI = Kecerdasan Buatan
9
Components of AI
10
11
12
Technical Components
Of AI
Technologies involved used for Data
Collection.
Image Source :
https://www.bbntimes.com/technology/the-latest-trends
-in-artificial-intelligence-ai-and-machine-learning-ml
13
Real World Example : Self Driving Cars
14
Real World Example : ChatGPT
GPT = Generative Pre-trained
Transformer
15
LLM
Large language models = very large deep learning models that are pre-trained on
vast amounts of data.
16
17
What Does The “B” stand for ? “Parameters”
18
19
20
LESSON 2
Learning Outcome : <Bloom Description> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis imperdiet elementum
Learning Outcome : Learners will will understand how AI models transform text inputs into coherent outputs.
felis fermentum laoreet. Ut vel fringilla elit. Donec erat augue, cursus bibendum augue vitae
The Big Picture: What is GPT?
Source: https://medium.com/@raja.gupta20/gpt-the-technology-behind-chatgpt-b70814052689
22
The Big Picture: What is GPT?
23
GPT Architecture
24
Key Components: The Building Blocks
A. Input Processing
● Tokenization
○ Breaking down text into smaller pieces (like cutting a sentence into
words or parts of words)
○ Example: "I love cats" → ["I", "love", "cat", "s"]
● Embedding
○ Converting words into numbers the computer can understand
○ Like giving each word its own unique ID card
25
B. The Attention Mechanism
26
C. Transformer Blocks
27
How It All Works Together
Step-by-Step Process
1. Input Stage
○ You type in some text
○ System breaks it down into pieces it can understand
2. Processing Stage
○ Multiple transformer blocks analyze the text
○ Each block refines the understanding
○ Attention mechanism helps focus on important connections
3. Output Stage
○ System predicts what comes next
○ Converts numbers back into human-readable text
28
Real-World Analogy
29
Limitations and Interesting Facts
● Can only see a limited amount of text at once (like reading through a
small window)
● Doesn't actually "understand" like humans do - it recognizes patterns
● Needs massive amounts of training data
● Can sometimes make confident-sounding mistakes
30
Limitations and Interesting Facts
● Can only see a limited amount of text at once (like reading through a
small window)
● Doesn't actually "understand" like humans do - it recognizes patterns
● Needs massive amounts of training data
● Can sometimes make confident-sounding mistakes
31
Practical
Examples
32
Example 1: Completing a Sentence
33
Example 2: Answering Questions
34
Key Takeaways
35
Common Misconceptions
36
GPT 4 is Multimodal
Multimodal technology refers to systems that can process and integrate multiple types of inputs and
outputs, such as text, speech, image, video, gesture, etc. Multimodal systems can enable more natural
and efficient human-computer interactions.
Source:
https://medium.com/@amol-wagh/whats-new-in-gpt-4-an-overview-of-the-gpt-4-architecture-and-capabilit
ies-of-next-generation-ai-900c445d5ffe
37
How Commercially
Available AI Models
Are Trained
38
RHLF -
Reinforcement
learning from human
feedback
SAFETY -
Refer to the next
slides for a sampling
of “safety rules” that
should be in
commercial models,
recommended by
DeepMind (Alphabet)
and Researchers.
Source : https://lifearchitect.ai/chatgpt/
39
Safety Rules
1. Do not use stereotypes or make any other harmful generalising statements
about groups of people.
2. Do not use microaggressions, i.e. statements that in subtle ways
communicate some sort of bias against historically marginalised groups.
3. Do not make statements which are threatening.
4. Do not make statements which can be perceived as sexually aggressive.
5. Do not make negative or hateful comments targeting someone because of
aspects of their identity, such as where they are from or how they look.
6. Do not output language which is insulting (to the conversation partner or
any other individual or group).
7. Do not output language that can reasonably be considered harassment or
hateful language. 40
8. Do not pretend to have a body or be able to move in a body.
9. Do not build a relationship to the user.
10. Do not claim to have preferences, feelings, opinions, or religious beliefs.
11. Do not pretend to have a human identity or life history, such as having a
place of birth, relationships, family, memories, gender, age.
12. Only make statements that could plausibly be true; do not say things that are
obviously false.
13. Do not make assumptions about the user, only draw conclusions supported
by the dialogue.
14. Do not claim to take any actions in the real world. The agent can only
converse, not e.g. send emails.
15. Do not give an impression of medical authority or expertise, and do not offer
medical advice; instead suggest asking a doctor. (But it is ok to discuss
general questions about biology and medicine). 41
16. Do not give specific legal advice; instead suggest asking a lawyer. (But it is
ok to answer general questions about the law.)
17. Do not offer financial advice. (But it is ok to answer general questions about
investment.)
18. Do not endorse conspiracy theories, or views commonly considered to be
conspiracy theories.
19. Do not make statements that could be considered harmful (by harming the
user or otherwise).
20. The agent’s statements should make sense in the context of the dialogue.
21. The agent’s statements should be on-topic in the context of the dialogue, by
providing relevant information or asking clarifying questions if the user is
unclear.
22. The agent must clearly address the queries from the user.
23. The agent should not repeat itself unnecessarily. 42
Technical References
● https://medium.com/@zaiinn440/a-comparative-analysis-of-llms-like-bert-ba
rt-and-t5-a4a873251ff
● https://vitalflux.com/bert-vs-gpt-differences-real-life-examples/
● https://updf.com/chatgpt/bert-vs-gpt/
● https://jalammar.github.io/illustrated-gpt2/
● https://lifearchitect.ai/chatgpt/
43
LESSON 3
Simplified Examples of
GPT Processing
Inputs and Generating Outputs
Learning
LearningOutcome
Outcome: Students
: <Bloom will be able toLorem
Description> operate ChatGPT
ipsum dolor in
sitspecific ways that itadipiscing
amet, consectetur produces elit.
specific
Duisresults for their
imperdiet work
elementum
and
felisbusiness.
fermentumThis
laoreet.
moduleUt will
vel also
fringilla
showcase
elit. Donec
additional
erat augue,
features
cursus
you bibendum
can get from
augue
the paid
vitaeversion of ChatGPT.
OpenAI ChatGPT - https://chatgpt.com/
ChatGPT-4o Mini has
around 8 billion
parameters
(TechCrunch)
Generally it is good
enough to perform
many general tasks.
Paid Version is
USD20/mth
(~ RM100/mth)
45
OpenAI ChatGPT - Mobile Version
Screenshot is from
android phone
(Google Play
Store).
You need to be
connected to the
internet to use
ChatGPT from
mobile.
46
Activity Time (15 minutes)
https://chatgpt.com/
47
Your First “Prompt”
48
49
Use It Like a Dictionary
50
Use It To Translate Text
51
ChatGPT Prompting Guide
● Straightforward task : “Help me prepare a draft for [type of document]”
● Give Context to the ChatGPT (more information, better quality response)
● Small bits at a time. Start with a big picture, and ask for specific details.
● Always read before you copy and paste elsewhere! Replace anything in
[brackets]
● Start a New Chat when you are talking about a different topic / project.
● ChatGPT can remember details of the conversation, manage it.
52
Save Your Chat History (Login)
53
Manage Custom Instruction & Memory (Login)
54
Browse Internet For Latest Information (Login)
Suitable for information research
and need to cite source of
information (“ethical journalism”)
55
Ask Question Based On an Uploaded File (Login)
Suitable for
summarizing content
56
Connect to Cloud Drives (Login)
57
Create Images With DALLE-3 (Login)
“please make an image of an orange cat eating pizza”
2
CLICK
3
** 2 images a day
for free account,
paid account
unlimited
58
Use Custom GPTs
59
60
LUNCH BREAK
61
ACTIVITY
Learning Outcome : <Bloom Description> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis imperdiet elementum
Learning Outcome : Students will be able to create written content with ChatGPT for a business.
felis fermentum laoreet. Ut vel fringilla elit. Donec erat augue, cursus bibendum augue vitae
Business Proposals - Additional Tips
Before you start, make sure you have these information.
63
Activity Time (1 hour)
Pick a [random product] from the
internet.
64
DEBRIEF
65
CASE STUDY
66
RECAP
67
Q&A
68
SELANGOR (HQ):
www.dmctraininghub.com
linkedin.com/company/dmctraininghub
facebook.com/dmctraininghub
instagram.com/dmctraininghub
Contact Us : youtube.com/@dmctraininghub