1
00:00:04,970 --> 00:00:09,500
In this lesson we are going to talk about what are hallucinations?

2
00:00:15,710 --> 00:00:24,410
So as you saw in the previous lesson, hallucinations are fake responses from an LM.

3
00:00:24,410 --> 00:00:29,840
And the big problem with hallucinations is that they seem legit.

4
00:00:29,840 --> 00:00:31,580
They seem correct.

5
00:00:31,580 --> 00:00:41,090
So, uh, hallucination is a fake answer from an LM, and it's very important to understand that an

6
00:00:41,090 --> 00:00:50,120
LM is not an intelligent being, but a statistical model trained to predict the most likely next word

7
00:00:50,120 --> 00:00:51,470
in a sentence.

8
00:00:52,430 --> 00:01:02,060
The accuracy level of an LM depends on the quality and quantity of data with which it has been trained.

9
00:01:03,240 --> 00:01:06,930
LMS have very high accuracy levels.

10
00:01:06,930 --> 00:01:13,020
When asked about the subjects on with which they have been trained.

11
00:01:14,250 --> 00:01:23,850
The main problem with hallucinations is that the LM states them in a way that seems true.

12
00:01:24,930 --> 00:01:28,290
How can hallucinations be reduced?

13
00:01:30,730 --> 00:01:37,660
We are going to talk about two ways to very basic ways to reduce hallucinations.

14
00:01:37,660 --> 00:01:42,670
The first one is changing the temperature of the LM.

15
00:01:43,810 --> 00:01:47,980
Probably you are familiar with this concept if you have used ChatGPT.

16
00:01:48,790 --> 00:01:58,480
So what is called the temperature of an LM regulates the level of creativity in their answers.

17
00:01:58,480 --> 00:02:05,860
For example, ChatGPT s temperature can be regulated between 0 and 10.

18
00:02:06,310 --> 00:02:13,780
The higher the temperature, the more creativity and the more hallucinations you may find.

19
00:02:13,810 --> 00:02:22,750
This can be good for having the LM write a fiction story, for example, and the lower the temperature,

20
00:02:22,750 --> 00:02:27,850
the less creativity and less hallucination you are going to find.

21
00:02:27,850 --> 00:02:37,630
This is good for having the LM answer specific questions, so you will learn how to change the temperature

22
00:02:37,630 --> 00:02:38,920
of an LM.

23
00:02:39,770 --> 00:02:42,830
And you will learn to understand why.

24
00:02:42,830 --> 00:02:51,380
It is good to have a very creative LLM and why one when it is good to have a very.

25
00:02:52,160 --> 00:02:53,840
Not creative.

26
00:02:53,870 --> 00:02:56,120
LM very precise.

27
00:02:56,330 --> 00:02:57,980
LM in the responses.

28
00:02:58,010 --> 00:03:02,300
Okay, so whenever you want the LM to.

29
00:03:04,060 --> 00:03:10,540
Tell stories, you know, invent a new brand for you, whatever.

30
00:03:10,540 --> 00:03:18,670
You will like to have a high temperature when you want accurate, precise responses, which is going

31
00:03:18,670 --> 00:03:25,870
to be most of the times you want to have the temperature of your LM as lower as possible.

32
00:03:27,490 --> 00:03:33,610
The second way to reduce hallucination is to improve your prompts.

33
00:03:33,640 --> 00:03:36,430
This is what is called prompt prompt engineering.

34
00:03:36,490 --> 00:03:46,690
So, for example, a very effective way is to include examples of correct questions and answers in your

35
00:03:46,690 --> 00:03:52,840
prompt so that the LM knows what it should and should not do.

36
00:03:52,870 --> 00:03:53,350
Okay.

37
00:03:53,350 --> 00:03:58,300
So in your prompt you can tell ChatGPT or your LM.

38
00:03:59,240 --> 00:04:05,900
Examples of right questions and right answers, or wrong questions and wrong answers.

39
00:04:05,900 --> 00:04:08,180
So ChatGPT understands.

40
00:04:08,180 --> 00:04:15,770
Okay, this is the way I should follow in order to prepare my, uh, my, uh, answer or this is not

41
00:04:15,770 --> 00:04:17,120
the way I should follow.

42
00:04:17,120 --> 00:04:17,720
Okay?

43
00:04:20,560 --> 00:04:28,300
So in this lesson, we have been talking a little bit more about hallucinations and how to reduce them.

44
00:04:28,840 --> 00:04:35,740
Hallucinations are a very important problem for LM app developers, so it's very important to be very

45
00:04:35,740 --> 00:04:39,190
aware of them and the techniques that can reduce them.

46
00:04:40,610 --> 00:04:48,890
In the next lesson, we are going to start talking about a very, very important subject in this second

47
00:04:48,890 --> 00:04:54,440
part of the program, which is the architecture of an LM application.

