Getting the best possible content from genAI tools means being aware of the what, the why and the how of prompt engineering. As genAI models enter everyday life, prompting skills will become more in-demand. For students, being able to work effectively with genAI directly impacts successful study and learning experiences.
Becoming a prompt expert means having a clear working idea of what prompts, outputs and prompt engineering are. These are explored in more depth below but click on the flip cards to get started with three key definitions.
Prompts or commands are crucial to working with technology. They’re the instructions you use to interact with the program or system. Think of how you ask Google or Library Search to find information you need. Or the way you request Siri, Alexa or other virtual assistants to do something for you.
The prompt is the instructions you input to guide content generation whether it’s text, image, audio or a combination output. Prompts are typically word-based. However, you can also provide visual or audio prompts in addition to written instruction in some genAI tools.
Outputs are the results or content genAI tools produce, in response to the input elements or prompts you provide. Outputs can be text, image, or audio based (or a combination). Outputs are not fixed or final and can be edited, modified, or improved. The quality of the prompt input used with the genAI tool will directly impact on the quality and effectiveness of an output.
Outputs can be used for various purposes, such as entertainment, education, research, or business.
What makes a good prompt is the art of prompt engineering. Prompt engineering is the practice of building and refining prompts to ensure quality output is produced by the genAI tool. Crafting clear and effective instructions or questions for genAI tools helps them to produce content that matches your expectations.
Taking some time to consider the various elements of the content you would like the genAI tool to produce for you will help you to develop a more effective prompt. Crafting an effective prompt is similar to following a recipe to cook a meal. Using quality ingredients and the right cooking techniques will help you to produce a delicious meal.
Just like cooking can be challenging and finding the best recipe takes experimentation and time, engineering a good prompt is the same.
Specificity and revision are key to prompt engineering. Click on the plus (+) icons in the below interactive infographic for guidance on how to prompt genAI to get what you need.
This interactive image hotspot provides a process for good practice when it comes to prompt engineering. Hotspots are displayed as plus (+) icons that can be clicked, to present the information.
First you want to set the right tone for the genAI tool. So, it's important to instruct the genAI tool to play a specific role. You can instruct it to act as a coach, advisor, tutor, creator, translator, critic, or analyst.
This ensures that the information is communicated in a particular style, the right level of detail, and using the appropriate language.
genAI tools can take on various personas, jumping between different professions and different roles. It can be different types of authors, radical artists, highly experienced scientists.
Secondly you want to state the task you want completed by the genAI tool. The task is a summary of what you need the genAI tool to create.
It’s important to provide the genAI with tool specific details of what you need, and if there are specific areas you want it to focus on. Clearly communicating the goal of the task helps the genAI tool to produce a more targeted output.
Finally, it's important to give context to the genAI tool.
Context is background information that helps the genAI tool better understand how to follow instructions, complete tasks, and avoid making assumptions.
Context can include:
In some cases, you can even show the genAI tool examples of what you want, which helps it understand and create the output you're looking for.
Once you have constructed a prompt you then need to run it in a generative AI tool.
The first time that you prompt a generative AI tool it is unlikely to produce your desired outcome. After you have run your prompt, you need to evaluate what the genAI tool produced based on the prompt.
If the genAI tool didn't produce to the desired outcome, it means something in your prompt wasn't clear. Then you need to go back and refine your prompt. Until the genAI tool produces the outcome you're looking for.
The genAI tool produces the outcome that you were after based on the prompt you gave it.
Generating different forms of content (text, visual, audio, etc.) usually means using different genAI tools. Different tools to generate different forms also means you need different approaches in prompt design to get effective and desired results.
Let's break down some of the considerations for each. Click on the plus (+) icons below to learn more.
Clarity: Your prompt should be clear and specific. Vague prompts can lead to vague outputs.
Leading: You can set the tone, style, or context in your prompt. E.g., "Write a horror story about a haunted piano" vs. "Write a romantic story about a piano in a Parisian cafe."
Constraints: You can limit or guide the model's response by adding constraints, such as word limits or specific structures.
Descriptive: Since you're trying to visualize a concept, your description needs to be detailed. E.g., "A serene sunset over a mountainous landscape with a river flowing in the foreground."
Input Images: Some models allow you to input an image as a starting point, and then describe modifications or elements you want to add or change.
Iteration: You might not get the perfect image on the first try. Refining your prompts or giving feedback on initial outputs can help in achieving the desired result.
Descriptive Soundscapes: Describe the audio environment you want. E.g., "A busy city street with distant sounds of a jazz band, honking cars, and nearby footsteps."
Musical Details: If generating music, you might specify instruments, tempo, mood, or genre. E.g., "A calm piano melody with a slow tempo, accompanied by a soft cello in the background."
Duration: You may need to specify the length of the audio clip.
Feedback Loops: For nuanced compositions, iterative feedback might be required.
Key takeaway
The quality of the prompt you give a genAI tool directly affects the quality of the information or output that the genAI tool produces. Your words or prompt material has enormous impact on how good the content generated is.
Consider
Well-crafted prompts are the grounding for good quality content to be generated. However, just like when you are drafting something it takes a few versions. Usually a series of prompts are used in conversation with the genAI tool to get a good result.