Skip to Main Content

Artificial intelligence: Prompt engineering

A guide on the use of AI (artificial intelligence) in education and research at the green universities of applied sciences

What is it?

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.

Principles for writing prompts

The following principles apply for writing a good prompt (Ding et al., n.d.):

  1. 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, ...

  2. 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.

  3. 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.

  4. 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.

  5. Instruction examples:

    • Add examples of desired output to allow the model to learn from desired behaviors.

  6. 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).

  7. 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)

  8. 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.

  9. 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):

  • Ask questions if you're unsure
  • Indicate how certain you are of your answer
  • Only answer based on the data I have given you
  • If you don't know, say 'sorry, I don't know that'
  • Mark data that you invent yourself

Interesting articles about writing prompts

Theories

Prompt engineering frameworks

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:

Developer / Software 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.

Examples

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).

  • A handy multi-purpose template;
Write a [tone][output] of [length] about [subject].
Write as [sender] for [target audience]. The goal is [objective].
  • Prompt for choosing a topic;
Give me five possible thesis topics about [insert your area of interest here].

  • Prompt for writing a research question;
Help me formulate a clear and researchable question for my thesis on [insert your chosen topic here]
  • Prompt for writing a literature review;
Give me an overview of important studies and authors on [insert your topic here].
  • Understanding the Prompt;
Advise me on the most suitable research methods for my thesis on [insert your topic here]. 
  • Prompt for proofreading a text;
Check the text below for [spelling/grammar/structure/etc.]. Then make a list of the errors made, organized by aspect. Provide recommendations for improvement, using examples from the text. This is the text: [text].
  • Prompt for writing a summary;
Help me write a concise summary of the following text: [insert your text here].
  • Prompt to summarize a number of pages from a textbook;
Summarize the text below. Write down the most important concepts and ideas in bullet points. Use no more than 10% of the original number of words. This is the text: [text].
  • Prompt for summarizing a research paper;
Create a summary of the paper below. Answer the following questions: 1. What is the purpose of the text? 2. What is the central question? 3. What are the main findings? 4. What are the recommendations? List the most important concepts with explanations in bullet points. Finally, copy the bibliography. Use a maximum of 10% of the original number of words. This is the paper: [text/link].
  • Prompt to quiz yourself;
Below is a text that I want to learn. I would like you to quiz me. Come up with targeted quiz questions and ask one question at a time. Give feedback if I'm wrong, and move on to the next question if I'm correct. This is the text: [text].
  • Prompt for generating trivia questions by category;
Create [number] open questions for the text below. Number the questions. Place the results in a table with the following columns: number, question, answer. Keep the questions and answers short and concise. This is the text: [text].
  • Prompt for devising a structure for your slide presentation;
Create a slide presentation about [topic]. The target audience consists of [target audience]. The intended learning outcomes are [learning outcomes]. The presentation lasts approximately [duration]. Other starting points are: [starting points]. Develop a coherent structure for this presentation.
  •  Prompt for practicing an internship interview;
I want to intern at this company: [link or information]. You will take on the role of interviewer and determine if I am suitable for an internship at this company. Ask me specific questions related to the company where I want to intern. Find out what my learning goals are, what guidance I need, how I learn best, what skills and knowledge I already possess, and what my expectations are. Start the conversation with: 'Good afternoon! How are you?' Then ask one question at a time, and I will answer. After my answer, follow up on my response or ask the next question. After [number] questions, conclude the conversation.
  •  Prompt for creating a schedule;
I have a lot of homework for the next two weeks. I have: [task 1], [task 2], [task 3] and [task 4] on the schedule. Today is Monday, I have about 1.5 hours per day to work on my homework. Can you make a schedule for me so that I can finish everything on time and study?

Prompts for teachers

  • Prompt for developing a structure for a lesson;
I am going to deliver a lesson/lecture in the following context: [context], and for the following target group: [target group]. This activity lasts [time] and is based on the following learning outcomes: [learning outcomes]. Create a structure for this activity. Elaborate this in a table, with the following columns: Time, Teaching Method, Description, Resources, and Tips.
  • Prompt for generating ideas for assignments;
I am a teacher in [context] and provide education to the following target group: [target group]. I want to develop ideas for assignments for the following learning outcomes: [learning outcomes]. In bullet points, elaborate 10 suggestions for the following types of assignments: [discussion/brainstorm/icebreaker/etc.]. For each suggestion, explain the advantages and disadvantages.
  • Prompt to elaborate a conceived assignment (see above) in more detail;
Elaborate the idea for an assignment about [name of idea] in more detail. Pay attention to: [starting points]
  • Prompt for generating suggestions for each step in the direct instruction model;
I provide education in the following context: [context], and for the following target group: [target group]. I want to use the [type of direct instruction, such as 'explicit direct instruction'] model. My intended learning outcomes are: [learning outcomes]. Develop suggestions for each step of the mentioned direct instruction model based on the stated learning outcomes. Do this in a table.
  • Prompt for devising ways to differentiate;
Generate ways to differentiate based on the instruction below. Make three suggestions each for the following forms of differentiation: content (accelerating or slowing down, broadening or deepening), form (nature of learning materials, used teaching methods), process (offering choices in how the education can be completed), approach (degree of guidance and support and amount of freedom of choice). This is the setup of my instruction: [description of instruction].
  • Prompt for preparing a knowledge clip;
