pdf-quiz-generator/frontend/src
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
..
api UI overhaul, bug fixes, section delete, category at extraction 2026-04-01 01:12:19 +02:00
components Cross-browser job tracking, hamburger fix, CLI extract, quiz delete keeps bank questions 2026-04-01 02:30:47 +02:00
context Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
pages Two-phase extraction for end-of-document answer keys (PREP 2013); scroll fix; bug audit 2026-04-01 03:22:26 +02:00
App.jsx UWorld-style quiz sidebar, mobile nav toggle, jobs page with skipped details 2026-04-01 02:48:59 +02:00
index.css UWorld-style quiz sidebar, mobile nav toggle, jobs page with skipped details 2026-04-01 02:48:59 +02:00
main.jsx Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00