The evaluation boundary
A benchmark is a handoff and a score, not only a folder of PDFs
V2 separates document generation from parser execution. You create a dataset with canonical truth, build a neutral bundle that removes labels and identifying metadata, give that bundle to your parser, then import its JSONL predictions for local scoring. The oracle stays in a separate directory and is never part of the parser handoff.
The resulting CER/WER belongs to the named parser, corpus, task version, normalization, and product revision. It lets you compare two runs on the same oracle; it does not reproduce a vendor's published headline score or predict every production document.
Suite → parser → report
Run the six-step local loop
- 1 · Plan
Choose a paired or mixture SuiteSpec with the document types, conditions, seed, and split policy that matter to your application.
- 2 · Preflight
Compile the suite and inspect every source/condition cell before writing an output directory.
- 3 · Generate
Publish the dataset, manifest, annotations, page images, recipe, coverage, and any requested exports together.
- 4 · Handoff
Create neutral PDF cases. The parser receives case files and hashes, not source text, annotations, recipes, or the private oracle.
- 5 · Predict
Write one run header and one hash-bound case record per parser response. Missing and failed cases stay in the denominator.
- 6 · Score
Score the predictions locally, then compare runs only when task, oracle, matching rules, and quarantine subset agree.
CLI workflow
Preflight, generate, bundle, score, compare
Export the bundled starter suite to a new directory. It produces two authored memos in clean and image-only conditions, giving you four PDF cases:
Run commands from the folder described in platform setup, and use a new output folder for each example.
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' demo --write-examples ocr-examplesLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli demo --write-examples ocr-examplesLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli demo --write-examples ocr-examplesPreview the plan without writing files:
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' generate --suite ocr-examples/first_run.json --preflightLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli generate --suite ocr-examples/first_run.json --preflightLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli generate --suite ocr-examples/first_run.json --preflightGenerate the four PDFs:
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' generate --suite ocr-examples/first_run.json --output output/ocr-pairs --workers 2 --validateLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli generate --suite ocr-examples/first_run.json --output output/ocr-pairs --workers 2 --validateLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli generate --suite ocr-examples/first_run.json --output output/ocr-pairs --workers 2 --validateCreate the parser bundle and its private oracle:
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' evaluate bundle --dataset output/ocr-pairs --task ocr --out handoff/ocr-pairsLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli evaluate bundle --dataset output/ocr-pairs --task ocr --out handoff/ocr-pairsLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli evaluate bundle --dataset output/ocr-pairs --task ocr --out handoff/ocr-pairsRun your parser on the cases in handoff/ocr-pairs and save predictions.jsonl using the prediction format below. Then score it:
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' evaluate score --oracle handoff/ocr-pairs_oracle --predictions predictions.jsonl --out reports/ocr-pairs-aLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli evaluate score --oracle handoff/ocr-pairs_oracle --predictions predictions.jsonl --out reports/ocr-pairs-aLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli evaluate score --oracle handoff/ocr-pairs_oracle --predictions predictions.jsonl --out reports/ocr-pairs-aOptional: score a second parser into reports/ocr-pairs-b against the same oracle, then compare the two reports:
Windows PowerShell
& '.\_internal\DocumentGenerator_v2.0_cli.exe' evaluate compare reports/ocr-pairs-a reports/ocr-pairs-b --out reports/ocr-pairs-comparisonLinux AppImage
./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli evaluate compare reports/ocr-pairs-a reports/ocr-pairs-b --out reports/ocr-pairs-comparisonLinux Flatpak
flatpak run com.docsetgenerator.DocSetGenerator --cli evaluate compare reports/ocr-pairs-a reports/ocr-pairs-b --out reports/ocr-pairs-comparisonUse fresh destinations. The preflight command prints the resolved matrix and stops before creating output. The bundle command creates neutral case_0001.pdf-style inputs and a cases.json hash index, with the private oracle in the sibling handoff/ocr-pairs_oracle directory by default. Run your parser on the bundle before scoring its predictions.jsonl; the evaluator does not execute the parser. Comparison requires a second compatible report.
Prediction format
Return hash-bound JSONL
{"record_type":"run","schema_version":"1.0","parser":{"name":"my-parser","version":"1.0"},"task":"ocr","task_version":"1.0"}
{"case_id":"case_0001","sha256":"<hash from cases.json>","status":"ok","text":"Recognized page text"}
{"case_id":"case_0002","sha256":"<hash from cases.json>","status":"failed","error":"Timed out"}
For the fields task, return a scalar mapping such as "fields":{"invoice_number":"INV-123"}. Unknown IDs, duplicate cases, mismatched hashes, invalid values, and incompatible task headers fail import. The evaluator normalizes OCR text with NFKC and collapsed whitespace while retaining case and punctuation for the configured metrics.
Supported evaluation inputs
Know which corpus can be scored
| Supported in parser evaluation | Not supported by this evaluator |
|---|---|
| Invoice, letter, and memo PDFs, plus PDF types from supported authored families, including the current automatic expanded default. | Native DOCX/XLSX/EML/CSV/TXT parser inputs; use their annotation or preview exports instead. |
| Quality 100 with clean, image-only, and current scan presets. | Visible text corruption, corrupt hidden text, watermarks, Bates overlays, and reduced quality. |
| Fields with scalar values actually printed on the page. | Table extraction, arbitrary schemas, and unsupported challenge or situation revisions. |
Use the separate fields task for grounded scalar business targets. The DocVQA export is a conservative question adapter and does not make every content fact a question. See the full evaluation workflow for field maps, quarantine, and comparison rules.
Choose suitable evaluation data
Use delivery conditions to create supported scan and image-only cases for the built-in evaluator. Visible and hidden text corruption can be used with your own testing tools. See OCR training data for dataset design and review to exclude selected documents from a test.