WEBVTT

00:00.420 --> 00:03.870
-: Okay, the final principle is division of labor.

00:03.870 --> 00:06.480
That's where you split tasks into multiple steps

00:06.480 --> 00:08.100
Because you can rarely get something done

00:08.100 --> 00:09.690
with just one prompt.

00:09.690 --> 00:11.310
You are gonna chain multiple prompts

00:11.310 --> 00:13.320
or multiple (indistinct) steps together

00:13.320 --> 00:15.690
to achieve a complex goal.

00:15.690 --> 00:17.220
So let's look at text models.

00:17.220 --> 00:19.440
Again, this is our naive prompt.

00:19.440 --> 00:21.990
We're just getting a list of 10 product names

00:21.990 --> 00:25.080
and then this is the engineered prompt.

00:25.080 --> 00:29.580
This is a much bigger prompt is much more to it,

00:29.580 --> 00:32.040
but we're not worried about the prompt itself specifically.

00:32.040 --> 00:33.960
We're worried about a prompt that comes after.

00:33.960 --> 00:36.030
So this isn't just one prompt.

00:36.030 --> 00:38.130
We get the response from ChatGPT,

00:38.130 --> 00:40.279
which gives us the names of iFitShoe,

00:40.279 --> 00:42.270
iAdapt, iUniversalStep.

00:42.270 --> 00:43.950
But then we have a second prompt

00:43.950 --> 00:46.110
that comes after that in the same session

00:46.110 --> 00:48.150
and that asks it to rate the names,

00:48.150 --> 00:49.950
because that's something

00:49.950 --> 00:51.990
that you would have to do as a human otherwise.

00:51.990 --> 00:56.040
And in this case, if you design in a rating step,

00:56.040 --> 00:59.370
you can maybe eliminate some of the time spent

00:59.370 --> 01:00.750
choosing a name,

01:00.750 --> 01:03.600
because that's not important when you're just brainstorming.

01:03.600 --> 01:05.490
You can just manually look at the names.

01:05.490 --> 01:07.740
But if you're generating a list of a hundred names,

01:07.740 --> 01:09.930
or if you're running this prompt a hundred times

01:09.930 --> 01:11.910
and then finding the most catchy, most unique,

01:11.910 --> 01:15.630
most simplistic, then that would make a big difference.

01:15.630 --> 01:18.300
In the prompt template, it's not just one template.

01:18.300 --> 01:19.650
We have this divider,

01:19.650 --> 01:21.990
then we have this second prompt underneath.

01:21.990 --> 01:24.720
So it's actually more of a chat session

01:24.720 --> 01:27.780
than an individual prompt.

01:27.780 --> 01:29.610
And if we zoom in on this,

01:29.610 --> 01:32.040
we can see that it takes the names

01:32.040 --> 01:33.390
that we've given it before,

01:33.390 --> 01:36.840
it has the context from the previous part of the session,

01:36.840 --> 01:40.770
and then it's actually giving you back the names in a table.

01:40.770 --> 01:43.860
And it's rating, such as, catchiness

01:43.860 --> 01:46.080
uniqueness and simplicity.

01:46.080 --> 01:47.367
Do the same thing through the API.

01:47.367 --> 01:49.320
Now the key is that we're actually applying

01:49.320 --> 01:52.050
all the other principles of prompting to this as well.

01:52.050 --> 01:53.700
Like we've specified the format,

01:53.700 --> 01:54.810
we want it in the table

01:54.810 --> 01:56.160
and we give it some direction.

01:56.160 --> 01:58.020
We want it to rate based on catchiness

01:58.020 --> 01:59.880
uniqueness and simplicity.

01:59.880 --> 02:03.330
Each prompt in the chain itself can be optimized.

02:03.330 --> 02:05.580
Now there are other parts of the chain

02:05.580 --> 02:06.570
you might want to add on.

02:06.570 --> 02:07.980
It's not just the rating step,

02:07.980 --> 02:09.570
but there's a step beforehand.

02:09.570 --> 02:13.440
Maybe wanna do some retrieval and list some related products

02:13.440 --> 02:16.350
and use that output as the input into your prompts.

02:16.350 --> 02:18.510
And say, we have Nike ID, it's a competitor.

02:18.510 --> 02:21.870
We have a Reebok Adjustable Shoes, uses a competitor.

02:21.870 --> 02:23.940
We can also do things like function calling,

02:23.940 --> 02:26.490
where you actually tell the AI

02:26.490 --> 02:28.110
it can cause specific functions,

