WEBVTT

00:00.620 --> 00:06.110
So this video is going to be all about memory and specifically all about memory in lecture one.

00:06.560 --> 00:10.880
As far as user interactions when it comes to LMS, LMS are stateless.

00:10.880 --> 00:16.760
So this means that the LMS don't save any information in the conversation that occurred in the conversation

00:16.760 --> 00:17.330
earlier.

00:17.330 --> 00:18.560
So it's stateless.

00:18.560 --> 00:20.090
Let's take a look at an example.

00:20.390 --> 00:26.000
Now if I'm going to ask my large language model that is based on the long chain documentation, who

00:26.000 --> 00:31.670
created long chain, then I would get a correct response that it was created by Harrison Chase.

00:31.670 --> 00:39.080
But if I'm going to follow up and ask, do you know any YouTube videos related to him, then the answer

00:39.080 --> 00:43.580
that I will get is, I'm sorry, I don't know who you're referring to.

00:43.610 --> 00:47.570
Could you please provide me with more context or clarify who is him?

00:47.930 --> 00:55.400
So the concept that we're discussing right now in the formal terminology is called a coreference resolution.

00:55.400 --> 01:03.410
Basically, it's the task of identifying all expressions, words or phrases in a text that refer to

01:03.440 --> 01:05.290
the same entity or concept.

01:05.290 --> 01:10.540
So in other words, it's the process of identifying all the instances where different words or phrases

01:10.540 --> 01:12.370
in a text refer to the same thing.

01:12.400 --> 01:16.000
And in our example, him referred to Harris and Chase.

01:16.030 --> 01:21.910
Now the LM was not able to do it because it didn't have a state, so it wasn't able to make a co-reference

01:21.910 --> 01:22.570
resolution.

01:22.570 --> 01:29.680
However, if the LM in the prompt will get the state and the chat history, then it will be easily able

01:29.680 --> 01:31.930
to make the co-reference resolution.

01:31.930 --> 01:37.240
And this is the underlying base to all the solutions that blockchain is currently supporting.

01:37.240 --> 01:43.720
For memory, we simply find sophisticated ways to pass into the prompt some data, some information

01:43.720 --> 01:49.270
that will help the LM to make some co-reference resolution, like in the example we see right now,

01:49.300 --> 01:52.930
the prompt that we're giving it is given the past conversation.

01:52.930 --> 01:54.550
Answer my question now.

01:54.550 --> 01:59.890
In the past conversation, we're simply going to answer an interaction between us and the bot.

01:59.890 --> 02:03.040
Something about I like drinking cold brew coffee.

02:03.070 --> 02:04.240
Where can I get it?

02:04.240 --> 02:07.860
And the last question is where else can I find that?

02:07.860 --> 02:11.880
And by that I am referencing the cold brew coffee.

02:11.940 --> 02:19.230
And also the LM will know that I don't want to drink at Starbucks, nor at Coffee Bean, and the LM

02:19.230 --> 02:22.890
can easily process that and can make some co-reference resolution.

02:22.950 --> 02:31.020
Now, you may notice that if we have a one hour conversation, then we are in a problem because we have

02:31.020 --> 02:32.820
too much data to put into the prompt.

02:32.820 --> 02:37.500
We know that there is a token limit, and if we have a very, very long conversation, then it will

02:37.500 --> 02:39.450
definitely exceed this limit.

02:40.620 --> 02:41.010
Okay.

02:41.010 --> 02:43.620
So now let's see how long chain resolves it.

02:43.620 --> 02:47.220
And let's take a look at all the long chain offerings regarding memory.

02:47.880 --> 02:50.460
Now this video is a theoretical video.

02:50.460 --> 02:54.570
So I'm not planning to show you any live examples of how to use them.

02:54.570 --> 02:58.740
They're pretty straightforward and we're going to see examples of them in the rest of this course.

02:58.740 --> 03:03.120
So don't worry about seeing implementations of those classes right now.

03:03.120 --> 03:07.980
What I want to demonstrate to you is the strategies that are used in order to resolve this token issue

03:08.010 --> 03:09.360
when it comes to memory.
