WEBVTT

00:00.120 --> 00:01.560
-: In this video, we're gonna look at

00:01.560 --> 00:04.920
how we can overcome ChatGPT's context length,

00:04.920 --> 00:07.290
and using a process called chunking.

00:07.290 --> 00:09.360
Let's start by having a look at this prompt at the top

00:09.360 --> 00:11.610
where we have, "Create an article outline

00:11.610 --> 00:15.360
with 20 subheadings about the 2008 financial crash."

00:15.360 --> 00:16.380
The problem we've got here

00:16.380 --> 00:19.110
is that the article outline is so long

00:19.110 --> 00:22.140
that if I just provide a prompt afterwards

00:22.140 --> 00:23.257
to ChatGPT to say,

00:23.257 --> 00:26.520
"Write an entire article based on the above subheadings,"

00:26.520 --> 00:29.010
ChatGPT starts off fine, absolutely good,

00:29.010 --> 00:31.170
but then as soon as we hit the domino effect,

00:31.170 --> 00:34.500
notice how we haven't even finished this sentence.

00:34.500 --> 00:36.510
So we've hit the largest amount of tokens

00:36.510 --> 00:38.700
that ChatGPT is able to provide us with.

00:38.700 --> 00:39.990
So we need to break this down

00:39.990 --> 00:42.000
and start using a chunking technique.

00:42.000 --> 00:45.390
So what we could do is, rather than asking it to create,

00:45.390 --> 00:47.130
when we have the article outline,

00:47.130 --> 00:49.920
rather than asking it to write an entire article,

00:49.920 --> 00:51.727
we could change it to say, you know,

00:51.727 --> 00:54.900
"Write a very and extremely detailed section

00:54.900 --> 00:55.733
about all of this."

00:55.733 --> 00:58.147
So we could say, for example, get all this information,

00:58.147 --> 01:01.110
"Write an extremely detailed

01:01.110 --> 01:03.790
and incredibly

01:05.310 --> 01:08.790
long section

01:08.790 --> 01:12.570
for all of the below subheadings."

01:12.570 --> 01:13.950
And we're breaking our problem down,

01:13.950 --> 01:17.010
so rather than purely working off

01:17.010 --> 01:18.960
creating the whole entire article,

01:18.960 --> 01:20.377
we're basically just trying to say,

01:20.377 --> 01:24.570
"Hey, let's take this section and chunk out

01:24.570 --> 01:25.830
and get the output from that."

01:25.830 --> 01:27.390
And then what we do after that

01:27.390 --> 01:29.250
is once we've done that entire thing,

01:29.250 --> 01:31.770
then we're gonna take this entire section

01:31.770 --> 01:33.210
on the historical background.

01:33.210 --> 01:35.340
And so we're breaking it down into step by steps,

01:35.340 --> 01:37.680
rather than trying to force ChatGPT

01:37.680 --> 01:40.293
to produce the entire output all in one go.

01:43.020 --> 01:43.853
And so you can see here

01:43.853 --> 01:45.800
we've got a little bit more information.

01:46.650 --> 01:48.150
Also, the keywords that we were using,

01:48.150 --> 01:52.110
such as extremely detailed and incredibly long section

01:52.110 --> 01:55.320
help to encourage ChatGPT to give us a better output.

01:55.320 --> 01:58.770
So again, you just keep doing this step over and over again

01:58.770 --> 02:01.980
and asking it to do, you know, a section at a time

02:01.980 --> 02:05.013
rather than trying to fit everything in the same output.