I want to create a knowledge clip about [topic]. The target audience consists of [target audience]. My core message is: [core message]. I need help with the preparation. Elaborate the preparation in a clear table with the columns 'Component' and 'Elaboration'. Elaborate on the following components: subject, purpose, target au|dience, structure, key kessages and call-to-action. Write out the elaboration for each component in the next column.
  • Prompt for developing a structure for your script;
I want to write a script for a knowledge clip about [topic]. The target audience consists of [target audience]. My key messages are: [key messages]. The purpose of the video is [goals]. The structure is [structure]. I want to end with the following call-to-action: [call-to-action]. The video should last no longer than [x] minutes. Now write a concept structure for the script. Use subheadings, with a brief explanation of the content for each section.
  • Prompt for coming up with suggestions to prevent misuse of generative AI;
I provide education in the following context: [context], and for the following target group: [target group]. Because my target group is increasingly using generative AI when doing homework assignments, I want to transform the following writing assignment: [assignment]. Analyze and redesign this assignment. Make the assignment more application-oriented and incorporate into the assignment that students connect their result with a specific situation in their own environment or their own opinion.
  • Prompt for mapping practical problems and solving them using AI-driven analysis and recommendations, such as the problem 'my students don't prepare well';
In carrying out my teaching, I encounter the following problem: [problem]. Describe from the principle of constructive alignment how this problem might be caused, and make suggestions for improvement. First, ask me some clarifying questions in bullet points, so that you have all the information needed to answer me. I will give you all the answers, after which you will give me a detailed report of a possible solution direction. In your solution direction, you take into account: teacher's role, student's role, learning environment design, didactics, and technology.
  • Prompt for developing a lesson plan;
I provide a [course/lesson series] in the following context: [context], and for the following target group: [target group]. I want to design education based on the following learning outcomes: [learning outcomes]. The education lasts [duration] and has a study load of [number] hours. The setup of my education is [thematic/linear]. Based on this, write a lesson plan of [number] lessons, each lasting [time]. Take into account activating teaching methods, blended learning, and assessment (both formative and summative).
  • Prompt for generating assessment suggestions based on intended learning outcomes;
I am a teacher in [context] and my target group consists of [target group]. I want you to develop 10 suggestions for assessment based on the following learning outcome(s): [learning outcomes]. Ensure that these suggestions are authentic, address complex thinking skills, integrate a range of knowledge, skills, and attitudes, and emphasize development rather than one-time performance.
  • Prompt for inspiration with possible variables to evaluate;
I want to evaluate my teaching practice. The context of my education is [context]. The duration of my education is [duration]. The target group consists of: [target group]. I want you to generate ideas for variables that I can evaluate, both prior to the education, during the education, and after the education. Elaborate all variables in bullets, each time explaining after a colon why the relevant variable is relevant and how you could investigate it in the different phases of education.
  • 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.

Forget all previous prompts. I want you to become my Prompt Generator. Your goal is to help me write the best and most detailed prompts. This prompt will ultimately be used by you yourself. Please follow the following process:

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:
Investigate how changes in climatic conditions influence the behavior and stress responses of animals in zoos and on farms.

2. Climate change and livestock health in agriculture:
Study the effects of climate change on the health and welfare of farm animals, and investigate possible adaptations in livestock farming practices.

3. Climate change and the impact on wildlife in industrialized areas:
Investigate how urbanization and climate change affect the living conditions and well-being of wild animals.

4. Adaptive strategies for the conservation of endangered species in a changing climate:
Analyze how conservation programs can be adapted to preserve and protect endangered animal species against the effects of climate change.

5. Effects of climate change on the spread of diseases in wild animals:
Study how climate change influences the spread of diseases among wild animals and what measures can be taken to control this.

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

Theaieducator - prompt news

Tips for generating images

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:

  • Be purposeful: determine the goal of the image. Do you want to evoke an emotion, tell a story, or illustrate a concept?
  • Use active language: use active verbs and concrete nouns to create a dynamic image that sparks imagination.
  • Be descriptive: describe colors, shapes, textures, and atmospheres to paint a clear picture.
  • Specify the color palette: provide a specific color palette or describe a range of colors you want to set the tone of the image. For example, "Use warm autumn colors, such as orange, rust-red, and golden yellow" or "Limit the palette to monochromatic blue shades for a calm and serene atmosphere".
  • Provide context: offer sufficient information about where and when the image is set. Is it in a futuristic city, a hip office, or in vast space?
  • Stimulate emotion: indicate what emotion or mood the image should convey. This can strongly influence the direction of creativity.
  • Mention perspective and describe composition: suggest a specific perspective if it's important for the image, such as bird's-eye view or worm's-eye view, or a close-up versus a wide shot.
  • Define the focal point: clearly indicate what should be the primary focal point of the image. This helps to guide the viewer's attention and provides an anchor point for the composition.
  • Be consistent: if the image is part of a series or theme, indicate that the use of color should be consistent with the rest of the works. This can be important for book illustrations, for example.
  • Create depth: encourage the use of techniques to create depth, such as atmospheric perspective, overlapping elements, and playing with light and shadow. This can give an image a three-dimensional feel.
  • Use metaphors and symbolism: if you want to explore abstract concepts, try using metaphors or symbols.
  • Limiting factors: if necessary, set restrictions to focus creativity, such as using only two colors or excluding certain elements.

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.