National Central University
Uedu Main Site
Explore Uedu
Student Console
Register as Member/Login
Research Informed Consent Center
Survey Center
Teacher Console
Course Setup
Support & Messages
Uptime Data

UeduGPTs

--

Jupyters

7

Local AI

--

Uedu Code

--

AI Reply Desktop Notifications

Show a desktop notification when the AI TA finishes replying

Chat Message Notifications

Notify me when classmates post messages in the forum

Sound notification

Play an alert sound whenever there is a new notification

METHODOLOGY

Quiz Generator
AI question generation methodology

Explain how Uedu's AI question-generation system uses teaching content, question types, and difficulty distribution to generate quiz questions in batches through an LLM, so teaching researchers can understand how questions are produced.

1. Overview

Uedu's Quiz Generator allows instructors to provide teaching content and have the LLM automatically generate quiz questions of multiple question types and difficulty levels. The core of the system is the QuizAIGenerator class, which uses the gpt-5-mini model and supports bilingual generation in Chinese and English.

The generation process adopts a question type × difficulty batching strategy, with each batch calling the LLM independently and reporting progress in real time through a progress callback, so that instructors can see the live generation status on the front end.

2. Input parameters

When creating an AI question-generation task, the Instructor must provide the following parameters:

ParameterTypeDescription
source_contentStringTeaching content text, as the knowledge source for question-setting
question_typesDictQuestion types to generate and the number of questions for each type, for example {"multiple_choice": 10, "true_false": 5}
difficulty_distDictDifficulty distribution ratio, for example {"easy": 0.3, "medium": 0.5, "hard": 0.2}
course_contextStringCourse background information (optional), to help the LLM understand the question context
languageStringGeneration language: zh (Traditional Chinese) or en (English)

2.1 Supported question types

Question type codeDescription
multiple_choiceSingle-choice question (one of four)
true_falseTrue/False
fill_in_blankFill-in-the-blank question
short_answerShort Answer
essayEssay questions

2.2 Difficulty level

LevelEnglishDescription
SimpleeasyMemory-based, direct recall questions
MediummediumComprehension and application questions
DifficultyhardAnalytical, evaluative and creative questions

3. Difficulty distribution calculation

The system uses the _calculate_difficulty_counts() method to split the total number of questions for each question type into the actual number of questions at each difficulty level according to the difficulty ratio:

3.1 Calculation logic

  1. For each question type, multiply the total number of questions by the proportion for each difficulty level, then take floor (round down)
  2. Due to rounding errors, the total number of questions for each difficulty level may be less than the original total number of questions
  3. Replenish the shortfall one by one in descending order of proportional priority, ensuring the total number of questions is correct

3.2 Calculation example

Assume multiple_choice: 10 questions, difficulty_dist: {"easy": 0.3, "medium": 0.5, "hard": 0.2}:

DifficultyPercentageCalculatefloorFinal
easy0.310 × 0.3 = 3.033
medium0.510 × 0.5 = 5.055
hard0.210 × 0.2 = 2.022

4. Batch generation strategy

4.1 Batch splitting

The system splits question-setting tasks into a batch matrix of question type × difficulty. For example, if the Instructor requests multiple_choice (10 questions) and true_false (5 questions), with an easy/medium/hard difficulty distribution, it is split into:

  • multiple choice × easy (3 questions)
  • multiple_choice × medium (5 questions)
  • multiple_choice × hard (2 questions)
  • true_false × easy (2 questions)
  • true_false × medium (2 questions)
  • true_false × hard (1 question)

Each batch makes one independent call to the LLM API.

4.2 Real-time progress updates

The system supports a progress callback mechanism. After each batch is completed, the callback function will be called to report:

  • Number of questions generated so far (current)
  • Total expected number of items (total)
  • Progress percentage (progress, 0.0 ~ 1.0)
  • Current status (processing, completed, failed)

The front end displays the generation status in real time via polling the progress API.

4.3 Item order

After all batches of questions have been generated, the system shuffles all questions and then reorders question_order to ensure that questions of different difficulty levels and types are evenly interleaved.

5. Output format

Each question generated by the LLM includes the following fields:

FieldTypeDescription
question_textStringQuestion text
question_typeStringQuestion type code (multiple_choice, true_false, etc.)
difficultyStringDifficulty level (easy, medium, hard)
optionsArrayOption list (for multiple-choice and true/false questions)
correct_answerStringCorrect Answer
explanationStringAnswer Explanation
question_orderNumberQuestion order (randomly reshuffled after all items are generated)
Instructors can edit

The questions generated by AI are drafts. The Instructor may review, edit or delete each question in the question bank to ensure the quality meets teaching needs.

6. Recommended research citation

Methodology description template

Quiz questions are automatically generated by the Quiz Generator module on the Uedu platform (the QuizAIGenerator class). Instructors provide teaching content (source_content), question type distribution (question_types) and difficulty ratio (difficulty_dist); the system splits the task into batch matrices of question type × difficulty, and each batch independently calls the LLM (OpenAI gpt-5-mini) to generate the specified number of questions. The difficulty distribution is allocated proportionally by _calculate_difficulty_counts() and corrected for rounding errors. Once generation is complete, all questions are shuffled randomly. The system supports bilingual generation in Traditional Chinese (zh) and English (en), and course context information (course_context) can be included. The generated questions are drafts and must be reviewed and edited by the Instructor before they can be used in a formal quiz. See https://uedu.tw/doc/quiz-generator for a detailed methodology.

It is recommended to provide the following:

  • Teaching content sources and length used for generation
  • Question type distribution and difficulty ratio settings
  • Generation language (zh / en)
  • Proportion of Teacher post-editing (modify / delete / keep as is)