mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-12 02:06:14 -05:00
Addresses #1034 Fixed 47 instances across 20 quiz files where MCQ answer explanations incorrectly referenced the correct option as one of the incorrect options. Changes: 1. Fixed all quiz JSON files with incorrect option references - Fixed patterns like 'Options A, C, and D' when A is correct - Fixed patterns like 'Option C is incorrect' when C is correct - Fixed patterns like 'Option A describes...' when A is correct 2. Created fix_mcq_answer_explanations.py script - Automatically detects and fixes incorrect option references - Handles plural and singular patterns - Can be run on all quiz files or specific files 3. Enhanced quizzes.py with validation and opt-in redistribution - Added validate_mcq_option_references() function - Validation runs during quiz generation to catch LLM errors - MCQ redistribution now requires --redistribute-mcq flag (opt-in) - Prevents bug from being reintroduced during answer shuffling All 445 MCQ questions validated across 35 quiz files.