
Prompt Engineering with AI
This is a guide on prompt engineering with AI.
It can be frustrating to insert prompt after prompt into generative AI tools and not get the responses we are looking for. As we work with generative AI, it is important to remember the way we ask for information matters. An effective prompt can be the difference between getting what we want and getting useless noise.
Use Clear Language
Clarity is key when engineering prompts. A clear and concise prompt will make it easier for the AI to understand your request and provide you with relevant, high quality output. When writing a prompt for generative AI, aim for a specific and simple prompt that is free from spelling and grammatical errors.
While being specific increases the size of the prompt, we should also get rid of unnecessary information, jargon, confusing phrases, mistakes, any of which can lead the AI down the wrong path. For example, instead of: 'my team is interested in x, tell me about that', consider: 'provide a summary of x, including its history, features, and configuration'.
By using clear language, you increase the chances of receiving accurate and useful information from your generative AI tool.
Every Prompt Has A Purpose
It is hard for the AI to give you what you want if it does not know what you are asking for. The first step in creating an effective prompt for generative AI tools is to define its purpose. Think about factors like:
- Tone: How do you want the output to sounds? Funny? Professional?
- Format: How do you want the output structured? Bullet list? Paragraph? An essay?
- Audience: Who is this for? Do you want something for children? Beginners? Experts?
By considering these and incorporating our answers into the prompt, we can produce much more targeted results from the AI. Consider a prompt like the following: 'Write about artificial intelligence'. As opposed to: 'Write structure for a brief presentation on the use of artificial intelligence for a manufacturing business. The tone should be professional and aimed at business executives'.
Which do you think will get us closer to our goals? Next time you are using a generative AI tool, consider the goal you are trying to achieve and consider how you can present it using the prompt. This will likely bring the output much closer to what you are looking for.
Include Important Context
Context is crucial when engineering prompts. Providing relevant background information can improve the AI's understanding of your request and lead to more accurate responses.
Include any details that are essential to understanding your request, such as historical context or related concepts. Instead : 'My code is throwing an error', Consider: This line of code is throwing the exception'.
If there are specific limitations or requirements, make them clear in your prompt. While context is important, avoid providing too much information, as it may confuse the AI or cause it to focus on less important aspects of your request.
For example, instead of:
'Explain how to use a computer program'
Using our previous strategies, we would have:
'Explain how to use a photo editing software, such as Adobe Photoshop, for beginners who have never worked with image editing tools'.
Using our new tips, we would add:
'Focus on basic functions like cropping, resizing, and adjusting color levels'.
By including important context, you help the generative AI tool understand your request more thoroughly and produce a response that better meets your needs.
In this guide, we covered some of the ways to effectively engineer prompts when working with generative AI tools. An effective prompt can make the difference in getting the information that we want. In summary, we should:
- Use clear language. Get rid of unnecessary information, jargon, confusing phrases, and mistakes.
- Define the purpose of the prompt using concepts like tone, format, and audience.
- Include important context: If there are specific limitations or requirements, make them clear in your prompt.
- Provide examples