WEBVTT

1
00:00:00.000 --> 00:00:02.100
<v ->What is the difference between prompt engineering</v>

2
00:00:02.100 --> 00:00:04.320
and just simply prompting these models?

3
00:00:04.320 --> 00:00:06.090
Let's start with a naive prompt.

4
00:00:06.090 --> 00:00:08.070
This is something that you might type in

5
00:00:08.070 --> 00:00:09.060
if you want a blog post.

6
00:00:09.060 --> 00:00:12.417
So write a blog post on prompt engineering.

7
00:00:12.417 --> 00:00:15.690
I'm just gonna hit enter and it will do a pretty good job.

8
00:00:15.690 --> 00:00:17.880
And these models are really fantastic.

9
00:00:17.880 --> 00:00:19.110
They get better and better,

10
00:00:19.110 --> 00:00:20.767
and that leads some people to think,

11
00:00:20.767 --> 00:00:23.040
"Eventually we won't need prompt engineering."

12
00:00:23.040 --> 00:00:24.480
But I think that's completely false

13
00:00:24.480 --> 00:00:27.300
because these models are really smart,

14
00:00:27.300 --> 00:00:29.670
but you're not giving 'em any direction here.

15
00:00:29.670 --> 00:00:30.620
This is just a naive prompt.

16
00:00:30.620 --> 00:00:32.730
If 100 people type this in,

17
00:00:32.730 --> 00:00:36.000
they're gonna get 100 very similar sounding blog posts,

18
00:00:36.000 --> 00:00:38.310
and there's not gonna be any real context in there.

19
00:00:38.310 --> 00:00:42.090
There's not gonna be any type of refinement to that prompt,

20
00:00:42.090 --> 00:00:42.950
and you need those sorts of things

21
00:00:42.950 --> 00:00:45.210
in order to get to something really good,

22
00:00:45.210 --> 00:00:46.560
that's human level

23
00:00:46.560 --> 00:00:49.533
because what we don't want is an internet full of blog posts

24
00:00:49.533 --> 00:00:52.170
that are just the default average

25
00:00:52.170 --> 00:00:55.440
of the internet-type response that we get from ChatGPT.

26
00:00:55.440 --> 00:00:56.940
Now, prompt engineering

27
00:00:56.940 --> 00:00:59.460
is really adding a lot of that secret sauce

28
00:00:59.460 --> 00:01:00.780
from your own skill,

29
00:01:00.780 --> 00:01:03.210
as well as testing what works reliably

30
00:01:03.210 --> 00:01:05.490
because if you're gonna be generating one blog post,

31
00:01:05.490 --> 00:01:06.690
it doesn't matter that much.

32
00:01:06.690 --> 00:01:09.060
If you're gonna generate 100 in a day

33
00:01:09.060 --> 00:01:12.420
or 1,000 in a week, then you need prompt engineering

34
00:01:12.420 --> 00:01:17.220
because if 10 in 100 of those 1,000 blog posts are wrong

35
00:01:17.220 --> 00:01:19.140
in some way or require human editing,

36
00:01:19.140 --> 00:01:21.540
you're not really saving yourself that much time.

37
00:01:21.540 --> 00:01:24.090
If you can get them as high quality as possible

38
00:01:24.090 --> 00:01:26.100
just by adapting the prompt template,

39
00:01:26.100 --> 00:01:28.170
and then the higher quality translates

40
00:01:28.170 --> 00:01:31.440
to every single time you run that prompt template.

41
00:01:31.440 --> 00:01:34.620
Let me show you what an engineered prompt might look like.

42
00:01:34.620 --> 00:01:35.970
And this is the prompt

43
00:01:35.970 --> 00:01:37.800
that we're gonna be working through on this course,

44
00:01:37.800 --> 00:01:40.770
and you can see how every part works together,

45
00:01:40.770 --> 00:01:43.380
but you can see there's a lot more information here.

46
00:01:43.380 --> 00:01:45.390
I'm setting a writing style,

47
00:01:45.390 --> 00:01:47.700
I'm using the Hero's Journey framework.

48
00:01:47.700 --> 00:01:49.710
I'm asking it to outline the story for it,

49
00:01:49.710 --> 00:01:52.710
telling it I want a sci-fi-type fantasy post

50
00:01:52.710 --> 00:01:56.190
rather than the generic, average prompt engineering guide

51
00:01:56.190 --> 00:01:57.450
that you see out there.

52
00:01:57.450 --> 00:01:59.280
I'm also providing instructions

53
00:01:59.280 --> 00:02:02.040
to combat specific edge cases that I found

54
00:02:02.040 --> 00:02:03.870
where it's not writing long enough

55
00:02:03.870 --> 00:02:05.220
and we're gonna learn how to do all

56
00:02:05.220 --> 00:02:06.810
of these things and more.

57
00:02:06.810 --> 00:02:08.280
But just wanted to show you

58
00:02:08.280 --> 00:02:09.690
what this type of thing looks like.

59
00:02:09.690 --> 00:02:11.220
Here we have an outline

60
00:02:11.220 --> 00:02:13.410
where it's broken down the whole narrative first.

61
00:02:13.410 --> 00:02:15.660
Then it started to write the blog post,

62
00:02:15.660 --> 00:02:18.990
and you can see that it's writing much longer type text.

63
00:02:18.990 --> 00:02:22.230
So it's writing two paragraphs here for each section

