Learn the art of prompt engineering with our comprehensive guide. Discover powerful formulas, actionable verbs, and expert best practices to craft effective prompts for consistently high-quality AI responses. If you are looking to move beyond generic AI outputs and start getting precise, high-quality results, you are in the right place. Read on to explore the structured formulas and expert techniques that will improve how you communicate with any AI model.
Table of Contents
- What is prompt engineering
- What is a Prompt?
- Why You Should Care About Prompts
- Elements of a Good Prompt
- Top 15 Verbs for Starting a Prompt
- Using Context
- The Six-Part Prompt Formula
- Positive vs Negative Prompts
- Positive Prompts
- Negative Prompts
- Using Personas
- Benefits of Using Personas
- How to Use Personas
- The Life Cycle of Prompt Creation
- Step 1: Requirement Analysis
- Step 2: Research & Data Collection
- Step 3: Drafting
- Step 4: Review & Refinement
- Step 5: Testing & Validation
- Step 6: Deployment
- Step 7: Feedback & Iteration
- Step 8: Archival & Documentation (if applicable)
- Prompt Conditioning
- How to craft effective prompts?
- The Perfect Prompt Formula
- Best Practices for Effective Prompts
- Prompting for Various Use Cases
- Writing Emails
- Writing Social Media Posts
- Writing Blog Posts
- Translation
- Resume Writing and Improving
- Cover Letter Writing
- Linkedin Profile Update
- Interview Preparation
- Career Advice
- Text to Table / Table to Text
- Dataset Generation
- Code Generation
- Code Explanation
- Language Conversion
- Excel Help
- ACT AS…
What is prompt engineering
Prompt Engineering: The process of crafting effective prompts
The way you phrase your prompts can have a significant impact on the quality and relevance of the responses you receive.
What is a Prompt?
A prompt is a question or statement used to elicit a specific response or action from a person or system.
Why You Should Care About Prompts
Prompts shape the quality and direction of responses, influencing user experience and the effectiveness of AI interactions.
Elements of a Good Prompt
- Clarity: It should be easily understandable and free from ambiguity.
- Specificity: It should be precise in its request or direction to elicit targeted responses.
- Brevity: Conciseness often leads to more accurate and direct responses.
- Neutrality: It should avoid biases or leading language.
- Relevance: The prompt should be pertinent to the audience or system it’s intended for.
- Structure: A well-organized prompt can guide responses in a systematic manner.
- Open-endedness (when necessary): This allows for more comprehensive and thoughtful answers, especially useful for explorative queries.
- Context: Providing enough background or situational information for more informed responses.
A good prompt strikes a balance among these elements depending on the context and desired outcome.
Top 15 Verbs for Starting a Prompt
- Describe: Elicits detailed explanations.
- Explain: Asks for clarification or elaboration.
- List: Requests multiple items or examples.
- Compare: Seeks similarities between items or concepts.
- Contrast: Asks for differences between items or concepts.
- Define: Requests a clear meaning or definition.
- Discuss: Invites comprehensive answers or opinions.
- Identify: Asks for recognition of an item, concept, or idea.
- Demonstrate: Requests a show of understanding or application.
- Evaluate: Asks for judgment based on criteria.
- Predict: Seeks an educated guess based on given information.
- Analyze: Requests breaking down of a topic into its components.
- Recommend: Asks for a suggestion or advice.
- Illustrate: Requests an example or clearer picture of a concept.
- Assess: Invites evaluation or appraisal of a situation or concept.
Using these verbs helps in crafting prompts that are more directed and can elicit specific types of responses.
Using Context
Tired of Terrible AI Responses? Could This Powerful 6-Part Formula Be the Ultimate Fix? Want Flawless Results from ChatGPT? Are You Using This Simple Prompting Method Correctly?
To consistently get high-quality results from AI like ChatGPT, you can use a structured formula. This approach involves providing clear instructions across six key components.
The Six-Part Prompt Formula
A well-crafted prompt includes specific information that guides the AI to produce the precise output you need. While you do not need all six elements for every prompt, understanding their order of importance is crucial. The Task is mandatory, Context is very important, and the remaining four components are beneficial for refining the results.
- Task: Start with a clear action verb like “generate,” “write,” or “analyze.” State your end goal clearly, whether it is a simple request or a multi-step instruction.
- Context: Provide essential background information. This helps the AI understand the user’s situation, what a successful outcome looks like, and the environment in which the task is being performed. For example, instead of just asking for a workout plan, specify your weight, goals, and time constraints.
- Exemplars: Include examples or a specific framework for the AI to follow. Research shows that providing models, such as the STAR method for interview answers or a sample of a well-written resume point, drastically improves the quality of the output.
- Persona: Tell the AI who it should be. You can ask it to act as a specific professional, like a physical therapist or a senior marketing manager, or even a famous or fictional character to adopt a particular style.
- Format: Describe exactly how you want the final output to look. You can request information be presented in a table, as bullet points, an email, or formatted with specific headers for a document.
- Tone: Specify the desired style or feeling of the text. You can ask for a formal, casual, witty, or confident tone. If you are unsure which words to use, you can ask the AI to suggest tone keywords for a specific situation.
By building your prompts using these components, you provide just enough relevant information to constrain the AI’s possibilities, leading to more accurate and useful responses. A detailed prompt that includes task, context, persona, and format will yield a far superior result compared to a simple, one-sentence request.
Positive vs Negative Prompts
Positive Prompts
Definition: Prompts that encourage a constructive, affirming, or optimistic response or behavior.
Characteristics:
- Framed in an affirmative manner.
- Encourage constructive thinking or behavior.
- Focus on strengths, possibilities, or solutions.
Examples:
“List the benefits of renewable energy.”
“Describe a time when you felt most accomplished.”
“What are the best strategies to improve productivity?”
Uses:
- Encouraging creativity and open thinking.
- Building confidence and reinforcing positive behaviors.
- Eliciting solutions or forward-thinking answers.
Negative Prompts
Definition: Prompts that encourage critical thinking, highlight challenges, or solicit potential drawbacks or problems.
Characteristics:
- Often highlight problems, risks, or downsides.
- Can point out gaps in understanding or knowledge.
- May challenge the status quo or provoke reflection on potential pitfalls.
Examples:
“What are the disadvantages of fossil fuels?”
“Describe a time when a project did not go as planned.”
“What are the potential risks of AI in decision-making?”
Uses:
- Identifying potential problems or challenges in a scenario.
- Encouraging critical thinking and evaluation.
- Preparing for potential risks or obstacles.
Note: While the terms “positive” and “negative” may carry certain connotations, in the context of prompts, neither is inherently good or bad. They serve different purposes and are valuable depending on the intended outcome. It’s essential to use them judiciously based on the context and the desired type of response or behavior.
Using Personas
Benefits of Using Personas
- Empathy Development: Personas help teams empathize with users, ensuring products and services are user-centric.
- Focused Decision Making: They provide clarity, allowing teams to make decisions aligned with user needs.
- Tailored User Experience: Designing for specific personas ensures a more personalized and effective user experience.
- Effective Communication: Personas provide a common understanding and language for teams to discuss their users’ needs.
How to Use Personas
- Research: Gather data through surveys, interviews, and observations to understand your audience.
- Segmentation: Group your users based on shared characteristics, behaviors, and goals.
- Persona Creation: Develop detailed profiles for each group, including demographics, motivations, behaviors, and pain points.
- Application: Use personas to guide decisions in product development, design, marketing, and more.
- Review and Update: Periodically reassess and update personas based on new data or changes in the user base.
The Life Cycle of Prompt Creation
The life cycle of prompt creation is a systematic process that ensures the development of effective prompts, whether for AI training, assessments, user interactions, or any other context. Here’s a breakdown of the life cycle:
Step 1: Requirement Analysis
Objective: Understand the purpose and goals of the prompt.
Actions:
- Define the desired outcome or response.
- Determine the target audience or system.
Step 2: Research & Data Collection
Objective: Gather necessary information to shape the prompt.
Actions:
- Conduct user surveys, interviews, or observe behaviors (if applicable).
- Review literature or previous prompt examples.
- Understand the capabilities and limitations of the system (especially in AI context).
Step 3: Drafting
Objective: Create an initial version of the prompt.
Actions:
- Use actionable verbs and clear language.
- Ensure specificity, relevance, and clarity.
- Create multiple versions/variations if possible.
Step 4: Review & Refinement
Objective: Improve the quality and effectiveness of the draft.
Actions:
- Seek feedback from peers, experts, or a sample of the target audience.
- Iterate based on feedback, ensuring clarity and lack of ambiguity.
- Test the prompt with the AI system (for AI-related prompts) and observe responses.
Step 5: Testing & Validation
Objective: Ensure the prompt elicits the desired response or behavior.
Actions:
- Conduct A/B testing, if possible, to compare effectiveness.
- Analyze responses for alignment with objectives.
- Refine the prompt based on test outcomes.
Step 6: Deployment
Objective: Introduce the prompt to the intended audience or system.
Actions:
- Implement the prompt in its final context (e.g., AI chatbot, assessment, survey).
- Monitor initial responses or behaviors for any unexpected outcomes.
Step 7: Feedback & Iteration
Objective: Continuously improve the prompt based on real-world usage.
Actions:
- Collect feedback from users or analyze AI responses over time.
- Refine and modify the prompt as needed based on this feedback.
- Re-deploy updated prompts and continue the feedback loop.
Step 8: Archival & Documentation (if applicable)
Objective: Store prompt versions and outcomes for future reference.
Actions:
- Document the prompt’s development process, decisions made, and feedback received.
- Archive older versions and store them systematically.
The life cycle of prompt creation emphasizes a structured approach, continuous feedback, and iteration, ensuring the development of effective prompts that meet their intended objectives.
Prompt Conditioning
Context: background information
Task: a specific question
Context: “In a world where superpowers are commonplace, there are few heroes who can
truly make a difference.”
Task: “Write a short story about a superhero who discovers a new power and uses it to save the world from a catastrophic threat.”
How to craft effective prompts?
- Be specific
- Use clear language
- Provide relevant context
- Test and iterate
Are you making this frustrating mistake when writing your ChatGPT prompts? What is the brilliant formula for getting amazing results from ChatGPT?
To get better and faster results from AI tools like ChatGPT, you need to provide a well-structured prompt. Using a simple formula can save you significant time by reducing the need for multiple revisions. This approach helps the AI understand your request clearly from the start.
The Perfect Prompt Formula
A powerful prompt combines four key elements in a specific order. Following this structure consistently will improve the quality of the AI’s response.
The formula is: Context + Specific Information + Intent + Response Format = The Perfect Prompt
- Context: Start by telling the AI who you are or what role you are playing. For example, “I am a beginner cook.”
- Specific Information: Provide the necessary details for your task. For example, “I am trying to make Italian cuisine.”
- Intent: Clearly state what you want the AI to do. For example, “Provide me with a simple and easy-to-follow recipe.”
- Response Format: Specify how you want the answer to be presented. For example, “Put the steps in a numbered list from one to ten.”
Best Practices for Effective Prompts
To master this formula, keep these seven best practices in mind. They will help you refine your prompts for the best possible outcome.
- Be Specific: Provide as much detail as possible. Instead of asking for “all dog breeds,” ask for “small dog breeds suitable for apartment living.”
- State Your Intent: Explain your goal. Rather than just saying “explain quantum physics,” say “Help me explain quantum physics to my son for his science homework in a simple way.”
- Use Correct Spelling and Grammar: While the AI can often understand mistakes, errors can sometimes lead to incorrect or irrelevant answers.
- Direct the Output Format: Tell the AI exactly how you want the information structured, whether it’s a paragraph, a step-by-step list, or a table.
- Follow Up with Questions: Even with a perfect prompt, you may need to ask clarifying questions to refine the answer.
- Experiment with Phrasing: If you do not get the desired result, try rephrasing your request. Sometimes, a different wording helps the AI understand your goal better.
- Fact-Check the Response: After receiving an answer, you can ask the AI to fact-check its own output to ensure accuracy.
By combining the four-part formula with these best practices, you can create effective prompts that deliver precise and useful results from any AI model.
Prompting for Various Use Cases
Writing Emails
“Write an email to John Smith about the upcoming project deadline and ask for an update on the progress.”
“Write a follow-up email to customers who have abandoned their shopping carts on our website. Encourage them to complete their purchase, and include a personalized offer or discount to sweeten the deal.
Writing Social Media Posts
“Write a 1-minute script for a social media video promoting our new online course, SQL for Data Analysis – Guided Project Course, launch, with an upbeat and informative tone.”
“Write a Linkedin post about the new online course you finished. The course name is SQL Guided Project Course.”
Writing Blog Posts
“Write an SEO-friendly blog post about the benefits of meditation for stress relief, with a conversational tone and a minimum of 500 words.”
Translation
“Translate this product description from English to Turkish, maintaining a formal and professional tone: If you’re looking to gain practical experience with SQL and learn how to analyze real-world datasets, then this course is for you!”
“Write synonyms for the word articulate”
Resume Writing and Improving
“Write a short, one paragraph, professional summary for a data analyst with 2 years of experience working at a startup company, doing various data analytics tasks. Include key skills and qualifications.”
“Write a resume for this person, including the short summary you wrote”
“Put the skills section after the summary section and update the resume. These skills are SQL, Tableau, Power BI, advanced statistics, python, excel, and communication skills.”
Cover Letter Writing
“Write a cover letter for an entry level data scientist position at a tech startup. Highlight the candidate’s portfolio with python and sql data analytics and machine learning projects, such as sales analysis and fraud detection.
Linkedin Profile Update
“Write a summary section for a newly graduated aspiring data scientist’s LinkedIn profile. Focus on the candidate’s course work and portfolio related to data science, data analysis, and machine learning.
Interview Preparation
“Provide a list of common interview questions for a senior data analyst position. Include tips on how to answer each question effectively.”
“Provide sql technical coding question examples. Include the answers.
Career Advice
“Provide advice for a recent college graduate looking to enter the finance industry as a financial analyst. Include tips on networking and gaining relevant experience.
Text to Table / Table to Text
“Convert the following text into a table: John, Doe, 35, Software Engineer. Include column headings for first name, last name, Age, and Occupation.”
“Fill this table with 10 more random employees.”
“Explain this table in plain English”
Dataset Generation
“Generate a sample dummy dataset of 1000 records with the following fields: Name, Age, Occupation, Salary. Include only records with salaries above $50,000.”
Code Generation
“Write a Python function to calculate the area of a triangle. The function should take the base and height as arguments and return the area.”
“You have the customers table with a unique customer_ID column and a purchases table with a customer_ID column and a purchase_date column. Write a SQL query to find the customers who have made at least one purchase in every quarter of the year 2022.”
Code Explanation
“Explain this code
def my_func(n) :
sm = 0
for i in range(1, n+1) :
sm = sm + (i * i)
return sm
n = 4
print(my_func(n))”
Language Conversion
“Convert this code to python
num = as.integer(readline(prompt=”Enter a number: “))
flag = 0
if(num > 1) {
flag = 1
for(i in 2:(num-1)) {
if ((num %% i) == 0) {
flag = 0
break
}
}
}
if(num == 2) flag = 1
if(flag == 1) {
print(paste(num,”is a prime number”))
} else {print(paste(num,”is not a prime number”))}”
Excel Help
Formula help: If you’re struggling with a particular formula or function in Excel, you can ask ChatGPT for help. For example, you can ask, “How do I use the VLOOKUP function in Excel?”
Troubleshooting: If you’re encountering an error or issue with Excel, you can describe the problem to ChatGPT and ask for suggestions on how to fix it. For example, you can say “I’m getting a #REF error in Excel, how do I fix it?”
Data analysis: If you need help analyzing data in Excel, ChatGPT can provide suggestions on which functions or tools to use. For example, you can ask “How do I create a pivot table in Excel?” or “What is the best way to visualize data in Excel?”
Tips and tricks: ChatGPT can also provide tips and tricks to help you work more efficiently in Excel. For example, you can ask “What are some keyboard shortcuts in Excel?” or “How do I format cells in Excel?
ACT AS…
“Act As…” prompts are prompts that ask you to imagine or pretend to be a particular person, character, or entity and then respond to a situation or question from that perspective.
Act As prompts are below:
Social Media Influencer
“Act as a social media influencer. You will create content for Linkedin, Facebook, Youtube, and TikTok to increase brand awareness and product promotions. My first request is: Write a Linkedin post about the upcoming Introduction to Python course to tease and create excitement.”
Career Coach
“Act as a career coach, and imagine you are meeting with a recent college graduate who is struggling to find a job in their field of study. In this scenario, the graduate has a degree in business administration and has been applying for entry-level data analyst positions at various companies for several months but has not had any luck. They are feeling frustrated and uncertain about their career path. Your first task is: Provide actionable steps to take moving forward.”
Programming Assistant
“I want you to act as a programming assistant for a beginner who is learning Python. They are trying to write a program that asks the user for their name and age and then prints a message with that information. Please provide guidance and suggestions as they work through the problem. Remember to keep your responses simple and clear, and avoid using technical jargon as much as possible.”
Translator
“I want you to act as an English translator. You will first detect the language and then translate it to English with elegant English words and sentences. I want you to reply with the name of the detected language first and then the English translation. Do not write explanations. My first sentence is “Bilgisayar muhendisliginden yeni mezun oldum. Programlama dillerinden hangisine agirlik vermeliyim?”
Interviewer
“I want you to act as an interviewer for data analyst and data scientist positions at a tech company. You will conduct virtual interviews with candidates who have submitted their resumes and cover letters, and evaluate their technical skills, problem-solving abilities, and
communication skills. Prepare a list of interview questions that are tailored to each position.”
Marketing Expert
“I want you to act as a marketing expert for [YOUR NICHE], who is trying to promote products. They have provided you with information about their product, target audience, and budget and have asked for your guidance on how to create effective marketing campaigns. Please provide a comprehensive marketing plan that includes strategies for social media, email marketing, paid advertising, content marketing, and other relevant channels. Your first task is: Develop an email marketing campaign for [YOUR NICHE]”
Math Teacher
“I want you to act as a math teacher. It is your job to explain the given questions in easy-to-understand terms. Include step-by-step explanations of the concept and examples whenever possible; also, suggest online resources for further study. Your first task is “Explain pvalue.”
SQL Terminal for Practicing
“I want you to act as a SQL terminal with a database. The tables in this database are “employees, ” “salaries, ” and “departments.” First, you will ask me a question. Then, I will answer your question by queries in mysql, and you will show me the result. If the query is wrong, you will explain why it is wrong and ask me to provide the corrected query. If the query is wrong again, you will explain why it is wrong and provide the correct answer. Your first task is: Start asking a data analysis question based on the tables provided