0% found this document useful (0 votes)
29 views

Day 1 - ChatGPT Architecture Principles

This document outlines the offerings of a leading AI and digital transformation consultancy in Malaysia, focusing on enhancing business operations through AI-powered solutions. It includes details about a training course on ChatGPT architecture, covering its principles, components, and practical applications. The document emphasizes the importance of ethical considerations in AI usage and provides insights into the functionalities of AI models, particularly in generating human-like text.

Uploaded by

Shann Daw Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Day 1 - ChatGPT Architecture Principles

This document outlines the offerings of a leading AI and digital transformation consultancy in Malaysia, focusing on enhancing business operations through AI-powered solutions. It includes details about a training course on ChatGPT architecture, covering its principles, components, and practical applications. The document emphasizes the importance of ethical considerations in AI usage and provides insights into the functionalities of AI models, particularly in generating human-like text.

Uploaded by

Shann Daw Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

WELCOME!

NO 1 AI & DIGITAL TRANSFORMATION CONSULTANCY IN MALAYSIA


WE MAKE A DIFFERENCE BY MAKING LIVES BETTER THROUGH
CONSULTING EDUCATION OUTSOURCING
Since 2016

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 Customer • AI-Powered Powered


Entrepreneur:
Experience: Enhancing Cybersecurity:
Harnessing
Engagement & Enhancing Data
Technology for SME
Interaction with Protection & Mitigating
Growth
Chatbots Security Risks

• AI-Powered Cloud • AI-Powered Supply


Solutions: Streamlining Chain Management:
Department Functions Maximizing Efficiency
for Cost Efficiency and Minimizing Wastage

• AI-Powered Predictive
Maintenance:
Maximizing Operational
Uptime and Enhancing
Cost Efficiency
Our Services

BUILD OPERATE TRANSFER


Blueprint to Innovation: Precision Performance: Empowered Independence:
Custom AI & Digital Delivering Seamless AI & Mastery Through
Solutions Digital Solutions Knowledge Transfer
CERTIFIED PROFESSIONAL
TRAINING IN GENERATIVE
AI: GPT ARCHITECTURE
AI
& APPLICATION
DAY 1 - ChatGPT Architecture Principles

NO. 1 AI & DIGITAL TRANSFORMATION CONSULTANCY


About This Course

DAY 1 - ChatGPT Architecture Principles


DAY 2 - Integration and Application Development
DAY 3 - Customizing ChatGPT
DAY 4 - Evaluating and Optimizing Model Performance
DAY 5 - Ethical Considerations and Responsible AI

6
Objectives
What you will learn today:
Day 1 - ChatGPT Architecture Principles

❏ Lesson 1: Introduction to Generative AI and GPT Models

❏ Lesson 2: Basic Components and Functioning of GPT Architecture

❏ Lesson 3: Simplified Examples of GPT Processing Inputs and Generating


Outputs

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.

Methods are Statistic Models

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

Basic Components and


Functioning of GPT Architecture

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?

● Think of GPT as a super-advanced text prediction system


● Similar to your phone's keyboard suggestions, but far more
sophisticated
● Can understand and generate human-like text by learning
patterns from vast amounts of written material

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

● Acts like a smart highlighter


● Helps the system focus on relevant parts of the text
● Example: In "The cat sat on the mat", when processing "sat", it pays
attention to "cat" as the subject

26
C. Transformer Blocks

● The main processing units


● Like a series of filters that each look at the text in different ways
● Stack multiple layers to understand increasingly complex patterns
○ Lower layers: Basic grammar and spelling
○ Middle layers: Context and relationships
○ Upper layers: Abstract concepts and reasoning

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

Think of it like a massive team of readers:

● Some focus on grammar


● Others look for context
● Others check for consistency
● All work together to understand and respond

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

Input: "The weather today is..."


● System breaks down input
● Analyzes patterns from training
● Suggests likely completions ("sunny", "rainy", etc.)

33
Example 2: Answering Questions

Input: "What is the capital of France?"


● System processes question
● Finds patterns matching geography questions
● Returns associated information about Paris

34
Key Takeaways

● GPT is like a pattern-recognition system for text


● Works by breaking down, analyzing, and rebuilding
text
● Uses attention to focus on important connections
● Processes information through multiple layers
● Gets better results with more context

35
Common Misconceptions

● It's not storing answers to every possible question


● Doesn't truly "understand" like humans do
● Not actually "thinking" - following sophisticated patterns
● Can't learn from conversations or create new
knowledge

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/

How ChatGPT Works Technically | ChatGPT Architecture


● https://www.youtube.com/watch?v=bSvTVREwSNw

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.

Apple Users can


also find it on the
Apple App Store.

46
Activity Time (15 minutes)

Please use the desktop browser


for this activity.

Use The Link Below


To Access ChatGPT

https://chatgpt.com/

47
Your First “Prompt”

Ask The Chatbot Something


About Malaysia
(Hint : Try to ask the same question in another language and see what happens!)

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

** You can build


Custom GPT with
Paid Account

59
60
LUNCH BREAK

61
ACTIVITY

Create A Business Proposal


and Email For a Business

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.

● Know your business - what is the name, what you sell


● Make sure ChatGPT knows this information in the prompt.
● Start with an outline, fine tune the details as you go on.
● Write with professional tone / style.
● Appeal to skimmers: Use lots of headlines, subheadings, and short
chunks of text.
● Put in 1 or 2 image that describe your product visually (business logo,
product).

63
Activity Time (1 hour)
Pick a [random product] from the
internet.

Pretend you want to start a business


selling this product and trying to get
people to invest in your business.

Write a business proposal and an


invitation email to attend your
presentation.

64
DEBRIEF

65
CASE STUDY

66
RECAP

67
Q&A

68
SELANGOR (HQ):

Digital Marketing Consultancy Sdn Bhd (1187706-T)


No E-701, Block E, Unit 01, Level 7,
Pusat Dagangan Phileo Damansara 1,
No.9, Jalan 16/11, Off Jalan Damansara,
46350 Petaling Jaya, Selangor, Malaysia

[email protected] (+60) 3 7968 2282

www.dmctraininghub.com

linkedin.com/company/dmctraininghub

facebook.com/dmctraininghub

instagram.com/dmctraininghub

Contact Us : youtube.com/@dmctraininghub

You might also like