64
00:02:22.230 --> 00:02:23.910
'cause there's gonna be 12 sections

65
00:02:23.910 --> 00:02:25.740
to the hero's journey stages.

66
00:02:25.740 --> 00:02:28.530
Then we're gonna have something like a 1,000

67
00:02:28.530 --> 00:02:29.977
to 2,000-word blog post.

68
00:02:29.977 --> 00:02:31.680
I'm gonna show you how to do this,

69
00:02:31.680 --> 00:02:34.170
how to get to this more complicated prompt iteratively

70
00:02:34.170 --> 00:02:36.270
without taking too much time and effort.

71
00:02:36.270 --> 00:02:38.610
And once you get to this point, you'll be able

72
00:02:38.610 --> 00:02:41.910
to make prompts that are equally as reliable

73
00:02:41.910 --> 00:02:44.490
and get human-level results

74
00:02:44.490 --> 00:02:47.040
because most people when they try ChatGPT

75
00:02:47.040 --> 00:02:48.600
and they say it's not very good,

76
00:02:48.600 --> 00:02:51.630
it's because they just don't know how to ask the right way.

77
00:02:51.630 --> 00:02:53.610
And that's what you're gonna learn here.

78
00:02:53.610 --> 00:02:57.330
We're gonna also dive into image generation as well

79
00:02:57.330 --> 00:03:00.180
because we could do something similar there too.

80
00:03:00.180 --> 00:03:02.400
These principles apply to image generation,

81
00:03:02.400 --> 00:03:03.840
as well as text generation.

82
00:03:03.840 --> 00:03:06.150
So I'm just gonna paste in here create an image

83
00:03:06.150 --> 00:03:07.620
that matches this blog post.

84
00:03:07.620 --> 00:03:10.050
This is the naive way to do it

85
00:03:10.050 --> 00:03:11.910
because we, you know, want just an image

86
00:03:11.910 --> 00:03:14.010
that matches the blog post and we already have a lot

87
00:03:14.010 --> 00:03:15.300
of prompting in the text side,

88
00:03:15.300 --> 00:03:17.670
so it's gonna create a pretty good image.

89
00:03:17.670 --> 00:03:19.800
The cool thing about DALL-E and ChatGPT

90
00:03:19.800 --> 00:03:22.470
is that ChatGPT actually writes the prompt for you,

91
00:03:22.470 --> 00:03:24.090
makes it a bit more sophisticated,

92
00:03:24.090 --> 00:03:26.760
but we might not get the type of image we really want

93
00:03:26.760 --> 00:03:28.980
and we're not really getting very much choice here.

94
00:03:28.980 --> 00:03:30.420
It's just gonna create one image.

95
00:03:30.420 --> 00:03:33.060
So we can see here this is a pretty cool image

96
00:03:33.060 --> 00:03:34.470
and it looks futuristic,

97
00:03:34.470 --> 00:03:36.030
like the sort of thing we're looking at

98
00:03:36.030 --> 00:03:37.980
in terms of the blog posts.

99
00:03:37.980 --> 00:03:39.150
So it does match pretty well.

100
00:03:39.150 --> 00:03:41.190
These are good results straight away.

101
00:03:41.190 --> 00:03:44.100
But a more optimized prompt might be something like this

102
00:03:44.100 --> 00:03:46.170
where I've written my own image prompt,

103
00:03:46.170 --> 00:03:47.820
so I'm just pasting this in here.

104
00:03:47.820 --> 00:03:49.920
I'm asking it to create different matching images

105
00:03:49.920 --> 00:03:51.960
to this blog post and this style.

106
00:03:51.960 --> 00:03:56.040
And I'm talking about solarpunk, which is a type of scene

107
00:03:56.040 --> 00:03:57.360
that I researched and found

108
00:03:57.360 --> 00:03:59.580
that I really like that visual style.

109
00:03:59.580 --> 00:04:01.650
And then talking about what's actually happening

110
00:04:01.650 --> 00:04:04.590
in the image, giving a bit more understanding

111
00:04:04.590 --> 00:04:07.680
of the composition, telling it what's in the background,

112
00:04:07.680 --> 00:04:08.820
all sorts of different things.

113
00:04:08.820 --> 00:04:10.440
Just gonna paste that in here

114
00:04:10.440 --> 00:04:12.660
and then we'll see what type of image we get back.

115
00:04:12.660 --> 00:04:13.980
Cool, so here's the first image.

116
00:04:13.980 --> 00:04:16.710
And you can see it's a very different visual style

117
00:04:16.710 --> 00:04:18.630
and we use prompt engineering to get here.

118
00:04:18.630 --> 00:04:21.960
This is the type of style that I wanted and it's futuristic.

119
00:04:21.960 --> 00:04:23.880
We're futuristic in a very different way,

120
00:04:23.880 --> 00:04:25.650
and you could try different styles

121
00:04:25.650 --> 00:04:28.110
once you realize what words you need to use

122
00:04:28.110 --> 00:04:31.590
to elicit that style from ChatGPT and Dall-E.

123
00:04:31.590 --> 00:04:32.820
That's what you're gonna learn.

124
00:04:32.820 --> 00:04:35.850
It's gonna be transferable across not just text and image,

125
00:04:35.850 --> 00:04:39.330
but also video, audio, really any type

126
00:04:39.330 --> 00:04:42.903
of AI model now and way into the future.

