-: Without further ado,
let's hop into this prompt engineering section.
So what I want you to do first
is download this Prompt Engineering Guide
that Benza and I put together to give you all the resources
that you're gonna need for this section.
So you can download it now in the Resources tab.
Now, this guide is an overview of prompt engineering.
What I wanna do in these lectures is just read through this
so that you can follow along
and you can use this as a complete GPS
and cheat sheet for all your future prompts.
So first, the overview.
Like I mentioned, this prompt engineering doc is designed
to optimize your ideation process
and enhance the quality of your output.
So this document is comprised of two main sections.
There's a simplified section,
and then there's an advanced prompting section.
The simple section is ideal for creating quick ideas,
and these will probably be most of your prompts.
Generally when using ChatGPT,
you just have a quick question
and you don't really need to go into detail
with crafting an entire prompt.
But on the other hand, when you do need to do that,
the advanced section is gonna go into the intricacies
of creating detailed outputs that you can use for personal
and professional purposes.
So what is prompt engineering?
Prompt engineering is the process of designing
and optimizing your prompts using NLP models like ChatGPT
and this involves crafting the prompt. like we mentioned,
in a clear, concise, and effective way
so you can get your desired output.
And I put a little bit of a metaphor here.
AKA, prompt engineering
is like making an effective fishing lure.
Just like a well-designed lure is more likely to go
and catch the fish you want when you're fishing,
a well-crafted prompt is more likely
to get your specific response or desired output.
And now onto the three primary principles
of prompt engineering.
First up, you wanna be specific.
The more criteria you give,
the more focused the output will be.
You also wanna work in steps
and break up your tasks into smaller chunks,
just as you would with a human.
You wanna go to your friend
and ask them to do 10 things back to back.
You would work through things methodically.
First, let's create our schedule for the week,
then let's talk about our schedule for the next month,
then let's talk about our long-term goals,
and then let's go here, here, and here.
So with ChatGPT, you wanna do the same thing
and break larger tasks.
Don't ask it to write an entire book.
Start with the chapters or start with the table of contents.
Go into the chapters, go into the content of each chapter,
and then further, further go into the details.
This is gonna make a better output.
And lastly, on these three principles,
is you wanna iterate and improve.
Like we mentioned, one of the most amazing parts
is that you can rework your inputs
to have ChatGPT iteratively improve on its own output.
Now let's talk about what makes a good prompt.
So a great output all comes down
to the data that the model was trained on,
like I mentioned, its parameters,
AKA how it's trained to use the data,
and then your input, AKA prompting.
So since we can only control one of these,
we can't really control the model that it was trained on
and we can't control the way
it was programmed to use that data.
We can only control our prompting.
So here's what that boils down to.
Clear and concise language that's direct and unambiguous.
The persona that you wanna assign ChatGPT to act as.
For example, you can act as a marketing expert,
a biologist, a mathematician, or a psychologist.
And then it's about the information
and examples that you provide.
And the interesting part about this
is that ChatGPT is going to basically remember
and be able to reference any of the information
and examples in the previous chat history.
So even if it's not in the direct prompt
that you're inputting in that very moment,
if you were having a conversation
and you pasted example information into the chat
earlier in that chat history,
it's gonna be able to reference that data.
Next is a specific task
that you are clearly requesting ChatGPT to complete,
AKA your desired output.
And lastly on what makes a good prompt is refinement.
So once you've received your first response,
you can then reiterate
until you receive your desired output.
So that's an overview of what makes a good prompt.
Now let's actually talk about the main prompting steps
that you wanna keep in mind.
So you first wanna define the goal or the problem,
and you wanna clearly articulate what you want
ChatGPT to help you with, kinda like what we're mentioning
at what makes a good prompt,
this is another way to frame it in your mind
so you're really clear on it.
So you wanna tell it what your goal is
or what your problem is, what you want fixed,
what you want answered,
and you wanna use relevant keywords
and phrases that you can input,
which will help guide things to your desired response.
The next step, of course, is really crafting
and writing your prompt clearly, like we mentioned,
the information, the task that's required,
using keywords and combining everything in step one
in your specified prompt.
Then lastly, you wanna test, evaluate, and iterate.
So we generate our responses, we evaluate the results,
we adjust the prompt as needed,
and then we repeat the process
until we have a successful rockstar prompt that is created
and consistently generates the desired response.