This repo uses AI to let you generate questions for a Question Based Learning (QBL) course from a predefined course skill map. It then lets you edit the questions and upload them automatically to the Torus educational platform, all in the same repo!
This is done using the OpenAI Chat Completions API for generating qustions and Selenium for the Torus automation.
To set up the workflow you need to do the below steps. The video tutorials further down will guide you through the process.
-
Create a fork of this template repository.
-
Set up five GitHub secrets. You need to create 5 GitHub secrets in your forked repository. Create the following secrets:
- OPENAI_API_KEY_KTH - API key for OpenAI
- BOTS_ACCESS_TOKEN - GitHub access token that has read access to the torusbot and qbl-bot-pipeline repositories
- CURRICULUM_URL - URL to the curriculum page of your course on Torus
- USER_EMAIL - Email for torus account that has access to your course
- USER_PASSWORD - Password for torus account that has access to your course
After the proper setup has been completed, the course creation process can be broken down into the following steps:
- Creating a skill map
- Generating pages with questions
- Reviewing the pages
- Adding the pages to Torus
The following section explains these steps in more detail.
To create the skill map, modify the template provided in the skillmap.yaml file to fit your course.
The file is written in the YAML format (check out the YAML quick guide for the most important info). You can add and remove units and pages as you like. Each page can have several skills.
When you have saved a correct version of the skill map, you are ready to start generating questions.
To generate the pages, run the qbl bot pipeline workflow under the "Actions" tab.
The workflow is run by first selecting the qbl bot pipeline workflow in the left panel, then pressing the "Run workflow" dropdown menu to the right, and finally pressing the green "Run workflow" button.
This will begin generating new pull requests for each page in the skill map. Each skill takes about two minutes to generate with ten questions per skill (which is the default).
The question format is multiple choice with three answer alternatives (A, B and C), where only a single answer is correct. Every alternative has tailored feedback informing the user if the answer was correct or incorrect, and why.
As soon as the first pull request shows up you can start reviewing (while the rest of the pages are being generated).
To review a page, edit the corresponding pull request.
This is done under "Files changed" in the pull request. When you are done editing, click "Commit changes" to save.
Optionally, you can assign additional people to review the questions.
When the review step is done, you are ready to add the page to Torus.
To regenerate a page, delete the automatically generated branch corresponding to the page. After that, run the action again.
To add the page to Torus, merge the corresponding pull request.
This will trigger the torus deployment workflow, which will create the page and add the questions. The page is done!
Repeat the steps for every page to generate the whole course.
Coming soon.
Coming soon.
- Try to mimic the provided template in skillmap.yaml.
- YAML is case sensitive.
- YAML uses indentation to denote hierarchy. Make sure you indent correctly.
- YAML wants indentation using spaces, not tabs. However, you likely don't need to worry about that as your editor will probably convert tabs to spaces automatically.
- YAML uses colons to denote key-value pairs. Ex.
key1: value1. If the value text contains a colon, you must put the value text in quotation marks. Ex.key1: "See the following: value".