Copilot AI chatbot can be given long and complex prompts that resemble light automation or programming. In this tip, we’ll go over an example of a complex prompt that can be used to create one correct multiple choice exam question to EXAM or Moodle.
What do I need?
Open Copilot AI chatbot and remember to log in with your TUNI ID. You can use Copilot sidebar in Edge web browser or copilot.microsoft.com with any other browser.
When building and testing a complex prompt, it’s a good idea to use a Word document or other suitable helper file where you can store different versions of the prompt.
What do I need to do?
1.Copy the sample prompt below:
Your goal is to output preformatted XML code. This is not Python code, so do not try to execute it. Use this text in the following task: History of Tampere Number of questions in the following task: 2 Number of options in individual questions in the following task: 4 Language of questions and options: English Before everything, output first: <?xml version="1.0" encoding="UTF-8"?> <quiz> Then, output one empty line. Then, output: <question type="multichoice"> Create a multiple choice quiz about the text I gave. Create a specified number of questions with answer options in a specified language. Only one question option is correct and other options are incorrect options. Do not use too easy incorrect options, instead use something that is almost correct but not quite. Output individual question with the following formatting: <name> <text>###question###</text> </name> <questiontext format="html"> <text><![CDATA[<p>###question###</p>]]></text> </questiontext> Replace placeholder ###question### with the actual question. Then output options to individual question with the following formatting: <answer fraction="###fraction###" format="html"> <text>###option###</text> <feedback format="html"> <text>###feedback###</text> </feedback> </answer> Replace placeholder ###fraction### with 100 if the option is correct or with 0 if the option is incorrect. Replace placeholder ###option### with the actual option. Replace placeholder ###feedback### with word correct in the specified language if the option is correct or with word incorrect in specified language if the option is incorrect. Then after options to individual question output following: <shuffleanswers>1</shuffleanswers> <single>true</single> <answernumbering>abc</answernumbering> <defaultgrade>1</defaultgrade> After everything, output: </question> After everything, output one empty line. After everything, output: </quiz> Follow the described format precisely as I'm using another tool that expects this exact XML format. Output the whole answer as preformatted XML code.
2. In Copilot, select GPT-4 Creative as the prompt style.
3. Paste the prompt into the Copilot message field.
Note! Edit the information at the top of the prompt to suit your needs: (Subject area of questions, number of questions, number of answer options, and language of questions. )
Use this text in the following task: History of Tampere Number of questions in the following task: 2 Number of options in individual questions in the following task: 4 Language of questions and options: English
4. Submit the prompt. Wait for the answer.
5. Copy the XML code from the Copilot response by clicking the Copy button.
6. From your computer, open the Notepad app or other text editor. Paste the copied XML code into Notepad.
7. Save the file, eg. examquestions.xml . The important thing is that the file ends in xml.
Import exam questions to TUNI EXAM
- Log in to TUNI EXAM
- Open question library
- Click: Import questions from Moodle
- Select the XML file from your computer
- Done
Import exam questions to Moodle
- Log in to TUNI Moodle
- Open course homepage
- Select from the menu: More > Question bank
- Select from the first drop-down menu: Import
- Choose file format: Moodle XML format
- If necessary, change the settings under General, e.g. select a specific category for questions
- Import questions from file > Choose a file > Upload a file > Choose file
- Upload this file
- Import
- Done
What do I have to take into account?
- Complex prompts tend to work more reliably in English, so AI doesn’t have to do translations in between.
- AI can still understand the same input differently at different times of use. At worst, the end result doesn’t work as expected every time. In addition, AI language patterns are constantly evolving, and therefore an input that previously worked in a certain way may work differently.
- The sample prompt will probably work as is, or with minor changes, also with other advanced AI chatbots.
- Copilot has a limit of 8000 characters for the length of normal prompt. The sample prompt is approximately 2000 characters long.
- The sample prompt can be freely edited, developed and distributed. It would be very nice though if you refer and link to this tip as a original source.
Read more