The art of prompting AI
The art of prompting AI involves crafting effective instructions or queries to elicit the desired response or behavior from the AI model. It is a skill that requires an understanding of how AI models like ChatGPT interpret and generate text based on the provided input.
Some tips to enhance your AI prompts
Be clear and specific
Clearly define what you want the AI to do or answer. Vague or ambiguous prompts can lead to inaccurate or irrelevant responses. State your requirements in a precise manner to guide the AI effectively.
Provide context
When asking a question or providing instructions, include relevant context to help the AI understand the scenario better. Background information, specific details, or examples can help the AI generate more accurate and relevant responses.
Experiment with different phrasings
AI models might interpret prompts differently based on slight changes in wording. If you’re not getting the desired response, try rephrasing your prompt or ask the question from a different angle. It can help you uncover different aspects or perspectives that the AI can address.
Use system message
Including a system message at the beginning of your prompt can guide the AI’s behavior. For example, you can specify the role or persona you want the AI to take on, such as a poet, a historian, or a character from a book. The system message helps set the context and influences the AI’s response accordingly.
Utilize user instructions
You can provide explicit instructions to the AI within your prompt. For instance, you can ask the AI to list pros and cons, generate step-by-step instructions, or compare different options. Directing the AI’s focus can lead to more specific and tailored responses.
Iterate and refine
If the initial response doesn’t meet your expectations, you can iterate by providing feedback to the AI. You can explicitly mention what you liked or disliked about the previous response and ask the AI to revise or expand on it. This iterative process can help guide the AI towards the desired outcome.
Be mindful of biases
AI models learn from the data they are trained on, which can sometimes include biases present in the training data. When prompting AI, it’s important to be aware of potential biases and strive for fairness and inclusivity. Frame your prompts in a way that promotes unbiased and objective responses.
Remember, while prompting AI is an art, it may still have limitations or generate unexpected results. Experimentation and refinement are key to achieving the desired outcome.
The art of prompting AI, specifically with ChatGPT as the model, in a table format
Aspect | Description | Example |
Clarity | Clearly and precisely defining the desired output or question to avoid ambiguity. | “Provide a detailed explanation of the concept of artificial intelligence, including its benefits and potential risks.” |
Context | Providing relevant background information or examples to help the AI understand the desired context. | “In the context of historical events, what were the main causes and consequences of World War II?” |
Phrasing | Experimenting with different wordings or angles to explore various perspectives or to obtain desired information. | “Can you explain the process of photosynthesis in plants?”<br>”How do plants convert sunlight into energy through photosynthesis?” |
System Message | Using a system message to guide the AI’s behavior or adopt a specific role or persona. | (System: You are an expert chef) “What are some popular recipes that involve chocolate as a main ingredient?” |
User Instructions | Including explicit instructions within the prompt to guide the AI’s response or formatting. | “Please provide a step-by-step guide on how to bake a chocolate cake, including the ingredients and baking temperature.” |
Iterative Approach | Providing feedback to the AI to refine or expand on previous responses, improving the quality of subsequent answers. | (User: The previous response was good, but could you also explain the historical significance of the event?) |
Bias Awareness | Being mindful of potential biases and promoting fairness and inclusivity in the prompts. | “Describe the contributions of both men and women in the field of computer science throughout history.” |
These examples showcase different aspects of prompting AI with ChatGPT, highlighting the importance of clarity, context, phrasing, system messages, user instructions, an iterative approach, and bias awareness. Remember, effective prompting requires experimentation and fine-tuning to achieve the desired outcomes.
Example of how a prompt engineer could fill in the table form with their specific skills
Aspect | Description | Example |
Clarity | I excel at clearly and precisely defining the desired output or question to avoid ambiguity. | “Please generate a creative and engaging short story with a twist ending.” |
Context | I am skilled at providing relevant background information or examples to help the AI understand the desired context. | “In the context of fashion trends, what were the main influences and impacts of the Roaring Twenties on women’s clothing?” |
Phrasing | I have experience experimenting with different wordings or angles to explore various perspectives or obtain desired information. | “Compare and contrast the advantages and disadvantages of traditional education versus online learning.” |
System Message | I am proficient at using system messages to guide the AI’s behavior or adopt a specific role or persona. | (System: You are a sports commentator) “Provide a live commentary on a thrilling soccer match between two rival teams.” |
User Instructions | I am adept at providing clear and explicit instructions within the prompt to guide the AI’s response or formatting. | “Please generate a step-by-step tutorial on how to perform a basic card trick, including the required setup and instructions for each step.” |
Iterative Approach | I have the ability to provide constructive feedback to the AI, allowing for refined and expanded responses. | (User: The previous response was good, but could you also provide some tips for improving public speaking skills?) |
Bias Awareness | I am conscientious about potential biases and strive for fairness and inclusivity in my prompts. | “Describe the contributions of scientists from diverse backgrounds in the field of physics throughout history.” |
As a prompt engineer, these skills can help guide the AI model and produce more accurate and tailored responses.
Let’s work out each example with a title and starting with the aspect of clarity
Clarity
Title: Requesting a Detailed Explanation of Artificial Intelligence
Prompt: Please provide a detailed explanation of the concept of artificial intelligence, including its benefits and potential risks.
Context
Title: Exploring the Causes and Consequences of World War II
Prompt: In the context of historical events, what were the main causes and consequences of World War II?
Phrasing
Title: Understanding the Process of Photosynthesis in Plants
Prompt: Can you explain the process of photosynthesis in plants?
System Message
Title: Seeking Popular Chocolate Recipes from an Expert Chef
Prompt: (System: You are an expert chef) What are some popular recipes that involve chocolate as a main ingredient?
User Instructions
Title: Requesting a Step-by-Step Guide for Baking a Chocolate Cake
Prompt: Please provide a step-by-step guide on how to bake a chocolate cake, including the ingredients and baking temperature.
Iterative Approach
Title: Expanding on Historical Significance
Prompt: (User: The previous response was good, but could you also explain the historical significance of the event?)
Bias Awareness
Title: Emphasizing the Contributions of Men and Women in Computer Science
Prompt: Describe the contributions of both men and women in the field of computer science throughout history.
These examples showcase how each aspect can be applied to formulate specific prompts, ensuring clarity in the requests made to the AI model.
Shop tip
Prompt Engineer on Amazon
Learn Prompting
Prompt Engineering for ChatGPT
Thank you for questions, shares and comments!
Share your thoughts or questions in the comments below!
Source OpenAI’s GPT language models, Fleeky, MIB, & Picsart