02:28.110 --> 02:31.500
and you give it an understanding of what those functions do.

02:31.500 --> 02:34.200
And then you can ask it, you know,

02:34.200 --> 02:36.000
when it's ready to do that.

02:36.000 --> 02:38.040
In this case, you could give it a function

02:38.040 --> 02:39.510
that calls GoDaddy!

02:39.510 --> 02:41.700
and then checks whether the domain is available.

02:41.700 --> 02:43.140
And that's gonna make the big difference

02:43.140 --> 02:46.110
because now you don't have to go do that yourself.

02:46.110 --> 02:48.840
And then another step, which is really powerful,

02:48.840 --> 02:50.610
is image generation, right?

02:50.610 --> 02:52.181
Like we've been seeing,

02:52.181 --> 02:53.014
we can go and generate an image

02:53.014 --> 02:55.020
of that shoe as part of, you know,

02:55.020 --> 02:56.613
the next part in the chain.

02:57.990 --> 03:00.000
Alright, so let's look at at image generation now

03:00.000 --> 03:03.120
and see how this principle applies to that too.

03:03.120 --> 03:04.410
And typically,

03:04.410 --> 03:06.990
you're not just using a one prompt in Stable Diffusion.

03:06.990 --> 03:10.050
When you see artists that are using AI,

03:10.050 --> 03:12.540
they're not just getting it right in one prompt.

03:12.540 --> 03:14.130
They're trying lots of different prompts.

03:14.130 --> 03:15.240
They're typically working in something

03:15.240 --> 03:17.610
like Photoshop where they're stitching

03:17.610 --> 03:20.250
different AI generated images together in a collage

03:20.250 --> 03:23.010
and then pulling them all together and editing,

03:23.010 --> 03:25.020
joining them together with generated film.

03:25.020 --> 03:26.160
Let's see how that works.

03:26.160 --> 03:28.200
We have this actual kind of prompt

03:28.200 --> 03:30.180
that we're running now, the template.

03:30.180 --> 03:32.910
But the problem with this is that the output,

03:32.910 --> 03:36.060
we have a white background, but we still have a problem

03:36.060 --> 03:38.430
because we, you know, we don't,

03:38.430 --> 03:41.040
we can't really use a white background necessarily.

03:41.040 --> 03:44.040
We need to cut out that shoe from the (indistinct).

03:44.040 --> 03:46.740
It's pretty hard to do in Stable Diffusion,

03:46.740 --> 03:48.960
what we do is we divide the labor,

03:48.960 --> 03:51.030
we split that out, that task out,

03:51.030 --> 03:53.070
we give it to another AI model.

03:53.070 --> 03:55.680
In this case, I'm using remove.bg,

03:55.680 --> 03:56.670
which is a free website

03:56.670 --> 03:59.520
where it just removes the background from the image.

03:59.520 --> 04:02.670
And now I have a proper PNG of the shoe.

04:02.670 --> 04:05.400
I can use that in multiple steps.

04:05.400 --> 04:07.530
And so, you know, that shoe is just one part

04:07.530 --> 04:09.120
of an overall advertisement

04:09.120 --> 04:12.360
or overall marketing collateral for the product.

04:12.360 --> 04:14.370
And you can see we can make a big difference

04:14.370 --> 04:16.140
to how the shoe is perceived

04:16.140 --> 04:18.210
just by putting it in different scenarios.

04:18.210 --> 04:20.760
And again, each one of these is generated

04:20.760 --> 04:21.870
with a separate step.

04:21.870 --> 04:24.750
So we have, you know, a background of New York City,

04:24.750 --> 04:26.280
we have a background of a spaceship,

04:26.280 --> 04:27.930
we have a background of a festival.

04:27.930 --> 04:30.210
Whatever it is you want to appeal to,

04:30.210 --> 04:33.300
in terms of an audience, you can do that now

04:33.300 --> 04:34.830
because you can take the shoe out

04:34.830 --> 04:37.890
of the context without changing what the shoe looks like

04:37.890 --> 04:39.630
and put it in a new context

04:39.630 --> 04:42.210
that was generated in a separate step.

04:42.210 --> 04:44.460
You'll find that this is just a simple example

04:44.460 --> 04:47.160
where you can use things like in painting to do this

04:47.160 --> 04:49.290
and make sure the shadows match.

04:49.290 --> 04:52.260
You can use our (indistinct)

04:52.260 --> 04:55.650
that you're really not using one model, one prompt,

04:55.650 --> 04:56.700
and then you're done.
