Mattingly "AI & Prompt Design: The Basics of Prompt Design"
BaltimoreNISO
972 views
48 slides
Apr 29, 2024
Slide 1 of 48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
About This Presentation
This presentation was provided by William Mattingly of the Smithsonian Institution, during the third segment of the NISO training series "AI & Prompt Design." Session Three: Beginning Conversations, was held on April 18, 2024.
Size: 924.5 KB
Language: en
Added: Apr 29, 2024
Slides: 48 pages
Slide Content
AI and Prompt Design
The Basics of Prompt Design
1.ChatGPT User Interface
2.What are Hallucinations?
3.What types of Hallucinations are there?
4.Why do they Happen?
5.How can we prevent them?
6.Context
7.Knowledge Bases
Goals
ChatGPT User Interface
Hallucinations
Fredegis of Tours
What are Hallucinations?
What are
Hallucinations?
Types of Hallucinations
1.Contradictory Hallucinations
2.Factual Hallucinations
3.Incoherent Hallucinations
Exercise 1 (10 min): Forcing Hallucinations
Why do Hallucinations Happen?
Why do
Hallucinations
Happen?
Reasons
1.Training Data
2.Temperature
3.Context
Why do
Hallucinations
Happen?
Training Data
●Inaccurate or False Information
●Outdated Information
●Low Diversity of Sources
●Noisy Data
●Misleading or Biased Data
Why do
Hallucinations
Happen?
Inaccurate or False Information
A language model trained on a
dataset containing inaccurately
transcribed historical texts might
replicate these errors. For instance,
if the transcriptions wrongly attribute
a famous quote to the wrong
historical figure, the model may
perpetuate this falsehood in its
responses.
Why do
Hallucinations
Happen?
Inaccurate or False Information
“To have another language is to
possess a second soul.”
-Charlemagne
Why do
Hallucinations
Happen?
Outdated Information
A model trained on data up to 2020
might provide outdated information
about a rapidly evolving field such
as artificial intelligence. For
instance, it could miss the latest
advancements in neural network
architectures introduced after its
last training cut-off.
Why do
Hallucinations
Happen?
Outdated Information
Who won the Stanley cup in 2023?
Why do
Hallucinations
Happen?
Low Diversity of Sources
If a language model is
predominantly trained on data from
English-speaking countries, it might
not perform well in generating
content relevant to non-English
speaking cultures or fail to
adequately represent diverse
perspectives on global issues.
Why do
Hallucinations
Happen?
Low Diversity of Sources
Who was the mayor of Fort Myers
in 2022?
Why do
Hallucinations
Happen?
Low Diversity of Sources
Who was the mayor of
Theewaterskloof in 2022?
Why do
Hallucinations
Happen?
Noisy Data
A dataset filled with typographical
errors, inconsistent use of
terminology, and grammar mistakes
can lead to a model that generates
text with similar errors. This noise in
the training data can compromise
the clarity and professionalism of
the model’s outputs.
Why do
Hallucinations
Happen?
Biased Data
If a model is trained on editorial
content that heavily favors certain
political ideologies over others, it
might generate responses that are
biased toward those viewpoints.
This could skew the model's
neutrality, leading to misleading or
biased outputs when discussing
political topics.
Why do
Hallucinations
Happen?
Biased Data
Who is the best British soccer
team?
Why do
Hallucinations
Happen?
Reinforcement Training Data
Let’s delve in.
Why do
Hallucinations
Happen?
Reinforcement Training Data
Let’s delve in.
Why do
Hallucinations
Happen?
Reinforcement Training Data
Let’s delve in.
https://en.wikipedia.org/wiki/Reinforcement_learning_from_human_feedback
Why do
Hallucinations
Happen?
Temperature
Temperature in the context of
machine learning models like
large language models (LLMs)
doesn't refer to physical heat,
but is rather a metaphor used
to describe a parameter that
affects the randomness or
certainty of the predictions
made by the model.
Why do
Hallucinations
Happen?
Temperature
Low Temperature: This setting
makes the model's responses more
predictable, conservative, or "safe".
The model is more likely to choose
words or phrases that are
commonly associated with the input
prompt, leading to less variety in the
responses but often higher reliability
and coherence.
Why do
Hallucinations
Happen?
Temperature
High Temperature: At a higher
temperature setting, the model's
responses are more varied and
creative. It might generate more
unusual or unexpected responses.
This can make the dialogue more
interesting but also increases the
risk of producing irrelevant or
nonsensical results.
The ____ chased after the car?
Exercise 2 : What else can chase a car?
The dog chased after the car?
The lion chased after the car?
Why do
Hallucinations
Happen?
Context
●Temporal Context
●Factual Context
Exercise 3 : Can Lions speak English?
Who is Michael Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Exercise 4
Who is Michael
Jordan?
Knowledge Bases
Knowledge
Bases
Types of Knowledge Bases
Internal
External