Effective AI Prompting

By learning how to formulate clear and guiding prompts, you can use artificial intelligence (AI) to generate text that will give you more relevant responses.

Here you will find examples of how to get started with writing prompts that work with the most common tools, as well as some ideas for how to use generative AI in your practice as a teacher or course administrator

En bild som har skapats med generativ AI tjänsten Midjourney which shows an university environment augmented with advanced technologies and AI
An image which has been generated using the generative AI tool 'Midjourney' Foto: N/A

Getting started with CoPilot (KI's generative AI)

The IT department provides a page with information on using the Large Language Model generative AI inbuilt in Office, CoPilot. This page includes information on... 

  • How to log into CoPilot
  • How to make sure your data is protected
  • The differences in CoPilot as part of the browser as opposed to CoPilot as a webpage
  • How to use CoPilot to work with files
  • The differences between the version of CoPilot all staff get in Office 365, and the version that requires an extra subscription.

What is a prompt?

A prompt can be an instruction, question, or statement that generates a response.  How you formulate a prompt will affect the response. By providing more details, you can pinpoint what response you expect. To support this, you can relate to TRACI:

  1. Task
  2. Role (roll)
  3. Audience (mottagare, kontext)
  4. Create, Establish
  5. Intent

An example of a prompt with TRACI:

{ROLE→} You are an an educational technologist working at Karolinska Institutet. {TASK→} Write me a lesson plan for a one hour long interactive session on generative for {AUDIENCE →} educational professionals. {INTENT→} The aim is to help them get started in using generative AI in their practice. {CREATE→} Give detailed suggestions for how the session would work, and plan it according to a Kolb experiential learning cycle

Uses and types of prompts

By copying any of the following examples into any AI tool (Copilot, Gemini, ChatGPT), you can comment or provide additional instructions to refine the result to arrive at a desired outcome. Make sure the prompt is relevant to the task you want help with by Include the necessary information and context.

If you prefer to work with the Microsoft Edge browser, you can first review Copilot settings

Choice of language

Swedish is a so-called Low Resource Language, which means in practice that since there is less Swedish-language training data for language models to train on, there are usually differences in the answers that you get. As a general recommendation, it may be worth prompting in English even if the last step in your process will be a translation.

Roleplay

In many systems, you can ask the AI to take on a role in the first prompt. For example:

You are an expert at writing AI prompts. Can you explain to me step by step how to write a prompt for Midjourney? Each step, ask me to submit my work and then give a suggestion on how I can improve it

Strangely enough, the word 'expert' often makes a big difference

Be careful with words that may be loaded with contextual values

You should be very careful when using certain words that can be loaded with values, e.g. if you write a prompt that asks a language model to 'improve' a text. Improve for whom? To what end? There are big differences between improvements whether the end product is to be a scientific text or an advertisement.

Use structure

One could suggest a structure in which language models should respond, for example, but could mark section headings with asterisks (e.g. ***Background***) or a numbering system

Ask for alternatives

To some extent, generative AI is random. Because of this, you can save time by asking for several different options for a particular thing at once, e.g. 'Give 20 different suggestions for learning lenses for X at Y-level'

Ask for an explanation

It may be worth making the process visible, or asking for explanations about the process, as it can contribute to one's own learning or even improve the quality of the response (see so-called Chain of Thought prompting). Try the following phrases:

  1. ... Explain the steps
  2. ... Annotate the process
  3. ... Document with comment as if it were code

NB! The examples are developed with Edge Copilot. Responses from other AI tools may differ.

Hidden possibilities

Although on the face of it, these services use text inputs and give text outputs, you can also use tables, sound, the camera, there is image analysis and several can even analyse documents.

Some specific tips for teachers

In our experience, it's often worthwhile prompting using terms for specific educational theories, like in the example which uses Kolb's Experiential Cycle above. Not only will you get the specifics of that theory, but we also experience there is often a quality lift in the response overall. This similarly applies to naming educational theorists, paradigms, methods or even just terms such as 'modern pedagogy'. Similarly, there can also be relatively large differences when shifting between the 'normal' and 'creative' setting in Co-Pilot.

Hint! Try to include one of the following keywords in your prompts: describe, explain, create, generate, recommend, suggest, advise, compare, define, discuss, exemplify, problematize, argue, simulate, specify, persuade, summarize, demonstrate, contrast, categorize, analyze, assess.

Ideas for how to use AI in your practice

Bing AI is surprisingly good at generating suggestions for lessons, with some careful prompting. Note that there is an assumption if you ask for a lesson plan that you're probably wanting to lecture. As such, add some hints about the format

Copilot AI can give pretty good suggestions for lesson planning, depending on how you prompt the service. Note that there is an assumption that if you ask for a lesson plan that you probably want to lecture. Therefore, add some tips about the format.

For example: Create a workshop based on Kolb's learning cycle

Prompt:

Can you write me a lesson plan along the lines of Kolb's learning cycle? Start with "abstract conceptualization." Include a few options for per-section discussion questions.

The learning outcomes of the session are...

Comments on the prompt and the result

This prompt worked well as a starting point, but some parts of the output needed a little more work. To do this, I copied the part I was unhappy with into a new prompt in the same conversation and asked Bing to generate 5 more options.

This prompt could potentially be adjusted by giving it more context about the students and the institution, but seemed to work quite well for my context, probably due to the fact that much of this information is included in the ILOs. Another possibility for use with workshops for example would be to use anonymized free-text data from a registration form - for example, the answers to the question "What are your expectations of the workshop?" to tailor it further.

Prompt:

Generate an alt text for the attached image in accordance with the guidelines on this web page (https://accessibility.huit.harvard.edu/describe-content-images). The context in which this image will be displayed is ********. The text should be a maximum of 255 characters long, and I would like to have versions in both Swedish and English

Comment:

Bing Co-Pilot is surprisingly good at describing images and can even handle more complex things like flowcharts. In my case, the interpretation of the image was completely correct, but it is worth checking the result carefully. One thing which is noteworthy is that generative AI tends to be bad at counting characters or words.

Prompt:

I am a teacher in [education] at Karolinska Institutet and teach students in year [level]. You are a medical pedagogical expert who will help me formulate multiple-choice questions (MCQs). The questions should be at the solo level [specify level]. Include distractors in the answer options that are credible but incorrect. Create examples and justify your answer with both answers and formative assessments. Use advice on question construction, e.g. Vanderbilt's page on MCQ questions or https://medicine.utah.edu/documents/writing-effective-multiple-choice-questions-1pdf

Reflection:

This prompt didn't actually work very well with Edge Copilot! When compared to Google Gemini, a prompt gave more detailed examples and more well-reasoned answers about the function of distractors. One can imagine that even if Co-Pilot has a good understanding of what a multiple-choice question is, it may have less understanding of how a good multiple-choice question would be formulated. Despite a reference to pages with advice and recommendations, Copilot did not include these in the response.

Prompt:

Create a screenplay in table format. The table should contain the following columns: Scene, Image Composition, Dialogue, Voice-over, and Graphics. The film is supposed to show two people riding a bus when one of them suddenly collapses. The viewer will learn how to administer first aid and call 112. The information must be conveyed with images, sound, graphics and text.

Reflection:

Asking the AI to structure the answer in a table format creates a good basis for further work. You can add other columns e.g.: "Add a column Length" and each scene will be adjusted according to time. Experiment with setting different headings for the column and see how the script develops.

Contact us if you have questions about how you can work with prompts to support teaching, or suggestions for new uses for prompting.

In addition to Microsoft Co-Pilot, the Unit for Teaching and Learning has tried out a number of different generative AI services. Here are a few that we have tried and found interesting. Note: KI does not have an agreement with these services regarding e.g. license, personal data or security.

  1. Midjourney – Generative AI for images that is extremely programmable and responsive. UoL has a small community on Discord that all KI employees can join.
  2. Adobe Firefly – An image generator that is particularly good at realistic images. Among other things, you can edit images, start from images that you upload yourself and more.
  3. Teachermatic – A stakeholder example of a suite of teacher tools. The results can be a bit mixed when you want to get material out at university level, but then the tool can provide inspiration for what is possible with language models

References 

Allprompts (2023), 70 ChatGPT Prompts for Medical Students to Develop Skills, https://allprompts.com/chatgpt-prompts-for-medical-students Hämtad: 2023-04-25

Brand, S, (2023): User’s Guide to the TRACI Prompt Framework for ChatGPT, https://structuredprompt.com/free-traci-users-guide-white-paper Hämtad: 2023-04-25

Eager, B., & Brunton, R. (2023). Prompting Higher Education Towards AI-Augmented Teaching and Learning Practice. Journal of University Teaching & Learning Practice, 20(5).

Heston, T (2023) Prompt Engineering For Students of Medicine and Their Teachers. MegaSimple.com LLC, Las Vegas, NV

Open AI (2023), Prompt Engineering, https://platform.openai.com/docs/guides/prompt-engineering Hämtad 2023-05-30