pdf-quiz-generator/frontend
Daniel e5e31f6eba Two-phase extraction for end-of-document answer keys (PREP 2013); scroll fix; bug audit
Two-phase extraction:
- Detects end-of-document answer key format by scanning last 40 pages for
  "Preferred Response:" (PREP 2013, 2014 etc use this vs PREP 2012 inline "Correct Answer:")
- Phase 1: Extract questions with item_number field, allow null correct_answer
- Phase 2: Extract answer key (item_number → letter) from last 40% of document
- Phase 3: Match questions to answers by item number, resolve letter → full option text
- Unmatched questions go to skipped list with reason shown in Jobs page
- Standard inline format (PREP 2012) unchanged

Updated extraction prompts:
- item_number field added to all extractions for cross-referencing
- Image content rule: "Item CXXXB" figure references must NOT be treated as new questions
- Recognises both "Correct Answer: X" and "Preferred Response: X"
- ANSWER_KEY_PROMPT: dedicated prompt for extracting answer key tables

Quiz navigation scroll:
- Clicking Next, Previous, or question number now scrolls the question card
  into view (smooth scroll to start of question-card div)

Code: extract_questions_no_answers(), extract_answer_key(), _call_model() added to ai_service.py

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 03:22:26 +02:00
..
src Two-phase extraction for end-of-document answer keys (PREP 2013); scroll fix; bug audit 2026-04-01 03:22:26 +02:00
.dockerignore Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
Dockerfile Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
index.html Better fonts, hamburger mobile nav, jobs indicator, warm theme refinement 2026-04-01 02:14:18 +02:00
nginx.conf Major: categories, question bank, security fixes, mobile layout, UX improvements 2026-03-31 20:08:05 +02:00
package.json Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
vite.config.js Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00