Automatic Question Generation using Open AI

Open AI tool created by LearningMate
Blogpost LearningMate-Instructure - AI quiz generator V2 (1).png
Share

As an organization striving to make the end-user journey better, LearningMate has embarked upon a use case to utilize Artificial Intelligence (Open Al). With Open Al, LearningMate intends to dynamically generate questions and readily provide quizzes within Canvas LMS, enhancing the educational experience for students and saving educators time.

Below is more detail on our Al-based quiz generator built to work within Canvas LMS.

With the increasing use of Learning Management Systems (LMS) for delivering online courses, there is a growing demand for effective ways to assess student’s understanding of material. One solution to this challenge is to use automatic question generation technology, which can create questions based on the given content of a course. 

Here, LearningMate will explore how OpenAI can be used to automatically generate questions from the content of the courses found within Instructure’s Canvas LMS and how those questions can be ingested back into Canvas to prepare quizzes. In this discussion, LearningMate will delve into the utilization of LearningMate's AI technologies and Instructure’s Canvas LMS APIs to automatically generate questions from the content of a Canvas course. These generated questions can then be seamlessly incorporated back into the Canvas course, enabling the effortless creation of quizzes.

In addition to improving student engagement and retention, automatic question generation can also save time and effort for instructors and course designers. Rather than manually creating questions for each course, they can simply extract the content from the Canvas LMS >> Course >>Modules and have the questions generated automatically. This can free up more time for instructors to focus on other aspects of their course design and delivery.

OpenAI is a cutting-edge research organization that is dedicated to advancing artificial intelligence responsibly and safely. One of the technologies developed by OpenAI is GPT-3, a state-of-the-art language generation model that has been trained on a massive amount of data and can generate natural language text with remarkable accuracy. This technology can be leveraged to automatically generate questions based on the content from Instructure’s Canvas LMS courses.

To generate questions using OpenAI, the Canvas LMS APIs were used to extract the course content from Canvas LMS and pre-process it for the model. This preprocessing step can involve removing any formatting, converting the content into plain text, and removing any unwanted information.

Once the content has been preprocessed, LearningMate's tool can feed it into the OpenAI model using OpenAI APIs to generate questions. [with the correct information and instructions - actually that’s the beauty of using the AI tools, as a fact you have to be smart enough to ask your query in a way to get the responses accurately]. The model will analyze the content and generate questions that are relevant to the course material. These questions can then be reviewed by a human to ensure their quality and relevance before being ingested back into Instructure’s Canvas LMS.

The generated questions can be used in a variety of ways within the LMS, such as quizzes, assignments, and other activities. This can provide students with a dynamic and engaging way to test their understanding of the course material and improve their retention of the information.

In addition to improving student engagement and retention, automatic question generation can also save time and effort for instructors and course designers. Rather than manually creating questions for each course, instructors can simply extract the content from the courses and modules content in Canvas and have the questions generated automatically. This can free up more time for instructors to focus on other aspects of their course design and delivery.

Automatic question and answer generation using OpenAI is a powerful and flexible tool for improving the effectiveness of online learning. By automating the process of creating questions, instructors can focus on other aspects of course design and delivery, and students can benefit from a more dynamic and engaging learning experience.

Below are the steps on how to use the OPEN-AI model to automatically generate questions by pulling content dynamically from Instructure’s Canvas LMS using the native Canvas LMS API. 

Although this AI Assistant for Tutors LearningMate has specifically discussed its effectiveness within Instructure’s Canvas LMS,  it is not platform limited and can be integrated with other LMSs as well.

Step 1: Listing all the Canvas Course Modules

In this first step, you will need to use the Canvas LMS API to dynamically list all the modules in the Canvas LMS course, with the option to expand and list pages/content items in each module. 

To do this, you will need to use the List Modules API, which allows you to retrieve a list of all the modules in a course and provide a list of pages for the instructors to select from.

Listing all the Canvas Course Modules

 

Learningmate Quizz Generator

 

Step 2: Selecting the module page content item

Once you have the list of modules, you can then use Canvas LMS API to select a module page content item and display its contents. To do this, one will use the Get Single Module API, which allows them to retrieve the details of a specific module in a course.

selecting module

 

Step 3: Generating quizzes

Once you have the selected module page content, you can then click the "Generate Quizzes" option to get the content and push it into OPEN-AI. To do this, you will use the OPEN-AI API with a predefined instruction, such as "Generate 5 MCQ questions from the provided text"

Generating quizzes

 

Generating AI quizzes

 

Step 4: Listing the OPEN-AI response

After sending the content to OPEN-AI, you can then list the response multiple choice questions (MCQs) on the screen, along with a button to ingest the quiz into the Instructure’s Canvas LMS Quiz Item in the same module. 

This is where tutors will also have the opportunity to review and have the flexibility to make amendments in the auto-generated questions. Instructors have to be double sure as any AI tool can’t beat the intelligence of a human brain.

OpenAi response

 

Step 5: Ingesting the MCQs into Canvas Quiz

Finally, you can use the Instructure’s Canvas LMS API to ingest the MCQ questions and options into the Instructure’s Canvas LMS Quiz. To do this, you will use the Create Quiz API, Create Question API, and Edit Question API.

Ingesting the MCQs into Canvas Quiz


With these steps, you can easily generate multiple-choice questions automatically using OPEN-AI and Canvas LMS. By pulling content dynamically from Canvas LMS and using the OPEN-AI API, you can save time and effort in creating quizzes, and allow for greater customization and flexibility.

Step 6: Add Created Quiz Into Canvas Module

Add Created Quiz Into Canvas Module

 

With these steps, you can easily generate multiple-choice questions automatically using OPEN-AI and Instructure’s Canvas LMS. By pulling content dynamically from Canvas LMS and using the OPEN-AI API, you can save time and effort in creating quizzes, and allow for greater customization and flexibility.

 

                                                                                             
Team Credits: Billwanath Pal (Solution Architect) and Sunil Dhakad (Tech Lead)

Stay in the know.

Subscribe to our blog and keep up-to-date with our latest insights, tips, and updates!