Skip to content

Add the GDP.pdf long-document rubric benchmark - #355

Draft
jason718 wants to merge 2 commits into
mainfrom
jasonr/gdp-pdf
Draft

jason718 wants to merge 2 commits into
mainfrom
jasonr/gdp-pdf

Conversation

@jason718

@jason718 jason718 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Adds GDP.pdf (Surge AI): 100 professional documents, each with a question and a hand-written rubric — 1,275 criteria in all, 3-30 per task, across healthcare, insurance, construction, real estate and other domains. Ported from the published harness surge-ai/gdp-pdf; data from surgeai/GDP.pdf.

Draft — the port is implemented and smoke-tested, but not yet validated against the published leaderboard. See Open below.

Tasks

Task Pages attached
gdp_pdf every page
gdp_pdf_first16 first 16

Documents run 8-192 pages (mean 62). The published harness attaches the PDF itself, which suits models with native document input; vision-language models take images, so pages are rendered here (lazily, per worker, via a picklable callable — building instances rasterizes nothing). gdp_pdf_first16 therefore measures a model on a prefix of each document and is not comparable to the leaderboard.

Metrics

  • all_pass — every criterion satisfied (the leaderboard headline)
  • mean_criteria — fraction of criteria satisfied
  • n_unscored — criteria the judge never returned a usable verdict for

Grading is one judge call per criterion, the judge seeing only the response and that criterion — never the prompt or the document. A criterion that fails to parse after five attempts is left unscored: it leaves the mean_criteria denominator and drops its whole response from all_pass. Grading that does not complete therefore reads as coverage loss rather than as a low score — the failure mode that recently turned a CharXiv run into 273 silent zeros (#337).

Faithful to the published harness

Verbatim judge prompt, strict JSON schema (score enum "0"/"1"), fence-stripping strict parse, decimal coercion, pass iff score.round(4) >= 1, five attempts.

Two deliberate deviations, both in the module docstring:

  1. The judge model is configurable (GDP_PDF_JUDGE_MODEL), defaulting to OpenAI rather than the leaderboard's gemini-3.5-flash, so numbers are not leaderboard-comparable unless the official judge is selected.
  2. Attempts wait a randomized exponential backoff, which the published harness omits.

Verification so far

  • Instances build: rubric columns parsed (11 criteria on the first task), PDF fetched, 16 pages rendered at 1238x1650, request formed with 16 images.
  • Judge discriminates against the live API: a correct answer scored mean_criteria 0.909 (10/11), a vague one 0.0, n_unscored 0; aggregate metrics compute correctly.
  • ruff check / ruff format --check clean; 2054 tests pass.

Validated against the published harness

Ran the published harness (gpt-4o, native PDF, gpt-4o judge) on 10 tasks, then graded its exact responses with this port's judge and metrics — same responses, same judge model, so any difference is the port.

Config all_pass mean_criteria per-criterion agreement vs published
Published harness 0.000 0.401 —
This port, matched sampling 0.000 0.397 86.4%
This port, temperature=0 0.000 0.373 / 0.389 92.2%
This port vs itself (temperature=0) — — 98.1%

103 criteria over 10 tasks. With sampling matched the aggregate lands within 0.004 of the published harness. Per-criterion agreement falls under matched sampling (86.4%) because at the provider's default temperature both sides are independent noisy draws — agreement drops while the expectation converges, which is judge noise rather than a porting error. Fixing temperature raises the judge's agreement with itself to 98.1% at a cost of about 0.02-0.03 mean_criteria; the port keeps the deterministic setting and documents it, so re-runs reproduce.

Open

  • No tests yet. Worth covering: rubric column parsing, the strict-parse and pass-threshold rules, and the unscored-exclusion metric semantics — all pure functions needing no API.

Rebased onto main

The vision branch is superseded (#316–#324 merged), so this PR now targets main and follows its layout: the task lives at evals/vision/benchmarks/gdp_pdf.py (registered in benchmarks/__init__.py) and the judge at evals/vision/scoring/gdp_pdf_judge.py; pymupdf joins ty's allowed unresolved imports as a task-installed dependency. Same two commits, same content otherwise. On main: ruff/format/ty clean, 2,812 tests pass, both tasks build their 100 instances (11 rubrics on the first, lazy page rendering), and no existing task hash changes.

@jason718 jason718 self-assigned this Sep 24, 2026
@jason718 jason718 mentioned this pull request Sep 28, 2026
11 tasks done
GDP.pdf pairs 100 professional documents with a question and a hand-written
rubric, 1,275 criteria in all. Each criterion is graded by its own judge call
that sees only the response and that criterion, and the benchmark reports
`all_pass` (every criterion satisfied) and `mean_criteria` (the fraction
satisfied).

The judge mirrors the published harness: verbatim prompt, strict JSON schema,
strict parsing, and five attempts before a criterion is left unscored. Unscored
criteria leave the `mean_criteria` denominator and drop their response from
`all_pass`, so grading that does not complete reads as coverage loss rather
than as failure, and `n_unscored` reports it. Attempts wait a randomized
exponential backoff, and the judge model is configurable, defaulting to OpenAI
rather than the leaderboard's Gemini.

The published harness attaches the PDF itself, which suits models with native
document input. Vision-language models take images, so documents are rendered
to page images, lazily and per worker. Documents run 8-192 pages, past what a
short-context model can hold: `gdp_pdf` attaches every page and
`gdp_pdf_first16` attaches a prefix.
The published harness leaves judge sampling at the provider default; this port
fixes temperature and seed so a re-run reproduces its numbers. Measured on the
same responses and judge model, that costs about 0.02-0.03 of `mean_criteria`
and raises the judge's agreement with itself from roughly 86% to 98%.
@jason718
jason718 changed the base branch from vision to main September 28, 2026 17:40
@jason718 jason718 closed this Sep 28, 2026
@jason718 jason718 reopened this Sep 28, 2026

This branch has not been deployed

No deployments
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