is usually the best place to start for prompting tips.
Below we present a number of prompt formats we find work well, but feel free to explore different formats, which may fit your task better.
Prompting Best Practices and Examples
Note: "{text input here}" should be replaced with actual text/context.
1. Use the latest model
New models offer improved ease of prompt engineering.
2. Put instructions at the beginning of the prompt and use ### or """ to separate the instruction and context
Less effective ❌:
Summarize the text below as a bullet point list of the most important points.
{text input here}
Better ✅:
Please summarize the following text, highlighting key points:
"""{text input here}"""
3. Be specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style, etc
Be specific about the context, outcome, length, format, style, etc
Less effective ❌:
Write a poem about OpenAI.
Better ✅:
Write a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}
4. Articulate the desired output format through examples
Less effective ❌:
Extract the entities mentioned in the text below. Extract the following 4 entity types: company names, people names, specific topics and themes.
Text: {text}
Show, and tell - the models respond better when shown specific format requirements. This also makes it easier to programmatically parse out multiple outputs reliably.
Better ✅:
Extract the important entities mentioned in the text below. First extract all company names, then extract all people names, then extract specific topics which fit the content and finally extract general overarching themes
Desired format:
Company names: <comma_separated_list_of_company_names>
People names: -||-
Specific topics: -||-
General themes: -||-
Text: {text}
5. Start with zero-shot, then few-shot, neither of them worked, then fine-tune
✅ Zero-shot
Extract keywords from the below text.
Text: {text}
Keywords:
✅ Few-shot - provide a couple of examples
Extract keywords from the corresponding texts below.
Text 1: Stripe provides APIs that web developers can use to integrate payment processing into their websites and mobile applications.
Keywords 1: Stripe, payment processing, APIs, web developers, websites, mobile applications
##
Text 2: OpenAI has trained cutting-edge language models that are very good at understanding and generating text. Our API provides access to these models and can be used to solve virtually any task that involves processing language.
Keywords 2: OpenAI, language models, text processing, API.
Describe this product in a concise paragraph of 3 to 5 sentences.
7. Focus on Constructive Instructions
Less effective ❌:
The following is a conversation between an Agent and a Customer. DO NOT ASK USERNAME OR PASSWORD. DO NOT REPEAT.
Customer: I can’t log in to my account.
Agent:
Better ✅:
The following is a conversation between an Agent and a Customer. The agent will attempt to diagnose the problem and suggest a solution, whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article www.samplewebsite.com/help/faq
Customer: I can’t log in to my account.
Agent:
8. For Code Generation, Use Specific Language Cues
Less effective ❌:
# Write a simple python function that
# 1. Ask me for a number in mile
# 2. It converts miles to kilometers
In this code example below, adding “import” hints to the model that it should start writing in Python. (Similarly “SELECT” is a good hint for the start of a SQL statement.)
Better ✅:
# Write a simple python function that
# 1. Ask me for a number in mile
# 2. It converts miles to kilometers
import
Parameters
Generally, we find that modelandtemperature are the most commonly used parameters to alter the model output.
are generally more expensive and may have higher latency.
temperature - A measure of how often the model outputs a less likely token. The higher the temperature, the more random (and usually creative) the output. This, however, is not the same as “truthfulness”. For most factual use cases such as data extraction, and truthful Q&A, the temperature of 0 is best.
max_tokens (maximum length) - Does not control the length of the output, but a hard cutoff limit for token generation. Ideally you won’t hit this limit often, as your model will stop either when it thinks it’s finished, or when it hits a stop sequence you defined.
stop (stop sequences) - A set of characters (tokens) that, when generated, will cause the text generation to stop.
"I need a [type of text] that will address the pain points and needs of my [ideal customer persona] and show them how my [product/service] is the solution they've been searching for."
"I'm looking for a [type of text] that will convince [ideal customer persona] to sign up for my [program/subscription] by explaining the value it brings and the benefits they'll receive."
"Please write a compelling [type of text] that speaks directly to my [ideal customer persona] and encourages them to take [desired action] on my [website/product]."
"I need a [type of text] that will persuade [ideal customer persona] to purchase my [product/service] by highlighting its unique benefits and addressing any potential objections."
"I'm looking for a [type of text] that will draw in my [ideal customer persona] with a strong headline and hook, and then convince them to take [desired action] with persuasive language and compelling evidence."
"I need a [type of text] that will make my [ideal customer persona] feel [emotion] about my [product/service] and convince them to take [desired action]."
"I'm looking for a [type of text] that will explain the features and benefits of my [product/service] to [ideal customer persona] in a clear and concise manner, leading them to make a purchase."
"I need a [type of text] that will tell a story about my [product/service] and how it has helped [ideal customer persona] achieve their [goal] in a relatable and engaging way."
"I'm looking for a [type of text] that will speak directly to the needs and pain points of my [ideal customer persona] and persuade them to take [desired action] with a sense of urgency and strong offer."
"I'm looking for a [type of text] that will showcase the unique features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase."
"I need a [type of text] that will overcome objections and concerns my [ideal customer persona] may have about my [product/service] and convince them to take [desired action]."
"I need a [type of text] that will showcase the value and benefits of my [product/service] to [ideal customer persona] and convince them to take [desired action] with social proof and credibility building elements."
"I'm looking for a [type of text] that will clearly explain the features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase with a strong call-to-action."
"I need a [type of text] that will make my [ideal customer persona] feel [emotion] about my [product/service] and persuade them to take [desired action] with a sense of urgency."
"I'm looking for a [type of text] that will establish trust and credibility with my [ideal customer persona] by highlighting the successes and testimonials of previous customers who have used my [product/service]."
Prompt for Blog Writing
"I'm looking for a [type of blog post] that will speak directly to my [ideal customer persona] and persuade them to take [desired action] on my [website/product]."
"I'm looking for a [type of blog post] that will establish trust and credibility with my [ideal customer persona] by highlighting the successes and testimonials of previous customers who have used my [product/service]."
"I need a [type of blog post] that will convince my [ideal customer persona] to purchase my [product/service] by highlighting its unique benefits and addressing any potential objections."
"I need a [type of blog post] that will make my [ideal customer persona] feel [emotion] about my [product/service] and persuade them to take [desired action] with a sense of urgency."
"I need a [type of blog post] that will overcome objections and concerns my [ideal customer persona] may have about my [product/service] and convince them to take [desired action]."
"I'm looking for a [type of blog post] that will showcase the unique features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase."
"I'm looking for a [type of blog post] that will clearly explain the features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase with a strong call-to-action."
"I'm looking for a [type of blog post] that will draw in my [ideal customer persona] with a strong headline and hook, and then convince them to take [desired action] with persuasive language and compelling evidence."
"I need a [type of blog post] that will address the pain points and needs of my [ideal customer persona] and show them how my [product/service] is the solution they've been searching for."
"I need a [type of blog post] that will speak directly to the needs and pain points of my [ideal customer persona] and persuade them to take [desired action] with a sense of urgency and strong offer."
"I'm looking for a [type of blog post] that will showcase the value and benefits of my [product/service] to [ideal customer persona] and convince them to take [desired action] with social proof and credibility-building elements."
"I'm looking for a [type of blog post] that will educate my [ideal customer persona] on a specific [topic] and persuade them to take [desired action] on my [website/product]."
"I need a [type of blog post] that will tell a story about my [product/service] and how it has helped [ideal customer persona] achieve their [goal] in a relatable and engaging way."
"I'm looking for a [type of blog post] that will engage my [ideal customer persona] with a unique and compelling perspective on [subject] and persuade them to take [desired action] on my [website/product]."
"I need a [type of blog post] that will provide valuable and relevant information to my [ideal customer persona] and persuade them to take [desired action] on my [website/product]."
Prompt for Email Marketing
"I need a [type of email] that will make my [ideal customer persona] feel [emotion] about my [product/service] and persuade them to take [desired action] with a sense of urgency."
"I'm looking for a [type of email] that will speak directly to the needs and pain points of my [ideal customer persona] and persuade them to take [desired action] with a sense of urgency and strong offer."
"I need a [type of email] that will showcase the value and benefits of my [product/service] to [ideal customer persona] and convince them to take [desired action] with social proof and credibility building elements."
"I'm looking for a [type of email] that will clearly explain the features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase with a strong call-to-action."
"I need a [type of email] that will convince my [ideal customer persona] to purchase my [product/service] by highlighting its unique benefits and addressing any potential objections."
"I'm looking for a [type of email] that will establish trust and credibility with my [ideal customer persona] by highlighting the successes and testimonials of previous customers who have used my [product/service]."
"I need a [type of email] that will overcome objections and concerns my [ideal customer persona] may have about my [product/service] and convince them to take [desired action]."
"I'm looking for a [type of email] that will showcase the unique features and benefits of my [product/service] to [ideal customer persona] and persuade them to make a purchase."
"I need a [type of email] that will tell a story about my [product/service] and how it has helped [ideal customer persona] achieve their [goal] in a relatable and engaging way."
"I'm looking for a [type of email] that will draw in my [ideal customer persona] with a strong headline and hook, and then convince them to take [desired action] with persuasive language and compelling evidence."
"I'm looking for a [type of email] that will explain the features and benefits of my [product/service] to [ideal customer persona] in a clear and concise manner, leading them to make a purchase."
"I need a [type of email] that will make my [ideal customer persona] feel [emotion] about my [product/service] and convince them to take [desired action]."
"I need a [type of email] that will persuade my [ideal customer persona] to purchase my [product/service] by highlighting its unique benefits and addressing any potential objections.""I'm looking for a [type of email] that will convince my [ideal customer persona] to sign up for my [program/subscription] by explaining the value it brings and the benefits they'll receive."
"I need a [type of email] that will address the pain points and needs of my [ideal customer persona] and show them how my [product/service] is the solution they've been searching for."
- A quick reference table of ChatGPT shortcuts is divided by domain and function, allowing users to filter by tags, search by keywords, and copy with a single click to utilize prompts.Even beginners can simply copy the prompt phrases, make minor modifications, and send them to ChatGPT to obtain the desired output.