Add Harbor tasks using the published ExtractBench coding-agent prompt
#2
by xujustinj - opened
This view is limited to 50 files because it contains too many changes. See the raw diff here.
Files changed (50)
- .gitattributes+1
- README.md+33
- harbor-manifest.jsonAdded
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/DockerfileAdded+7
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/document.pdfAdded+3
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/schema.jsonAdded+246
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/instruction.mdAdded+16
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/solution/expected.jsonAdded+143
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/solution/solve.shAdded+3
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/task.tomlAdded+30
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/DockerfileAdded+5
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/reference.test.jsonAdded+1
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/test.shAdded+3
- tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/verifier.pyAdded+134
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/DockerfileAdded+7
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/document.pdfAdded+3
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/schema.jsonAdded+202
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/instruction.mdAdded+16
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/solution/expected.jsonAdded+41
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/solution/solve.shAdded+3
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/task.tomlAdded+30
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/DockerfileAdded+5
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/reference.test.jsonAdded+1
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/test.shAdded+3
- tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/verifier.pyAdded+134
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/DockerfileAdded+7
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/document.pdfAdded+3
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/schema.jsonAdded+382
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/instruction.mdAdded+16
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/solution/expected.jsonAdded+130
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/solution/solve.shAdded+3
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/task.tomlAdded+30
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/DockerfileAdded+5
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/reference.test.jsonAdded+1
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/test.shAdded+3
- tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/verifier.pyAdded+134
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/DockerfileAdded+7
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/document.pdfAdded+3
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/schema.jsonAdded+205
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/instruction.mdAdded+16
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/solution/expected.jsonAdded+43
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/solution/solve.shAdded+3
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/task.tomlAdded+30
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/DockerfileAdded+5
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/reference.test.jsonAdded+1
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/test.shAdded+3
- tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/verifier.pyAdded+134
- tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/DockerfileAdded+7
- tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/document.pdfAdded+3
- tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/schema.jsonAdded+112
245 unmodified lines246247248249245 unmodified linesdocs/long_chart_sheets/wireline_log_02.pdf filter=lfs diff=lfs merge=lfs -textdocs/long_chart_sheets/wireline_log_03.pdf filter=lfs diff=lfs merge=lfs -texthouse_vocabulary.jsonl filter=lfs diff=lfs merge=lfs -texttasks/**/document.pdf filter=lfs diff=lfs merge=lfs -text37 unmodified lines3839404142434445169 unmodified lines21521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724837 unmodified linessize_categories:- n<1Ktags:- rl-environment- harbor- document-extraction- structured-extraction- information-extraction169 unmodified lines- **Code:** [run-llama/ExtractBench](https://github.com/run-llama/ExtractBench)- **ExtractBench:** [llamaindex/ExtractBench](https://huggingface.co/datasets/llamaindex/ExtractBench), real-document extraction- **ParseBench:** [llamaindex/ParseBench](https://huggingface.co/datasets/llamaindex/ParseBench), a companion benchmark for document parsing
## Harbor
Requires Harbor 0.24.0 or later, Git with Git LFS, and Docker.Run `git lfs install` before the first use, then run the tasks directly from this repository:
```bashharbor run --repo https://huggingface.co/datasets/llamaindex/ExtractBenchPro -p tasks \ -a codex -m MODEL --allow-agent-host MODEL_API_HOST```
Instructions reproduce the [published coding-agent prompt](https://arxiv.org/html/2607.29677v1#A3.SS1), with a standardized document filename.Agents receive only `document.pdf` and `schema.json` and write `output.json`.During agent execution, network access is denied except for explicitly allowedmodel API hosts. Set `MODEL_API_HOST` to the hostname of your model endpoint;repeat `--allow-agent-host` only for additional required model API hosts.Do not allow dataset hosts, public proxies, or broad IP ranges. Setup can downloadagent tools before extraction begins; the separate verifier runs without networking.The separate verifier uses the existing ExtractBench evaluator at commit `2f27f100730afc7c395602e26a2a87e07ea66b31`.The reward is Value F1 in [0, 1]; `metrics.json` also records perfect-document status.`feedback.json` records aligned output/reference cell paths, value outcomes, andeach matched cell's contribution to the same F1 reward. Paths refer to normalizedscoring inputs; one-sided cells contribute to the denominator. This feedback doesnot change the reward or assign credit to reasoning steps.This prompt does not request citations, so this lane does not measure grounding.The agent timeout is 1800 seconds per document.
The JSONL files and ordinary Hugging Face dataset configuration are preserved.`harbor-manifest.json` records source revisions and hashes for reproducibility.For a no-inference packaging smoke test, use `-a oracle -l 1` instead of `-a codex -m MODEL`.The oracle copies the reference output; it checks packaging and grading, not extraction ability.1234567FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils tesseract-ocr curl git nodejs npm \ && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir pymupdf==1.26.6 pypdf==6.4.0 pillow==12.0.0WORKDIR /appCOPY document.pdf schema.json /app/123version https://git-lfs.github.com/spec/v1oid sha256:cf1affe0894e4b83d7227ae0d0e4fcc0abe4ec8d473857b5be446acfae7eb399size 4544011123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246{ "type": "object", "properties": { "agency_nurses": { "type": "array", "description": "One entry per nurse supplied by the agency to the ward in February, in roster order. Count only shifts the agency may charge for under its agreement with the hospital.", "items": { "type": "object", "description": "", "properties": { "nurse": { "type": "string", "description": "Name as printed on the roster, surname first, without any marker." }, "chargeable_shifts": { "type": "integer", "description": "Shifts the agency may charge for." }, "chargeable_hours": { "type": "number", "description": "Paid hours of those shifts." }, "shift_charges": { "type": "number", "description": "Hourly charges for those shifts, in pounds." }, "long_run_supplement": { "type": "number", "description": "Extra charged for shifts late in a long run of shifts, in pounds." }, "call_off_fees": { "type": "number", "description": "Fees for shifts the ward called off, in pounds." }, "amount_due": { "type": "number", "description": "Total the hospital owes the agency for this nurse, in pounds." }, "difference_from_invoice": { "type": "number", "description": "Amount the agency invoiced for this nurse minus the amount due, in pounds." } }, "required": [ "nurse", "chargeable_shifts", "chargeable_hours", "shift_charges", "long_run_supplement", "call_off_fees", "amount_due", "difference_from_invoice" ] } }, "pay_periods": { "type": "object", "description": "Agency hours and money by agency pay period.", "properties": { "period_03": { "type": "object", "description": "Agency pay period 03, as the agency numbers its periods.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for that fall in this period." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." }, "amount": { "type": "number", "description": "Money due to the agency for this period, all charges included, in pounds." } }, "required": [ "agency_shifts", "agency_hours", "amount" ] }, "period_04": { "type": "object", "description": "Agency pay period 04, as the agency numbers its periods.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for that fall in this period." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." }, "amount": { "type": "number", "description": "Money due to the agency for this period, all charges included, in pounds." } }, "required": [ "agency_shifts", "agency_hours", "amount" ] }, "period_05": { "type": "object", "description": "Agency pay period 05, as the agency numbers its periods.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for that fall in this period." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." }, "amount": { "type": "number", "description": "Money due to the agency for this period, all charges included, in pounds." } }, "required": [ "agency_shifts", "agency_hours", "amount" ] } }, "required": [ "period_03", "period_04", "period_05" ] }, "roster_weeks": { "type": "object", "description": "Agency hours by roster week.", "properties": { "week_1": { "type": "object", "description": "Roster week 1, Monday 1 to Sunday 7 February.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for worked in this week." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." } }, "required": [ "agency_shifts", "agency_hours" ] }, "week_2": { "type": "object", "description": "Roster week 2, Monday 8 to Sunday 14 February.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for worked in this week." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." } }, "required": [ "agency_shifts", "agency_hours" ] }, "week_3": { "type": "object", "description": "Roster week 3, Monday 15 to Sunday 21 February.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for worked in this week." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." } }, "required": [ "agency_shifts", "agency_hours" ] }, "week_4": { "type": "object", "description": "Roster week 4, Monday 22 to Sunday 28 February.", "properties": { "agency_shifts": { "type": "integer", "description": "Shifts the agency may charge for worked in this week." }, "agency_hours": { "type": "number", "description": "Hours of those shifts." } }, "required": [ "agency_shifts", "agency_hours" ] } }, "required": [ "week_1", "week_2", "week_3", "week_4" ] }, "total_due": { "type": "number", "description": "Total the hospital owes the agency for February, in pounds." }, "invoice_difference": { "type": "number", "description": "Invoice total minus the total owed, in pounds." }, "nurses_over_booking_limit": { "type": "integer", "description": "Agency nurses who worked more long shifts in a row than the agreement allows." }, "withdrawn_bookings": { "type": "integer", "description": "Agency shifts the ward called off after they were booked." } }, "required": [ "agency_nurses", "pay_periods", "roster_weeks", "total_due", "invoice_difference", "nurses_over_booking_limit", "withdrawn_bookings" ]}12345678910111213141516Extract structured data from the document file `./document.pdf` in the current directory.
Use only local file inspection and shell commands. Do not use web search, network calls, browser tools, or external services. Temporary scratch files inside the current directory are OK.
Return a single JSON object conforming to this schema as your final answer:
{"type": "object", "properties": {"agency_nurses": {"type": "array", "description": "One entry per nurse supplied by the agency to the ward in February, in roster order. Count only shifts the agency may charge for under its agreement with the hospital.", "items": {"type": "object", "description": "", "properties": {"nurse": {"type": "string", "description": "Name as printed on the roster, surname first, without any marker."}, "chargeable_shifts": {"type": "integer", "description": "Shifts the agency may charge for."}, "chargeable_hours": {"type": "number", "description": "Paid hours of those shifts."}, "shift_charges": {"type": "number", "description": "Hourly charges for those shifts, in pounds."}, "long_run_supplement": {"type": "number", "description": "Extra charged for shifts late in a long run of shifts, in pounds."}, "call_off_fees": {"type": "number", "description": "Fees for shifts the ward called off, in pounds."}, "amount_due": {"type": "number", "description": "Total the hospital owes the agency for this nurse, in pounds."}, "difference_from_invoice": {"type": "number", "description": "Amount the agency invoiced for this nurse minus the amount due, in pounds."}}, "required": ["nurse", "chargeable_shifts", "chargeable_hours", "shift_charges", "long_run_supplement", "call_off_fees", "amount_due", "difference_from_invoice"]}}, "pay_periods": {"type": "object", "description": "Agency hours and money by agency pay period.", "properties": {"period_03": {"type": "object", "description": "Agency pay period 03, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}, "period_04": {"type": "object", "description": "Agency pay period 04, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}, "period_05": {"type": "object", "description": "Agency pay period 05, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}}, "required": ["period_03", "period_04", "period_05"]}, "roster_weeks": {"type": "object", "description": "Agency hours by roster week.", "properties": {"week_1": {"type": "object", "description": "Roster week 1, Monday 1 to Sunday 7 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_2": {"type": "object", "description": "Roster week 2, Monday 8 to Sunday 14 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_3": {"type": "object", "description": "Roster week 3, Monday 15 to Sunday 21 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_4": {"type": "object", "description": "Roster week 4, Monday 22 to Sunday 28 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}}, "required": ["week_1", "week_2", "week_3", "week_4"]}, "total_due": {"type": "number", "description": "Total the hospital owes the agency for February, in pounds."}, "invoice_difference": {"type": "number", "description": "Invoice total minus the total owed, in pounds."}, "nurses_over_booking_limit": {"type": "integer", "description": "Agency nurses who worked more long shifts in a row than the agreement allows."}, "withdrawn_bookings": {"type": "integer", "description": "Agency shifts the ward called off after they were booked."}}, "required": ["agency_nurses", "pay_periods", "roster_weeks", "total_due", "invoice_difference", "nurses_over_booking_limit", "withdrawn_bookings"]}
Rules:
- Use null for fields not present in the document.- For list/array fields, enumerate every relevant row visible in the document; never collapse rows.- For large regular tables, prefer writing and running a local script to parse/enumerate rows.- For forms, prefer direct field extraction from the document content.- Write the resulting JSON object to ./output.json and validate that it is valid JSON before stopping.- Do not print the JSON to your assistant output.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143{ "agency_nurses": [ { "nurse": "Eriksen, Hollis", "chargeable_shifts": 13, "chargeable_hours": 147.5, "shift_charges": 6731.03, "long_run_supplement": 119.8, "call_off_fees": 0.0, "amount_due": 6850.83, "difference_from_invoice": 74.6 }, { "nurse": "Grimaldi, Elif", "chargeable_shifts": 13, "chargeable_hours": 149.5, "shift_charges": 7109.53, "long_run_supplement": 64.2, "call_off_fees": 96.0, "amount_due": 7269.73, "difference_from_invoice": 577.75 }, { "nurse": "Holloway, Wren", "chargeable_shifts": 14, "chargeable_hours": 146.0, "shift_charges": 6789.03, "long_run_supplement": 42.8, "call_off_fees": 0.0, "amount_due": 6831.83, "difference_from_invoice": 432.4 }, { "nurse": "Ivanova, Hester", "chargeable_shifts": 10, "chargeable_hours": 105.0, "shift_charges": 5153.73, "long_run_supplement": 0.0, "call_off_fees": 96.0, "amount_due": 5249.73, "difference_from_invoice": 692.4 }, { "nurse": "Kerrigan, Yara", "chargeable_shifts": 11, "chargeable_hours": 125.5, "shift_charges": 6150.31, "long_run_supplement": 0.0, "call_off_fees": 0.0, "amount_due": 6150.31, "difference_from_invoice": 695.15 }, { "nurse": "Marchetti, Vesna", "chargeable_shifts": 9, "chargeable_hours": 92.5, "shift_charges": 4368.61, "long_run_supplement": 21.4, "call_off_fees": 0.0, "amount_due": 4390.01, "difference_from_invoice": 812.55 }, { "nurse": "Nakashima, Tamsin", "chargeable_shifts": 13, "chargeable_hours": 132.5, "shift_charges": 6263.01, "long_run_supplement": 64.2, "call_off_fees": 0.0, "amount_due": 6327.21, "difference_from_invoice": 436.5 }, { "nurse": "Novak, Jasper", "chargeable_shifts": 10, "chargeable_hours": 95.0, "shift_charges": 4381.57, "long_run_supplement": 64.2, "call_off_fees": 96.0, "amount_due": 4541.77, "difference_from_invoice": 349.2 }, { "nurse": "Tregarth, Soren", "chargeable_shifts": 13, "chargeable_hours": 149.5, "shift_charges": 7109.53, "long_run_supplement": 77.0, "call_off_fees": 96.0, "amount_due": 7282.53, "difference_from_invoice": 19.0 }, { "nurse": "Valdivia, Lucan", "chargeable_shifts": 12, "chargeable_hours": 138.0, "shift_charges": 6510.38, "long_run_supplement": 21.4, "call_off_fees": 96.0, "amount_due": 6627.78, "difference_from_invoice": -21.4 } ], "pay_periods": { "period_03": { "agency_shifts": 46, "agency_hours": 499.5, "amount": 22926.59 }, "period_04": { "agency_shifts": 59, "agency_hours": 633.0, "amount": 30933.67 }, "period_05": { "agency_shifts": 13, "agency_hours": 148.5, "amount": 7661.47 } }, "roster_weeks": { "week_1": { "agency_shifts": 36, "agency_hours": 384.5 }, "week_2": { "agency_shifts": 23, "agency_hours": 252.5 }, "week_3": { "agency_shifts": 27, "agency_hours": 304.0 }, "week_4": { "agency_shifts": 32, "agency_hours": 340.0 } }, "total_due": 61521.73, "invoice_difference": 4068.15, "nurses_over_booking_limit": 8, "withdrawn_bookings": 5}123#!/bin/bashset -euo pipefailcp /solution/expected.json /app/output.json123456789101112131415161718192021222324252627282930schema_version = "1.3"artifacts = ["/app/output.json"]
[metadata]source_repo = "llamaindex/ExtractBenchPro"source_revision = "16f6672e06cf77491ec6d18c817d67864b90d845"source_case_id = "charts_inside_documents/agency_staffing_invoice_01"source_split = "charts_inside_documents"scorer_revision = "2f27f100730afc7c395602e26a2a87e07ea66b31"prompt_source = "https://arxiv.org/html/2607.29677v1#A3.SS1"tags = ["source:synthetic", "challenge:charts_inside_documents", "perception:handwritten", "length:medium", "domain:D6"]
[agent]timeout_sec = 1800network_mode = "allowlist"allowed_hosts = []
[environment]cpus = 2memory_mb = 4096storage_mb = 10240
[verifier]environment_mode = "separate"timeout_sec = 1800
[verifier.environment]cpus = 2memory_mb = 8192network_mode = "no-network"12345FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir "llama-extract-bench @ git+https://github.com/run-llama/ExtractBench.git@2f27f100730afc7c395602e26a2a87e07ea66b31" "parse-bench==1.0.4"WORKDIR /appCOPY . /tests/1{"tags": ["source:synthetic", "challenge:charts_inside_documents", "perception:handwritten", "length:medium", "domain:D6"], "data_schema": {"type": "object", "properties": {"agency_nurses": {"type": "array", "description": "One entry per nurse supplied by the agency to the ward in February, in roster order. Count only shifts the agency may charge for under its agreement with the hospital.", "items": {"type": "object", "description": "", "properties": {"nurse": {"type": "string", "description": "Name as printed on the roster, surname first, without any marker."}, "chargeable_shifts": {"type": "integer", "description": "Shifts the agency may charge for."}, "chargeable_hours": {"type": "number", "description": "Paid hours of those shifts."}, "shift_charges": {"type": "number", "description": "Hourly charges for those shifts, in pounds."}, "long_run_supplement": {"type": "number", "description": "Extra charged for shifts late in a long run of shifts, in pounds."}, "call_off_fees": {"type": "number", "description": "Fees for shifts the ward called off, in pounds."}, "amount_due": {"type": "number", "description": "Total the hospital owes the agency for this nurse, in pounds."}, "difference_from_invoice": {"type": "number", "description": "Amount the agency invoiced for this nurse minus the amount due, in pounds."}}, "required": ["nurse", "chargeable_shifts", "chargeable_hours", "shift_charges", "long_run_supplement", "call_off_fees", "amount_due", "difference_from_invoice"]}}, "pay_periods": {"type": "object", "description": "Agency hours and money by agency pay period.", "properties": {"period_03": {"type": "object", "description": "Agency pay period 03, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}, "period_04": {"type": "object", "description": "Agency pay period 04, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}, "period_05": {"type": "object", "description": "Agency pay period 05, as the agency numbers its periods.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for that fall in this period."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}, "amount": {"type": "number", "description": "Money due to the agency for this period, all charges included, in pounds."}}, "required": ["agency_shifts", "agency_hours", "amount"]}}, "required": ["period_03", "period_04", "period_05"]}, "roster_weeks": {"type": "object", "description": "Agency hours by roster week.", "properties": {"week_1": {"type": "object", "description": "Roster week 1, Monday 1 to Sunday 7 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_2": {"type": "object", "description": "Roster week 2, Monday 8 to Sunday 14 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_3": {"type": "object", "description": "Roster week 3, Monday 15 to Sunday 21 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}, "week_4": {"type": "object", "description": "Roster week 4, Monday 22 to Sunday 28 February.", "properties": {"agency_shifts": {"type": "integer", "description": "Shifts the agency may charge for worked in this week."}, "agency_hours": {"type": "number", "description": "Hours of those shifts."}}, "required": ["agency_shifts", "agency_hours"]}}, "required": ["week_1", "week_2", "week_3", "week_4"]}, "total_due": {"type": "number", "description": "Total the hospital owes the agency for February, in pounds."}, "invoice_difference": {"type": "number", "description": "Invoice total minus the total owed, in pounds."}, "nurses_over_booking_limit": {"type": "integer", "description": "Agency nurses who worked more long shifts in a row than the agreement allows."}, "withdrawn_bookings": {"type": "integer", "description": "Agency shifts the ward called off after they were booked."}}, "required": ["agency_nurses", "pay_periods", "roster_weeks", "total_due", "invoice_difference", "nurses_over_booking_limit", "withdrawn_bookings"]}, "expected_output": {"agency_nurses": [{"nurse": "Eriksen, Hollis", "chargeable_shifts": 13, "chargeable_hours": 147.5, "shift_charges": 6731.03, "long_run_supplement": 119.8, "call_off_fees": 0.0, "amount_due": 6850.83, "difference_from_invoice": 74.6}, {"nurse": "Grimaldi, Elif", "chargeable_shifts": 13, "chargeable_hours": 149.5, "shift_charges": 7109.53, "long_run_supplement": 64.2, "call_off_fees": 96.0, "amount_due": 7269.73, "difference_from_invoice": 577.75}, {"nurse": "Holloway, Wren", "chargeable_shifts": 14, "chargeable_hours": 146.0, "shift_charges": 6789.03, "long_run_supplement": 42.8, "call_off_fees": 0.0, "amount_due": 6831.83, "difference_from_invoice": 432.4}, {"nurse": "Ivanova, Hester", "chargeable_shifts": 10, "chargeable_hours": 105.0, "shift_charges": 5153.73, "long_run_supplement": 0.0, "call_off_fees": 96.0, "amount_due": 5249.73, "difference_from_invoice": 692.4}, {"nurse": "Kerrigan, Yara", "chargeable_shifts": 11, "chargeable_hours": 125.5, "shift_charges": 6150.31, "long_run_supplement": 0.0, "call_off_fees": 0.0, "amount_due": 6150.31, "difference_from_invoice": 695.15}, {"nurse": "Marchetti, Vesna", "chargeable_shifts": 9, "chargeable_hours": 92.5, "shift_charges": 4368.61, "long_run_supplement": 21.4, "call_off_fees": 0.0, "amount_due": 4390.01, "difference_from_invoice": 812.55}, {"nurse": "Nakashima, Tamsin", "chargeable_shifts": 13, "chargeable_hours": 132.5, "shift_charges": 6263.01, "long_run_supplement": 64.2, "call_off_fees": 0.0, "amount_due": 6327.21, "difference_from_invoice": 436.5}, {"nurse": "Novak, Jasper", "chargeable_shifts": 10, "chargeable_hours": 95.0, "shift_charges": 4381.57, "long_run_supplement": 64.2, "call_off_fees": 96.0, "amount_due": 4541.77, "difference_from_invoice": 349.2}, {"nurse": "Tregarth, Soren", "chargeable_shifts": 13, "chargeable_hours": 149.5, "shift_charges": 7109.53, "long_run_supplement": 77.0, "call_off_fees": 96.0, "amount_due": 7282.53, "difference_from_invoice": 19.0}, {"nurse": "Valdivia, Lucan", "chargeable_shifts": 12, "chargeable_hours": 138.0, "shift_charges": 6510.38, "long_run_supplement": 21.4, "call_off_fees": 96.0, "amount_due": 6627.78, "difference_from_invoice": -21.4}], "pay_periods": {"period_03": {"agency_shifts": 46, "agency_hours": 499.5, "amount": 22926.59}, "period_04": {"agency_shifts": 59, "agency_hours": 633.0, "amount": 30933.67}, "period_05": {"agency_shifts": 13, "agency_hours": 148.5, "amount": 7661.47}}, "roster_weeks": {"week_1": {"agency_shifts": 36, "agency_hours": 384.5}, "week_2": {"agency_shifts": 23, "agency_hours": 252.5}, "week_3": {"agency_shifts": 27, "agency_hours": 304.0}, "week_4": {"agency_shifts": 32, "agency_hours": 340.0}}, "total_due": 61521.73, "invoice_difference": 4068.15, "nurses_over_booking_limit": 8, "withdrawn_bookings": 5}, "_field_rules": {"agency_nurses[0].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.08699, 0.06898, 0.00985], "quote": "Eriksen, Hollis", "value": "Eriksen, Hollis", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[0].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 13}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 147.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6731.03}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 119.8}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6850.83}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[0].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 74.6}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.14026, 0.06188, 0.00985], "quote": "Grimaldi, Elif", "value": "Grimaldi, Elif", "coarse": false}, {"page": 17, "bbox": [0.25483, 0.31408, 0.06188, 0.00985], "quote": "Grimaldi, Elif", "value": "Grimaldi, Elif", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[1].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 13}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 149.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7109.53}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 64.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 96.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7269.73}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[1].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 577.75}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.19353, 0.07568, 0.00985], "quote": "Holloway, Wren", "value": "Holloway, Wren", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[2].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 14}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 146.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6789.03}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 42.8}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6831.83}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[2].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 432.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.24773, 0.07629, 0.00985], "quote": "Ivanova, Hester", "value": "Ivanova, Hester", "coarse": false}, {"page": 17, "bbox": [0.25483, 0.14587, 0.07629, 0.00985], "quote": "Ivanova, Hester", "value": "Ivanova, Hester", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[3].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 10}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 105.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5153.73}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 96.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5249.73}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[3].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 692.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.301, 0.06879, 0.00985], "quote": "Kerrigan, Yara", "value": "Kerrigan, Yara", "coarse": false}, {"page": 17, "bbox": [0.25483, 0.13092, 0.06879, 0.00985], "quote": "Kerrigan, Yara", "value": "Kerrigan, Yara", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[4].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 11}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 125.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6150.31}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6150.31}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[4].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 695.15}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.35427, 0.0816, 0.00985], "quote": "Marchetti, Vesna", "value": "Marchetti, Vesna", "coarse": false}, {"page": 17, "bbox": [0.25483, 0.30006, 0.0816, 0.00985], "quote": "Marchetti, Vesna", "value": "Marchetti, Vesna", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[5].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 9}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 92.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4368.61}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 21.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4390.01}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[5].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 812.55}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.39445, 0.095, 0.00985], "quote": "Nakashima, Tamsin", "value": "Nakashima, Tamsin", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[6].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 13}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 132.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6263.01}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 64.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6327.21}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[6].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 436.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.44772, 0.07042, 0.00985], "quote": "Novak, Jasper", "value": "Novak, Jasper", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[7].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 10}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 95.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4381.57}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 64.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 96.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4541.77}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[7].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 349.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.48884, 0.07489, 0.00985], "quote": "Tregarth, Soren", "value": "Tregarth, Soren", "coarse": false}, {"page": 17, "bbox": [0.25483, 0.22998, 0.07489, 0.00985], "quote": "Tregarth, Soren", "value": "Tregarth, Soren", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[8].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 13}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 149.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7109.53}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 77.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 96.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7282.53}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[8].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 19.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].nurse": {"evidence": [{"page": 2, "bbox": [0.08559, 0.5421, 0.07327, 0.00985], "quote": "Valdivia, Lucan", "value": "Valdivia, Lucan", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "agency_nurses[9].chargeable_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 12}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].chargeable_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 138.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].shift_charges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6510.38}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].long_run_supplement": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 21.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].call_off_fees": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 96.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].amount_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 6627.78}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "agency_nurses[9].difference_from_invoice": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -21.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_03.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 46}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_03.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 499.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_03.amount": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 22926.59}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_04.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 59}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_04.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 633.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_04.amount": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 30933.67}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_05.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 13}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_05.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 148.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "pay_periods.period_05.amount": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7661.47}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_1.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 36}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_1.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 384.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_2.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 23}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_2.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 252.5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_3.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 27}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_3.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 304.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_4.agency_shifts": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 32}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "roster_weeks.week_4.agency_hours": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 340.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "total_due": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 61521.73}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "invoice_difference": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4068.15}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "nurses_over_booking_limit": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 8}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "withdrawn_bookings": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5}], "verified": true, "source_policy": "inferred", "evidence_required": true}}}123#!/bin/bashset -euo pipefailpython /tests/verifier.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134"""Harbor's file boundary into the existing ExtractBench evaluator."""
from __future__ import annotations
import argparseimport jsonfrom collections.abc import Mapping, Sequencefrom datetime import UTC, datetimefrom pathlib import Pathfrom typing import Any
from extract_bench.evaluation.evaluators.extract import ExtractEvaluatorfrom extract_bench.evaluation.metrics.extract.unified_evidence_metric import ValueCellfrom extract_bench.evaluation.score_case import load_extract_test_casefrom extract_bench.schemas.extract_output import ExtractOutputfrom extract_bench.schemas.pipeline_io import InferenceRequest, InferenceResultfrom extract_bench.schemas.product import ProductType
def _feedback(cells: Sequence[ValueCell], metadata: Mapping[str, Any]) -> dict[str, Any]: expected = sum(cell.gt_path is not None for cell in cells) predicted = sum(cell.pred_path is not None for cell in cells) matched = sum(cell.value_correct for cell in cells) if (expected, predicted, matched) != ( metadata["expected_cells"], metadata["predicted_cells"], metadata["v_correct"], ): raise ValueError("Value feedback does not account for the scorer's cell counts") denominator = expected + predicted entries = [] for cell in cells: if cell.gt_path is None: outcome = "prediction_only" elif cell.pred_path is None: outcome = "reference_only" else: outcome = "matched" if cell.value_correct else "value_differs" entries.append( { "reference_path": cell.gt_path, "output_path": cell.pred_path, "outcome": outcome, "f1_credit": 2.0 / denominator if cell.value_correct else 0.0, } ) return { "schema_version": 1, "status": "scored", "path_space": "normalized_scoring_inputs", "counts": {"expected": expected, "predicted": predicted, "matched": matched}, "value_incomplete": metadata["value_incomplete"], "cells": entries, }
def score_prediction(test_json: Path, prediction: Any) -> tuple[dict[str, float], dict[str, Any]]: """Use exactly the normal evaluator's normalization and metric selection.""" case = load_extract_test_case(test_json, source_file=Path("/app/document.pdf")) now = datetime.now(UTC) result = InferenceResult( request=InferenceRequest( example_id=case.test_id, source_file_path=str(case.file_path), product_type=ProductType.EXTRACT, ), pipeline_name="harbor", product_type=ProductType.EXTRACT, raw_output={}, output=ExtractOutput( example_id=case.test_id, pipeline_name="harbor", extracted_data=prediction, field_citations=[], ), started_at=now, completed_at=now, latency_in_ms=0, ) cells: list[ValueCell] = [] bundle = ExtractEvaluator().compute_metrics(result, case, value_cells=cells) metrics = { metric.metric_name: metric.value for metric in bundle.metrics if metric.metric_name.startswith("extract_unified_value_") } value_f1 = next(metric for metric in bundle.metrics if metric.metric_name == "extract_unified_value_f1") return metrics, _feedback(cells, value_f1.metadata)
def verify(test_json: Path, prediction_path: Path, log_dir: Path) -> dict[str, Any]: """Bad/missing submissions earn zero; broken grading raises an error.
Only submission decoding is caught. A missing reference, loader error or scorer failure must fail the verifier instead of becoming a model score. """ log_dir.mkdir(parents=True, exist_ok=True) reward_path = log_dir / "reward.txt" for name in ("reward.txt", "metrics.json", "feedback.json"): (log_dir / name).unlink(missing_ok=True) try: prediction = json.loads(prediction_path.read_text(encoding="utf-8")) except (FileNotFoundError, UnicodeDecodeError, json.JSONDecodeError) as error: report: dict[str, Any] = {"status": "invalid_submission", "error": str(error), "value_f1": 0.0} else: if not isinstance(prediction, dict): report = {"status": "invalid_submission", "error": "Expected one JSON object", "value_f1": 0.0} else: metrics, feedback = score_prediction(test_json, prediction) report = { "status": "scored", "value_f1": metrics["extract_unified_value_f1"], "metrics": metrics, } if report["status"] == "invalid_submission": feedback = {"schema_version": 1, "status": "invalid_submission", "error": report["error"], "cells": []} report["perfect"] = int(report["value_f1"] == 1.0) (log_dir / "metrics.json").write_text(json.dumps(report, indent=2, allow_nan=False) + "\n", encoding="utf-8") (log_dir / "feedback.json").write_text(json.dumps(feedback, indent=2, allow_nan=False) + "\n", encoding="utf-8") reward_path.write_text(f"{report['value_f1']}\n", encoding="utf-8") return report
def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--test-json", type=Path, default=Path("/tests/reference.test.json")) parser.add_argument("--prediction", type=Path, default=Path("/app/output.json")) parser.add_argument("--log-dir", type=Path, default=Path("/logs/verifier")) args = parser.parse_args() verify(args.test_json, args.prediction, args.log_dir)
if __name__ == "__main__": main()1234567FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils tesseract-ocr curl git nodejs npm \ && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir pymupdf==1.26.6 pypdf==6.4.0 pillow==12.0.0WORKDIR /appCOPY document.pdf schema.json /app/123version https://git-lfs.github.com/spec/v1oid sha256:5bd14a1625b6d184e42c03f316f530c2fd4476538296cbdd2343e50ced82ef15size 9730520123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202{ "type": "object", "properties": { "lot01SamplesOut": { "type": "integer", "description": "Lot 1: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot01PayFactor": { "type": "number", "description": "Lot 1: pay factor applied to the lot." }, "lot01Adjustment": { "type": "number", "description": "Lot 1: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot02SamplesOut": { "type": "integer", "description": "Lot 2: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot02PayFactor": { "type": "number", "description": "Lot 2: pay factor applied to the lot." }, "lot02Adjustment": { "type": "number", "description": "Lot 2: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot03SamplesOut": { "type": "integer", "description": "Lot 3: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot03PayFactor": { "type": "number", "description": "Lot 3: pay factor applied to the lot." }, "lot03Adjustment": { "type": "number", "description": "Lot 3: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot04SamplesOut": { "type": "integer", "description": "Lot 4: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot04PayFactor": { "type": "number", "description": "Lot 4: pay factor applied to the lot." }, "lot04Adjustment": { "type": "number", "description": "Lot 4: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot05SamplesOut": { "type": "integer", "description": "Lot 5: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot05PayFactor": { "type": "number", "description": "Lot 5: pay factor applied to the lot." }, "lot05Adjustment": { "type": "number", "description": "Lot 5: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot06SamplesOut": { "type": "integer", "description": "Lot 6: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot06PayFactor": { "type": "number", "description": "Lot 6: pay factor applied to the lot." }, "lot06Adjustment": { "type": "number", "description": "Lot 6: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot07SamplesOut": { "type": "integer", "description": "Lot 7: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot07PayFactor": { "type": "number", "description": "Lot 7: pay factor applied to the lot." }, "lot07Adjustment": { "type": "number", "description": "Lot 7: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot08SamplesOut": { "type": "integer", "description": "Lot 8: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot08PayFactor": { "type": "number", "description": "Lot 8: pay factor applied to the lot." }, "lot08Adjustment": { "type": "number", "description": "Lot 8: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot09SamplesOut": { "type": "integer", "description": "Lot 9: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot09PayFactor": { "type": "number", "description": "Lot 9: pay factor applied to the lot." }, "lot09Adjustment": { "type": "number", "description": "Lot 9: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot10SamplesOut": { "type": "integer", "description": "Lot 10: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot10PayFactor": { "type": "number", "description": "Lot 10: pay factor applied to the lot." }, "lot10Adjustment": { "type": "number", "description": "Lot 10: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot11SamplesOut": { "type": "integer", "description": "Lot 11: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot11PayFactor": { "type": "number", "description": "Lot 11: pay factor applied to the lot." }, "lot11Adjustment": { "type": "number", "description": "Lot 11: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "lot12SamplesOut": { "type": "integer", "description": "Lot 12: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot." }, "lot12PayFactor": { "type": "number", "description": "Lot 12: pay factor applied to the lot." }, "lot12Adjustment": { "type": "number", "description": "Lot 12: pay adjustment in dollars, negative for a deduction, 0 when unreduced." }, "totalAdjustment": { "type": "number", "description": "Sum of the pay adjustments of all lots, in dollars." }, "lotsAtFullPay": { "type": "integer", "description": "Number of lots paid without any reduction." }, "tonnageAtReducedPay": { "type": "integer", "description": "Total tonnage of the lots paid at a factor below 1.00." } }, "required": [ "lot01SamplesOut", "lot01PayFactor", "lot01Adjustment", "lot02SamplesOut", "lot02PayFactor", "lot02Adjustment", "lot03SamplesOut", "lot03PayFactor", "lot03Adjustment", "lot04SamplesOut", "lot04PayFactor", "lot04Adjustment", "lot05SamplesOut", "lot05PayFactor", "lot05Adjustment", "lot06SamplesOut", "lot06PayFactor", "lot06Adjustment", "lot07SamplesOut", "lot07PayFactor", "lot07Adjustment", "lot08SamplesOut", "lot08PayFactor", "lot08Adjustment", "lot09SamplesOut", "lot09PayFactor", "lot09Adjustment", "lot10SamplesOut", "lot10PayFactor", "lot10Adjustment", "lot11SamplesOut", "lot11PayFactor", "lot11Adjustment", "lot12SamplesOut", "lot12PayFactor", "lot12Adjustment", "totalAdjustment", "lotsAtFullPay", "tonnageAtReducedPay" ]}12345678910111213141516Extract structured data from the document file `./document.pdf` in the current directory.
Use only local file inspection and shell commands. Do not use web search, network calls, browser tools, or external services. Temporary scratch files inside the current directory are OK.
Return a single JSON object conforming to this schema as your final answer:
{"type": "object", "properties": {"lot01SamplesOut": {"type": "integer", "description": "Lot 1: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot01PayFactor": {"type": "number", "description": "Lot 1: pay factor applied to the lot."}, "lot01Adjustment": {"type": "number", "description": "Lot 1: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot02SamplesOut": {"type": "integer", "description": "Lot 2: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot02PayFactor": {"type": "number", "description": "Lot 2: pay factor applied to the lot."}, "lot02Adjustment": {"type": "number", "description": "Lot 2: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot03SamplesOut": {"type": "integer", "description": "Lot 3: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot03PayFactor": {"type": "number", "description": "Lot 3: pay factor applied to the lot."}, "lot03Adjustment": {"type": "number", "description": "Lot 3: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot04SamplesOut": {"type": "integer", "description": "Lot 4: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot04PayFactor": {"type": "number", "description": "Lot 4: pay factor applied to the lot."}, "lot04Adjustment": {"type": "number", "description": "Lot 4: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot05SamplesOut": {"type": "integer", "description": "Lot 5: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot05PayFactor": {"type": "number", "description": "Lot 5: pay factor applied to the lot."}, "lot05Adjustment": {"type": "number", "description": "Lot 5: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot06SamplesOut": {"type": "integer", "description": "Lot 6: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot06PayFactor": {"type": "number", "description": "Lot 6: pay factor applied to the lot."}, "lot06Adjustment": {"type": "number", "description": "Lot 6: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot07SamplesOut": {"type": "integer", "description": "Lot 7: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot07PayFactor": {"type": "number", "description": "Lot 7: pay factor applied to the lot."}, "lot07Adjustment": {"type": "number", "description": "Lot 7: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot08SamplesOut": {"type": "integer", "description": "Lot 8: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot08PayFactor": {"type": "number", "description": "Lot 8: pay factor applied to the lot."}, "lot08Adjustment": {"type": "number", "description": "Lot 8: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot09SamplesOut": {"type": "integer", "description": "Lot 9: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot09PayFactor": {"type": "number", "description": "Lot 9: pay factor applied to the lot."}, "lot09Adjustment": {"type": "number", "description": "Lot 9: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot10SamplesOut": {"type": "integer", "description": "Lot 10: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot10PayFactor": {"type": "number", "description": "Lot 10: pay factor applied to the lot."}, "lot10Adjustment": {"type": "number", "description": "Lot 10: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot11SamplesOut": {"type": "integer", "description": "Lot 11: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot11PayFactor": {"type": "number", "description": "Lot 11: pay factor applied to the lot."}, "lot11Adjustment": {"type": "number", "description": "Lot 11: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot12SamplesOut": {"type": "integer", "description": "Lot 12: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot12PayFactor": {"type": "number", "description": "Lot 12: pay factor applied to the lot."}, "lot12Adjustment": {"type": "number", "description": "Lot 12: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "totalAdjustment": {"type": "number", "description": "Sum of the pay adjustments of all lots, in dollars."}, "lotsAtFullPay": {"type": "integer", "description": "Number of lots paid without any reduction."}, "tonnageAtReducedPay": {"type": "integer", "description": "Total tonnage of the lots paid at a factor below 1.00."}}, "required": ["lot01SamplesOut", "lot01PayFactor", "lot01Adjustment", "lot02SamplesOut", "lot02PayFactor", "lot02Adjustment", "lot03SamplesOut", "lot03PayFactor", "lot03Adjustment", "lot04SamplesOut", "lot04PayFactor", "lot04Adjustment", "lot05SamplesOut", "lot05PayFactor", "lot05Adjustment", "lot06SamplesOut", "lot06PayFactor", "lot06Adjustment", "lot07SamplesOut", "lot07PayFactor", "lot07Adjustment", "lot08SamplesOut", "lot08PayFactor", "lot08Adjustment", "lot09SamplesOut", "lot09PayFactor", "lot09Adjustment", "lot10SamplesOut", "lot10PayFactor", "lot10Adjustment", "lot11SamplesOut", "lot11PayFactor", "lot11Adjustment", "lot12SamplesOut", "lot12PayFactor", "lot12Adjustment", "totalAdjustment", "lotsAtFullPay", "tonnageAtReducedPay"]}
Rules:
- Use null for fields not present in the document.- For list/array fields, enumerate every relevant row visible in the document; never collapse rows.- For large regular tables, prefer writing and running a local script to parse/enumerate rows.- For forms, prefer direct field extraction from the document content.- Write the resulting JSON object to ./output.json and validate that it is valid JSON before stopping.- Do not print the JSON to your assistant output.1234567891011121314151617181920212223242526272829303132333435363738394041{ "lot01SamplesOut": 3, "lot01PayFactor": 0.9, "lot01Adjustment": -5671.0, "lot02SamplesOut": 3, "lot02PayFactor": 0.9, "lot02Adjustment": -5392.8, "lot03SamplesOut": 3, "lot03PayFactor": 0.95, "lot03Adjustment": -3809.2, "lot04SamplesOut": 4, "lot04PayFactor": 0.9, "lot04Adjustment": -9244.8, "lot05SamplesOut": 2, "lot05PayFactor": 0.98, "lot05Adjustment": -1527.96, "lot06SamplesOut": 4, "lot06PayFactor": 0.9, "lot06Adjustment": -8324.6, "lot07SamplesOut": 2, "lot07PayFactor": 0.98, "lot07Adjustment": -881.57, "lot08SamplesOut": 1, "lot08PayFactor": 0.98, "lot08Adjustment": -1829.59, "lot09SamplesOut": 3, "lot09PayFactor": 0.9, "lot09Adjustment": -7730.35, "lot10SamplesOut": 0, "lot10PayFactor": 1.0, "lot10Adjustment": 0.0, "lot11SamplesOut": 1, "lot11PayFactor": 0.98, "lot11Adjustment": -1639.1, "lot12SamplesOut": 4, "lot12PayFactor": 0.95, "lot12Adjustment": -4806.55, "totalAdjustment": -50857.52, "lotsAtFullPay": 1, "tonnageAtReducedPay": 38160}123#!/bin/bashset -euo pipefailcp /solution/expected.json /app/output.json123456789101112131415161718192021222324252627282930schema_version = "1.3"artifacts = ["/app/output.json"]
[metadata]source_repo = "llamaindex/ExtractBenchPro"source_revision = "16f6672e06cf77491ec6d18c817d67864b90d845"source_case_id = "charts_inside_documents/aggregate_qc_report_01"source_split = "charts_inside_documents"scorer_revision = "2f27f100730afc7c395602e26a2a87e07ea66b31"prompt_source = "https://arxiv.org/html/2607.29677v1#A3.SS1"tags = ["source:synthetic", "challenge:charts_inside_documents", "perception:scan", "length:medium", "domain:D3"]
[agent]timeout_sec = 1800network_mode = "allowlist"allowed_hosts = []
[environment]cpus = 2memory_mb = 4096storage_mb = 10240
[verifier]environment_mode = "separate"timeout_sec = 1800
[verifier.environment]cpus = 2memory_mb = 8192network_mode = "no-network"12345FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir "llama-extract-bench @ git+https://github.com/run-llama/ExtractBench.git@2f27f100730afc7c395602e26a2a87e07ea66b31" "parse-bench==1.0.4"WORKDIR /appCOPY . /tests/1{"tags": ["source:synthetic", "challenge:charts_inside_documents", "perception:scan", "length:medium", "domain:D3"], "data_schema": {"type": "object", "properties": {"lot01SamplesOut": {"type": "integer", "description": "Lot 1: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot01PayFactor": {"type": "number", "description": "Lot 1: pay factor applied to the lot."}, "lot01Adjustment": {"type": "number", "description": "Lot 1: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot02SamplesOut": {"type": "integer", "description": "Lot 2: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot02PayFactor": {"type": "number", "description": "Lot 2: pay factor applied to the lot."}, "lot02Adjustment": {"type": "number", "description": "Lot 2: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot03SamplesOut": {"type": "integer", "description": "Lot 3: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot03PayFactor": {"type": "number", "description": "Lot 3: pay factor applied to the lot."}, "lot03Adjustment": {"type": "number", "description": "Lot 3: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot04SamplesOut": {"type": "integer", "description": "Lot 4: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot04PayFactor": {"type": "number", "description": "Lot 4: pay factor applied to the lot."}, "lot04Adjustment": {"type": "number", "description": "Lot 4: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot05SamplesOut": {"type": "integer", "description": "Lot 5: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot05PayFactor": {"type": "number", "description": "Lot 5: pay factor applied to the lot."}, "lot05Adjustment": {"type": "number", "description": "Lot 5: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot06SamplesOut": {"type": "integer", "description": "Lot 6: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot06PayFactor": {"type": "number", "description": "Lot 6: pay factor applied to the lot."}, "lot06Adjustment": {"type": "number", "description": "Lot 6: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot07SamplesOut": {"type": "integer", "description": "Lot 7: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot07PayFactor": {"type": "number", "description": "Lot 7: pay factor applied to the lot."}, "lot07Adjustment": {"type": "number", "description": "Lot 7: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot08SamplesOut": {"type": "integer", "description": "Lot 8: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot08PayFactor": {"type": "number", "description": "Lot 8: pay factor applied to the lot."}, "lot08Adjustment": {"type": "number", "description": "Lot 8: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot09SamplesOut": {"type": "integer", "description": "Lot 9: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot09PayFactor": {"type": "number", "description": "Lot 9: pay factor applied to the lot."}, "lot09Adjustment": {"type": "number", "description": "Lot 9: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot10SamplesOut": {"type": "integer", "description": "Lot 10: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot10PayFactor": {"type": "number", "description": "Lot 10: pay factor applied to the lot."}, "lot10Adjustment": {"type": "number", "description": "Lot 10: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot11SamplesOut": {"type": "integer", "description": "Lot 11: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot11PayFactor": {"type": "number", "description": "Lot 11: pay factor applied to the lot."}, "lot11Adjustment": {"type": "number", "description": "Lot 11: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "lot12SamplesOut": {"type": "integer", "description": "Lot 12: number of the laboratory's own samples of the lot that miss a gradation limit at one or more sieves. Count only samples that stand for the lot."}, "lot12PayFactor": {"type": "number", "description": "Lot 12: pay factor applied to the lot."}, "lot12Adjustment": {"type": "number", "description": "Lot 12: pay adjustment in dollars, negative for a deduction, 0 when unreduced."}, "totalAdjustment": {"type": "number", "description": "Sum of the pay adjustments of all lots, in dollars."}, "lotsAtFullPay": {"type": "integer", "description": "Number of lots paid without any reduction."}, "tonnageAtReducedPay": {"type": "integer", "description": "Total tonnage of the lots paid at a factor below 1.00."}}, "required": ["lot01SamplesOut", "lot01PayFactor", "lot01Adjustment", "lot02SamplesOut", "lot02PayFactor", "lot02Adjustment", "lot03SamplesOut", "lot03PayFactor", "lot03Adjustment", "lot04SamplesOut", "lot04PayFactor", "lot04Adjustment", "lot05SamplesOut", "lot05PayFactor", "lot05Adjustment", "lot06SamplesOut", "lot06PayFactor", "lot06Adjustment", "lot07SamplesOut", "lot07PayFactor", "lot07Adjustment", "lot08SamplesOut", "lot08PayFactor", "lot08Adjustment", "lot09SamplesOut", "lot09PayFactor", "lot09Adjustment", "lot10SamplesOut", "lot10PayFactor", "lot10Adjustment", "lot11SamplesOut", "lot11PayFactor", "lot11Adjustment", "lot12SamplesOut", "lot12PayFactor", "lot12Adjustment", "totalAdjustment", "lotsAtFullPay", "tonnageAtReducedPay"]}, "expected_output": {"lot01SamplesOut": 3, "lot01PayFactor": 0.9, "lot01Adjustment": -5671.0, "lot02SamplesOut": 3, "lot02PayFactor": 0.9, "lot02Adjustment": -5392.8, "lot03SamplesOut": 3, "lot03PayFactor": 0.95, "lot03Adjustment": -3809.2, "lot04SamplesOut": 4, "lot04PayFactor": 0.9, "lot04Adjustment": -9244.8, "lot05SamplesOut": 2, "lot05PayFactor": 0.98, "lot05Adjustment": -1527.96, "lot06SamplesOut": 4, "lot06PayFactor": 0.9, "lot06Adjustment": -8324.6, "lot07SamplesOut": 2, "lot07PayFactor": 0.98, "lot07Adjustment": -881.57, "lot08SamplesOut": 1, "lot08PayFactor": 0.98, "lot08Adjustment": -1829.59, "lot09SamplesOut": 3, "lot09PayFactor": 0.9, "lot09Adjustment": -7730.35, "lot10SamplesOut": 0, "lot10PayFactor": 1.0, "lot10Adjustment": 0.0, "lot11SamplesOut": 1, "lot11PayFactor": 0.98, "lot11Adjustment": -1639.1, "lot12SamplesOut": 4, "lot12PayFactor": 0.95, "lot12Adjustment": -4806.55, "totalAdjustment": -50857.52, "lotsAtFullPay": 1, "tonnageAtReducedPay": 38160}, "_field_rules": {"lot01SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot01PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.9}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot01Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -5671.0}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot02SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot02PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.9}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot02Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -5392.8}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot03SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot03PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.95}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot03Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -3809.2}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot04SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot04PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.9}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot04Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -9244.8}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot05SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot05PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.98}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot05Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -1527.96}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot06SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot06PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.9}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot06Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -8324.6}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot07SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot07PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.98}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot07Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -881.57}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot08SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot08PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.98}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot08Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -1829.59}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot09SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot09PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.9}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot09Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -7730.35}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot10SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot10PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1.0}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot10Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.0}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot11SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot11PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.98}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot11Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -1639.1}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot12SamplesOut": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot12PayFactor": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0.95}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lot12Adjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -4806.55}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "totalAdjustment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": -50857.52}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "lotsAtFullPay": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1}], "source_policy": "inferred", "evidence_required": true, "verified": true}, "tonnageAtReducedPay": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 38160}], "source_policy": "inferred", "evidence_required": true, "verified": true}}}123#!/bin/bashset -euo pipefailpython /tests/verifier.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134"""Harbor's file boundary into the existing ExtractBench evaluator."""
from __future__ import annotations
import argparseimport jsonfrom collections.abc import Mapping, Sequencefrom datetime import UTC, datetimefrom pathlib import Pathfrom typing import Any
from extract_bench.evaluation.evaluators.extract import ExtractEvaluatorfrom extract_bench.evaluation.metrics.extract.unified_evidence_metric import ValueCellfrom extract_bench.evaluation.score_case import load_extract_test_casefrom extract_bench.schemas.extract_output import ExtractOutputfrom extract_bench.schemas.pipeline_io import InferenceRequest, InferenceResultfrom extract_bench.schemas.product import ProductType
def _feedback(cells: Sequence[ValueCell], metadata: Mapping[str, Any]) -> dict[str, Any]: expected = sum(cell.gt_path is not None for cell in cells) predicted = sum(cell.pred_path is not None for cell in cells) matched = sum(cell.value_correct for cell in cells) if (expected, predicted, matched) != ( metadata["expected_cells"], metadata["predicted_cells"], metadata["v_correct"], ): raise ValueError("Value feedback does not account for the scorer's cell counts") denominator = expected + predicted entries = [] for cell in cells: if cell.gt_path is None: outcome = "prediction_only" elif cell.pred_path is None: outcome = "reference_only" else: outcome = "matched" if cell.value_correct else "value_differs" entries.append( { "reference_path": cell.gt_path, "output_path": cell.pred_path, "outcome": outcome, "f1_credit": 2.0 / denominator if cell.value_correct else 0.0, } ) return { "schema_version": 1, "status": "scored", "path_space": "normalized_scoring_inputs", "counts": {"expected": expected, "predicted": predicted, "matched": matched}, "value_incomplete": metadata["value_incomplete"], "cells": entries, }
def score_prediction(test_json: Path, prediction: Any) -> tuple[dict[str, float], dict[str, Any]]: """Use exactly the normal evaluator's normalization and metric selection.""" case = load_extract_test_case(test_json, source_file=Path("/app/document.pdf")) now = datetime.now(UTC) result = InferenceResult( request=InferenceRequest( example_id=case.test_id, source_file_path=str(case.file_path), product_type=ProductType.EXTRACT, ), pipeline_name="harbor", product_type=ProductType.EXTRACT, raw_output={}, output=ExtractOutput( example_id=case.test_id, pipeline_name="harbor", extracted_data=prediction, field_citations=[], ), started_at=now, completed_at=now, latency_in_ms=0, ) cells: list[ValueCell] = [] bundle = ExtractEvaluator().compute_metrics(result, case, value_cells=cells) metrics = { metric.metric_name: metric.value for metric in bundle.metrics if metric.metric_name.startswith("extract_unified_value_") } value_f1 = next(metric for metric in bundle.metrics if metric.metric_name == "extract_unified_value_f1") return metrics, _feedback(cells, value_f1.metadata)
def verify(test_json: Path, prediction_path: Path, log_dir: Path) -> dict[str, Any]: """Bad/missing submissions earn zero; broken grading raises an error.
Only submission decoding is caught. A missing reference, loader error or scorer failure must fail the verifier instead of becoming a model score. """ log_dir.mkdir(parents=True, exist_ok=True) reward_path = log_dir / "reward.txt" for name in ("reward.txt", "metrics.json", "feedback.json"): (log_dir / name).unlink(missing_ok=True) try: prediction = json.loads(prediction_path.read_text(encoding="utf-8")) except (FileNotFoundError, UnicodeDecodeError, json.JSONDecodeError) as error: report: dict[str, Any] = {"status": "invalid_submission", "error": str(error), "value_f1": 0.0} else: if not isinstance(prediction, dict): report = {"status": "invalid_submission", "error": "Expected one JSON object", "value_f1": 0.0} else: metrics, feedback = score_prediction(test_json, prediction) report = { "status": "scored", "value_f1": metrics["extract_unified_value_f1"], "metrics": metrics, } if report["status"] == "invalid_submission": feedback = {"schema_version": 1, "status": "invalid_submission", "error": report["error"], "cells": []} report["perfect"] = int(report["value_f1"] == 1.0) (log_dir / "metrics.json").write_text(json.dumps(report, indent=2, allow_nan=False) + "\n", encoding="utf-8") (log_dir / "feedback.json").write_text(json.dumps(feedback, indent=2, allow_nan=False) + "\n", encoding="utf-8") reward_path.write_text(f"{report['value_f1']}\n", encoding="utf-8") return report
def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--test-json", type=Path, default=Path("/tests/reference.test.json")) parser.add_argument("--prediction", type=Path, default=Path("/app/output.json")) parser.add_argument("--log-dir", type=Path, default=Path("/logs/verifier")) args = parser.parse_args() verify(args.test_json, args.prediction, args.log_dir)
if __name__ == "__main__": main()1234567FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils tesseract-ocr curl git nodejs npm \ && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir pymupdf==1.26.6 pypdf==6.4.0 pillow==12.0.0WORKDIR /appCOPY document.pdf schema.json /app/123version https://git-lfs.github.com/spec/v1oid sha256:ea802e7d108e5715ec2f2651fa7deaeac040ce02dc0bc5542022906e08ccb191size 16669700123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382{ "type": "object", "description": "The street assessment as it stands once certified. Count only lots inside the improvement district.", "properties": { "blocks": { "type": "object", "properties": { "phase2BlockC": { "type": "object", "description": "Phase 2, Block C.", "properties": { "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." }, "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase3BlockB": { "type": "object", "description": "Phase 3, Block B.", "properties": { "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase1BlockB": { "type": "object", "description": "Phase 1, Block B.", "properties": { "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase1BlockC": { "type": "object", "description": "Phase 1, Block C.", "properties": { "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase3BlockA": { "type": "object", "description": "Phase 3, Block A.", "properties": { "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase2BlockA": { "type": "object", "description": "Phase 2, Block A.", "properties": { "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase3BlockC": { "type": "object", "description": "Phase 3, Block C.", "properties": { "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase2BlockB": { "type": "object", "description": "Phase 2, Block B.", "properties": { "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." }, "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] }, "phase1BlockA": { "type": "object", "description": "Phase 1, Block A.", "properties": { "drainageLots": { "type": "integer", "description": "Lots in this block that also pay the flat drainage charge." }, "lotsCharged": { "type": "integer", "description": "Lots in this block that pay anything." }, "parcelsExcused": { "type": "integer", "description": "Parcels in this block the city releases from paying." }, "feetCharged": { "type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay." }, "dollarsCharged": { "type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges." } }, "required": [ "parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged" ] } }, "required": [ "phase1BlockA", "phase1BlockB", "phase1BlockC", "phase2BlockA", "phase2BlockB", "phase2BlockC", "phase3BlockA", "phase3BlockB", "phase3BlockC" ] }, "totals": { "type": "object", "properties": { "largestAssessmentLot": { "type": "string", "description": "The lot paying the largest single total, written phase-block-lot, as in 2-B-17." }, "totalAssessment": { "type": "number", "description": "Dollars the whole improvement district pays: per-foot amounts plus drainage charges." }, "drainageCharges": { "type": "number", "description": "Dollars of flat drainage charges across the district." } }, "required": [ "totalAssessment", "largestAssessmentLot", "drainageCharges" ] }, "streets": { "type": "array", "description": "One row per district street on which at least one lot pays, in alphabetical order.", "items": { "type": "object", "properties": { "street": { "type": "string", "description": "Street name as printed." }, "lotsCharged": { "type": "integer", "description": "Lots that pay on this street." }, "dollarsForFeet": { "type": "number", "description": "Dollars those feet pay at this street's rate per foot." }, "feetCharged": { "type": "number", "description": "Feet of street line paid for on this street, to two decimals." }, "largestLotCharge": { "type": "number", "description": "The largest per-foot amount any one lot pays on this street, in dollars." } }, "required": [ "street", "feetCharged", "dollarsForFeet", "lotsCharged", "largestLotCharge" ] } } }, "required": [ "streets", "blocks", "totals" ]}12345678910111213141516Extract structured data from the document file `./document.pdf` in the current directory.
Use only local file inspection and shell commands. Do not use web search, network calls, browser tools, or external services. Temporary scratch files inside the current directory are OK.
Return a single JSON object conforming to this schema as your final answer:
{"type": "object", "description": "The street assessment as it stands once certified. Count only lots inside the improvement district.", "properties": {"blocks": {"type": "object", "properties": {"phase2BlockC": {"type": "object", "description": "Phase 2, Block C.", "properties": {"parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockB": {"type": "object", "description": "Phase 3, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockB": {"type": "object", "description": "Phase 1, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockC": {"type": "object", "description": "Phase 1, Block C.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockA": {"type": "object", "description": "Phase 3, Block A.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase2BlockA": {"type": "object", "description": "Phase 2, Block A.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockC": {"type": "object", "description": "Phase 3, Block C.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase2BlockB": {"type": "object", "description": "Phase 2, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockA": {"type": "object", "description": "Phase 1, Block A.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}}, "required": ["phase1BlockA", "phase1BlockB", "phase1BlockC", "phase2BlockA", "phase2BlockB", "phase2BlockC", "phase3BlockA", "phase3BlockB", "phase3BlockC"]}, "totals": {"type": "object", "properties": {"largestAssessmentLot": {"type": "string", "description": "The lot paying the largest single total, written phase-block-lot, as in 2-B-17."}, "totalAssessment": {"type": "number", "description": "Dollars the whole improvement district pays: per-foot amounts plus drainage charges."}, "drainageCharges": {"type": "number", "description": "Dollars of flat drainage charges across the district."}}, "required": ["totalAssessment", "largestAssessmentLot", "drainageCharges"]}, "streets": {"type": "array", "description": "One row per district street on which at least one lot pays, in alphabetical order.", "items": {"type": "object", "properties": {"street": {"type": "string", "description": "Street name as printed."}, "lotsCharged": {"type": "integer", "description": "Lots that pay on this street."}, "dollarsForFeet": {"type": "number", "description": "Dollars those feet pay at this street's rate per foot."}, "feetCharged": {"type": "number", "description": "Feet of street line paid for on this street, to two decimals."}, "largestLotCharge": {"type": "number", "description": "The largest per-foot amount any one lot pays on this street, in dollars."}}, "required": ["street", "feetCharged", "dollarsForFeet", "lotsCharged", "largestLotCharge"]}}}, "required": ["streets", "blocks", "totals"]}
Rules:
- Use null for fields not present in the document.- For list/array fields, enumerate every relevant row visible in the document; never collapse rows.- For large regular tables, prefer writing and running a local script to parse/enumerate rows.- For forms, prefer direct field extraction from the document content.- Write the resulting JSON object to ./output.json and validate that it is valid JSON before stopping.- Do not print the JSON to your assistant output.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130{ "blocks": { "phase2BlockC": { "parcelsExcused": 0, "dollarsCharged": 12203.8, "drainageLots": 0, "feetCharged": 435.85, "lotsCharged": 7 }, "phase3BlockB": { "dollarsCharged": 75796.32, "lotsCharged": 23, "feetCharged": 1579.09, "drainageLots": 0, "parcelsExcused": 3 }, "phase1BlockB": { "dollarsCharged": 20924.05, "parcelsExcused": 0, "feetCharged": 597.83, "lotsCharged": 9, "drainageLots": 0 }, "phase1BlockC": { "drainageLots": 0, "feetCharged": 212.8, "lotsCharged": 4, "dollarsCharged": 5958.4, "parcelsExcused": 0 }, "phase3BlockA": { "dollarsCharged": 14101.28, "feetCharged": 273.26, "lotsCharged": 5, "drainageLots": 3, "parcelsExcused": 1 }, "phase2BlockA": { "drainageLots": 0, "feetCharged": 1768.21, "lotsCharged": 26, "dollarsCharged": 84874.08, "parcelsExcused": 0 }, "phase3BlockC": { "dollarsCharged": 20582.1, "parcelsExcused": 0, "lotsCharged": 9, "feetCharged": 588.06, "drainageLots": 0 }, "phase2BlockB": { "dollarsCharged": 20767.1, "lotsCharged": 7, "parcelsExcused": 0, "drainageLots": 3, "feetCharged": 409.06 }, "phase1BlockA": { "drainageLots": 3, "lotsCharged": 23, "parcelsExcused": 0, "feetCharged": 1584.54, "dollarsCharged": 82003.26 } }, "totals": { "largestAssessmentLot": "1-A-18", "totalAssessment": 337210.39, "drainageCharges": 19350.0 }, "streets": [ { "street": "BLUESTEM WAY", "lotsCharged": 10, "dollarsForFeet": 22282.75, "feetCharged": 636.65, "largestLotCharge": 3185.35 }, { "street": "BRENNAN STREET", "lotsCharged": 9, "dollarsForFeet": 20582.1, "feetCharged": 588.06, "largestLotCharge": 3428.95 }, { "street": "COPPERLEAF DRIVE", "lotsCharged": 5, "dollarsForFeet": 7651.28, "feetCharged": 273.26, "largestLotCharge": 2122.4 }, { "street": "JUNIPER RIDGE ROAD", "lotsCharged": 7, "dollarsForFeet": 12203.8, "feetCharged": 435.85, "largestLotCharge": 2568.72 }, { "street": "KESTREL COURT", "lotsCharged": 4, "dollarsForFeet": 5958.4, "feetCharged": 212.8, "largestLotCharge": 1694.28 }, { "street": "LAUREL LANE", "lotsCharged": 48, "dollarsForFeet": 159068.64, "feetCharged": 3313.93, "largestLotCharge": 5178.72 }, { "street": "PRAIRIE ROSE DRIVE", "lotsCharged": 7, "dollarsForFeet": 14317.1, "feetCharged": 409.06, "largestLotCharge": 3077.2 }, { "street": "WHITCOMB STREET", "lotsCharged": 23, "dollarsForFeet": 75796.32, "feetCharged": 1579.09, "largestLotCharge": 4080.48 } ]}123#!/bin/bashset -euo pipefailcp /solution/expected.json /app/output.json123456789101112131415161718192021222324252627282930schema_version = "1.3"artifacts = ["/app/output.json"]
[metadata]source_repo = "llamaindex/ExtractBenchPro"source_revision = "16f6672e06cf77491ec6d18c817d67864b90d845"source_case_id = "charts_inside_documents/assessment_billing_run_01"source_split = "charts_inside_documents"scorer_revision = "2f27f100730afc7c395602e26a2a87e07ea66b31"prompt_source = "https://arxiv.org/html/2607.29677v1#A3.SS1"tags = ["source:synthetic", "challenge:charts_inside_documents", "perception:scan", "length:medium", "domain:D8"]
[agent]timeout_sec = 1800network_mode = "allowlist"allowed_hosts = []
[environment]cpus = 2memory_mb = 4096storage_mb = 10240
[verifier]environment_mode = "separate"timeout_sec = 1800
[verifier.environment]cpus = 2memory_mb = 8192network_mode = "no-network"12345FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir "llama-extract-bench @ git+https://github.com/run-llama/ExtractBench.git@2f27f100730afc7c395602e26a2a87e07ea66b31" "parse-bench==1.0.4"WORKDIR /appCOPY . /tests/1{"tags": ["source:synthetic", "challenge:charts_inside_documents", "perception:scan", "length:medium", "domain:D8"], "data_schema": {"type": "object", "description": "The street assessment as it stands once certified. Count only lots inside the improvement district.", "properties": {"blocks": {"type": "object", "properties": {"phase2BlockC": {"type": "object", "description": "Phase 2, Block C.", "properties": {"parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockB": {"type": "object", "description": "Phase 3, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockB": {"type": "object", "description": "Phase 1, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockC": {"type": "object", "description": "Phase 1, Block C.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockA": {"type": "object", "description": "Phase 3, Block A.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase2BlockA": {"type": "object", "description": "Phase 2, Block A.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase3BlockC": {"type": "object", "description": "Phase 3, Block C.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase2BlockB": {"type": "object", "description": "Phase 2, Block B.", "properties": {"dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}, "phase1BlockA": {"type": "object", "description": "Phase 1, Block A.", "properties": {"drainageLots": {"type": "integer", "description": "Lots in this block that also pay the flat drainage charge."}, "lotsCharged": {"type": "integer", "description": "Lots in this block that pay anything."}, "parcelsExcused": {"type": "integer", "description": "Parcels in this block the city releases from paying."}, "feetCharged": {"type": "number", "description": "Feet paid for by this block's lots, on whichever street they pay."}, "dollarsCharged": {"type": "number", "description": "Dollars this block's lots pay: per-foot amounts plus drainage charges."}}, "required": ["parcelsExcused", "drainageLots", "lotsCharged", "feetCharged", "dollarsCharged"]}}, "required": ["phase1BlockA", "phase1BlockB", "phase1BlockC", "phase2BlockA", "phase2BlockB", "phase2BlockC", "phase3BlockA", "phase3BlockB", "phase3BlockC"]}, "totals": {"type": "object", "properties": {"largestAssessmentLot": {"type": "string", "description": "The lot paying the largest single total, written phase-block-lot, as in 2-B-17."}, "totalAssessment": {"type": "number", "description": "Dollars the whole improvement district pays: per-foot amounts plus drainage charges."}, "drainageCharges": {"type": "number", "description": "Dollars of flat drainage charges across the district."}}, "required": ["totalAssessment", "largestAssessmentLot", "drainageCharges"]}, "streets": {"type": "array", "description": "One row per district street on which at least one lot pays, in alphabetical order.", "items": {"type": "object", "properties": {"street": {"type": "string", "description": "Street name as printed."}, "lotsCharged": {"type": "integer", "description": "Lots that pay on this street."}, "dollarsForFeet": {"type": "number", "description": "Dollars those feet pay at this street's rate per foot."}, "feetCharged": {"type": "number", "description": "Feet of street line paid for on this street, to two decimals."}, "largestLotCharge": {"type": "number", "description": "The largest per-foot amount any one lot pays on this street, in dollars."}}, "required": ["street", "feetCharged", "dollarsForFeet", "lotsCharged", "largestLotCharge"]}}}, "required": ["streets", "blocks", "totals"]}, "expected_output": {"blocks": {"phase2BlockC": {"parcelsExcused": 0, "dollarsCharged": 12203.8, "drainageLots": 0, "feetCharged": 435.85, "lotsCharged": 7}, "phase3BlockB": {"dollarsCharged": 75796.32, "lotsCharged": 23, "feetCharged": 1579.09, "drainageLots": 0, "parcelsExcused": 3}, "phase1BlockB": {"dollarsCharged": 20924.05, "parcelsExcused": 0, "feetCharged": 597.83, "lotsCharged": 9, "drainageLots": 0}, "phase1BlockC": {"drainageLots": 0, "feetCharged": 212.8, "lotsCharged": 4, "dollarsCharged": 5958.4, "parcelsExcused": 0}, "phase3BlockA": {"dollarsCharged": 14101.28, "feetCharged": 273.26, "lotsCharged": 5, "drainageLots": 3, "parcelsExcused": 1}, "phase2BlockA": {"drainageLots": 0, "feetCharged": 1768.21, "lotsCharged": 26, "dollarsCharged": 84874.08, "parcelsExcused": 0}, "phase3BlockC": {"dollarsCharged": 20582.1, "parcelsExcused": 0, "lotsCharged": 9, "feetCharged": 588.06, "drainageLots": 0}, "phase2BlockB": {"dollarsCharged": 20767.1, "lotsCharged": 7, "parcelsExcused": 0, "drainageLots": 3, "feetCharged": 409.06}, "phase1BlockA": {"drainageLots": 3, "lotsCharged": 23, "parcelsExcused": 0, "feetCharged": 1584.54, "dollarsCharged": 82003.26}}, "totals": {"largestAssessmentLot": "1-A-18", "totalAssessment": 337210.39, "drainageCharges": 19350.0}, "streets": [{"street": "BLUESTEM WAY", "lotsCharged": 10, "dollarsForFeet": 22282.75, "feetCharged": 636.65, "largestLotCharge": 3185.35}, {"street": "BRENNAN STREET", "lotsCharged": 9, "dollarsForFeet": 20582.1, "feetCharged": 588.06, "largestLotCharge": 3428.95}, {"street": "COPPERLEAF DRIVE", "lotsCharged": 5, "dollarsForFeet": 7651.28, "feetCharged": 273.26, "largestLotCharge": 2122.4}, {"street": "JUNIPER RIDGE ROAD", "lotsCharged": 7, "dollarsForFeet": 12203.8, "feetCharged": 435.85, "largestLotCharge": 2568.72}, {"street": "KESTREL COURT", "lotsCharged": 4, "dollarsForFeet": 5958.4, "feetCharged": 212.8, "largestLotCharge": 1694.28}, {"street": "LAUREL LANE", "lotsCharged": 48, "dollarsForFeet": 159068.64, "feetCharged": 3313.93, "largestLotCharge": 5178.72}, {"street": "PRAIRIE ROSE DRIVE", "lotsCharged": 7, "dollarsForFeet": 14317.1, "feetCharged": 409.06, "largestLotCharge": 3077.2}, {"street": "WHITCOMB STREET", "lotsCharged": 23, "dollarsForFeet": 75796.32, "feetCharged": 1579.09, "largestLotCharge": 4080.48}]}, "_field_rules": {"streets[0].street": {"evidence": [{"page": 2, "bbox": [0.814252, 0.814657, 0.091843, 0.010467], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 3, "bbox": [0.820559, 0.101876, 0.092961, 0.011232], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 3, "bbox": [0.389251, 0.611529, 0.092594, 0.01107], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 4, "bbox": [0.819555, 0.208015, 0.092548, 0.011534], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 4, "bbox": [0.811466, 0.514951, 0.092446, 0.01151], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 4, "bbox": [0.382624, 0.814867, 0.092362, 0.011486], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 4, "bbox": [0.803394, 0.821206, 0.092345, 0.011485], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 5, "bbox": [0.393628, 0.098853, 0.092477, 0.010313], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 6, "bbox": [0.381843, 0.097681, 0.092027, 0.011312], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.454741, 0.190356, 0.083314, 0.009906], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.454927, 0.203663, 0.083308, 0.009902], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.455112, 0.216969, 0.083301, 0.009899], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.455285, 0.229319, 0.083296, 0.009896], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.45547, 0.242621, 0.083289, 0.009892], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.455656, 0.25591, 0.083283, 0.009889], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.455841, 0.269208, 0.083277, 0.009886], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.456014, 0.281551, 0.083271, 0.009883], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 9, "bbox": [0.456199, 0.294845, 0.083265, 0.009879], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 11, "bbox": [0.099174, 0.110568, 0.096829, 0.011547], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}, {"page": 31, "bbox": [0.093966, 0.396107, 0.09998, 0.011025], "quote": "BLUESTEM WAY", "value": "BLUESTEM WAY", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[0].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 636.65, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 639.21, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[0].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 22282.75, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 22372.35, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[0].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 10, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[0].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3185.35, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[1].street": {"evidence": [{"page": 1, "bbox": [0.371823, 0.695016, 0.107215, 0.011799], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 2, "bbox": [0.799158, 0.303961, 0.106575, 0.010465], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 3, "bbox": [0.802356, 0.307613, 0.107524, 0.011345], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 3, "bbox": [0.377758, 0.406245, 0.107305, 0.011302], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 4, "bbox": [0.385811, 0.098936, 0.107198, 0.011782], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 4, "bbox": [0.794201, 0.616881, 0.106984, 0.01174], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 4, "bbox": [0.370592, 0.712622, 0.106964, 0.011732], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 5, "bbox": [0.377931, 0.30446, 0.106998, 0.010349], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 8, "bbox": [0.371356, 0.302736, 0.10722, 0.01123], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.456384, 0.308048, 0.09682, 0.009989], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.45657, 0.321328, 0.096813, 0.009986], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.456742, 0.333674, 0.096806, 0.009982], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.456927, 0.34695, 0.096799, 0.009978], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.457113, 0.360234, 0.096792, 0.009975], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.457298, 0.373517, 0.096785, 0.009971], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.45747, 0.385846, 0.096778, 0.009968], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.457655, 0.399124, 0.096771, 0.009964], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 9, "bbox": [0.45784, 0.412391, 0.096764, 0.00996], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 11, "bbox": [0.098956, 0.128466, 0.112622, 0.011684], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}, {"page": 31, "bbox": [0.093893, 0.415943, 0.11629, 0.011033], "quote": "BRENNAN STREET", "value": "BRENNAN STREET", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[1].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 588.06, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 590.58, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[1].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 20582.1, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 20670.3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[1].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 9, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[1].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3428.95, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[2].street": {"evidence": [{"page": 1, "bbox": [0.788947, 0.393113, 0.117681, 0.011778], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 1, "bbox": [0.78229, 0.699204, 0.117677, 0.01196], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 2, "bbox": [0.367519, 0.612355, 0.117968, 0.010496], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 5, "bbox": [0.790238, 0.099392, 0.118007, 0.010377], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 6, "bbox": [0.372288, 0.814194, 0.118045, 0.011939], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 8, "bbox": [0.362465, 0.405105, 0.11818, 0.011355], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458026, 0.425599, 0.106781, 0.010038], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458197, 0.437921, 0.106773, 0.010035], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458383, 0.451192, 0.106765, 0.010031], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458568, 0.464461, 0.106757, 0.010027], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458753, 0.477718, 0.106749, 0.010023], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 9, "bbox": [0.458925, 0.490043, 0.106742, 0.010019], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 11, "bbox": [0.098726, 0.147325, 0.124318, 0.011784], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}, {"page": 31, "bbox": [0.093824, 0.434835, 0.128364, 0.011039], "quote": "COPPERLEAF DRIVE", "value": "COPPERLEAF DRIVE", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[2].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 273.26, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[2].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7651.28, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[2].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[2].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2122.4, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[3].street": {"evidence": [{"page": 1, "bbox": [0.357836, 0.387989, 0.127858, 0.011947], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 2, "bbox": [0.778356, 0.098962, 0.127222, 0.010735], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 3, "bbox": [0.352466, 0.71356, 0.127763, 0.011428], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 3, "bbox": [0.772903, 0.820383, 0.127903, 0.011398], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 5, "bbox": [0.356262, 0.509686, 0.127503, 0.010408], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 6, "bbox": [0.765977, 0.091548, 0.126863, 0.011815], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 7, "bbox": [0.352219, 0.611273, 0.127418, 0.012153], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.45911, 0.503238, 0.115555, 0.010086], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.459295, 0.516499, 0.115546, 0.010082], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.45948, 0.529758, 0.115538, 0.010078], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.459651, 0.542066, 0.11553, 0.010074], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.459836, 0.555322, 0.115521, 0.01007], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.460021, 0.568565, 0.115513, 0.010066], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 9, "bbox": [0.460206, 0.581817, 0.115504, 0.010062], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 11, "bbox": [0.098496, 0.166191, 0.134604, 0.011869], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}, {"page": 31, "bbox": [0.093751, 0.45468, 0.138999, 0.011044], "quote": "JUNIPER RIDGE ROAD", "value": "JUNIPER RIDGE ROAD", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[3].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 435.85, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[3].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 12203.8, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[3].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[3].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2568.72, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[4].street": {"evidence": [{"page": 2, "bbox": [0.807592, 0.201547, 0.098059, 0.010501], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 3, "bbox": [0.389485, 0.200825, 0.098803, 0.011266], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 4, "bbox": [0.381694, 0.610666, 0.098432, 0.0116], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 5, "bbox": [0.385976, 0.407152, 0.098366, 0.010324], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 9, "bbox": [0.460378, 0.594297, 0.088428, 0.009845], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 9, "bbox": [0.460563, 0.607545, 0.088422, 0.009842], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 9, "bbox": [0.460748, 0.620791, 0.088415, 0.009838], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 9, "bbox": [0.460933, 0.634025, 0.088409, 0.009835], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 11, "bbox": [0.098278, 0.184195, 0.103058, 0.011588], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}, {"page": 31, "bbox": [0.093678, 0.47452, 0.106411, 0.011028], "quote": "KESTREL COURT", "value": "KESTREL COURT", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[4].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 212.8, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[4].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5958.4, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[4].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[4].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1694.28, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[5].street": {"evidence": [{"page": 1, "bbox": [0.408265, 0.184082, 0.081859, 0.011165], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 1, "bbox": [0.829573, 0.189514, 0.081507, 0.011143], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 1, "bbox": [0.827354, 0.291556, 0.081506, 0.011185], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 1, "bbox": [0.816256, 0.80171, 0.081501, 0.011394], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.402473, 0.099381, 0.081817, 0.010509], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.403022, 0.304848, 0.081751, 0.010385], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.403297, 0.407453, 0.081718, 0.010324], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.824508, 0.406319, 0.081297, 0.010297], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.403581, 0.509967, 0.081685, 0.010303], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.824613, 0.50856, 0.081265, 0.010275], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 2, "bbox": [0.404119, 0.71466, 0.08162, 0.010393], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 3, "bbox": [0.829577, 0.204994, 0.082133, 0.01107], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 3, "bbox": [0.826022, 0.410681, 0.082053, 0.011013], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 3, "bbox": [0.820702, 0.718479, 0.081934, 0.010929], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 3, "bbox": [0.396872, 0.816368, 0.081772, 0.010892], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.408598, 0.20181, 0.08183, 0.011359], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.406049, 0.304199, 0.081801, 0.011351], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.827585, 0.310567, 0.081785, 0.01135], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.403512, 0.406514, 0.081771, 0.011343], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.824885, 0.412876, 0.081755, 0.011342], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.400967, 0.508763, 0.081741, 0.011335], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 4, "bbox": [0.816805, 0.719364, 0.081666, 0.011318], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 5, "bbox": [0.403835, 0.201743, 0.081692, 0.010282], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 5, "bbox": [0.825089, 0.305034, 0.081621, 0.010276], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 5, "bbox": [0.823601, 0.510235, 0.081548, 0.01027], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 5, "bbox": [0.400535, 0.816976, 0.081473, 0.010265], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 5, "bbox": [0.821398, 0.817333, 0.081439, 0.010262], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.394811, 0.199592, 0.081412, 0.011185], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.814199, 0.193384, 0.081302, 0.011176], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.397088, 0.301645, 0.081472, 0.011215], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.399377, 0.403848, 0.081532, 0.011245], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.401681, 0.506214, 0.081592, 0.011275], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.822006, 0.499775, 0.081483, 0.011265], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.403967, 0.608721, 0.081652, 0.011304], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.406277, 0.711381, 0.081712, 0.011334], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 6, "bbox": [0.827213, 0.704789, 0.081603, 0.011325], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.411363, 0.098622, 0.081989, 0.011632], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.834407, 0.1038, 0.082278, 0.011647], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.408679, 0.20167, 0.081915, 0.011581], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.40601, 0.304522, 0.08184, 0.01153], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.400695, 0.509683, 0.081691, 0.011429], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.822194, 0.515447, 0.081978, 0.011443], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.819167, 0.617892, 0.081903, 0.011393], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.816126, 0.720153, 0.081828, 0.011342], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.392734, 0.816034, 0.081469, 0.011278], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 7, "bbox": [0.8131, 0.822232, 0.081754, 0.011292], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 8, "bbox": [0.814775, 0.093197, 0.081853, 0.010942], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 8, "bbox": [0.816844, 0.195592, 0.081848, 0.010942], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 8, "bbox": [0.818903, 0.297964, 0.081843, 0.010942], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.461105, 0.64644, 0.071552, 0.009701], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.461289, 0.65967, 0.071547, 0.009698], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.461474, 0.672908, 0.071542, 0.009695], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.461659, 0.686145, 0.071536, 0.009692], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.46183, 0.698431, 0.071531, 0.009689], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.462015, 0.711663, 0.071526, 0.009686], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.462199, 0.724884, 0.071521, 0.009683], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.462384, 0.738113, 0.071516, 0.00968], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.462555, 0.750392, 0.071511, 0.009677], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.46274, 0.763617, 0.071505, 0.009674], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.462924, 0.77684, 0.0715, 0.009671], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.463109, 0.790051, 0.071495, 0.009668], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.46328, 0.802333, 0.07149, 0.009665], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.463465, 0.81554, 0.071485, 0.009662], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.463649, 0.828756, 0.071479, 0.009659], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.463833, 0.841969, 0.071474, 0.009656], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464004, 0.854234, 0.071469, 0.009653], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464189, 0.867444, 0.071464, 0.00965], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464373, 0.880642, 0.071459, 0.009647], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464557, 0.893848, 0.071453, 0.009644], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464728, 0.906106, 0.071448, 0.009641], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 9, "bbox": [0.464913, 0.919308, 0.071443, 0.009638], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.462395, 0.090489, 0.071305, 0.009669], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.462288, 0.103684, 0.07131, 0.009668], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.462181, 0.116881, 0.071315, 0.009667], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.462082, 0.129134, 0.071319, 0.009667], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461975, 0.142324, 0.071324, 0.009666], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461867, 0.155526, 0.071328, 0.009665], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.46176, 0.168729, 0.071333, 0.009664], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461661, 0.180988, 0.071337, 0.009664], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461554, 0.194195, 0.071342, 0.009663], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461447, 0.207404, 0.071347, 0.009662], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.46134, 0.220604, 0.071351, 0.009661], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.46124, 0.23287, 0.071356, 0.00966], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461133, 0.246083, 0.07136, 0.00966], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.461026, 0.259299, 0.071365, 0.009659], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460919, 0.272516, 0.071369, 0.009658], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460819, 0.284787, 0.071374, 0.009657], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460712, 0.297998, 0.071378, 0.009657], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460605, 0.31122, 0.071383, 0.009656], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460498, 0.324444, 0.071388, 0.009655], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460398, 0.336721, 0.071392, 0.009654], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460291, 0.349949, 0.071397, 0.009653], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460184, 0.363177, 0.071401, 0.009653], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.460076, 0.376398, 0.071406, 0.009652], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.459977, 0.388682, 0.07141, 0.009651], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.459869, 0.401916, 0.071415, 0.00965], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.459762, 0.415152, 0.07142, 0.009649], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 10, "bbox": [0.459655, 0.428389, 0.071424, 0.009649], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 11, "bbox": [0.098048, 0.203124, 0.083407, 0.011414], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.4407, 0.339592, 0.086177, 0.012176], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.441035, 0.358567, 0.086172, 0.012179], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.441386, 0.378482, 0.086168, 0.012182], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.441738, 0.398405, 0.086164, 0.012185], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.442073, 0.417375, 0.08616, 0.012188], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 28, "bbox": [0.442424, 0.437284, 0.086156, 0.012191], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}, {"page": 31, "bbox": [0.093609, 0.493426, 0.086119, 0.011019], "quote": "LAUREL LANE", "value": "LAUREL LANE", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[5].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3313.93, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 3318.91, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[5].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 159068.64, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 159307.68, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[5].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 48, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[5].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5178.72, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[6].street": {"evidence": [{"page": 1, "bbox": [0.782878, 0.495093, 0.12154, 0.0119], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 2, "bbox": [0.784862, 0.712706, 0.12116, 0.010553], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 3, "bbox": [0.782216, 0.615548, 0.122231, 0.01141], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 4, "bbox": [0.792829, 0.105083, 0.122009, 0.012024], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 5, "bbox": [0.36151, 0.612189, 0.121668, 0.010391], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 5, "bbox": [0.782046, 0.714979, 0.121555, 0.010388], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 8, "bbox": [0.354426, 0.200355, 0.122071, 0.011397], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.459555, 0.440679, 0.110597, 0.009923], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.459448, 0.45391, 0.110605, 0.009921], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.45934, 0.467152, 0.110612, 0.009919], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.459233, 0.480396, 0.110619, 0.009917], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.459133, 0.492693, 0.110626, 0.009915], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.459026, 0.50594, 0.110633, 0.009914], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 10, "bbox": [0.458918, 0.519189, 0.11064, 0.009912], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 11, "bbox": [0.097818, 0.221937, 0.129165, 0.011806], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}, {"page": 31, "bbox": [0.093536, 0.513285, 0.133385, 0.011039], "quote": "PRAIRIE ROSE DRIVE", "value": "PRAIRIE ROSE DRIVE", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[6].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 409.06, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[6].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 14317.1, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[6].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[6].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3077.2, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[7].street": {"evidence": [{"page": 1, "bbox": [0.373596, 0.285906, 0.114293, 0.011683], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 1, "bbox": [0.369168, 0.490423, 0.11429, 0.0118], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 1, "bbox": [0.366954, 0.592669, 0.114289, 0.011859], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 1, "bbox": [0.78839, 0.597224, 0.113798, 0.011836], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 1, "bbox": [0.362527, 0.797157, 0.114286, 0.011977], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 2, "bbox": [0.370265, 0.202104, 0.114256, 0.010605], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 2, "bbox": [0.792462, 0.610674, 0.113479, 0.010451], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 2, "bbox": [0.371988, 0.816883, 0.113981, 0.010612], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 3, "bbox": [0.375345, 0.097741, 0.114546, 0.011492], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 3, "bbox": [0.372229, 0.303461, 0.114436, 0.011421], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 3, "bbox": [0.369119, 0.508786, 0.114325, 0.011349], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 3, "bbox": [0.791736, 0.513036, 0.114504, 0.011358], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 5, "bbox": [0.793406, 0.202235, 0.114061, 0.010366], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 5, "bbox": [0.791955, 0.40761, 0.113959, 0.010365], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 5, "bbox": [0.790507, 0.612628, 0.113858, 0.010364], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 5, "bbox": [0.368712, 0.714604, 0.113861, 0.010367], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 6, "bbox": [0.784569, 0.29536, 0.113578, 0.011689], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 6, "bbox": [0.787144, 0.397487, 0.113662, 0.011725], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 6, "bbox": [0.792306, 0.602206, 0.11383, 0.011796], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 6, "bbox": [0.797483, 0.807524, 0.113999, 0.011868], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 7, "bbox": [0.798818, 0.206489, 0.114715, 0.012194], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 7, "bbox": [0.795795, 0.309489, 0.11461, 0.01213], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 7, "bbox": [0.37098, 0.406687, 0.114121, 0.012051], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 7, "bbox": [0.792776, 0.412304, 0.114505, 0.012066], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 7, "bbox": [0.363102, 0.7136, 0.113811, 0.011861], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 8, "bbox": [0.360101, 0.097951, 0.114305, 0.011308], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458811, 0.53243, 0.103565, 0.009861], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458711, 0.544733, 0.103571, 0.00986], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458604, 0.557987, 0.103578, 0.009858], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458496, 0.571243, 0.103585, 0.009856], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458389, 0.584501, 0.103591, 0.009855], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458289, 0.59681, 0.103598, 0.009853], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458181, 0.610061, 0.103604, 0.009851], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.458074, 0.623324, 0.103611, 0.00985], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457966, 0.636588, 0.103618, 0.009848], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457866, 0.648904, 0.103624, 0.009846], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457759, 0.662171, 0.103631, 0.009845], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457651, 0.675441, 0.103638, 0.009843], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457543, 0.688702, 0.103645, 0.009841], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457444, 0.701024, 0.103651, 0.00984], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457336, 0.714298, 0.103658, 0.009838], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457228, 0.727574, 0.103664, 0.009836], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457121, 0.740852, 0.103671, 0.009835], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.457021, 0.75318, 0.103677, 0.009833], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456913, 0.766452, 0.103684, 0.009831], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456805, 0.779735, 0.103691, 0.00983], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456698, 0.793019, 0.103698, 0.009828], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456597, 0.805354, 0.103704, 0.009826], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.45649, 0.818642, 0.103711, 0.009825], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456382, 0.831932, 0.103718, 0.009823], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456274, 0.845213, 0.103724, 0.009821], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 10, "bbox": [0.456174, 0.857554, 0.103731, 0.00982], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 11, "bbox": [0.097599, 0.239905, 0.120902, 0.011731], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}, {"page": 31, "bbox": [0.093467, 0.532199, 0.124861, 0.011035], "quote": "WHITCOMB STREET", "value": "WHITCOMB STREET", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "streets[7].feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1579.09, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 1581.57, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[7].dollarsForFeet": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 75796.32, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 75915.36, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[7].lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 23, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "streets[7].largestLotCharge": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4080.48, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockA.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockA.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockA.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 23, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockA.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1584.54, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 1587.03, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockA.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 82003.26, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 82122.78, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockB.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockB.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockB.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 9, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockB.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 597.83, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 600.39, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockB.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 20924.05, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 21013.65, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockC.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockC.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockC.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockC.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 212.8, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase1BlockC.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5958.4, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockA.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockA.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockA.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 26, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockA.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1768.21, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 1770.7, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockA.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 84874.08, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 84993.6, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockB.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockB.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockB.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockB.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 409.06, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockB.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 20767.1, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockC.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockC.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockC.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 7, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockC.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 435.85, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase2BlockC.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 12203.8, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockA.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockA.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockA.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockA.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 273.26, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockA.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 14101.28, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockB.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockB.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockB.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 23, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockB.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 1579.09, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 1581.57, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockB.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 75796.32, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 75915.36, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockC.parcelsExcused": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockC.drainageLots": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockC.lotsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 9, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockC.feetCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 588.06, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 590.58, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "blocks.phase3BlockC.dollarsCharged": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 20582.1, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 20670.3, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "totals.totalAssessment": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 337210.39, "coarse": true}, {"page": null, "bbox": null, "quote": null, "value": 337746.27, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "totals.largestAssessmentLot": {"evidence": [{"page": 3, "bbox": [0.87305, 0.37755, 0.03541, 0.01231], "quote": "1-A-18", "value": "1-A-18", "coarse": false}, {"page": 9, "bbox": [0.17155, 0.86812, 0.03184, 0.01127], "quote": "1-A-18", "value": "1-A-18", "coarse": false}], "verified": true, "source_policy": "verbatim", "evidence_required": true}, "totals.drainageCharges": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 19350.0, "coarse": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}}}123#!/bin/bashset -euo pipefailpython /tests/verifier.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134"""Harbor's file boundary into the existing ExtractBench evaluator."""
from __future__ import annotations
import argparseimport jsonfrom collections.abc import Mapping, Sequencefrom datetime import UTC, datetimefrom pathlib import Pathfrom typing import Any
from extract_bench.evaluation.evaluators.extract import ExtractEvaluatorfrom extract_bench.evaluation.metrics.extract.unified_evidence_metric import ValueCellfrom extract_bench.evaluation.score_case import load_extract_test_casefrom extract_bench.schemas.extract_output import ExtractOutputfrom extract_bench.schemas.pipeline_io import InferenceRequest, InferenceResultfrom extract_bench.schemas.product import ProductType
def _feedback(cells: Sequence[ValueCell], metadata: Mapping[str, Any]) -> dict[str, Any]: expected = sum(cell.gt_path is not None for cell in cells) predicted = sum(cell.pred_path is not None for cell in cells) matched = sum(cell.value_correct for cell in cells) if (expected, predicted, matched) != ( metadata["expected_cells"], metadata["predicted_cells"], metadata["v_correct"], ): raise ValueError("Value feedback does not account for the scorer's cell counts") denominator = expected + predicted entries = [] for cell in cells: if cell.gt_path is None: outcome = "prediction_only" elif cell.pred_path is None: outcome = "reference_only" else: outcome = "matched" if cell.value_correct else "value_differs" entries.append( { "reference_path": cell.gt_path, "output_path": cell.pred_path, "outcome": outcome, "f1_credit": 2.0 / denominator if cell.value_correct else 0.0, } ) return { "schema_version": 1, "status": "scored", "path_space": "normalized_scoring_inputs", "counts": {"expected": expected, "predicted": predicted, "matched": matched}, "value_incomplete": metadata["value_incomplete"], "cells": entries, }
def score_prediction(test_json: Path, prediction: Any) -> tuple[dict[str, float], dict[str, Any]]: """Use exactly the normal evaluator's normalization and metric selection.""" case = load_extract_test_case(test_json, source_file=Path("/app/document.pdf")) now = datetime.now(UTC) result = InferenceResult( request=InferenceRequest( example_id=case.test_id, source_file_path=str(case.file_path), product_type=ProductType.EXTRACT, ), pipeline_name="harbor", product_type=ProductType.EXTRACT, raw_output={}, output=ExtractOutput( example_id=case.test_id, pipeline_name="harbor", extracted_data=prediction, field_citations=[], ), started_at=now, completed_at=now, latency_in_ms=0, ) cells: list[ValueCell] = [] bundle = ExtractEvaluator().compute_metrics(result, case, value_cells=cells) metrics = { metric.metric_name: metric.value for metric in bundle.metrics if metric.metric_name.startswith("extract_unified_value_") } value_f1 = next(metric for metric in bundle.metrics if metric.metric_name == "extract_unified_value_f1") return metrics, _feedback(cells, value_f1.metadata)
def verify(test_json: Path, prediction_path: Path, log_dir: Path) -> dict[str, Any]: """Bad/missing submissions earn zero; broken grading raises an error.
Only submission decoding is caught. A missing reference, loader error or scorer failure must fail the verifier instead of becoming a model score. """ log_dir.mkdir(parents=True, exist_ok=True) reward_path = log_dir / "reward.txt" for name in ("reward.txt", "metrics.json", "feedback.json"): (log_dir / name).unlink(missing_ok=True) try: prediction = json.loads(prediction_path.read_text(encoding="utf-8")) except (FileNotFoundError, UnicodeDecodeError, json.JSONDecodeError) as error: report: dict[str, Any] = {"status": "invalid_submission", "error": str(error), "value_f1": 0.0} else: if not isinstance(prediction, dict): report = {"status": "invalid_submission", "error": "Expected one JSON object", "value_f1": 0.0} else: metrics, feedback = score_prediction(test_json, prediction) report = { "status": "scored", "value_f1": metrics["extract_unified_value_f1"], "metrics": metrics, } if report["status"] == "invalid_submission": feedback = {"schema_version": 1, "status": "invalid_submission", "error": report["error"], "cells": []} report["perfect"] = int(report["value_f1"] == 1.0) (log_dir / "metrics.json").write_text(json.dumps(report, indent=2, allow_nan=False) + "\n", encoding="utf-8") (log_dir / "feedback.json").write_text(json.dumps(feedback, indent=2, allow_nan=False) + "\n", encoding="utf-8") reward_path.write_text(f"{report['value_f1']}\n", encoding="utf-8") return report
def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--test-json", type=Path, default=Path("/tests/reference.test.json")) parser.add_argument("--prediction", type=Path, default=Path("/app/output.json")) parser.add_argument("--log-dir", type=Path, default=Path("/logs/verifier")) args = parser.parse_args() verify(args.test_json, args.prediction, args.log_dir)
if __name__ == "__main__": main()1234567FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils tesseract-ocr curl git nodejs npm \ && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir pymupdf==1.26.6 pypdf==6.4.0 pillow==12.0.0WORKDIR /appCOPY document.pdf schema.json /app/123version https://git-lfs.github.com/spec/v1oid sha256:bb4e1350573400b802096dfbce273e922aac15fa2e3478482e23acb70ceed14esize 4653915123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205{ "type": "object", "properties": { "modules": { "type": "object", "description": "The tenant's UPS modules, one entry each.", "properties": { "ups_1": { "type": "object", "description": "UPS module UPS-1.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] }, "ups_2": { "type": "object", "description": "UPS module UPS-2.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] }, "ups_3": { "type": "object", "description": "UPS module UPS-3.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] }, "ups_4": { "type": "object", "description": "UPS module UPS-4.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] }, "ups_5": { "type": "object", "description": "UPS module UPS-5.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] }, "ups_6": { "type": "object", "description": "UPS module UPS-6.", "properties": { "load_kw_before": { "type": "number", "description": "Tenant load on this module before the change, in kW." }, "load_kw_after": { "type": "number", "description": "Tenant load on this module after the change, in kW." }, "over_limit_after": { "type": "boolean", "description": "Whether this module is above the site's loading limit after the change." }, "racks_exposed_after": { "type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard." } }, "required": [ "load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after" ] } }, "required": [ "ups_1", "ups_2", "ups_3", "ups_4", "ups_5", "ups_6" ] }, "kw_moving_if_module_fails": { "type": "number", "description": "After the change, the kW that would move onto other modules if UPS-4 failed." }, "racks_on_one_cord_after": { "type": "integer", "description": "After the change, how many tenant racks have only one live supply cord." }, "tenant_kw_after": { "type": "number", "description": "Total tenant design load in Data Hall 2 after the change, in kW." } }, "required": [ "modules", "kw_moving_if_module_fails", "racks_on_one_cord_after", "tenant_kw_after" ]}12345678910111213141516Extract structured data from the document file `./document.pdf` in the current directory.
Use only local file inspection and shell commands. Do not use web search, network calls, browser tools, or external services. Temporary scratch files inside the current directory are OK.
Return a single JSON object conforming to this schema as your final answer:
{"type": "object", "properties": {"modules": {"type": "object", "description": "The tenant's UPS modules, one entry each.", "properties": {"ups_1": {"type": "object", "description": "UPS module UPS-1.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_2": {"type": "object", "description": "UPS module UPS-2.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_3": {"type": "object", "description": "UPS module UPS-3.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_4": {"type": "object", "description": "UPS module UPS-4.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_5": {"type": "object", "description": "UPS module UPS-5.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_6": {"type": "object", "description": "UPS module UPS-6.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}}, "required": ["ups_1", "ups_2", "ups_3", "ups_4", "ups_5", "ups_6"]}, "kw_moving_if_module_fails": {"type": "number", "description": "After the change, the kW that would move onto other modules if UPS-4 failed."}, "racks_on_one_cord_after": {"type": "integer", "description": "After the change, how many tenant racks have only one live supply cord."}, "tenant_kw_after": {"type": "number", "description": "Total tenant design load in Data Hall 2 after the change, in kW."}}, "required": ["modules", "kw_moving_if_module_fails", "racks_on_one_cord_after", "tenant_kw_after"]}
Rules:
- Use null for fields not present in the document.- For list/array fields, enumerate every relevant row visible in the document; never collapse rows.- For large regular tables, prefer writing and running a local script to parse/enumerate rows.- For forms, prefer direct field extraction from the document content.- Write the resulting JSON object to ./output.json and validate that it is valid JSON before stopping.- Do not print the JSON to your assistant output.12345678910111213141516171819202122232425262728293031323334353637383940414243{ "modules": { "ups_1": { "load_kw_before": 124.6, "load_kw_after": 117.6, "over_limit_after": false, "racks_exposed_after": 3 }, "ups_2": { "load_kw_before": 129.2, "load_kw_after": 122.2, "over_limit_after": true, "racks_exposed_after": 3 }, "ups_3": { "load_kw_before": 92.4, "load_kw_after": 80.6, "over_limit_after": false, "racks_exposed_after": 0 }, "ups_4": { "load_kw_before": 307.0, "load_kw_after": 290.0, "over_limit_after": true, "racks_exposed_after": 5 }, "ups_5": { "load_kw_before": 110.2, "load_kw_after": 105.4, "over_limit_after": false, "racks_exposed_after": 2 }, "ups_6": { "load_kw_before": 273.0, "load_kw_after": 256.6, "over_limit_after": false, "racks_exposed_after": 2 } }, "kw_moving_if_module_fails": 262.4, "racks_on_one_cord_after": 4, "tenant_kw_after": 972.4}123#!/bin/bashset -euo pipefailcp /solution/expected.json /app/output.json123456789101112131415161718192021222324252627282930schema_version = "1.3"artifacts = ["/app/output.json"]
[metadata]source_repo = "llamaindex/ExtractBenchPro"source_revision = "16f6672e06cf77491ec6d18c817d67864b90d845"source_case_id = "charts_inside_documents/capacity_change_pack_01"source_split = "charts_inside_documents"scorer_revision = "2f27f100730afc7c395602e26a2a87e07ea66b31"prompt_source = "https://arxiv.org/html/2607.29677v1#A3.SS1"tags = ["source:synthetic", "challenge:charts_inside_documents", "perception:image", "length:medium", "domain:D2"]
[agent]timeout_sec = 1800network_mode = "allowlist"allowed_hosts = []
[environment]cpus = 2memory_mb = 4096storage_mb = 10240
[verifier]environment_mode = "separate"timeout_sec = 1800
[verifier.environment]cpus = 2memory_mb = 8192network_mode = "no-network"12345FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir "llama-extract-bench @ git+https://github.com/run-llama/ExtractBench.git@2f27f100730afc7c395602e26a2a87e07ea66b31" "parse-bench==1.0.4"WORKDIR /appCOPY . /tests/1{"tags": ["source:synthetic", "challenge:charts_inside_documents", "perception:image", "length:medium", "domain:D2"], "data_schema": {"type": "object", "properties": {"modules": {"type": "object", "description": "The tenant's UPS modules, one entry each.", "properties": {"ups_1": {"type": "object", "description": "UPS module UPS-1.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_2": {"type": "object", "description": "UPS module UPS-2.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_3": {"type": "object", "description": "UPS module UPS-3.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_4": {"type": "object", "description": "UPS module UPS-4.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_5": {"type": "object", "description": "UPS module UPS-5.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}, "ups_6": {"type": "object", "description": "UPS module UPS-6.", "properties": {"load_kw_before": {"type": "number", "description": "Tenant load on this module before the change, in kW."}, "load_kw_after": {"type": "number", "description": "Tenant load on this module after the change, in kW."}, "over_limit_after": {"type": "boolean", "description": "Whether this module is above the site's loading limit after the change."}, "racks_exposed_after": {"type": "integer", "description": "After the change, how many racks with a cord on this module could lose power through the failure of one module or one switchboard."}}, "required": ["load_kw_before", "load_kw_after", "over_limit_after", "racks_exposed_after"]}}, "required": ["ups_1", "ups_2", "ups_3", "ups_4", "ups_5", "ups_6"]}, "kw_moving_if_module_fails": {"type": "number", "description": "After the change, the kW that would move onto other modules if UPS-4 failed."}, "racks_on_one_cord_after": {"type": "integer", "description": "After the change, how many tenant racks have only one live supply cord."}, "tenant_kw_after": {"type": "number", "description": "Total tenant design load in Data Hall 2 after the change, in kW."}}, "required": ["modules", "kw_moving_if_module_fails", "racks_on_one_cord_after", "tenant_kw_after"]}, "expected_output": {"modules": {"ups_1": {"load_kw_before": 124.6, "load_kw_after": 117.6, "over_limit_after": false, "racks_exposed_after": 3}, "ups_2": {"load_kw_before": 129.2, "load_kw_after": 122.2, "over_limit_after": true, "racks_exposed_after": 3}, "ups_3": {"load_kw_before": 92.4, "load_kw_after": 80.6, "over_limit_after": false, "racks_exposed_after": 0}, "ups_4": {"load_kw_before": 307.0, "load_kw_after": 290.0, "over_limit_after": true, "racks_exposed_after": 5}, "ups_5": {"load_kw_before": 110.2, "load_kw_after": 105.4, "over_limit_after": false, "racks_exposed_after": 2}, "ups_6": {"load_kw_before": 273.0, "load_kw_after": 256.6, "over_limit_after": false, "racks_exposed_after": 2}}, "kw_moving_if_module_fails": 262.4, "racks_on_one_cord_after": 4, "tenant_kw_after": 972.4}, "_field_rules": {"modules.ups_1.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 124.6}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_1.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 117.6}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_1.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": false}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_1.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_2.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 129.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_2.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 122.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_2.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_2.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 3}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_3.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 92.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_3.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 80.6}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_3.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": false}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_3.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_4.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 307.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_4.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 290.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_4.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": true}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_4.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 5}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_5.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 110.2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_5.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 105.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_5.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": false}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_5.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_6.load_kw_before": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 273.0}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_6.load_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 256.6}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_6.over_limit_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": false}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "modules.ups_6.racks_exposed_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 2}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "kw_moving_if_module_fails": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 262.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "racks_on_one_cord_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 4}], "verified": true, "source_policy": "inferred", "evidence_required": true}, "tenant_kw_after": {"evidence": [{"page": null, "bbox": null, "quote": null, "value": 972.4}], "verified": true, "source_policy": "inferred", "evidence_required": true}}}123#!/bin/bashset -euo pipefailpython /tests/verifier.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134"""Harbor's file boundary into the existing ExtractBench evaluator."""
from __future__ import annotations
import argparseimport jsonfrom collections.abc import Mapping, Sequencefrom datetime import UTC, datetimefrom pathlib import Pathfrom typing import Any
from extract_bench.evaluation.evaluators.extract import ExtractEvaluatorfrom extract_bench.evaluation.metrics.extract.unified_evidence_metric import ValueCellfrom extract_bench.evaluation.score_case import load_extract_test_casefrom extract_bench.schemas.extract_output import ExtractOutputfrom extract_bench.schemas.pipeline_io import InferenceRequest, InferenceResultfrom extract_bench.schemas.product import ProductType
def _feedback(cells: Sequence[ValueCell], metadata: Mapping[str, Any]) -> dict[str, Any]: expected = sum(cell.gt_path is not None for cell in cells) predicted = sum(cell.pred_path is not None for cell in cells) matched = sum(cell.value_correct for cell in cells) if (expected, predicted, matched) != ( metadata["expected_cells"], metadata["predicted_cells"], metadata["v_correct"], ): raise ValueError("Value feedback does not account for the scorer's cell counts") denominator = expected + predicted entries = [] for cell in cells: if cell.gt_path is None: outcome = "prediction_only" elif cell.pred_path is None: outcome = "reference_only" else: outcome = "matched" if cell.value_correct else "value_differs" entries.append( { "reference_path": cell.gt_path, "output_path": cell.pred_path, "outcome": outcome, "f1_credit": 2.0 / denominator if cell.value_correct else 0.0, } ) return { "schema_version": 1, "status": "scored", "path_space": "normalized_scoring_inputs", "counts": {"expected": expected, "predicted": predicted, "matched": matched}, "value_incomplete": metadata["value_incomplete"], "cells": entries, }
def score_prediction(test_json: Path, prediction: Any) -> tuple[dict[str, float], dict[str, Any]]: """Use exactly the normal evaluator's normalization and metric selection.""" case = load_extract_test_case(test_json, source_file=Path("/app/document.pdf")) now = datetime.now(UTC) result = InferenceResult( request=InferenceRequest( example_id=case.test_id, source_file_path=str(case.file_path), product_type=ProductType.EXTRACT, ), pipeline_name="harbor", product_type=ProductType.EXTRACT, raw_output={}, output=ExtractOutput( example_id=case.test_id, pipeline_name="harbor", extracted_data=prediction, field_citations=[], ), started_at=now, completed_at=now, latency_in_ms=0, ) cells: list[ValueCell] = [] bundle = ExtractEvaluator().compute_metrics(result, case, value_cells=cells) metrics = { metric.metric_name: metric.value for metric in bundle.metrics if metric.metric_name.startswith("extract_unified_value_") } value_f1 = next(metric for metric in bundle.metrics if metric.metric_name == "extract_unified_value_f1") return metrics, _feedback(cells, value_f1.metadata)
def verify(test_json: Path, prediction_path: Path, log_dir: Path) -> dict[str, Any]: """Bad/missing submissions earn zero; broken grading raises an error.
Only submission decoding is caught. A missing reference, loader error or scorer failure must fail the verifier instead of becoming a model score. """ log_dir.mkdir(parents=True, exist_ok=True) reward_path = log_dir / "reward.txt" for name in ("reward.txt", "metrics.json", "feedback.json"): (log_dir / name).unlink(missing_ok=True) try: prediction = json.loads(prediction_path.read_text(encoding="utf-8")) except (FileNotFoundError, UnicodeDecodeError, json.JSONDecodeError) as error: report: dict[str, Any] = {"status": "invalid_submission", "error": str(error), "value_f1": 0.0} else: if not isinstance(prediction, dict): report = {"status": "invalid_submission", "error": "Expected one JSON object", "value_f1": 0.0} else: metrics, feedback = score_prediction(test_json, prediction) report = { "status": "scored", "value_f1": metrics["extract_unified_value_f1"], "metrics": metrics, } if report["status"] == "invalid_submission": feedback = {"schema_version": 1, "status": "invalid_submission", "error": report["error"], "cells": []} report["perfect"] = int(report["value_f1"] == 1.0) (log_dir / "metrics.json").write_text(json.dumps(report, indent=2, allow_nan=False) + "\n", encoding="utf-8") (log_dir / "feedback.json").write_text(json.dumps(feedback, indent=2, allow_nan=False) + "\n", encoding="utf-8") reward_path.write_text(f"{report['value_f1']}\n", encoding="utf-8") return report
def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--test-json", type=Path, default=Path("/tests/reference.test.json")) parser.add_argument("--prediction", type=Path, default=Path("/app/output.json")) parser.add_argument("--log-dir", type=Path, default=Path("/logs/verifier")) args = parser.parse_args() verify(args.test_json, args.prediction, args.log_dir)
if __name__ == "__main__": main()1234567FROM python:3.12-slim-bookwormRUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils tesseract-ocr curl git nodejs npm \ && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir pymupdf==1.26.6 pypdf==6.4.0 pillow==12.0.0WORKDIR /appCOPY document.pdf schema.json /app/123version https://git-lfs.github.com/spec/v1oid sha256:8e075c3b5829c6b3a8c421846fa525ef42a3135d4eb65d1f5d3e3e7988bcccf7size 868761123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ "type": "object", "description": "Pharmacy verification summary for this patient's course of chemotherapy.", "properties": { "cycles": { "type": "array", "description": "One entry per cycle the patient was treated in, in cycle order.", "items": { "type": "object", "properties": { "cycle": { "type": "integer", "description": "Cycle number." }, "cyclophosphamide": { "type": "object", "description": "Cyclophosphamide over this cycle.", "properties": { "dose_mg": { "type": "number", "description": "Amount prepared for the patient over the cycle, in mg." }, "vials_opened": { "type": "integer", "description": "How many vials were opened for it over the cycle." }, "discarded_mg": { "type": "number", "description": "Drug thrown away from those vials over the cycle, in mg." } }, "required": [ "dose_mg", "vials_opened", "discarded_mg" ] }, "methotrexate": { "type": "object", "description": "Methotrexate over this cycle.", "properties": { "dose_mg": { "type": "number", "description": "Amount prepared for the patient over the cycle, in mg." }, "vials_opened": { "type": "integer", "description": "How many vials were opened for it over the cycle." }, "discarded_mg": { "type": "number", "description": "Drug thrown away from those vials over the cycle, in mg." } }, "required": [ "dose_mg", "vials_opened", "discarded_mg" ] }, "fluorouracil": { "type": "object", "description": "Fluorouracil over this cycle.", "properties": { "dose_mg": { "type": "number", "description": "Amount prepared for the patient over the cycle, in mg." }, "vials_opened": { "type": "integer", "description": "How many vials were opened for it over the cycle." }, "discarded_mg": { "type": "number", "description": "Drug thrown away from those vials over the cycle, in mg." } }, "required": [ "dose_mg", "vials_opened", "discarded_mg" ] } }, "required": [ "cycle", "cyclophosphamide", "methotrexate", "fluorouracil" ] } }, "treatment_days_on_new_surface_area": { "type": "integer", "description": "How many treatment days after the very first had their doses worked out from a fresh body surface area instead of the first day's." }, "cycles_with_a_second_day_dose_reduced": { "type": "integer", "description": "How many cycles had at least one drug's second treatment day reduced to keep the cycle within its upper limit." }, "total_discarded_mg": { "type": "number", "description": "All drug thrown away over the course, every drug together, in mg." } }, "required": [ "cycles", "treatment_days_on_new_surface_area", "cycles_with_a_second_day_dose_reduced", "total_discarded_mg" ]}.gitattributes+1
README.md+33
harbor-manifest.jsonAdded
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/DockerfileAdded+7
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/document.pdfAdded+3
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/environment/schema.jsonAdded+246
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/instruction.mdAdded+16
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/solution/expected.jsonAdded+143
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/solution/solve.shAdded+3
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/task.tomlAdded+30
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/DockerfileAdded+5
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/reference.test.jsonAdded+1
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/test.shAdded+3
tasks/charts-inside-documents--agency-staffing-invoice-01-9aebdbb0d3/tests/verifier.pyAdded+134
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/DockerfileAdded+7
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/document.pdfAdded+3
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/environment/schema.jsonAdded+202
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/instruction.mdAdded+16
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/solution/expected.jsonAdded+41
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/solution/solve.shAdded+3
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/task.tomlAdded+30
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/DockerfileAdded+5
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/reference.test.jsonAdded+1
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/test.shAdded+3
tasks/charts-inside-documents--aggregate-qc-report-01-3bcd23f4aa/tests/verifier.pyAdded+134
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/DockerfileAdded+7
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/document.pdfAdded+3
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/environment/schema.jsonAdded+382
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/instruction.mdAdded+16
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/solution/expected.jsonAdded+130
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/solution/solve.shAdded+3
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/task.tomlAdded+30
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/DockerfileAdded+5
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/reference.test.jsonAdded+1
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/test.shAdded+3
tasks/charts-inside-documents--assessment-billing-run-01-a758923341/tests/verifier.pyAdded+134
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/DockerfileAdded+7
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/document.pdfAdded+3
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/environment/schema.jsonAdded+205
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/instruction.mdAdded+16
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/solution/expected.jsonAdded+43
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/solution/solve.shAdded+3
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/task.tomlAdded+30
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/DockerfileAdded+5
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/reference.test.jsonAdded+1
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/test.shAdded+3
tasks/charts-inside-documents--capacity-change-pack-01-426d0e3de2/tests/verifier.pyAdded+134
tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/DockerfileAdded+7
tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/document.pdfAdded+3
tasks/charts-inside-documents--chemo-verification-01-755808e636/environment/schema.jsonAdded+112