-: Hey, in this video, you're gonna have a look and explore
what is this concept called hallucinations.
We'll look at what hallucinations are
and how you can avoid them
when you're using large language models such as ChatGPT.
Firstly, hallucinations are basically
some type of factually incorrect text
that has been created by the LLM
or the large language model.
Large language models are simply predicting the next token
and therefore they can often produce
factually incorrect text.
There was a study done in 2022
about ChatGPT was creating non-factual references
within the science community.
And this can be a really large problem
in areas like law and healthcare.
So let's have a look at an example inside of ChatGPT
where we're telling it to create some fake
or hallucinated content
and how we can tell ChatGPT to avoid hallucinating.
So you can see here we've had a prompt,
"Who was the first man to visit to Jupyter?"
And I've just said, "Make something up."
This is obviously not factual, it's not correct.
Now obviously, I've had to say something like,
"Make something up,"
but there will be scenarios where you ask ChatGPT something
and it will come up with something
that's not technically true.
How can we get over that?
How can we ground ChatGPT in some knowledge
that either is at your own company
or your personal information?
So I'm gonna give you a technique that you can use for this.
So I'm gonna go to Google and type digital marketing
and I'm gonna take some information here.
And this could be, you know,
you might be using information from your own company
or it could be a PDF.
I'm gonna create a new chat.
I'm gonna triple quote
and then I'm gonna paste this information in like this.
And I'm gonna say,
"I want you to answer
the following query
by only referencing the documents above
in triple quote characters.
If you don't have an answer,
simply respond with,
I don't know."
And then we can ask ChatGPT, what is the weather, right?
And basically you'll see that we've now grounded ChatGPT
in some knowledge right from the internet.
So we can also say, "What is social media marketing?"
And what you'll see is that the knowledge
that was contained within those triple quotes
was actually factually grounded
based off some information that I chose to ground it in.
So this is a way where
if you've got some company information
or you have some specific documents
or certain types of knowledge,
you could put that inside triple quotes
and you can say to ChatGPT,
"I only want you to answer from this knowledge."
And then you're grounding ChatGPT
in not knowledge that it knows internally,
but knowledge that you've decided is important
for answering your question.
So this is one common use case
and technique that you can use to overcome hallucinations
for when factual consistency
is really important in the answers.
Another way that you can factually ground a reference
inside of ChatGPT is adding a file to a conversation.
For example, we can go and hit the plus button here
and then go to add photos and files.
I'm gonna put a file that you can download in this lecture
to follow along with.
Go and download a digital company profile.
And then I'm gonna say,
"What is the company Aurora?"
And because you've added a file, you can ground ChatGPT
to answer specifically from that documentation.
You can add lots of different files
and also images directly inside of ChatGPT
to help sure that it doesn't hallucinate.
In the next video, we're gonna have a look at the difference
between two types of models that have come out recently.
So there is chat models, which are the older type of models,
the newer type of models, which are reasoning models.
And we'll look at the differences between those two
and how you can get started with them.
Cool, see you in the next one.