WEBVTT

00:00.540 --> 00:02.580
-: The first principle is giving direction,

00:02.580 --> 00:04.410
describing the desired style in detail

00:04.410 --> 00:06.723
or referencing a relevant persona.

00:07.560 --> 00:09.963
So, let's walk through this with text models.

00:11.010 --> 00:13.680
This is an example of a naive prompt.

00:13.680 --> 00:16.410
So, if we were looking for a pair of shoes

00:16.410 --> 00:17.970
that could fit any foot size,

00:17.970 --> 00:20.040
we want to brainstorm with ChatGPT,

00:20.040 --> 00:20.887
we could just write that out.

00:20.887 --> 00:23.137
"Can I have a list of 10 product names

00:23.137 --> 00:25.647
"for a pair of shoes that can fit any foot size?"

00:26.760 --> 00:28.770
And this does a reasonable job.

00:28.770 --> 00:30.360
You know, these names are pretty good.

00:30.360 --> 00:32.760
If you're just brainstorming, that's no big deal.

00:32.760 --> 00:35.250
You don't actually need prompt engineering.

00:35.250 --> 00:38.280
Now, if you were building a product

00:38.280 --> 00:40.770
that helped people brainstorm names,

00:40.770 --> 00:42.540
you need to work a little bit more on the prompt

00:42.540 --> 00:44.670
because that prompt is gonna be run hundreds

00:44.670 --> 00:46.650
or maybe thousands of times.

00:46.650 --> 00:48.504
So, this is prompt engineering,

00:48.504 --> 00:51.510
when you're working on the prompt to make it more reliable

00:51.510 --> 00:54.900
or to get it to give you more desired outputs.

00:54.900 --> 00:57.360
And this is an example of a prompt template

00:57.360 --> 01:00.360
that we came up with where we've really optimized it.

01:00.360 --> 01:02.910
We've used all of the five principles of prompt engineering,

01:02.910 --> 01:06.093
and we're gonna go through just the first principle today.

01:07.728 --> 01:10.980
This is the prompt template if you guys want to use that,

01:10.980 --> 01:13.020
and you can learn a lot from this prompt template

01:13.020 --> 01:14.730
to create your own prompt templates.

01:14.730 --> 01:16.650
But the main things to call out here

01:16.650 --> 01:18.300
is that this is reusable.

01:18.300 --> 01:20.430
So, no matter what type of product

01:20.430 --> 01:22.860
we're trying to generate names for,

01:22.860 --> 01:25.710
we can insert that product description in this template

01:25.710 --> 01:27.270
in these curly brackets.

01:27.270 --> 01:28.957
We also have this section where we say

01:28.957 --> 01:30.690
"in the style of a famous inventor,"

01:30.690 --> 01:32.730
and that's a variable we can change.

01:32.730 --> 01:35.310
But there's also the rest of the template as well.

01:35.310 --> 01:37.200
And we can test different parts of this template,

01:37.200 --> 01:38.430
and I think that's really the key

01:38.430 --> 01:40.260
to understanding prompt engineering,

01:40.260 --> 01:43.620
which is to actually change some parts of this template

01:43.620 --> 01:46.593
and see how it responds to performance.

01:47.940 --> 01:49.680
Okay, so the first principle

01:49.680 --> 01:52.230
I promised to cover was giving direction.

01:52.230 --> 01:56.340
So, in this case, we have a specific part of the prompt

01:56.340 --> 01:58.530
that says, "In the style of,"

01:58.530 --> 02:01.080
and then we have in this case Steve Jobs.

02:01.080 --> 02:02.400
And it doesn't have to be Steve Jobs.

02:02.400 --> 02:05.460
It could be anyone that we want to emulate the style of.

02:05.460 --> 02:07.207
But you can see here that when we say,

02:07.207 --> 02:10.740
"in the style of Steve Jobs," we get Steve Jobs-like names.

02:10.740 --> 02:14.220
So we have the iFitShoe, iAdapt, iUniversalStep,

02:14.220 --> 02:16.500
just like the iPod or iPhone.

02:16.500 --> 02:19.890
So again, we're describing the desired style in detail

02:19.890 --> 02:22.830
and we're referencing a relevant persona.

02:22.830 --> 02:25.620
The key is knowing what style to put in here.

02:25.620 --> 02:28.560
If you're a student of history or business or art,

02:28.560 --> 02:31.800
you can know who are the famous product namers in the past

02:31.800 --> 02:33.360
or you could do that research.

02:33.360 --> 02:36.570
You don't have to use someone as obvious as Steve Jobs,

02:36.570 --> 02:38.940
and I think that's where you get the key insight

02:38.940 --> 02:40.320
into this principle.

02:40.320 --> 02:41.610
Based on your domain knowledge,

02:41.610 --> 02:43.593
you can give it better direction.

