The quality of generative AI outputs is strongly influenced by the instructions it receives (prompts). By adjusting prompts (prompt engineering), you increase the chance of obtaining more useful and relevant outcomes. Prompt engineering is the skill of inputting prompts in the best possible way to get what you want.
As AI tools are increasingly integrated into software that people use in their work, dealing with them is becoming more important. There are a few basic rules that apply to various AI chatbots. Be clear and concise, explicitly state what you want, and provide one or more examples if possible. Another trick that often works is to assign a 'role' (Wokke, 2023). For example: "You are a nutritionist. Name three topics about proteins that are interesting to research for a thesis."
This page provides some tips to help you improve your prompts.
The following principles apply for writing a good prompt (Ding et al., n.d.):
Clear instructions:
Provide clear and specific instructions in the prompt to guide the model towards the desired output.
Avoid ambiguity or vagueness in the prompt, as well as jargon.
Write affirmatively, state what you want and avoid negations and mentioning what you don't want. A chatbot focuses on the characteristic words in the prompt and often doesn't read words like 'not'.
Use descriptive adjectives, such as constructive, honest, specific, detailed, thoughtful, ...
Adding context:
Provide relevant context in the prompt, so the model can better understand the input and generate contextually relevant answers.
Specify the target audience (for example, the education level, whether they are first-year or fourth-year students, etc.).
Also specify the purpose of the output.
Control mechanisms:
Add control mechanisms to the prompt to influence the style, sentiment, or length of the output (number of words, number of sentences).
For calculations: always add "make sure the answer is correct". This may seem like an unnecessary addition, and for a human it probably is. But a chatbot is not human.
Feedback loops:
Iteratively improve the prompts by using feedback from users or evaluating the model's output.
Have the chatbot ask you (follow-up) questions at the end of each answer.
Note: Avoid a long question-and-answer session with the chatbot here. After six or seven responses, the chatbot's output becomes less accurate and increasingly unpredictable. It's better to start a new chat at that point, using the preliminary result of the previous chat as a starting point.
Instruction examples:
Add examples of desired output to allow the model to learn from desired behaviors.
Avoiding question formulation:
Try to formulate the prompt in such a way that the model is not tempted to include the question in the output, unless that is specifically intended (see point 4 above).
Avoid bias in your prompt:
Bias, also known as prejudice, arises from preferences, prejudices, and social influences. An AI chatbot adopts the style of the prompt in its response. Therefore, ensure that your prompts do not contain bias. Otherwise, it's possible that ChatGPT will reflect this bias in its answer. Examples of bias can be found here: What Is Confirmation Bias? | Definition & Examples (scribbr.nl)
Specify the shape of the output
Tables, matrices, mathematical formulas are possible forms of output that are only obtained by specifying them.
You sometimes also need to specify the language (including programming languages). For example, when creating summaries, ChatGPT spontaneously responds in English unless you specify otherwise.
Tone of voice:
It appears (or seems) that a politely phrased prompt generates a better answer than a neutral prompt. When asked, ChatGPT explains that this is mainly about user interaction. The chatbot adopts the style of the prompt, and people respond positively to a positive tone of voice.
A few sentences that lead to higher quality responses (De Beer, 2024):
Interesting articles about writing prompts
Being able to 'talk' effectively with a chatbot and extract useful information from it requires the right attitude and effort. You will notice that you don't always get the answer you might expect. Fortunately, the acronym "PREPARE EDIT" can help with this (Fitzpatrick, 2023). If you apply this framework to the questions you ask, it will help you get a more concrete answer from the chatbot.
PREPARE (ask the chatbot the right questions)
Prompt: Start with a clear question. Set the stage for what follows.
For example: "Write a summary about the latest sustainable trends in agriculture"
Role: Give the AI a role and outline the context.
For example: "Assume the role of an expert in the green sector"
Explicit: Be specific in your question to avoid misunderstandings.
For example: "In the summary, mention how AI can contribute to sustainable plant cultivation."
Parameters: Set clear frameworks such as 'tone of voice' and the format of the output.
For example: "Use an informative tone and keep the summary under 300 words."
Ask: Ask the AI to pose clarifying questions to you before proceeding.
For example: "First ask me some clarifying questions and then provide an answer."
Rate: Ask the AI to evaluate its own output.
For example: "Give my summary a rating based on 0-10 points, and indicate what could be improved."
Emotions: Add an emotional stimulus. This appears to be able to increase quality (but avoid sarcasm, irony, or humor as AI doesn't recognize these).
For example: "Breathe in, and breathe out. Really try your best. It's important to me."
EDIT (check the chatbot's outputs)
Evaluate: Evaluate the content of your AI output for language, facts, and structure.
Determine: Determine accuracy and confirm with other sources.
Identify: Identify biases and incorrect information in the output.
Transform: Transform content to reflect adjustments and new findings.
Other prompt engineering frameworks:
Every chatbot is built on a framework. A chatbot AI framework is a software framework that helps developers build, implement, and manage chatbots. These frameworks vary in functionality, support for programming languages, integration capabilities, and complexity. Developers choose a framework based on their specific requirements and the features that best align with the intended use of the chatbot.
Experiment
There are many ways and methods to communicate with AI chatbots, and each chatbot responds based on its framework. On this page, we show a few examples of communication techniques. You can find a wide range of other models and theories on the internet and in books. There is also plenty of room for experimentation. We encourage you to try out different approaches yourself to achieve the desired result.
Prompts for Education
Writing reports and a thesis are important components of your studies. AI can support you in researching and writing academic texts. Available tools can help you explore a topic, find examples, gain inspiration, and generate ideas.
The prompts below can assist you with this (De Beer, 2024; Last & Sprakel, 2024; Teachmehowtodothat, 2024).
Prompts for teachers
Turn the AI tool into a Prompt Generator using the following prompt
It is also possible to have the chatbot give suggestions about which prompts will provide the output you want. The advantage is that you also learn how to best communicate with chatbots.
1. Your first response is to ask me what the prompt should be about exactly. I will then answer, but we need to keep improving this in iterations.
2. Based on my input, you then generate three sections: section a) The revised prompt [give your rewritten prompt. This should be clear, concise, and easy for you as a chatbot to understand], b) Improvement suggestions [give suggestions about what details should be included in the prompt to improve it] and c) Asking for help [list in bullets the relevant questions regarding additional information needed to improve the prompt].
3. We repeat this iterative process, in which I continuously provide input to improve the prompt and you keep improving the prompt in the revised prompts section until I indicate that I am satisfied.
I want you to evaluate every prompt that I give you or that you produce yourself. Give a score from 1 to 10. Add comments about what you think could have been improved. Do this for each prompt. If your evaluation of the prompt is 8 or higher, ask me 'Do you want to execute this prompt?' with a menu choice between 'Yes' or 'No'. If I say 'Yes', execute the last prompt you suggested. If I say 'No', generate a better prompt, possibly based on additional feedback I give on the prompt.
It is essential that you execute a prompt if I say 'Yes'. Continue with this prompt until I say stop or you execute the prompt. Thank you!
Example conversation (starting point of your research)
Pretend to be an expert academic professor in animal welfare. I am writing a bachelor's thesis for the Animal Management program and I need help coming up with a topic. I am interested in topics focused on animals and climate change. Generate a list of 5 topics related to this subject. |
|
Certainly, I understand your interest in animal welfare within the framework of climate change. Here are 5 potential topics for your bachelor's thesis: 1. Effects of climate change on the stress level and welfare of animals in captivity: 2. Climate change and livestock health in agriculture: 3. Climate change and the impact on wildlife in industrialized areas: 4. Adaptive strategies for the conservation of endangered species in a changing climate: 5. Effects of climate change on the spread of diseases in wild animals: |
|
Help me formulate a clear and researchable question for my thesis on 'Effects of climate change on the spread of diseases in wild animals' |
|
Of course, formulating a clear and researchable question is essential for a successful thesis. Here's a suggestion for your research question: "To what extent does climate change influence the spread of diseases in wild animals, and which specific changes in ecological factors play a crucial role in this process?" This question provides room for an in-depth analysis of the relationship between climate change and disease spread, allowing you to investigate which ecological factors (such as temperature, precipitation patterns, habitat changes, etc.) influence the spread of diseases. It enables you to examine specific aspects of this complex relationship and draw conclusions based on empirical evidence. |
|
Create a list of sub-questions that answer this research question, so I can make a good start with my thesis. |
|
Certainly, here are some sub-questions you can consider to answer your main research question: 1. How does climate change influence the geographical distribution of wild animal species? 2. Which specific diseases in wild animals are affected by climate change? 3. To what extent do climate-related ecological factors, such as temperature and precipitation patterns, change in the habitat of wild animals? 4. What are the mechanisms by which climate change affects disease transmission between wild animals? 5. How can changes in habitat and climate influence disease hosts? 6. What role do migration patterns of wild animals play in relation to climate change in the spread of diseases? 7. Are certain animal species more susceptible to disease spread as a result of climate change, and if so, why? 8. In what way can changes in food availability due to climate change affect the health and resistance of wild animals? 9. What preventive measures can be taken to reduce the impact of climate change on disease spread in wild animals? 10. To what extent do human activities and land use changes influence the interaction between climate change and disease spread in wild animals? These sub-questions could help you explore and analyze various aspects of the relationship between climate change and the spread of diseases in wild animals. You can use these sub-questions as a guide to structure your thesis and conduct your research in a focused and structured manner. |
Example conversation (Determining search terms)
Come up with multiple search terms that can be used for literature research, where the (research) question is: To what extent does climate change influence the spread of diseases in wild animals, and which specific changes in ecological factors play a crucial role in this process? |
|
1. Climate change and disease spread in wild animals 2. Ecological factors and disease spread 3. Infectious diseases and climate change in wildlife 4. Disease ecology and climate change 5. Wildlife diseases and climate change 6. Disease epidemiology and ecological changes 7. Climate change and biological invasions of pathogens 8. Spread of diseases in the wild and climate factors 9. Impact of climate change on wild animal diseases 10. Ecological changes and disease spread in wildlife 11. Climate-related changes in habitats and disease spread 12. Wildlife health and climate change 13. Disease ecology in a changing climate 14. Changing ecology and wildlife disease spread 15. Climate change and infectious diseases in wild animals |
Engaging in conversation with the chatbot
Be aware that you can and should always ask follow-up questions after a chatbot has given an answer. You can go in any direction. For example, by asking for more suggestions, or by focusing on a specific answer the chatbot has given, which will give you more insights and information about the topic. Be creative and dare to ask questions. You'll see that chatbots understand a lot and knows what you're talking about.
Need more inspiration for effective prompts?
You can find an overview of our books about AI and prompt engineering on Greeni. You can find them via this link.
Other prompt engineering sources
The generation of images through AI is an intriguing and creative process. You never know exactly what images will be generated. Each time it's a surprise. However, the following tips can help you to make the end result align as closely as possible with your original vision.
You can find tips on Dorik.com how to write Dall-E Prompts. On Frankwatching.com (NL) we find principles that you can apply for prompts to generate images:
Example prompt
Generate an image of the countryside where sustainability is the central theme. The color palette consists of light colors, green, and warm tones. You see a Dutch landscape, focusing on the subjects of agriculture and sustainability. There is hard work being done on the landscape. The image should evoke a happy feeling. Composition: bird's eye view. |
|
I will try to create that. |