-: The first principle is giving direction,
describing the desired style in detail
or referencing a relevant persona.
So, let's walk through this with text models.
This is an example of a naive prompt.
So, if we were looking for a pair of shoes
that could fit any foot size,
we want to brainstorm with ChatGPT,
we could just write that out.
"Can I have a list of 10 product names
"for a pair of shoes that can fit any foot size?"
And this does a reasonable job.
You know, these names are pretty good.
If you're just brainstorming, that's no big deal.
You don't actually need prompt engineering.
Now, if you were building a product
that helped people brainstorm names,
you need to work a little bit more on the prompt
because that prompt is gonna be run hundreds
or maybe thousands of times.
So, this is prompt engineering,
when you're working on the prompt to make it more reliable
or to get it to give you more desired outputs.
And this is an example of a prompt template
that we came up with where we've really optimized it.
We've used all of the five principles of prompt engineering,
and we're gonna go through just the first principle today.
This is the prompt template if you guys want to use that,
and you can learn a lot from this prompt template
to create your own prompt templates.
But the main things to call out here
is that this is reusable.
So, no matter what type of product
we're trying to generate names for,
we can insert that product description in this template
in these curly brackets.
We also have this section where we say
"in the style of a famous inventor,"
and that's a variable we can change.
But there's also the rest of the template as well.
And we can test different parts of this template,
and I think that's really the key
to understanding prompt engineering,
which is to actually change some parts of this template
and see how it responds to performance.
Okay, so the first principle
I promised to cover was giving direction.
So, in this case, we have a specific part of the prompt
that says, "In the style of,"
and then we have in this case Steve Jobs.
And it doesn't have to be Steve Jobs.
It could be anyone that we want to emulate the style of.
But you can see here that when we say,
"in the style of Steve Jobs," we get Steve Jobs-like names.
So we have the iFitShoe, iAdapt, iUniversalStep,
just like the iPod or iPhone.
So again, we're describing the desired style in detail
and we're referencing a relevant persona.
The key is knowing what style to put in here.
If you're a student of history or business or art,
you can know who are the famous product namers in the past
or you could do that research.
You don't have to use someone as obvious as Steve Jobs,
and I think that's where you get the key insight
into this principle.
Based on your domain knowledge,
you can give it better direction.
Okay, so let's look at the impact on results
of changing one of these variables.
If we change it from Steve Jobs to Elon Musk,
we're gonna get different names.
We get ShoeX, MarsFit, The Shoe Company,
just like the Boring Company.
If we change it to Walt Disney,
it's Enchanted Slippers, Magic Step, Whimsoles,
which is one I particularly like.
And then Marc Jacobs in the fashion space,
Morph by Marc, the Marc Jacobs Flexible Shoe,
FlexForm Oxfords.
The really interesting thing about the principles
of prompt engineering is that they apply
no matter what AI model you're prompting.
So, if you look at image models, in this case,
Stable Diffusion, we can do the same thing.
So again, we're just prompting Stable Diffusion
in this case, looking for a shoe that can fit any foot size.
So we have our idea,
we have our name,
but now we're gonna enter an image of that product,
and it does a pretty decent job.
Some of these are kind of ugly, to be honest,
but I kind of like the one in the bottom right.
It looks like an astronaut shoe.
It does look like it could fit any foot size.
Now, here it is an example that's been prompt engineered,
as we've applied all of the five principles to it
and we're gonna specifically call out
where we gave direction.
This is the prompt template.
We have the prototype, we have style details,
and then we have designed by artists.
Again, we're using the role playing section again.
And then we have a few aspects related to format.
So we have product photography, extremely details,
studio light, et cetera.
If you use this template,
you will get a pretty reliable result.
Now, the part where we're giving direction
is in this part here.
We've said we want it to be scary, beautiful,
platemail armor, sleek iridescent detail,
designed by Ridley Scott, "Alien,"
as in from the "Alien" movies.
You can see it kind of looks
like the Xenomorph's exterior hide,
but it's neon pink and blue.
And that's really exciting
because we can change this variable.
We can get different results.
And again, we're giving it some direction.
In this case, we're actually changing the style details.
Now, you don't have to go with what I went with.
You could change that to anything else.
Like, here is a shoe designed by Salvador Dali.
Here's a shoe designed by Van Gogh.
And then this last one, which is my favorite,
is based on the famous Japanese block painting,
"The Great Wave."
Whatever it is you decide to do,
giving direction is the first thing you should try,
'cause if you can steer the model towards something
that's unique and original and create it,
then you're gonna get much better results
that are specific to your use case.