02:45.370 --> 02:47.880
Okay, so let's look at the impact on results

02:47.880 --> 02:49.650
of changing one of these variables.

02:49.650 --> 02:52.110
If we change it from Steve Jobs to Elon Musk,

02:52.110 --> 02:53.520
we're gonna get different names.

02:53.520 --> 02:56.340
We get ShoeX, MarsFit, The Shoe Company,

02:56.340 --> 02:58.020
just like the Boring Company.

02:58.020 --> 02:59.310
If we change it to Walt Disney,

02:59.310 --> 03:01.680
it's Enchanted Slippers, Magic Step, Whimsoles,

03:01.680 --> 03:03.810
which is one I particularly like.

03:03.810 --> 03:06.120
And then Marc Jacobs in the fashion space,

03:06.120 --> 03:09.540
Morph by Marc, the Marc Jacobs Flexible Shoe,

03:09.540 --> 03:10.773
FlexForm Oxfords.

03:12.450 --> 03:14.970
The really interesting thing about the principles

03:14.970 --> 03:16.800
of prompt engineering is that they apply

03:16.800 --> 03:18.900
no matter what AI model you're prompting.

03:18.900 --> 03:21.720
So, if you look at image models, in this case,

03:21.720 --> 03:24.390
Stable Diffusion, we can do the same thing.

03:24.390 --> 03:26.730
So again, we're just prompting Stable Diffusion

03:26.730 --> 03:30.870
in this case, looking for a shoe that can fit any foot size.

03:30.870 --> 03:33.540
So we have our idea,

03:33.540 --> 03:34.830
we have our name,

03:34.830 --> 03:36.930
but now we're gonna enter an image of that product,

03:36.930 --> 03:38.790
and it does a pretty decent job.

03:38.790 --> 03:41.130
Some of these are kind of ugly, to be honest,

03:41.130 --> 03:43.770
but I kind of like the one in the bottom right.

03:43.770 --> 03:45.360
It looks like an astronaut shoe.

03:45.360 --> 03:48.210
It does look like it could fit any foot size.

03:48.210 --> 03:52.080
Now, here it is an example that's been prompt engineered,

03:52.080 --> 03:54.690
as we've applied all of the five principles to it

03:54.690 --> 03:56.340
and we're gonna specifically call out

03:56.340 --> 03:57.933
where we gave direction.

03:59.460 --> 04:00.960
This is the prompt template.

04:00.960 --> 04:02.910
We have the prototype, we have style details,

04:02.910 --> 04:04.230
and then we have designed by artists.

04:04.230 --> 04:07.230
Again, we're using the role playing section again.

04:07.230 --> 04:11.640
And then we have a few aspects related to format.

04:11.640 --> 04:13.830
So we have product photography, extremely details,

04:13.830 --> 04:15.360
studio light, et cetera.

04:15.360 --> 04:16.260
If you use this template,

04:16.260 --> 04:18.160
you will get a pretty reliable result.

04:19.530 --> 04:21.630
Now, the part where we're giving direction

04:21.630 --> 04:22.950
is in this part here.

04:22.950 --> 04:26.070
We've said we want it to be scary, beautiful,

04:26.070 --> 04:28.350
platemail armor, sleek iridescent detail,

04:28.350 --> 04:30.450
designed by Ridley Scott, "Alien,"

04:30.450 --> 04:32.520
as in from the "Alien" movies.

04:32.520 --> 04:33.600
You can see it kind of looks

04:33.600 --> 04:36.120
like the Xenomorph's exterior hide,

04:36.120 --> 04:38.100
but it's neon pink and blue.

04:38.100 --> 04:39.750
And that's really exciting

04:39.750 --> 04:41.820
because we can change this variable.

04:41.820 --> 04:43.800
We can get different results.

04:43.800 --> 04:45.750
And again, we're giving it some direction.

04:45.750 --> 04:49.050
In this case, we're actually changing the style details.

04:49.050 --> 04:51.780
Now, you don't have to go with what I went with.

04:51.780 --> 04:53.340
You could change that to anything else.

04:53.340 --> 04:55.877
Like, here is a shoe designed by Salvador Dali.

04:55.877 --> 04:58.350
Here's a shoe designed by Van Gogh.

04:58.350 --> 05:00.840
And then this last one, which is my favorite,

05:00.840 --> 05:03.847
is based on the famous Japanese block painting,

05:03.847 --> 05:05.040
"The Great Wave."

05:05.040 --> 05:06.720
Whatever it is you decide to do,

05:06.720 --> 05:09.541
giving direction is the first thing you should try,

05:09.541 --> 05:13.230
'cause if you can steer the model towards something

05:13.230 --> 05:15.420
that's unique and original and create it,

05:15.420 --> 05:17.790
then you're gonna get much better results

05:17.790 --> 05:20.703
that are specific to your use case.
