pdf-quiz-generator/backend/app
Daniel 9658ddb207 feat: look at every figure and detach the ones that belong to another question
An HPV vaccination question was carrying a table of craniofacial reconstruction
by age. Extraction takes figures off the page a question was printed on, which
is usually right and occasionally catastrophically wrong — and the mistake is
invisible to a text review, because nothing about the stem or the filename says
the picture is about something else. My earlier pass read stems and answers and
could not have caught it.

So this looks. Every figure goes to a vision model with its question and is
asked whether it belongs: strict about "no", generous about "unsure", because
detaching a figure a question needs is worse than leaving a stray one attached
for somebody to notice. A clear mismatch is detached and the image stays in the
bank with a note saying what happened, so nothing is lost and the decision can
be checked.

Ran over all 341: **30 detached, 2 unsure, 309 kept.** Among the thirty — the
rule of nines on a hepatitis B newborn, a molluscum table on a collapsed
athlete, a textbook citation page on a drowning, and the craniofacial table
that started this.

It also describes each figure while it is looking at it, and keeps the
description. 435 assets said "Figure from question #1206", which is a filename
with extra steps and is why the image bank could not be searched; 335 now say
what they show, and none of the placeholders remain.

The model is named in the task rather than read from the admin's `tool`
setting: this is a one-off audit, and it should not quietly become the thing
that decides what the tool model is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-12 20:54:23 +02:00
..
middleware Add comprehensive structured logging with Loki + Grafana 2026-04-11 02:53:54 +02:00
models feat: figures are thumbnails that open into a viewer, with source and overlay 2026-09-12 20:33:00 +02:00
routers feat: figures are thumbnails that open into a viewer, with source and overlay 2026-09-12 20:33:00 +02:00
schemas feat: an account may have no password, and may set one later 2026-09-12 17:39:29 +02:00
services feat: an article follows a topic, rather than copying it once 2026-09-12 19:57:06 +02:00
tasks feat: look at every figure and detach the ones that belong to another question 2026-09-12 20:54:23 +02:00
utils feat: question folders, per-section notes, and two feedback paths 2026-09-12 18:37:43 +02:00
__init__.py Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
cli.py Fix CLI argument handling for all commands 2026-04-08 20:57:58 +02:00
config.py feat: rerank what a learner is shown, with Cohere through the proxy 2026-09-12 18:23:06 +02:00
database.py Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
logging_config.py Add comprehensive structured logging with Loki + Grafana 2026-04-11 02:53:54 +02:00
main.py feat: question folders, per-section notes, and two feedback paths 2026-09-12 18:37:43 +02:00