Mod2 Planning a Generative AI Project InstructorDeck
Mod2 Planning a Generative AI Project InstructorDeck
Planning a Generative AI
Project
1
Module On completion, you will be able to do
objectives the following:
• Discuss the technical foundations and key
terminology for generative artificial
intelligence (generative AI).
• Explain the steps for planning a
generative AI project.
• Identify some of the risks and mitigations
when using generative AI.
2
Technical foundations and
terminology for generative AI
Generative AI fundamentals
Generative AI in practice
Generative AI context
3
Foundation models
2 5
1 3 4
4
Evolution of ML and the emergence of generative AI
5
How are foundation models created?
6
Pretraining
7
Components of FMs
Unlabeled data Large model
• Easier to obtain compared to • Billions of parameters
labeled data
• Pretraining models of this
• Pretraining models take size requires access to:
context into account from all • Sufficient quantity and quality of
of this training data training data
• Tracks the relationships in • Large-scale training
sequential data infrastructure
8
How does this unlabeled data get
processed?
9
Transformer The transformer architecture is a type
of neural network that is efficient, easy
to scale and parallelize, and can model
interdependence between input and
output data.
10
Transformer Benefits of transformers include the
benefits following:
• Memory efficient and can be trained
in parallel on GPUs
• Retain and use information about
meaning and position
• Pay attention to multiple things at
once, in different ways
11
Technical foundations and
terminology for generative AI
Generative AI fundamentals
Generative AI in practice
Generative AI context
12
A puppy is to dog as kitten is to…
13
How a transformer model completes a sentence
Tokenization
Word
and Decoding Outputs
embedding
encoding
14
Tokenization and encoding
pupp kitte
[CLS] A is to dog as is to [SEP]
y n
1702 1840
101 1037 2003 2000 3899 2004 2003 2000 102
2 1
15
Word embedding
16
Words with similar meaning are
located closer to each other in this
vector space.
17
Decoder A puppy is to dog as kitten is to_______.
cat 9.2
bird 5.5
bear 4.7
human 3.7
18
Output
19
Technical foundations and
terminology for generative AI
Generative AI fundamentals
Generative AI in practice
Generative AI context
20
Context Context is a private exchange between
the user and the model.
• It does not persist.
• There is an upper limit on the number
of tokens.
• Initial information the model is using
can be lost.
21
Example The transformer model has to figure out what
this refers to in the context of the current
conversation.
Prompt (Turn 1)
Response:
Response:
23
Question 1
What is the term for a Choice Response
24
Question 1 answers
What is the term for a Choice Response
25
Planning a generative AI project
Steps in planning a generative AI
project
26
Planning a generative AI project
27
Step 1: Define the scope
28
Long-term and Assess the long-term and short-term
short-term impacts that each solution provides.
impacts • What are the trade-offs of having
faster development cycles for your
developers?
• What about implementation time of
the solutions?
29
Step 2: Select a model
31
Step 3: Adapt the model
33
Activity Chatbot example
Apply the four-step framework:
1. What is the scope?
2. Would you use a pretrained model, or fine-
tune a pre-existing model?
3. Would you use prompt engineering or fine-
tuning a continuation of pretraining?
4. When using the model, what would you
consider?
34
Evaluating the use of
generative AI for your project
Risks and mitigation
35
Evaluating the • Not all problems can or should be
use of solved by generative AI.
generative AI • Take into account the risks of using
generative AI, including whether or
not those risks can be mitigated.
36
Generative AI considerations
Fairness Privacy
37
Concerns of generative AI
39
Module You should now be able to do the
summary following:
• Discuss the technical foundations and
key terminology for generative AI.
• Explain the steps for planning a
generative AI project.
• Identify some of the risks and
mitigations when using generative AI.
40