Skip to content

Template detection #9

Description

@gavinbee

`src/template_detect.py` — classify page 1 of the input PDF against the template registry.

  • Rasterize page 1 (`pdf_io`), send to `qwen2.5vl:*` with a classification prompt: "Which of these On-Deck Evaluation templates is this? Respond with template_id and confidence." Enum comes from `TEMPLATES` keys.
  • If confidence < threshold (default 0.7) or model says `unknown` → exit with a clear message offering `--template ` override and asking the user to file an issue with the PDF.
  • `--template ` short-circuits detection.

Tests use a mocked vision client.

Depends on #6, #8.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions