n rm
Browse files
README.md
CHANGED
|
@@ -1,232 +1,226 @@
|
|
| 1 |
# AI Course Assessment Generator
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
| 4 |
|
| 5 |
## Features
|
| 6 |
|
| 7 |
-
|
| 8 |
-
- Generate customizable number of learning objectives
|
| 9 |
-
- Create multiple-choice questions based on learning objectives
|
| 10 |
-
- Evaluate question quality using an LLM judge
|
| 11 |
-
- Save assessments to JSON format
|
| 12 |
-
- Track source references for each learning objective and question
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
```
|
| 19 |
-
pip install -r requirements.txt
|
| 20 |
-
```
|
| 21 |
-
3. Create a `.env` file in the project root with your OpenAI API key:
|
| 22 |
-
```
|
| 23 |
-
OPENAI_API_KEY=your_api_key_here
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
## Usage
|
| 27 |
-
|
| 28 |
-
1. Run the application:
|
| 29 |
-
```
|
| 30 |
-
python app.py
|
| 31 |
-
```
|
| 32 |
-
2. Open the Gradio interface in your web browser (typically at http://127.0.0.1:7860)
|
| 33 |
-
3. Upload your course materials (.vtt, .srt, .ipynb files)
|
| 34 |
-
4. Specify the number of learning objectives to generate
|
| 35 |
-
5. Select the OpenAI model to use
|
| 36 |
-
6. Generate learning objectives
|
| 37 |
-
7. Review and provide feedback on the generated objectives
|
| 38 |
-
8. Generate multiple-choice questions based on the approved objectives
|
| 39 |
-
9. Review the generated questions and their quality assessments
|
| 40 |
-
10. The final assessment will be saved as `assessment.json` in the project directory
|
| 41 |
-
|
| 42 |
-
## Project Structure
|
| 43 |
-
|
| 44 |
-
- `app.py`: Entry point for the application
|
| 45 |
-
|
| 46 |
-
### Modules
|
| 47 |
-
|
| 48 |
-
- `models/`: Pydantic data models
|
| 49 |
-
- `__init__.py`: Exports all models
|
| 50 |
-
- `learning_objectives.py`: Learning objective data models
|
| 51 |
-
- `questions.py`: Question and option data models
|
| 52 |
-
- `assessment.py`: Assessment data models
|
| 53 |
-
|
| 54 |
-
- `ui/`: User interface components
|
| 55 |
-
- `__init__.py`: Package initialization
|
| 56 |
-
- `app.py`: Gradio UI implementation
|
| 57 |
-
- `content_processor.py`: Processes uploaded files and extracts content
|
| 58 |
-
- `objective_handlers.py`: Handlers for learning objective generation
|
| 59 |
-
- `question_handlers.py`: Handlers for question generation
|
| 60 |
-
- `feedback_handlers.py`: Handlers for feedback and regeneration
|
| 61 |
-
- `formatting.py`: Formatting utilities for UI display
|
| 62 |
-
- `state.py`: State management for the UI
|
| 63 |
-
|
| 64 |
-
- `quiz_generator/`: Quiz generation components
|
| 65 |
-
- `__init__.py`: Package initialization
|
| 66 |
-
- `generator.py`: Main QuizGenerator class
|
| 67 |
-
- `assessment.py`: Assessment generation logic
|
| 68 |
-
- `question_generation.py`: Question generation logic
|
| 69 |
-
- `question_improvement.py`: Question quality improvement logic
|
| 70 |
-
- `question_ranking.py`: Question ranking and grouping logic
|
| 71 |
-
- `feedback_questions.py`: Feedback-based question generation
|
| 72 |
-
|
| 73 |
-
- `learning_objective_generator/`: Learning objective generation components
|
| 74 |
-
- `__init__.py`: Package initialization
|
| 75 |
-
- `generator.py`: Main generator class
|
| 76 |
-
- `base_generation.py`: Base generation logic
|
| 77 |
-
- `enhancement.py`: Enhancement logic
|
| 78 |
-
- `grouping_and_ranking.py`: Grouping and ranking logic
|
| 79 |
-
|
| 80 |
-
- `prompts/`: Prompt templates and components
|
| 81 |
-
- `questions.py`: Question generation prompts
|
| 82 |
-
- `incorrect_answers.py`: Incorrect answer generation prompts
|
| 83 |
-
- `learning_objectives.py`: Learning objective generation prompts
|
| 84 |
-
|
| 85 |
-
- `obsolete/`: Deprecated files (not used in current implementation)
|
| 86 |
-
|
| 87 |
-
- `specs.md`: Project specifications
|
| 88 |
-
- `project_flow.md`: Detailed description of the project architecture and workflow
|
| 89 |
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
-
|
| 93 |
-
- Gradio 4.19.2+
|
| 94 |
-
- Pydantic 2.8.0+
|
| 95 |
-
- OpenAI 1.52.0+
|
| 96 |
-
- nbformat 5.9.2+
|
| 97 |
-
- instructor 1.7.9+
|
| 98 |
-
- python-dotenv 1.0.0+
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
```
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
```
|
| 106 |
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
- The application uses XML-style source tags to track which file each piece of content comes from
|
| 110 |
-
- Questions are evaluated against quality standards to ensure they meet educational requirements
|
| 111 |
-
- Each question includes feedback for both correct and incorrect answers
|
| 112 |
|
| 113 |
-
##
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
-
|
| 118 |
-
-
|
| 119 |
-
- `CORRECT_ANSWER_SPECIFIC_QUALITY_STANDARDS`: Standards for correct answer options
|
| 120 |
-
- `INCORRECT_ANSWER_SPECIFIC_QUALITY_STANDARDS`: Standards for creating plausible incorrect answers
|
| 121 |
-
- `EXAMPLE_QUESTIONS`: A collection of high-quality example questions for model guidance
|
| 122 |
-
- `MULTIPLE_CHOICE_STANDARDS`: Standards specific to multiple-choice question format
|
| 123 |
-
- `BLOOMS_TAXONOMY_LEVELS`: Educational taxonomy for different levels of learning
|
| 124 |
-
- `ANSWER_FEEDBACK_QUALITY_STANDARDS`: Standards for providing helpful feedback
|
| 125 |
-
- `LEARNING_OBJECTIVES_PROMPT`: Template for generating learning objectives
|
| 126 |
-
- `LEARNING_OBJECTIVE_EXAMPLES`: Examples of well-formulated learning objectives
|
| 127 |
|
| 128 |
-
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
###
|
| 137 |
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
| 143 |
-
2. **Learning Objective Generation**: Creates learning objectives from the processed content
|
| 144 |
-
3. **Question Generation**: Produces multiple-choice questions for each learning objective
|
| 145 |
-
4. **Quality Assessment**: Evaluates the generated questions for quality
|
| 146 |
-
5. **UI Interface**: Provides a Gradio-based web interface for user interaction
|
| 147 |
|
| 148 |
-
|
|
|
|
|
|
|
| 149 |
|
| 150 |
-
|
| 151 |
-
- Loads environment variables (including OpenAI API key)
|
| 152 |
-
- Creates and launches the Gradio UI
|
| 153 |
|
| 154 |
-
|
| 155 |
|
| 156 |
-
|
| 157 |
-
- Organizes functionality into tabs:
|
| 158 |
-
- File upload and learning objective generation
|
| 159 |
-
- Question generation
|
| 160 |
-
- Preview and export
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
- `state.py`: Manages state between UI components
|
| 169 |
|
| 170 |
-
|
| 171 |
|
| 172 |
-
-
|
| 173 |
-
- `.vtt` and `.srt` subtitle files
|
| 174 |
-
- `.ipynb` Jupyter notebook files
|
| 175 |
-
- For each file, adds XML source tags to track the origin of content
|
| 176 |
-
- Returns structured content for further processing
|
| 177 |
|
| 178 |
-
##
|
| 179 |
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
-
|
| 187 |
|
| 188 |
-
|
| 189 |
-
2. Combines content and creates a prompt (utilizing modular components from `prompts.py`)
|
| 190 |
-
3. Uses OpenAI's API with instructor to generate learning objectives
|
| 191 |
-
4. Returns structured `LearningObjective` objects
|
| 192 |
|
| 193 |
-
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
-
|
| 202 |
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
|
|
|
| 210 |
|
| 211 |
-
|
| 212 |
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
- This creates a comprehensive prompt that guides the LLM in generating relevant and well-structured learning objectives
|
| 218 |
|
| 219 |
-
|
| 220 |
-
- Components like `GENERAL_QUALITY_STANDARDS`, `MULTIPLE_CHOICE_STANDARDS`, `QUESTION_SPECIFIC_QUALITY_STANDARDS`, etc. are combined
|
| 221 |
-
- Along with the learning objective and course content, these form a detailed prompt that ensures high-quality question generation
|
| 222 |
|
| 223 |
-
|
| 224 |
|
| 225 |
-
|
| 226 |
-
2. System processes files and extracts content with source references
|
| 227 |
-
3. LLM generates learning objectives based on content
|
| 228 |
-
4. User reviews and approves learning objectives
|
| 229 |
-
5. System generates multiple-choice questions for each approved objective
|
| 230 |
-
6. Questions are presented to the user for review and export
|
| 231 |
|
| 232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# AI Course Assessment Generator
|
| 2 |
|
| 3 |
+
An AI-powered tool that creates learning objectives and multiple-choice quiz questions from course materials. Supports both **automatic generation** from uploaded content and **manual entry** of learning objectives, producing fully enriched outputs with correct and incorrect answer suggestions ready for quiz generation.
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
|
| 7 |
## Features
|
| 8 |
|
| 9 |
+
### Tab 1 β Generate Learning Objectives
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
**Two modes of operation:**
|
| 12 |
|
| 13 |
+
- **Generate from course materials** β Upload course files and let the AI extract and generate learning objectives automatically through a multi-run, multi-stage pipeline.
|
| 14 |
+
- **Use my own learning objectives** β Enter your own learning objectives in a text field (one per line). The app searches the uploaded course materials for relevant source references, generates a correct answer for each objective, and produces incorrect answer options β the same full pipeline as automatic generation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
**Shared capabilities (both modes):**
|
| 17 |
+
- Configurable AI model and temperature for both generation and incorrect answer suggestion steps
|
| 18 |
+
- All output in the same JSON format, ready to feed directly into Tab 2
|
| 19 |
+
- "Generate all" button runs the full end-to-end pipeline (learning objectives β quiz questions) in a single click, in either mode
|
| 20 |
+
|
| 21 |
+
### Tab 2 β Generate Questions
|
| 22 |
+
|
| 23 |
+
- Takes the learning objectives JSON produced in Tab 1 as input
|
| 24 |
+
- Generates multiple-choice questions with 4 options, per-option feedback, and source references
|
| 25 |
+
- Configurable number of questions and generation runs
|
| 26 |
+
- Automatic ranking and grouping of generated questions by quality
|
| 27 |
+
- Outputs: ranked best-in-group questions, all grouped questions, and a human-readable formatted quiz
|
| 28 |
+
|
| 29 |
+
### Tab 3 β Propose / Edit Question
|
| 30 |
+
|
| 31 |
+
- Load the formatted quiz from Tab 2 or upload a `.md` / `.yml` quiz file
|
| 32 |
+
- Review and edit questions one at a time with Previous / Accept & Next navigation
|
| 33 |
+
- Download the final edited quiz
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## Generation Pipeline (Learning Objectives)
|
| 38 |
|
| 39 |
+
### Automatic generation mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
1. **Content extraction** β Uploads are parsed (`.vtt`, `.srt`, `.ipynb`, `.md`) and wrapped with XML source tags for full traceability
|
| 42 |
+
2. **Multi-run base generation** β Multiple independent runs produce candidate objectives (Bloom's taxonomy aware, one action verb, multiple-choice assessable)
|
| 43 |
+
3. **Correct answer generation** β A concise correct answer (~20 words) is generated for each objective from the course content
|
| 44 |
+
4. **Grouping & ranking** β Similar objectives are clustered; the best representative in each group is selected
|
| 45 |
+
5. **Incorrect answer generation** β Three plausible distractors are generated for each best-in-group objective, matching the correct answer in length, style, and complexity
|
| 46 |
+
6. **Iterative improvement** β Each distractor is evaluated and regenerated until it meets quality standards
|
| 47 |
+
|
| 48 |
+
### User-provided objectives mode
|
| 49 |
+
|
| 50 |
+
1. **Objective parsing** β Text is split by newlines; common leading labels are stripped automatically:
|
| 51 |
+
- Numbered: `1.`, `2)`, `3:`
|
| 52 |
+
- Lettered: `a.`, `b)`, `c:`
|
| 53 |
+
- Plain (no label)
|
| 54 |
+
2. **Source finding** β For each objective, the LLM searches the uploaded course materials to identify the most relevant source file(s)
|
| 55 |
+
3. **Correct answer generation** β Same function as the automatic flow, grounded in the course content
|
| 56 |
+
4. **Incorrect answer generation** β Same three-distractor generation as automatic flow
|
| 57 |
+
5. **Iterative improvement** β Same quality improvement loop
|
| 58 |
+
6. All objectives are treated as best-in-group (the user has already curated them), so no grouping/filtering step is applied
|
| 59 |
+
|
| 60 |
+
**Example accepted input formats:**
|
| 61 |
```
|
| 62 |
+
Identify key upstream and downstream collaborators for data engineers
|
| 63 |
+
Identify the stages of the data engineering lifecycle
|
| 64 |
+
Articulate a mental framework for building data engineering solutions
|
| 65 |
+
```
|
| 66 |
+
```
|
| 67 |
+
1. Identify key upstream and downstream collaborators for data engineers
|
| 68 |
+
2. Identify the stages of the data engineering lifecycle
|
| 69 |
+
3. Articulate a mental framework for building data engineering solutions
|
| 70 |
+
```
|
| 71 |
+
```
|
| 72 |
+
a. Identify key upstream and downstream collaborators for data engineers
|
| 73 |
+
b. Identify the stages of the data engineering lifecycle
|
| 74 |
+
c. Articulate a mental framework for building data engineering solutions
|
| 75 |
```
|
| 76 |
|
| 77 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
## Setup
|
| 80 |
|
| 81 |
+
### Prerequisites
|
| 82 |
|
| 83 |
+
- Python 3.12 (recommended) or 3.8+
|
| 84 |
+
- An OpenAI API key
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
+
### Installation
|
| 87 |
|
| 88 |
+
**Using uv (recommended):**
|
| 89 |
+
```bash
|
| 90 |
+
uv venv -p 3.12
|
| 91 |
+
source .venv/bin/activate # Windows: .venv\Scripts\activate
|
| 92 |
+
uv pip install -r requirements.txt
|
| 93 |
+
```
|
| 94 |
|
| 95 |
+
**Using pip:**
|
| 96 |
+
```bash
|
| 97 |
+
pip install -r requirements.txt
|
| 98 |
+
```
|
| 99 |
|
| 100 |
+
### Environment variables
|
| 101 |
|
| 102 |
+
Create a `.env` file in the project root:
|
| 103 |
+
```
|
| 104 |
+
OPENAI_API_KEY=your_api_key_here
|
| 105 |
+
```
|
| 106 |
|
| 107 |
+
---
|
| 108 |
|
| 109 |
+
## Running the app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
+
```bash
|
| 112 |
+
python app.py
|
| 113 |
+
```
|
| 114 |
|
| 115 |
+
Opens the Gradio interface at [http://127.0.0.1:7860](http://127.0.0.1:7860).
|
|
|
|
|
|
|
| 116 |
|
| 117 |
+
---
|
| 118 |
|
| 119 |
+
## Supported file formats
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
+
| Format | Description |
|
| 122 |
+
|--------|-------------|
|
| 123 |
+
| `.vtt` | WebVTT subtitle files (timestamps stripped) |
|
| 124 |
+
| `.srt` | SRT subtitle files (timestamps stripped) |
|
| 125 |
+
| `.ipynb` | Jupyter notebooks (markdown and code cells extracted) |
|
| 126 |
+
| `.md` | Markdown files |
|
|
|
|
| 127 |
|
| 128 |
+
All content is wrapped with XML source tags (`<source file="filename">β¦</source>`) so every generated objective and question can be traced back to its origin file.
|
| 129 |
|
| 130 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
+
## Project structure
|
| 133 |
|
| 134 |
+
```
|
| 135 |
+
quiz_generator_ECM/
|
| 136 |
+
β
|
| 137 |
+
βββ app.py # Entry point β loads .env and launches Gradio
|
| 138 |
+
β
|
| 139 |
+
βββ models/ # Pydantic data models
|
| 140 |
+
β βββ learning_objectives.py # BaseLearningObjective β LearningObjective β Grouped*
|
| 141 |
+
β βββ questions.py # MultipleChoiceQuestion β Ranked* β Grouped*
|
| 142 |
+
β βββ assessment.py # Assessment (objectives + questions)
|
| 143 |
+
β βββ config.py # Model list and temperature availability map
|
| 144 |
+
β
|
| 145 |
+
βββ prompts/ # Reusable prompt components
|
| 146 |
+
β βββ learning_objectives.py # Bloom's taxonomy, quality standards, examples
|
| 147 |
+
β βββ incorrect_answers.py # Distractor guidelines and examples
|
| 148 |
+
β βββ questions.py # Question and answer quality standards
|
| 149 |
+
β βββ all_quality_standards.py # General quality standards
|
| 150 |
+
β
|
| 151 |
+
βββ learning_objective_generator/ # Learning objective pipeline
|
| 152 |
+
β βββ generator.py # LearningObjectiveGenerator orchestrator
|
| 153 |
+
β βββ base_generation.py # Base generation, correct answers, source finding
|
| 154 |
+
β βββ enhancement.py # Incorrect answer generation
|
| 155 |
+
β βββ grouping_and_ranking.py # Similarity grouping and best-in-group selection
|
| 156 |
+
β βββ suggestion_improvement.py # Iterative distractor quality improvement
|
| 157 |
+
β
|
| 158 |
+
βββ quiz_generator/ # Question generation pipeline
|
| 159 |
+
β βββ generator.py # QuizGenerator orchestrator
|
| 160 |
+
β βββ question_generation.py # Multiple-choice question generation
|
| 161 |
+
β βββ question_improvement.py # Question quality assessment and improvement
|
| 162 |
+
β βββ question_ranking.py # Ranking and grouping of questions
|
| 163 |
+
β βββ feedback_questions.py # Feedback-based question regeneration
|
| 164 |
+
β βββ assessment.py # Assessment compilation and export
|
| 165 |
+
β
|
| 166 |
+
βββ ui/ # Gradio interface and handlers
|
| 167 |
+
βββ app.py # UI layout, mode toggle, event wiring
|
| 168 |
+
βββ objective_handlers.py # Handlers for both objective modes + Generate all
|
| 169 |
+
βββ question_handlers.py # Question generation handler
|
| 170 |
+
βββ content_processor.py # File parsing and XML source tagging
|
| 171 |
+
βββ edit_handlers.py # Question editing flow (Tab 3)
|
| 172 |
+
βββ formatting.py # Quiz formatting for UI display
|
| 173 |
+
βββ state.py # Global state (file contents, objectives)
|
| 174 |
+
βββ run_manager.py # Run tracking and output saving
|
| 175 |
+
```
|
| 176 |
|
| 177 |
+
---
|
| 178 |
|
| 179 |
+
## Data models
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
+
Learning objectives progress through these stages:
|
| 182 |
|
| 183 |
+
```
|
| 184 |
+
BaseLearningObjectiveWithoutCorrectAnswer
|
| 185 |
+
ββ id, learning_objective, source_reference
|
| 186 |
+
β
|
| 187 |
+
BaseLearningObjective
|
| 188 |
+
ββ + correct_answer
|
| 189 |
+
β
|
| 190 |
+
LearningObjective (output of Tab 1, input to Tab 2)
|
| 191 |
+
ββ + incorrect_answer_options, in_group, group_members, best_in_group
|
| 192 |
+
```
|
| 193 |
|
| 194 |
+
Questions follow an equivalent progression:
|
| 195 |
|
| 196 |
+
```
|
| 197 |
+
MultipleChoiceQuestion
|
| 198 |
+
ββ id, question_text, options (text + is_correct + feedback),
|
| 199 |
+
learning_objective_id, correct_answer, source_reference
|
| 200 |
+
β
|
| 201 |
+
RankedMultipleChoiceQuestion
|
| 202 |
+
ββ + rank, ranking_reasoning, in_group, group_members, best_in_group
|
| 203 |
+
```
|
| 204 |
|
| 205 |
+
---
|
| 206 |
|
| 207 |
+
## Model configuration
|
| 208 |
|
| 209 |
+
Default model: `gpt-5.2`
|
| 210 |
+
Default temperature: `1.0` (ignored for models that do not support it, such as `o1`, `o3-mini`, `gpt-5`, `gpt-5.1`, `gpt-5.2`)
|
|
|
|
| 211 |
|
| 212 |
+
You can set different models for the main generation step and the incorrect answer suggestion step, which is useful for using a more creative model for distractors.
|
|
|
|
|
|
|
| 213 |
|
| 214 |
+
---
|
| 215 |
|
| 216 |
+
## Requirements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
+
| Package | Version |
|
| 219 |
+
|---------|---------|
|
| 220 |
+
| Python | 3.8+ (3.12 recommended) |
|
| 221 |
+
| gradio | 4.19.2+ |
|
| 222 |
+
| pydantic | 2.8.0+ |
|
| 223 |
+
| openai | 1.52.0+ |
|
| 224 |
+
| nbformat | 5.9.2+ |
|
| 225 |
+
| instructor | 1.7.9+ |
|
| 226 |
+
| python-dotenv | 1.0.0+ |
|