5 Ways Your Prompts Need To Change To Get The Best of GPT-4o
Summary
TLDRThis video script provides essential tactics for optimizing prompts to achieve the best results from Chat GPT. It emphasizes the importance of clear details, breaking down complex tasks, utilizing larger prompts with delimiters, referencing texts for specific information, and using one-shot or few-shot prompting with examples. The script illustrates these tactics with practical examples, demonstrating how to structure prompts for detailed outputs, organize virtual conferences, synthesize research findings, and write abstracts in a specific journal style.
Takeaways
- 📝 Be specific and clear in your prompts to provide the AI with more context, leading to more accurate predictions and relevant outputs.
- 📚 Include detailed instructions in your prompts, such as specifying the desired output length, focus, audience, and tone, to guide the AI effectively.
- 🔍 Use examples to illustrate the task, such as one-shot or few-shot prompting, to help the AI replicate the desired outcome more effectively.
- 📈 Break down complex tasks into simpler subtasks to make it easier for the AI to provide precise and helpful responses for each step.
- 📑 Utilize larger prompts with clear delimiters to structure complex interactions and maintain the AI's understanding across a large context window.
- 📘 Provide reference texts and specific questions to extract accurate information, ensuring the AI cites the document and does not fabricate information.
- 🔑 Use delimiters consistently to separate different parts of your request, helping the AI understand where one part of the input ends and another begins.
- 📝 When providing a large prompt, structure it clearly with instructions and examples to guide the AI in generating the desired output.
- 🔬 Test the AI's ability to handle complex instructions by attaching articles and giving detailed tasks, such as summarizing and crafting sections based on those summaries.
- 📋 Demonstrate the effectiveness of using examples by showing how the AI can mimic the style of abstracts from a journal when given two or more examples.
- 📈 The video script emphasizes the importance of prompt engineering techniques to optimize interactions with AI and achieve better results.
Q & A
What are the main tactics discussed in the video for getting the best results from chat GPT?
-The video discusses five main tactics: 1) Include specific and clear details in your prompt, 2) Split complex tasks into simpler subtasks, 3) Use larger prompts with delimiters, 4) Provide a reference text, and 5) Use one-shot and few-shot prompting with examples.
Why is it important to include specific details in a prompt for chat GPT?
-Including specific details provides the model with more context, which helps it to predict and generate more relevant and accurate subsequent words and tokens.
Can you give an example of a bad prompt according to the video?
-A bad example prompt would be something like 'write about AI in healthcare', which is too general and lacks specificity.
What is the purpose of splitting complex tasks into simpler subtasks?
-Splitting tasks simplifies the process for chat GPT, making it easier to provide precise and helpful responses for each step of the task.
How does using delimiters help in structuring large prompts for chat GPT?
-Delimiters help the AI understand where one part of the input ends and another begins, making it easier to process and respond to complex and detailed prompts.
What is the advantage of using a reference text in prompts?
-Using a reference text allows chat GPT to extract specific information and answer questions accurately, ensuring the response is based on the provided document.
How does one-shot prompting differ from few-shot prompting?
-One-shot prompting involves giving one example to illustrate the task, while few-shot prompting involves giving two or more examples to help the model replicate the outcome more effectively.
What is the recommended number of examples to use in few-shot prompting according to the video?
-The video suggests that using two to five examples in few-shot prompting yields better results.
How does chat GPT handle a question if the reference text does not contain the information needed to answer it?
-If the reference text does not contain the necessary information, chat GPT is instructed to respond with 'insufficient information'.
What is the significance of providing examples when asking chat GPT to write in a specific style, such as an academic abstract?
-Providing examples illustrates the desired style and structure, enabling chat GPT to replicate it accurately in its response.
What is the next step the video promises to deliver in terms of prompt engineering tactics?
-The video promises to cover five more tactics in the next video, encouraging viewers to subscribe for updates.
Outlines
📘 Optimizing Chat GPT Prompts with Clear Details
The first paragraph introduces the video's focus on tactics for crafting effective prompts for Chat GPT, referencing Open AI's prompt engineering guide. The key tactic discussed is the importance of including specific and clear details in prompts to provide the AI with sufficient context for accurate predictions. An example is given to illustrate the difference between a vague prompt and a detailed one, showing how specificity improves the relevance and quality of the AI's output.
📚 Breaking Down Complex Tasks for Chat GPT
The second paragraph emphasizes the strategy of splitting complex tasks into simpler subtasks to facilitate more precise responses from Chat GPT. It demonstrates how breaking down a request, such as organizing a virtual conference, into actionable steps results in a more detailed guide. The paragraph also shows how further details can be obtained by specifying particular steps, leading to a more comprehensive and step-by-step approach.
🔍 Utilizing Delimiters for Structured Prompts
The third paragraph discusses the use of delimiters to structure large prompts and help the AI understand the different parts of a request. Examples of delimiters are provided, and a detailed example is given where XML tags are used to structure instructions for summarizing research papers and developing sections based on those summaries. The output from Chat GPT is shown to be well-structured and adhering to the provided guidelines, highlighting the effectiveness of using delimiters.
📝 Extracting Information with Reference Texts
The fourth paragraph introduces the technique of providing a reference text enclosed in triple quotes for Chat GPT to extract specific information from. It outlines a method where the AI is instructed to answer a question using only the provided document and to cite the passages used. An example is given where the AI successfully extracts a definition from a text and cites the source, and also correctly indicates 'insufficient information' when the question cannot be answered by the provided text.
🎯 Enhancing Prompts with One-Shot and Few-Shot Examples
The final paragraph of the script explores the power of providing examples through one-shot and few-shot prompting to illustrate tasks for the AI. It explains that giving clear examples helps the model replicate the desired outcome, with research suggesting that few-shot prompting (two to five examples) yields better results. An example is provided where Chat GPT is instructed to write an abstract in the style of existing journal abstracts, demonstrating the AI's ability to mimic the style effectively.
Mindmap
Keywords
💡Prompt Engineering
💡Tokens
💡Context Window
💡Actionable Steps
💡Delimiters
💡128,000 Token Context
💡Reference Text
💡One Shot and Few Shot Prompting
💡Research Papers
💡Insufficient Information
💡Abstracts
Highlights
Introduction to the most important tactics for effective prompt engineering with Chat GPT.
Tactic 1: Importance of including specific and clear details in prompts for better predictions.
Explanation of the model's context window and how it uses tokens to predict subsequent words.
Example of a good prompt for writing an article on AI in healthcare with specified focus and audience.
Demonstration of the model's output adhering to the detailed prompt, showcasing six paragraphs and a conclusion.
Tactic 2: Splitting complex tasks into simpler subtasks for more precise responses.
Example of breaking down the task of organizing a virtual conference into actionable steps.
Tactic 3: Utilizing larger prompts with the 128,000 token context limit for detailed interactions.
Use of delimiters to separate different parts of a request for clarity in long prompts.
Example of structuring a prompt with XML tags for synthesizing research findings and drafting sections.
Tactic 4: Providing a reference text enclosed in triple quotes for extracting specific information.
Method of answering questions using only the provided document and citing passages.
Tactic 5: Power of providing examples using one-shot and few-shot prompting for task illustration.
Research showing better results with few-shot prompting using two to five examples.
Example of writing an abstract in a journal's specific style using two abstract examples.
Output demonstration of an abstract written in a similar style to the provided journal examples.
Upcoming video teaser on five additional tactics for prompt engineering with Chat GPT.
Transcripts
hello everyone and in this video we're
going to be looking at the most
important tactics that you need to use
in your prompts to get the best results
out of chat GPT and I'm going to be
showing you this with some practical
examples for each one and this is based
on open ai's official prompt engineering
guide which I'll leave the link for you
below in case you want to go into
further detail so tactic number one
include specific and clear details in
your prompt and I know this seems
straightforward but it's important to
understand why we need to do this and
this is because the model considers all
the previous tokens or let's just call
them words and uses it to predict the
next words within its current context
window which is basically the session
and the words that you're working with
right now so by providing that extra
detail in your prompt you give it
significantly more information to work
with and to accurately predict all the
subsequent words and tokens that are
coming next so the more you're able to
provide in terms of uh context the more
relevant your output is going to be so
if you were to give a bad example you'd
say something like write about AI in
healthcare which is completely General
but a good example would be to write a
prompt like this so write an article
composed of six paragraphs so you can
see I specified the amount of the output
that I want on the impact of AI in
healthcare focusing on how it enhances
personalized patient care okay so I've
said specifically what I want the focus
of my article to be the article is
intended for healthc Care Professionals
and administrators so I've said who my
audience is and where it's going to be
published in a leading Healthcare
Journal the tone should be informative
and professional specifi the tone the
way it should be written and it's
suitable for an audience familiar with
medical and technological advancements
telling it that you can use some
technical terminology as well so I'm
going to enter this
prompt okay so if we look at our output
we can immediately see it's given us six
paragraph output that we wanted and it's
also added a conclusion at the end uh if
we look at the actual writing we can see
that it's focused on the specific areas
that told it to focus on which is the
area of personalized patient care and I
can already see that it's given me some
examples of specific AI tools and if I
read through it I can see that it's
adopted the tone that I want it has
technical language and it sounds
professional as well so again being H
specific and clear in my in my prompt
will help me get a better output so
tactic number two split complex tasks
into simpler subtasks so instead of just
asking for help in general terms break
down your request into specific
actionable steps and this approach makes
it easier for chat GPT to give you a
more precise and helpful response for
each step so I'll give you an example
instead of prompting it by say help me
organize a virtual conference on AI you
can first ask chat GPT to give you the
steps involved so we will put a prompt
here that says what are the steps
involved in organizing a virtual
conference on the advances of AI okay so
I'm going to enter
that and you can see that it's come back
with some steps that tell me what I need
need to do in order to organize the
conference I've got find the conference
goals and so on got almost um 12
different steps that I would need to go
through and now I can then follow up
this prompt that says provide a detailed
guide on organizing a virtual conference
on the topic of advancements in
artificial intelligence and machine
learning and then the guide should
include all the above steps
and now you can see it's come back with
a detailed guide and for each step it's
now broken it down into further substeps
that tell me exactly what I need to do
for each one and it's given me a lot
more detail that it initially did in the
first part so helping it to think in
these in terms of these different steps
will get more detailed precise responses
and what you can do is you can even ask
for further detail
step number one consider any other
variables that should be added okay and
I can specify one specific step to go
into further detail and then I will
enter
that okay and you can see just for that
step again um it's gone into a lot more
detail in terms of the topics and themes
and so on so when we get the model to
think in terms of steps we're usually
getting a more precise detail detailed
output than if we just ask it to think
of a topic as a whole so tactic number
three is to use larger prompts with the
limits and with chat GPT for you can now
use much larger prompts because it has a
128,000 token context which is roughly
about 100,000 words and this means that
GPT 4 can retain and understand
information across all those words and
you can use this to your advantage to
have more detailed and complex
interactions with the model so to get
the best results from these long prompts
you need to use the limits clearly to
separate different parts of your request
and when we talk about Del limits
they're basically symbols or words that
help the AI understand where one part of
your input ends and the other begins so
some examples are as we can see here you
can use triple quotes you can use three
dashes you can use angle brackets you
can use XML tags really it doesn't
matter which delimiter you use the most
important thing is that you stay
consistent using the same delimiter for
the type of instruction that you're
giving so let me give you an example
just to clarify a bit and I probably
don't need to use all these delimits
here but I have quite a large uh prompt
that I'm going to be inputting and I
want to structure it um so that it's
very clear in terms of what it needs to
do and in terms of the output that I
want it to give me so if you look here
I've put my instructions um in XML tags
so showing the beginning and the end and
I've said you're an expert academic
writer tasked with synthesizing research
findings your primary Duty is to
summarize provided research papers and
then develop crucial sections based on
these summaries please adhere to the
following guidelines while drafting your
summary and section and then the next
section I've given it is the research
papers and I've said I have attached the
three research papers for summarization
which I'm going to attach them in the
prompt and then I've got some section
constraints so specific things that I
want it to stick to while it's
responding so maintain a clear and
concise academic tone limit each section
structure each section um clearly and
engagingly and so on and then I've got
the summary of the research papers so if
you look at the instructions above I
wanted to summarize the papers first and
then I've got a section that says
research paper sections to craft okay
and here so the first section I wanted
to come up with is the research
questions and I've also given an example
that I wanted to follow when it comes up
with the research question that it knows
when it comes back gives me some
research questions it will follow the
guidelines or the structure of this
example and then got my research
questions section and then this is where
it's going to insert the research
questions here and then I've got a
section on the important theoretical
Frameworks and it's going to insert the
theoretical Frameworks based on the
articles that I provided here so you can
see there's a lot of sections had I just
written it all as one prompt it might
not have come back with an accurate
response you don't definitely don't need
to include all that in every prompt so
I'm going to go back to chat GPT and
what I'm going to do is I'm going to
insert this entire prompt prompt over
here and what I'm also going to do
attach the Articles to this prompt so
after I've attached my articles I'm now
going to enter the
prompt okay and if we look at the output
it's come back with exactly what I've
specified it's first summarized the
research papers that I've provided and
you can see it's got three clear
summaries of the three research papers
the next section is the research
questions it's now come up with three
different research question questions
that are based on the um articles that I
have submitted and it's also following
the style of the example that I had
given and then the next section we can
see is the important theoretical
Frameworks again it's specified the
three theoretical Frameworks from the
above examples and you can see I was
able to get the exact output and the
structure that I wanted so tactic number
four is to provide a reference text and
you won't use this all the time but this
is really useful when you're focusing on
extracting specific information from an
article or a reference or a data set and
to do this you provide a document and
enclose that in triple quotes and a
specific question for chat GPT to answer
so we can add a prompt here that says
you will be provided with a document
delimited by triple quotes and a
question your task is to answer the
question using only the provided
document and to cite the passages of the
document used to answer the question if
the document does not contain the
information needed to answer this
question then simply write insufficient
information okay so basically we're
telling it don't make up the information
just say that it doesn't have the
information and then if an answer to the
question is provided it must be
annotated with the citation and use this
format to give me the uh citation okay
so I've added the prompt here now what I
need to do is I'm going to open my
triple quotes and I'm going to extract
the reference text from an article so
I'm going to add that in and I'm also
going to add like I mentioned the uh
question that I wanted to answer which
is what definition is provided for
entrepreneurial action and I'm going to
close off the section with my triple
quotes again and I'm going to enter that
and you can see the response that it's
given the definition provided of
entrepreneurial action emphasize the
importance of both opportunities and
individuals it's given me where it's
extracted the information from and the
citation here's the citation in the
format that I specified um above and
then it carries on giving me the uh the
rest of the information here as well so
what if I asked that something that
really isn't part of the text will it
respond as I asked it to to just say
insufficient information um so I'm just
going to ask it something that
definitely not in that reference text
I'm going to
say how many companies were used in this
sample and you can see it's come back
with insufficient information this is a
really good way to get accurate
information from a reference text and
also to build on tactic number three you
can see using the limits here to
identify the part of the text that we're
submitting is also really useful so
tactic number five is to provide
examples using one shot and few shot
prompting now providing examples is such
a powerful technique in prompt
engineering and the main idea here is to
illustrate the task by giving clear
concrete examples which can then help
the model to replicate the outcome and
this technique is sometimes called One
Shot prompting or few shot prompting
depending on how many examples you give
so obviously one shot prompting would be
just giving it one example and then F
shot prompting would be giving two or
more examples and research has actually
shown that when you use f shop prompting
so anything from two to five examples uh
you actually get much better results so
I'm going to use two examples in this
prompt and we're going to apply this to
getting chat GPT to write an abstract
based on existing abstracts in a journal
so say for example I want to uh submit a
paper to this journal and and they
already have a specific structure to the
way they write the abstracts I'm going
to copy two different abstracts exactly
the same and I'm going to give chat GPT
an instruction here that says okay use
these two abstract examples to write an
abstract in a similar style for a
research paper and then I've given the
title of the paper that I wanted to
write this is the end of the
instructions and you can see I've used
the limits here as well and then I've
put the abstract example one write an
abstract for research paper and I've
taken the exact name of the research
paper okay and then I've added here the
actual abstract that was written for
that paper with the same title and then
I've given another example also from the
same Journal using writer an abstract
for research paper and then I've found
another paper and given it the title and
then I've added the abstract so I'm
going to enter
that okay and now you can see from the
output it's come back with an abstract
that really is in a similar style to the
ab racts from the journal that I've
chosen and if we read through it you'll
find that it actually sounds really
academic it talks about the Gap that's
been addressed which is a key feature of
all the other abstracts that we have it
talks about the findings obviously this
one is uh chat GPT making these things
up have to input additional material in
your prompt to make it accurate but
you'll see that illustrates the findings
and and then it goes on to talk about
the discussion elements in the app so
really well uh written done an amazing
job in copying style of the previous
examples so in this video I've focused
on five main tactics that you can use to
really get the best out of your prompt
engineering there are five more that I'd
like to talk to you about but I'll keep
them to the next video so please
subscribe and I look forward to seeing
you in the next video
浏览更多相关视频
Ahli Prompt Chat GPT Cuma Butuh 7 Menit !!
Master ChatGPT in 2024 - Every Feature Explained (hidden ones too)
Discover Prompt Engineering | Google AI Essentials
Master the core principles of prompt engineering with GitHub Copilot
This AI Tool is a Game-Changer for Graphic Designers
5 guide GRATUITE per ChatGPT, Claude, Copilot, e altre AI
5.0 / 5 (0 votes)