Skip to content

bench(coverage): image-mode so Word files are measurable (docx = 100% coverage)#141

Merged
Ztein merged 1 commit into
mainfrom
feat/coverage-bench-office
Jul 9, 2026
Merged

bench(coverage): image-mode so Word files are measurable (docx = 100% coverage)#141
Ztein merged 1 commit into
mainfrom
feat/coverage-bench-office

Conversation

@Ztein

@Ztein Ztein commented Jul 9, 2026

Copy link
Copy Markdown
Owner

The coverage metric reported N/A for uncaptioned documents. This adds a second ground-truth mode so the Word file is in the benchmark.

  • image mode (docs with < 2 captions): ground truth = embedded images in the source (office media/ or PDF xobjects, icons filtered by size). Covered = distinct images figmark extracted, deduped by content hash so LibreOffice's phantom repeats (41 placements → 6 unique) collapse to one.
  • Hardened the caption regex to match any whitespace (incl. nbsp) between word and number → the ground truth is now stable across publishers (this was silently flipping BoC between 58%/54%).

Baseline now

Document Mode Coverage
boc-mpr-202410.pdf caption 58%
boj-outlook-2410.pdf caption 79%
govuk-social-care-consultation.docx image 100% (6/6)

The docx has complete coverage — figmark finds all 6 embedded images; its open questions are quality (two logos over-described), which is the LLM-judge track. Scripts-only.

🤖 Generated with Claude Code

…measurable

The coverage metric reported N/A for documents without figure captions. Add a
second ground-truth mode:

- image mode: for docs with < 2 captions, ground truth = embedded images in the
  source (office media / PDF xobjects, icons filtered). Covered = distinct images
  figmark extracted, deduplicated by content hash so the LibreOffice "same header
  on every page" phantom repeats (41 placements -> 6 unique) collapse to one.
- Also hardened the caption regex to match any whitespace (incl. nbsp) between
  the word and number, so the ground truth is stable across publishers.

Baseline now includes govuk-social-care-consultation.docx: 6/6 images = 100%
coverage (the docx's issues are quality, not coverage). Caption docs unchanged
(BoC 58%, BoJ 79%).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Ztein Ztein merged commit f22866f into main Jul 9, 2026
@Ztein Ztein deleted the feat/coverage-bench-office branch July 9, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant