Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

feat(examples): add ocr-two-stage, a recorded two-stage OCR evaluation (#303)

svonava4202f7d96ab8
diff --git a/examples/ocr-two-stage/.gitignore b/examples/ocr-two-stage/.gitignore
new file mode 100644
index 000000000..0fc9acdc2
--- /dev/null
+++ b/examples/ocr-two-stage/.gitignore
@@ -0,0 +1 @@
+verified-run/.work/
diff --git a/examples/ocr-two-stage/README.md b/examples/ocr-two-stage/README.md
new file mode 100644
index 000000000..f48e0eaee
--- /dev/null
+++ b/examples/ocr-two-stage/README.md
@@ -0,0 +1,105 @@
+# ocr-two-stage
+
+**A recorded evaluation, not a demo.** There is no UI here and nothing to click.
+If you want a browser demo that swaps OCR models live, that is
+[`examples/document-ocr`](../document-ocr). This directory holds one recorded
+run and the code to check its numbers.
+
+## What this shows
+
+Two stages, two different jobs, measured separately.
+
+**Stage 1** sends a page image to `lightonai/LightOnOCR-2-1B` and gets Markdown
+back. **Stage 2** sends *that Markdown* — never the image — to a chat model
+under a fixed JSON schema, and gets typed fields back. Stage 2 runs twice, once
+on `Qwen/Qwen3.8-27B-FP8` and once on `Qwen/Qwen3.5-4B`, so the same stage-1
+text is scored against two models.
+
+Splitting them is the point. When a field comes back wrong you can ask which
+stage lost it: the evaluator checks whether the field's registered printed token
+survived into stage 1's Markdown, which separates an error stage 2 inherited
+from one it made on text it could read.
+
+Six documents, 20 calls, all against `https://api.superlinked.com`.
+
+## How to run it
+
+Checking the numbers needs no API key and no network:
+
+```
+python3 evaluate.py
+```
+
+It reads exactly three committed files and nothing else:
+`verified-run/calls.json` for what came back, `data/inputs.json` for what was
+registered before the run, and `data/predictions.json` for the predictions it
+scores. No key, no network, no fourth file.
+
+Re-recording the run needs a key in `SIE_API_KEY`:
+
+```
+python3 run.py # all six documents, both stages
+python3 run.py --verify-inputs # fetch the images and check their digests only
+```
+
+The images are **not committed**. Several carry licences that do not permit
+redistribution here — one is a copyrighted NVIDIA investor page used as an
+attributed excerpt, another is CC BY-SA 3.0 whose share-alike would attach to a
+copy. Each document in `data/inputs.json` instead carries the URL serving the
+exact bytes that were sent, their length, their SHA-256, the upstream original
+and the licence. `run.py` fetches by that URL and refuses to proceed if the
+length or digest differs.
+
+## What result to expect
+
+`evaluate.py` prints four figures, which are the ones the
+[/ocr page](https://superlinked.com/ocr) publishes:
+
+| | |
+|---|---|
+| stage 1 | **81 of 86** registered printed tokens survive into the Markdown |
+| stage 2, `Qwen/Qwen3.8-27B-FP8` | **78 of 89** fields match, 7 of 7 replies schema-valid |
+| stage 2, `Qwen/Qwen3.5-4B` | **27 of 89** fields match, **2 of 7** replies schema-valid |
+
+The gap between the two stage-2 models is the interesting part: the smaller one
+mostly fails before it is even scored, because five of its seven replies do not
+validate against the schema they were given.
+
+## What this does NOT establish
+
+- **It is not a benchmark.** Six documents chosen to be awkward in different
+ ways — a born-digital financial page, a blurred thermal receipt, a barcode
+ label, a container photo, a factory control panel, an invoice — are not a
+ sample of anything. No score here generalises.
+- **It is one run.** Recorded 2026-09-16. Nothing here shows variance across
+ runs, and these models are not pinned to a revision by us; the revision each
+ call actually got is recorded per call in `calls.json`.
+- **The verdicts encode judgement.** What counts as a match was registered
+ before the run in `data/inputs.json`, but somebody chose those rules. The
+ evaluator applies them mechanically; it does not make them right.
+- **It says nothing about documents unlike these.** Handwriting, non-Latin
+ scripts and multi-column layouts are absent.
+
+## Layout
+
+```
+data/inputs.json what was registered before the run, and how to fetch each image
+data/predictions.json the prediction spec the evaluator scores
+verified-run/calls.json every call: request, response, status, model revision, timing
+verified-run/evaluation.json what evaluate.py produced from the above
+run.py makes the calls
+evaluate.py scores the recorded calls, offline
+```
+
+## Relationship to sie-web
+
+The same recorded responses back the `/ocr` page in the `sie-web` repository,
+where CI asserts that the page cannot publish a number its recorded response
+does not support. That copy is the one CI reads; this one is the one a reader
+reads. They are not bound to each other by a digest, so they can in principle
+drift; if they disagree, the sie-web fixture is the CI-bound record.
+
+`evaluate.py` here is sie-web's evaluator with its input layer changed to read
+`calls.json`. Every verdict rule, the normalization and the schema checks are
+copied unchanged, and it reproduces sie-web's evaluation exactly: the same
+stage-1 count, the same per-model totals, the same per-document verdicts.
diff --git a/examples/ocr-two-stage/data/inputs.json b/examples/ocr-two-stage/data/inputs.json
new file mode 100644
index 000000000..f5fbc19f9
--- /dev/null
+++ b/examples/ocr-two-stage/data/inputs.json
@@ -0,0 +1,1317 @@
+{
+ "registered_utc": "2026-09-15",
+ "note": "Pre-registration for the /ocr two-stage page. Committed before any model call. Documents, schemas, expected values, scoring rules and predictions are fixed here; nothing in this file changes after the first call. The document set is closed at 6 documents and 7 stage-2 calls per stage-2 model.",
+ "stage1": {
+ "role": "page pixels to Markdown",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "body_shape": "{\"items\": [{\"images\": [{\"data\": \"<base64>\", \"format\": \"<png|jpeg>\"}]}]}",
+ "read_result_at": "entities[0].text",
+ "note": "Byte-identical in shape to the snippet packages/tasks/src/codegen.ts generates for the ocr task with the quality model. Replaces the earlier Modal run in lightonocr-run.json so both stages of the page run against the same production API."
+ },
+ "stage2": {
+ "role": "Markdown to typed fields under a fixed JSON schema",
+ "input": "stage 1's recorded Markdown, verbatim. The page image is never sent to stage 2.",
+ "models": {
+ "primary": "Qwen/Qwen3.8-27B-FP8",
+ "secondary": "Qwen/Qwen3.5-4B"
+ },
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format_shape": "{\"type\": \"json_schema\", \"json_schema\": {\"name\": \"<schema id>\", \"strict\": true, \"schema\": <schema>}}",
+ "instruction_template": "Fill the schema from this OCR text of a {document_type}. Use only what the text states. Use null when the text does not state a value.\n\n---\n{markdown}",
+ "note": "Chat completions rather than /v1/generate because this is a text-only prompt on a Qwen model: the plain-text generate path skipped the chat template, so the model reasoned instead of answering. Both stage-2 models get byte-identical messages and schemas."
+ },
+ "scoring": {
+ "note": "evaluate.py assigns every registered field exactly one verdict. No verdict is hand-authored. The stage-1 test asks whether the field's registered `printed` token survives into stage 1's Markdown; that is what separates an error stage 2 inherited from one stage 2 made on text it could read.",
+ "normalization": "Unicode NFKC, collapse runs of whitespace to one space, trim. Applied to both the returned value and the registered expectation before comparison, and to the Markdown before the token search.",
+ "verdicts": {
+ "match": "returned value satisfies the field's rule",
+ "stage1_lost": "printed token absent from stage 1's Markdown AND stage 2 returned null",
+ "stage1_error": "printed token absent or garbled in stage 1's Markdown AND stage 2 returned a wrong non-null value",
+ "stage2_error": "printed token present verbatim in stage 1's Markdown AND stage 2 returned a wrong non-null value",
+ "stage2_dropped": "printed token present verbatim in stage 1's Markdown AND stage 2 returned null"
+ },
+ "rules": {
+ "verbatim": "normalized returned string equals expect",
+ "integer": "returned value is an integer equal to expect",
+ "signed_parenthesis": "returned integer equals expect; the page prints the magnitude in parentheses, so stage 2 has to supply the sign",
+ "strip_footnote_marker": "normalized returned string equals expect; the page prints a trailing footnote marker stage 2 has to drop",
+ "gs1_element_string": "normalized returned string equals expect; ground truth is the GS1 application identifier printed under the barcode, not a reading of the human-readable date",
+ "any_of": "normalized returned string is one of expect",
+ "contains": "lowercased returned string contains lowercased expect",
+ "absent": "expect is null because the value is not legible on the source page"
+ },
+ "also_recorded": [
+ "schema validity of every stage-2 reply, checked against the registered schema (required keys, types, enum members)",
+ "stage-1 token recall per document: how many registered printed tokens appear in the Markdown",
+ "HTTP status, latency, finish reason and token counts per call"
+ ]
+ },
+ "predictions": {
+ "note": "Written before any call, published beside the outcome in SOURCES.md whether or not they hold. A prediction that misses is reported as a miss.",
+ "items": [
+ "At least one of NVIDIA's parenthesised rows comes back with the wrong sign, scored stage2_error.",
+ "NVIDIA's `Taiwan (2)` carries its footnote marker into the location field, scored stage2_error.",
+ "The label's best_before comes back 2023-12-02, a US reading of 12/02/2024, against the barcode's 2024-02-12.",
+ "Stage 1 loses the blurred receipt header, and stage 2 invents a merchant name or a transaction date rather than returning null.",
+ "Across the whole registered set, most fields match."
+ ]
+ },
+ "display": {
+ "note": "Three documents are displayed, chosen before the run to differ in kind. Every registered document is counted in the page's totals whatever it does; none is dropped for looking bad.",
+ "documents": [
+ "nvidia-annual-report-p78",
+ "receipt-cord-0007",
+ "product-gs1-128-label"
+ ]
+ },
+ "documents": [
+ {
+ "id": "nvidia-annual-report-p78",
+ "kind": "clean born-digital page",
+ "document_type": "page from an annual report",
+ "image": "nvidia-annual-report-page-166.png",
+ "format": "png",
+ "image_sha256": "19ea06de9cdbd0c643fac69fbae1b53a8d94c769ec9700878b2fd733fadb5ba7",
+ "displayed": true,
+ "calls": [
+ {
+ "id": "segment-reconciliation",
+ "schema": "nvidia_segment",
+ "match_rows_by": "line_item",
+ "expected": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "expect": "In millions",
+ "rule": "contains"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2026",
+ "printed": "139,297",
+ "expect": 139297,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2025",
+ "printed": "87,960",
+ "expect": 87960,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2024",
+ "printed": "37,862",
+ "expect": 37862,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2026",
+ "printed": "(6,386)",
+ "expect": -6386,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2025",
+ "printed": "(4,737)",
+ "expect": -4737,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2024",
+ "printed": "(3,549)",
+ "expect": -3549,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2026",
+ "printed": "(1,997)",
+ "expect": -1997,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2025",
+ "printed": "(1,171)",
+ "expect": -1171,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2024",
+ "printed": "(728)",
+ "expect": -728,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2026",
+ "printed": "(527)",
+ "expect": -527,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2025",
+ "printed": "(599)",
+ "expect": -599,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2024",
+ "printed": "(613)",
+ "expect": -613,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2026",
+ "printed": "2,300",
+ "expect": 2300,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2025",
+ "printed": "1,786",
+ "expect": 1786,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2024",
+ "printed": "866",
+ "expect": 866,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2026",
+ "printed": "(259)",
+ "expect": -259,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2025",
+ "printed": "(247)",
+ "expect": -247,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2024",
+ "printed": "(257)",
+ "expect": -257,
+ "rule": "signed_parenthesis"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2026",
+ "printed": "9,022",
+ "expect": 9022,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2025",
+ "printed": "1,034",
+ "expect": 1034,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2024",
+ "printed": "237",
+ "expect": 237,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2026",
+ "printed": "141,450",
+ "expect": 141450,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2025",
+ "printed": "84,026",
+ "expect": 84026,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2024",
+ "printed": "33,818",
+ "expect": 33818,
+ "rule": "integer"
+ }
+ ]
+ },
+ {
+ "id": "geographic-revenue",
+ "schema": "nvidia_geographic",
+ "match_rows_by": "location",
+ "expected": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "expect": "In millions",
+ "rule": "contains"
+ },
+ {
+ "path": "basis",
+ "printed": "Revenue by geographic area is based upon the location of the customers' headquarters.",
+ "expect": "headquarters",
+ "rule": "contains"
+ },
+ {
+ "path": "rows[location=United States].fy2026",
+ "printed": "149,617",
+ "expect": 149617,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=United States].fy2025",
+ "printed": "77,482",
+ "expect": 77482,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=United States].fy2024",
+ "printed": "31,533",
+ "expect": 31533,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Taiwan].location",
+ "printed": "Taiwan (2)",
+ "expect": "Taiwan",
+ "rule": "strip_footnote_marker"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2026",
+ "printed": "42,345",
+ "expect": 42345,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2025",
+ "printed": "23,600",
+ "expect": 23600,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2024",
+ "printed": "14,912",
+ "expect": 14912,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2026",
+ "printed": "19,677",
+ "expect": 19677,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2025",
+ "printed": "25,048",
+ "expect": 25048,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2024",
+ "printed": "12,330",
+ "expect": 12330,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Other].fy2026",
+ "printed": "4,299",
+ "expect": 4299,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Other].fy2025",
+ "printed": "4,367",
+ "expect": 4367,
+ "rule": "integer"
+ },
+ {
+ "path": "rows[location=Other].fy2024",
+ "printed": "2,147",
+ "expect": 2147,
+ "rule": "integer"
+ },
+ {
+ "path": "total_revenue.fy2026",
+ "printed": "215,938",
+ "expect": 215938,
+ "rule": "integer"
+ },
+ {
+ "path": "total_revenue.fy2025",
+ "printed": "130,497",
+ "expect": 130497,
+ "rule": "integer"
+ },
+ {
+ "path": "total_revenue.fy2024",
+ "printed": "60,922",
+ "expect": 60922,
+ "rule": "integer"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/nvidia-annual-report-page-166.png",
+ "bytes": 269475,
+ "upstream": "https://s201.q4cdn.com/141608511/files/doc_financials/2026/ar/2026-Annual-Report-Web.pdf",
+ "licence": "public investor document. NVIDIA retains copyright. The page uses a short attributed excerpt for commentary.",
+ "derivation": "the PDF page containing printed page 78 rendered as a PNG.",
+ "sha256": "19ea06de9cdbd0c643fac69fbae1b53a8d94c769ec9700878b2fd733fadb5ba7"
+ }
+ },
+ {
+ "id": "receipt-cord-0007",
+ "kind": "degraded thermal receipt",
+ "document_type": "till receipt",
+ "image": "receipt-cord-0007.jpg",
+ "format": "jpeg",
+ "image_sha256": "15494cb391bd72c057e2ca8eea9ddc4942ce0df001b1d7d3acea51053e2ce052",
+ "displayed": true,
+ "note": "The top third of the source photo is blurred by the dataset, so the merchant block and the date are not legible on the page. Both register as absent, which is what makes an invented value detectable.",
+ "calls": [
+ {
+ "id": "receipt",
+ "schema": "receipt",
+ "match_rows_by": "description",
+ "expected": [
+ {
+ "path": "merchant_name",
+ "printed": null,
+ "expect": null,
+ "rule": "absent"
+ },
+ {
+ "path": "transaction_date",
+ "printed": null,
+ "expect": null,
+ "rule": "absent"
+ },
+ {
+ "path": "line_items[description=Kupon 15].amount",
+ "printed": "100,000",
+ "expect": [
+ "100,000",
+ "100000"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "line_items[description=ADD CHICKEN BOX].amount",
+ "printed": "909",
+ "expect": [
+ "909"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "subtotal",
+ "printed": "100,909",
+ "expect": [
+ "100,909",
+ "100909"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "tax",
+ "printed": "10,091",
+ "expect": [
+ "10,091",
+ "10091"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "total",
+ "printed": "111,000",
+ "expect": [
+ "111,000",
+ "111000"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "amount_paid",
+ "printed": "Rp.111,000",
+ "expect": [
+ "111,000",
+ "111000",
+ "Rp.111,000",
+ "Rp. 111,000",
+ "Rp 111,000"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Cash",
+ "expect": [
+ "Cash",
+ "cash"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "currency",
+ "printed": "Rp.",
+ "expect": [
+ "IDR",
+ "Rp",
+ "Rp.",
+ "Indonesian rupiah"
+ ],
+ "rule": "any_of"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/receipt-cord-0007.jpg",
+ "bytes": 137082,
+ "upstream": "https://github.com/clovaai/cord",
+ "licence": "CC BY 4.0, https://creativecommons.org/licenses/by/4.0/",
+ "derivation": null,
+ "sha256": "15494cb391bd72c057e2ca8eea9ddc4942ce0df001b1d7d3acea51053e2ce052"
+ }
+ },
+ {
+ "id": "product-gs1-128-label",
+ "kind": "photographed printed label",
+ "document_type": "product label",
+ "image": "product-gs1-128-barcode.jpg",
+ "format": "jpeg",
+ "image_sha256": "1412e09c45718f67c50cff437cb831262b30eedfc7df611492c768bd8c007f24",
+ "displayed": true,
+ "note": "The label prints BEST BEFORE: 12/02/2024 in human-readable form and the same date as GS1 application identifier (15) 240212 under the barcode. The element string fixes the calendar date at 2024-02-12 independently of anyone's reading of the slashed date, so the ISO field has ground truth printed on the artifact itself.",
+ "calls": [
+ {
+ "id": "label",
+ "schema": "product_label",
+ "expected": [
+ {
+ "path": "product",
+ "printed": "Oatly Oat Drink Barista Edition 1,0",
+ "expect": "Oatly Oat Drink Barista Edition 1,0",
+ "rule": "verbatim"
+ },
+ {
+ "path": "pack",
+ "printed": "6 x 1,0 Lit",
+ "expect": [
+ "6 x 1,0 Lit",
+ "6 x 1,0 L",
+ "6 x 1,0 Lit."
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "gtin",
+ "printed": "27394376616222",
+ "expect": "27394376616222",
+ "rule": "verbatim"
+ },
+ {
+ "path": "printed_best_before",
+ "printed": "12/02/2024",
+ "expect": "12/02/2024",
+ "rule": "verbatim"
+ },
+ {
+ "path": "best_before",
+ "printed": "240212",
+ "expect": "2024-02-12",
+ "rule": "gs1_element_string"
+ },
+ {
+ "path": "batch",
+ "printed": "3043AAG",
+ "expect": "3043AAG",
+ "rule": "verbatim"
+ },
+ {
+ "path": "internal_code",
+ "printed": "61622",
+ "expect": "61622",
+ "rule": "verbatim"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/product-gs1-128-barcode.jpg",
+ "bytes": 496341,
+ "upstream": "https://commons.wikimedia.org/wiki/File:GS1-128_product_barcode.jpg",
+ "licence": "public-domain dedication on the source page.",
+ "derivation": null,
+ "sha256": "1412e09c45718f67c50cff437cb831262b30eedfc7df611492c768bd8c007f24"
+ }
+ },
+ {
+ "id": "shipping-container",
+ "kind": "photographed container in a yard",
+ "document_type": "photo of shipping container markings",
+ "image": "shipping-container-cclu-714026-4.jpg",
+ "format": "jpeg",
+ "image_sha256": "5f77054ff6e07381ed4535e8642a94e26d9b63f03e4093919f5f7f64d47abdf0",
+ "displayed": false,
+ "note": "Two containers are in frame. Stage 2 sees text only and has no way to tell which markings belong to which unit, so the schema asks for a list and only the fully legible CHINA SHIPPING unit is scored. Container ids compare with spaces removed.",
+ "calls": [
+ {
+ "id": "container",
+ "schema": "container_markings",
+ "expected": [
+ {
+ "path": "containers[*].container_id",
+ "printed": "CCLU 71 40 26 4",
+ "expect": [
+ "CCLU7140264"
+ ],
+ "rule": "any_of_in_list",
+ "compare": "strip_spaces"
+ },
+ {
+ "path": "containers[*].iso_type",
+ "printed": "45G1",
+ "expect": [
+ "45G1"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "containers[*].operator",
+ "printed": "CHINA SHIPPING",
+ "expect": [
+ "CHINA SHIPPING",
+ "China Shipping"
+ ],
+ "rule": "any_of_in_list"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/shipping-container-cclu-714026-4.jpg",
+ "bytes": 762876,
+ "upstream": "https://commons.wikimedia.org/wiki/File:China_45G1_CCLU_714026_4.jpg",
+ "licence": "CC BY-SA 3.0, https://creativecommons.org/licenses/by-sa/3.0/",
+ "derivation": null,
+ "sha256": "5f77054ff6e07381ed4535e8642a94e26d9b63f03e4093919f5f7f64d47abdf0"
+ }
+ },
+ {
+ "id": "milk-factory-control-panel",
+ "kind": "photographed industrial control panel",
+ "document_type": "photo of a machine control panel",
+ "image": "milk-factory-control-panel.jpg",
+ "format": "jpeg",
+ "image_sha256": "45b70a17a302e72cb37f1bf4cb2505cd9f7a940e77885750a537d998f6bce3ac",
+ "displayed": false,
+ "note": "Control kind is not scored: stage 2 sees text and cannot tell a dial from a lamp. Labels are scored as recall over the registered set, compared uppercased with whitespace collapsed.",
+ "calls": [
+ {
+ "id": "panel",
+ "schema": "control_panel",
+ "expected": [
+ {
+ "path": "manufacturer",
+ "printed": "FOGG",
+ "expect": [
+ "FOGG"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "E-STOP RESET",
+ "expect": [
+ "E-STOP RESET"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CONVEYORS ON/OFF",
+ "expect": [
+ "CONVEYORS ON/OFF",
+ "CONVEYORS"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP DETECTOR",
+ "expect": [
+ "NO CAP DETECTOR"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP",
+ "expect": [
+ "NO CAP"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BACKLOG EYE",
+ "expect": [
+ "BACKLOG EYE"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAP FEEDER START",
+ "expect": [
+ "CAP FEEDER START"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER START",
+ "expect": [
+ "FILLER START"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER SPEED",
+ "expect": [
+ "FILLER SPEED"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAPPER UP/DOWN",
+ "expect": [
+ "CAPPER UP/DOWN",
+ "CAPPER UP DOWN",
+ "UP CAPPER DOWN"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER JOG",
+ "expect": [
+ "FILLER JOG"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BOWL UP/DOWN",
+ "expect": [
+ "BOWL UP/DOWN",
+ "BOWL UP DOWN",
+ "UP BOWL DOWN"
+ ],
+ "rule": "any_of_in_list"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "SPEED",
+ "expect": [
+ "SPEED"
+ ],
+ "rule": "any_of_in_list"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/milk-factory-control-panel.jpg",
+ "bytes": 637649,
+ "upstream": "https://commons.wikimedia.org/wiki/File:Milk_Factory_(Brisbane)_-_Control_Panel.jpg",
+ "licence": "CC BY 2.0, https://creativecommons.org/licenses/by/2.0/",
+ "derivation": null,
+ "sha256": "45b70a17a302e72cb37f1bf4cb2505cd9f7a940e77885750a537d998f6bce3ac"
+ }
+ },
+ {
+ "id": "invoice-mit-sample",
+ "kind": "born-digital invoice",
+ "document_type": "invoice",
+ "image": "invoice-mit-sample-page-1.png",
+ "format": "png",
+ "image_sha256": "17322de73e201e8a96ef6c0f6810614806ba89b155f7003eee09da29d5358d8b",
+ "displayed": false,
+ "note": "The rendered demo page of an MIT-licensed HTML invoice template. The invoice sits inside a page that also carries the template's own title and licence line, so it doubles as a test of whether stage 2 keeps surrounding page text out of the record.",
+ "calls": [
+ {
+ "id": "invoice",
+ "schema": "invoice",
+ "match_rows_by": "description",
+ "expected": [
+ {
+ "path": "invoice_no",
+ "printed": "Invoice #: 123",
+ "expect": [
+ "123"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "created",
+ "printed": "January 1, 2023",
+ "expect": [
+ "January 1, 2023",
+ "2023-01-01"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "due",
+ "printed": "February 1, 2023",
+ "expect": [
+ "February 1, 2023",
+ "2023-02-01"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "vendor",
+ "printed": "Sparksuite, Inc.",
+ "expect": [
+ "Sparksuite, Inc.",
+ "Sparksuite Inc.",
+ "SPARKSUITE"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "customer",
+ "printed": "Acme Corp.",
+ "expect": [
+ "Acme Corp.",
+ "Acme Corp"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "contact_email",
+ "printed": "[email protected]",
+ "expect": "[email protected]",
+ "rule": "verbatim"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Check",
+ "expect": [
+ "Check",
+ "check"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "check_number",
+ "printed": "1000",
+ "expect": [
+ "1000"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "line_items[description=Website design].amount",
+ "printed": "$300.00",
+ "expect": [
+ "$300.00",
+ "300.00",
+ "300"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "line_items[description=Hosting (3 months)].amount",
+ "printed": "$75.00",
+ "expect": [
+ "$75.00",
+ "75.00",
+ "75"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "line_items[description=Domain name (1 year)].amount",
+ "printed": "$10.00",
+ "expect": [
+ "$10.00",
+ "10.00",
+ "10"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "total",
+ "printed": "Total: $385.00",
+ "expect": [
+ "$385.00",
+ "385.00",
+ "385"
+ ],
+ "rule": "any_of"
+ },
+ {
+ "path": "currency",
+ "printed": "$",
+ "expect": [
+ "USD",
+ "$"
+ ],
+ "rule": "any_of"
+ }
+ ]
+ }
+ ],
+ "source": {
+ "url": "https://superlinked.com/reference/ocr-review/invoice-mit-sample-page-1.png",
+ "bytes": 91118,
+ "upstream": null,
+ "licence": "MIT, https://opensource.org/licenses/MIT",
+ "derivation": "the one-page PDF rendered at 1,224 by 1,584 pixels. The rendered page carries the template's own title and licence line around the invoice.",
+ "sha256": "17322de73e201e8a96ef6c0f6810614806ba89b155f7003eee09da29d5358d8b"
+ }
+ }
+ ],
+ "schemas": {
+ "nvidia_segment": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "line_item": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line_item",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ }
+ },
+ "required": [
+ "unit",
+ "rows"
+ ]
+ },
+ "nvidia_geographic": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "basis": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "location",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "total_revenue": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "required": [
+ "unit",
+ "basis",
+ "rows",
+ "total_revenue"
+ ]
+ },
+ "receipt": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "merchant_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "transaction_date": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "subtotal": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tax": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "amount_paid": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "merchant_name",
+ "transaction_date",
+ "line_items",
+ "subtotal",
+ "tax",
+ "total",
+ "amount_paid",
+ "payment_method",
+ "currency"
+ ]
+ },
+ "product_label": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "product": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "pack": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "gtin": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "printed_best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date exactly as printed in human-readable text"
+ },
+ "best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date as an ISO 8601 calendar date, YYYY-MM-DD"
+ },
+ "batch": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "internal_code": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "product",
+ "pack",
+ "gtin",
+ "printed_best_before",
+ "best_before",
+ "batch",
+ "internal_code"
+ ]
+ },
+ "container_markings": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "containers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "container_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "iso_type": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "operator": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "container_id",
+ "iso_type",
+ "operator"
+ ]
+ }
+ }
+ },
+ "required": [
+ "containers"
+ ]
+ },
+ "control_panel": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "manufacturer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "controls": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "kind": {
+ "type": "string",
+ "enum": [
+ "button",
+ "switch",
+ "dial",
+ "indicator",
+ "display",
+ "plate",
+ "unknown"
+ ]
+ }
+ },
+ "required": [
+ "label",
+ "kind"
+ ]
+ }
+ }
+ },
+ "required": [
+ "manufacturer",
+ "controls"
+ ]
+ },
+ "invoice": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "invoice_no": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "due": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "vendor": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "customer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "contact_email": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "check_number": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "invoice_no",
+ "created",
+ "due",
+ "vendor",
+ "customer",
+ "contact_email",
+ "payment_method",
+ "check_number",
+ "line_items",
+ "total",
+ "currency"
+ ]
+ }
+ },
+ "about": "Pinned inputs for the ocr-two-stage example. Registrations were written before the run. Images are not committed: each carries the URL of the exact bytes that were sent, their length and SHA-256, the upstream original and the licence."
+}
diff --git a/examples/ocr-two-stage/data/predictions.json b/examples/ocr-two-stage/data/predictions.json
new file mode 100644
index 000000000..f210a8226
--- /dev/null
+++ b/examples/ocr-two-stage/data/predictions.json
@@ -0,0 +1,64 @@
+{
+ "note": "How each pre-registered prediction is decided. inputs.json is the canonical source of the prediction text; the `text` field below repeats it only so the two can be compared. evaluate.py reads the text from inputs.json by index and refuses to run unless the copy below matches it character for character, so the page cannot restate a prediction in softer words than the one that was committed. The checks themselves were written after the run, against verdicts the evaluator had already computed; that is disclosed in SOURCES.md. Four of the five predictions failed, so there was no flattering direction to write a check toward. One registered prediction contains an arithmetic slip: it names 2023-12-02 as the US reading of 12/02/2024, which is 2024-12-02. inputs.json is frozen, so the text stands as committed and the check scores the prediction against both dates, the generous reading. It failed either way: the model returned 2024-02-12.",
+ "predictions": [
+ {
+ "index": 0,
+ "text": "At least one of NVIDIA's parenthesised rows comes back with the wrong sign, scored stage2_error.",
+ "short": "A parenthesised row comes back with the wrong sign",
+ "check": {
+ "kind": "any_field_missed_with_rule",
+ "rule": "signed_parenthesis"
+ },
+ "evidence_held": "Wrong signs on {count} of the {total} parenthesised values.",
+ "evidence_failed": "All {total} parenthesised values came back negative, from -6386 to -257."
+ },
+ {
+ "index": 1,
+ "text": "NVIDIA's `Taiwan (2)` carries its footnote marker into the location field, scored stage2_error.",
+ "short": "A footnote marker rides into a field",
+ "check": {
+ "kind": "field_missed",
+ "document": "nvidia-annual-report-p78",
+ "call": "geographic-revenue",
+ "path": "rows[location=Taiwan].location"
+ },
+ "evidence_held": "The location field came back as printed, footnote and all.",
+ "evidence_failed": "The page prints Taiwan (2); the field came back Taiwan."
+ },
+ {
+ "index": 2,
+ "text": "The label's best_before comes back 2023-12-02, a US reading of 12/02/2024, against the barcode's 2024-02-12.",
+ "short": "An ambiguous date is read the American way",
+ "check": {
+ "kind": "field_returned_in",
+ "document": "product-gs1-128-label",
+ "call": "label",
+ "path": "best_before",
+ "values": ["2023-12-02", "2024-12-02"]
+ },
+ "evidence_held": "The slashed date won over the barcode.",
+ "evidence_failed": "It came back 2024-02-12, taken from the GS1 element string the OCR kept. Scored against both 2023-12-02 as registered and 2024-12-02, which is what a US reading of 12/02/2024 actually gives."
+ },
+ {
+ "index": 3,
+ "text": "Stage 1 loses the blurred receipt header, and stage 2 invents a merchant name or a transaction date rather than returning null.",
+ "short": "An unreadable header comes back as an invented value",
+ "check": {
+ "kind": "any_verdict",
+ "verdict": "stage2_invented"
+ },
+ "evidence_held": "{count} fields came back with a value that is not on the page.",
+ "evidence_failed": "Stage 1 did lose the header, as predicted. Stage 2 returned null for both fields rather than filling them, and invented nothing anywhere in the set."
+ },
+ {
+ "index": 4,
+ "text": "Across the whole registered set, most fields match.",
+ "short": "Most fields match",
+ "check": {
+ "kind": "majority_match"
+ },
+ "evidence_held": "{matched} of {registered} fields match the printed page.",
+ "evidence_failed": "Only {matched} of {registered} fields match the printed page."
+ }
+ ]
+}
diff --git a/examples/ocr-two-stage/evaluate.py b/examples/ocr-two-stage/evaluate.py
new file mode 100644
index 000000000..422f641f4
--- /dev/null
+++ b/examples/ocr-two-stage/evaluate.py
@@ -0,0 +1,584 @@
+#!/usr/bin/env python3
+"""Score the recorded /ocr two-stage run against the pre-registered expectations.
+
+ python3 apps/site/tests/fixtures/reference/ocr/evaluate.py
+
+Reads inputs.json (registered before any call) together with the recorded
+stage-1 and stage-2 responses, and writes evaluation.json. Every verdict is
+computed here; none is hand-authored, and this script never reads the page.
+
+The verdict turns on one question: did the field's registered `printed` token
+survive into stage 1's Markdown? That is what separates an error stage 2
+inherited from stage 1 from an error stage 2 made on text it could read.
+
+Standard library only. No network.
+"""
+
+from __future__ import annotations
+
+import json
+import re
+import sys
+import unicodedata
+from pathlib import Path
+from typing import Any
+
+ROOT = Path(__file__).resolve().parent
+INPUTS_PATH = ROOT / "data" / "inputs.json"
+CALLS_PATH = ROOT / "verified-run" / "calls.json"
+EVALUATION_PATH = ROOT / "verified-run" / "evaluation.json"
+
+MISSING = object()
+
+# Every response this example scores lives in one calls.json, keyed by the slug
+# the runner recorded. sie-web keeps the same responses as one file per call;
+# the verdict rules below are identical either way.
+_CALLS: dict[str, Any] = {}
+
+
+def norm(value: Any) -> str:
+ """Unicode NFKC, collapse whitespace, trim. The registered normalization."""
+ text = unicodedata.normalize("NFKC", str(value))
+ # The OCR text uses curly quotes where the registered expectation uses
+ # straight ones; fold them so a token search is not defeated by typography.
+ text = text.replace("’", "'").replace("‘", "'")
+ text = text.replace("“", '"').replace("”", '"')
+ return re.sub(r"\s+", " ", text).strip()
+
+
+def read_json(path: Path) -> Any:
+ return json.loads(path.read_text(encoding="utf-8"))
+
+
+def load_calls() -> dict[str, Any]:
+ if not _CALLS:
+ for call in read_json(CALLS_PATH)["calls"]:
+ _CALLS[call["slug"]] = call
+ return _CALLS
+
+
+def response_body(slug: str) -> Any:
+ call = load_calls().get(slug)
+ if call is None:
+ raise SystemExit(f"no recorded call for {slug!r} in {CALLS_PATH.name}")
+ return call["response"]["body"]
+
+
+def stage1_markdown(doc_id: str) -> str:
+ body = response_body(f"{doc_id}__stage1")
+ return body["items"][0]["entities"][0]["text"]
+
+
+def stage2_object(doc_id: str, call_id: str, model_key: str) -> tuple[Any, str | None]:
+ body = response_body(f"{doc_id}__{call_id}__stage2__{model_key}")
+ content = body["choices"][0]["message"]["content"]
+ try:
+ return json.loads(content), None
+ except json.JSONDecodeError as error:
+ return None, f"{type(error).__name__}: {error}"
+
+
+# --- path resolution -------------------------------------------------------
+
+STEP = re.compile(r"^([A-Za-z_][A-Za-z0-9_]*)(?:\[(.+?)\])?$")
+
+
+def resolve(obj: Any, path: str) -> Any:
+ """Resolve a registered path such as rows[line_item=Taiwan].fy2026.
+
+ A `[key=value]` selector picks the first list element whose `key` matches
+ `value` after normalization. A `[*]` selector collects the field from every
+ element, which is how list-recall fields are scored.
+ """
+ current: Any = obj
+ for raw in split_path(path):
+ match = STEP.match(raw)
+ if not match:
+ raise ValueError(f"Unparsable path segment {raw!r} in {path!r}")
+ key, selector = match.group(1), match.group(2)
+ if isinstance(current, list):
+ return MISSING
+ if not isinstance(current, dict) or key not in current:
+ return MISSING
+ current = current[key]
+ if selector is None:
+ continue
+ if not isinstance(current, list):
+ return MISSING
+ if selector == "*":
+ return current
+ field, _, wanted = selector.partition("=")
+ picked = MISSING
+ for element in current:
+ if isinstance(element, dict) and norm(element.get(field, "")) == norm(wanted):
+ picked = element
+ break
+ if picked is MISSING:
+ return MISSING
+ current = picked
+ return current
+
+
+def split_path(path: str) -> list[str]:
+ """Split on dots that sit outside a [...] selector."""
+ parts, depth, buf = [], 0, ""
+ for char in path:
+ if char == "[":
+ depth += 1
+ elif char == "]":
+ depth -= 1
+ if char == "." and depth == 0:
+ parts.append(buf)
+ buf = ""
+ else:
+ buf += char
+ parts.append(buf)
+ return parts
+
+
+def collect(values: Any, key: str) -> list[Any]:
+ """Values of `key` across a list, keeping explicit nulls and skipping
+ elements that do not carry the key at all. `.get()` would flatten the two
+ into None and let an omitted key read as a returned null."""
+ if not isinstance(values, list):
+ return []
+ return [v[key] for v in values if isinstance(v, dict) and key in v]
+
+
+# --- rules -----------------------------------------------------------------
+
+
+def compare_text(value: Any, compare: str | None) -> str:
+ text = norm(value)
+ if compare == "strip_spaces":
+ text = text.replace(" ", "")
+ return text
+
+
+def rule_satisfied(field: dict[str, Any], returned: Any) -> bool:
+ rule = field["rule"]
+ expect = field.get("expect")
+ compare = field.get("compare")
+
+ if rule == "absent":
+ return returned is None or returned is MISSING
+
+ if returned is MISSING:
+ return False
+
+ if rule in {"integer", "signed_parenthesis"}:
+ return isinstance(returned, int) and not isinstance(returned, bool) and returned == expect
+
+ if rule in {"verbatim", "strip_footnote_marker", "gs1_element_string"}:
+ return returned is not None and compare_text(returned, compare) == compare_text(expect, compare)
+
+ if rule == "contains":
+ return returned is not None and norm(expect).lower() in norm(returned).lower()
+
+ if rule == "any_of":
+ if returned is None:
+ return False
+ got = compare_text(returned, compare)
+ return any(got == compare_text(option, compare) for option in expect)
+
+ if rule == "any_of_in_list":
+ # `returned` is the list produced by a [*] selector.
+ if not isinstance(returned, list):
+ return False
+ wanted = {compare_text(option, compare) for option in expect}
+ return any(v is not None and compare_text(v, compare) in wanted for v in returned)
+
+ raise ValueError(f"Unknown rule {rule!r}")
+
+
+def is_null(field: dict[str, Any], returned: Any) -> bool:
+ """Did stage 2 return null for this field?
+
+ MISSING is not null. A `[key=value]` selector that matches no element means
+ stage 2 returned rows under different keys, which is a wrong non-null
+ answer; the registered taxonomy reserves `stage2_dropped` for an explicit
+ null. Conflating the two would report a mislabelled row as a drop.
+ """
+ if field["rule"] == "any_of_in_list":
+ if not isinstance(returned, list):
+ return False
+ # all() is true of an empty list, and an empty array is stage 2
+ # answering with no rows rather than answering null.
+ return bool(returned) and all(v is None for v in returned)
+ return returned is None
+
+
+def verdict_for(field: dict[str, Any], returned: Any, markdown_norm: str) -> str:
+ if rule_satisfied(field, returned):
+ return "match"
+
+ printed = field.get("printed")
+ in_text = printed is not None and norm(printed) in markdown_norm
+
+ if field["rule"] == "absent":
+ # The value is not legible on the page and stage 1 rightly did not
+ # produce it, so a non-null answer is stage 2's own invention. This
+ # sub-case of the registered taxonomy is reported separately.
+ return "stage2_invented"
+
+ if is_null(field, returned):
+ return "stage2_dropped" if in_text else "stage1_lost"
+ return "stage2_error" if in_text else "stage1_error"
+
+
+# --- minimal JSON Schema check --------------------------------------------
+
+
+def schema_errors(schema: dict[str, Any], value: Any, where: str = "$") -> list[str]:
+ """Checks the subset the registered schemas use: type, required, enum,
+ additionalProperties and array items."""
+ errors: list[str] = []
+ types = schema.get("type")
+ allowed = types if isinstance(types, list) else [types]
+
+ def type_ok(name: str) -> bool:
+ if name == "object":
+ return isinstance(value, dict)
+ if name == "array":
+ return isinstance(value, list)
+ if name == "string":
+ return isinstance(value, str)
+ if name == "integer":
+ return isinstance(value, int) and not isinstance(value, bool)
+ if name == "number":
+ return isinstance(value, (int, float)) and not isinstance(value, bool)
+ if name == "boolean":
+ return isinstance(value, bool)
+ if name == "null":
+ return value is None
+ return True
+
+ if types is not None and not any(type_ok(name) for name in allowed):
+ return [f"{where}: expected {types}, got {type(value).__name__}"]
+
+ if "enum" in schema and value not in schema["enum"]:
+ errors.append(f"{where}: {value!r} not in enum")
+
+ if isinstance(value, dict) and "properties" in schema:
+ for name in schema.get("required", []):
+ if name not in value:
+ errors.append(f"{where}: missing required {name!r}")
+ if schema.get("additionalProperties") is False:
+ for name in value:
+ if name not in schema["properties"]:
+ errors.append(f"{where}: unexpected property {name!r}")
+ for name, sub in schema["properties"].items():
+ if name in value:
+ errors.extend(schema_errors(sub, value[name], f"{where}.{name}"))
+
+ if isinstance(value, list) and isinstance(schema.get("items"), dict):
+ for index, element in enumerate(value):
+ errors.extend(schema_errors(schema["items"], element, f"{where}[{index}]"))
+
+ return errors
+
+
+# --- pre-registered predictions ------------------------------------------
+
+
+def primary_fields(documents: list[dict[str, Any]]) -> list[dict[str, Any]]:
+ return [
+ field
+ for document in documents
+ for call in document["calls"]
+ if call["model_key"] == "primary"
+ for field in call["fields"]
+ ]
+
+
+def score_predictions(
+ inputs: dict[str, Any],
+ documents: list[dict[str, Any]],
+ totals: dict[str, Any],
+) -> list[dict[str, Any]]:
+ """Decide each registered prediction from the recorded run.
+
+ The prediction text lives in inputs.json, which was committed before the
+ first call. predictions.json only says how each one is decided, and this
+ function refuses to run if the two disagree, so a prediction cannot be
+ restated on the page in softer words than the one that was registered.
+ """
+ spec = read_json(ROOT / "data" / "predictions.json")
+ registered = inputs["predictions"]["items"]
+ fields = primary_fields(documents)
+ primary = totals["primary"]
+ scored: list[dict[str, Any]] = []
+
+ for entry in spec["predictions"]:
+ index = entry["index"]
+ if index >= len(registered) or entry["text"] != registered[index]:
+ raise SystemExit(
+ f"prediction {index} in predictions.json does not match inputs.json verbatim"
+ )
+ check = entry["check"]
+ kind = check["kind"]
+ numbers = {
+ "matched": primary["matched"],
+ "registered": primary["registered_fields"],
+ "count": 0,
+ "total": 0,
+ }
+
+ if kind == "any_field_missed_with_rule":
+ pool = [f for f in fields if f["rule"] == check["rule"]]
+ missed = [f for f in pool if f["verdict"] != "match"]
+ numbers["count"] = len(missed)
+ numbers["total"] = len(pool)
+ held = bool(missed)
+ elif kind == "field_missed":
+ field = find_field(documents, check["document"], check["call"], check["path"])
+ held = field["verdict"] != "match"
+ elif kind == "field_returned_equals":
+ field = find_field(documents, check["document"], check["call"], check["path"])
+ held = field["path_resolved"] and norm(field["returned"]) == norm(check["value"])
+ elif kind == "field_returned_in":
+ # Several accepted values, so a prediction is scored the way that
+ # most favours it. Used where the registered text names a date the
+ # prediction's own reasoning does not produce.
+ field = find_field(documents, check["document"], check["call"], check["path"])
+ held = field["path_resolved"] and any(
+ norm(field["returned"]) == norm(v) for v in check["values"]
+ )
+ elif kind == "any_verdict":
+ hits = [f for f in fields if f["verdict"] == check["verdict"]]
+ numbers["count"] = len(hits)
+ held = bool(hits)
+ elif kind == "majority_match":
+ held = primary["matched"] * 2 > primary["registered_fields"]
+ else:
+ raise SystemExit(f"Unknown prediction check {kind!r}")
+
+ template = entry["evidence_held"] if held else entry["evidence_failed"]
+ scored.append(
+ {
+ "index": index,
+ "text": registered[index],
+ "short": entry["short"],
+ "held": held,
+ "evidence": template.format(**numbers),
+ }
+ )
+
+ if len(scored) != len(registered):
+ raise SystemExit("every registered prediction must be scored")
+ return scored
+
+
+def find_field(
+ documents: list[dict[str, Any]], doc_id: str, call_id: str, path: str
+) -> dict[str, Any]:
+ for document in documents:
+ if document["document"] != doc_id:
+ continue
+ for call in document["calls"]:
+ if call["call"] != call_id or call["model_key"] != "primary":
+ continue
+ for field in call["fields"]:
+ if field["path"] == path:
+ return field
+ raise SystemExit(f"prediction references an unrecorded field: {doc_id}/{call_id}/{path}")
+
+
+# --- main ------------------------------------------------------------------
+
+
+def evaluate_call(
+ inputs: dict[str, Any],
+ doc: dict[str, Any],
+ call: dict[str, Any],
+ model_key: str,
+ markdown: str,
+) -> dict[str, Any]:
+ markdown_norm = norm(markdown)
+ returned_obj, parse_error = stage2_object(doc["id"], call["id"], model_key)
+
+ # A reply that did not parse, or that parsed into something that is not an
+ # object, cannot answer any field. Without this gate the `absent` rule is
+ # satisfied by a missing path, so a reply like `[]` would earn `match` on
+ # every field registered as not legible on the page.
+ usable = isinstance(returned_obj, dict)
+
+ fields: list[dict[str, Any]] = []
+ for field in call["expected"]:
+ if not usable:
+ record = {
+ "path": field["path"],
+ "printed": field.get("printed"),
+ "rule": field["rule"],
+ "expected": field.get("expect"),
+ # No reply to resolve against, so nothing resolved.
+ "path_resolved": False,
+ "returned": None,
+ "printed_token_in_stage1_text": (
+ field.get("printed") is not None and norm(field["printed"]) in markdown_norm
+ ),
+ "verdict": "stage2_unusable",
+ }
+ fields.append(record)
+ continue
+ if parse_error is not None:
+ returned: Any = MISSING
+ else:
+ resolved = resolve(returned_obj, field["path"])
+ if field["rule"] == "any_of_in_list":
+ leaf = split_path(field["path"])[-1]
+ key = STEP.match(leaf).group(1) if STEP.match(leaf) else leaf
+ parent = ".".join(split_path(field["path"])[:-1])
+ container = resolve(returned_obj, parent) if parent else MISSING
+ returned = collect(container, key) if isinstance(container, list) else resolved
+ else:
+ returned = resolved
+ record = {
+ "path": field["path"],
+ "printed": field.get("printed"),
+ "rule": field["rule"],
+ "expected": field.get("expect"),
+ # The verdict turns on this: an unresolved path is a wrong answer,
+ # an explicit null is stage 2 declining to answer. Both serialise
+ # as null, so the flag is what keeps them apart in the artifact.
+ "path_resolved": returned is not MISSING,
+ "returned": None if returned is MISSING else returned,
+ "printed_token_in_stage1_text": (
+ field.get("printed") is not None and norm(field["printed"]) in markdown_norm
+ ),
+ "verdict": verdict_for(field, returned, markdown_norm),
+ }
+ fields.append(record)
+
+ errors = (
+ schema_errors(inputs["schemas"][call["schema"]], returned_obj)
+ if parse_error is None
+ else [f"reply did not parse as JSON: {parse_error}"]
+ )
+ counts: dict[str, int] = {}
+ for record in fields:
+ counts[record["verdict"]] = counts.get(record["verdict"], 0) + 1
+
+ return {
+ "document": doc["id"],
+ "call": call["id"],
+ "schema": call["schema"],
+ "model_key": model_key,
+ "model": inputs["stage2"]["models"][model_key],
+ "json_parsed": parse_error is None,
+ "parse_error": parse_error,
+ "schema_valid": not errors,
+ "schema_errors": errors,
+ "fields": fields,
+ "counts": counts,
+ "registered_fields": len(fields),
+ "matched": counts.get("match", 0),
+ }
+
+
+def main() -> None:
+ inputs = read_json(INPUTS_PATH)
+ documents: list[dict[str, Any]] = []
+ model_keys = list(inputs["stage2"]["models"])
+
+ for doc in inputs["documents"]:
+ markdown = stage1_markdown(doc["id"])
+ markdown_norm = norm(markdown)
+ tokens = sorted(
+ {
+ field["printed"]
+ for call in doc["calls"]
+ for field in call["expected"]
+ if field.get("printed") is not None
+ }
+ )
+ found = [token for token in tokens if norm(token) in markdown_norm]
+ entry = {
+ "document": doc["id"],
+ "kind": doc["kind"],
+ "displayed": doc["displayed"],
+ "image": doc["image"],
+ "image_sha256": doc["image_sha256"],
+ "stage1": {
+ "markdown_chars": len(markdown),
+ "registered_tokens": len(tokens),
+ "tokens_in_text": len(found),
+ "tokens_missing": [token for token in tokens if token not in found],
+ },
+ "calls": [
+ evaluate_call(inputs, doc, call, model_key, markdown)
+ for call in doc["calls"]
+ for model_key in model_keys
+ ],
+ }
+ documents.append(entry)
+
+ totals: dict[str, dict[str, Any]] = {}
+ for model_key in model_keys:
+ counts: dict[str, int] = {}
+ registered = matched = calls = parsed = valid = 0
+ for entry in documents:
+ for call in entry["calls"]:
+ if call["model_key"] != model_key:
+ continue
+ calls += 1
+ parsed += 1 if call["json_parsed"] else 0
+ valid += 1 if call["schema_valid"] else 0
+ registered += call["registered_fields"]
+ matched += call["matched"]
+ for name, value in call["counts"].items():
+ counts[name] = counts.get(name, 0) + value
+ totals[model_key] = {
+ "model": inputs["stage2"]["models"][model_key],
+ "calls": calls,
+ "json_parsed": parsed,
+ "schema_valid": valid,
+ "registered_fields": registered,
+ "matched": matched,
+ "verdicts": counts,
+ }
+
+ predictions = score_predictions(inputs, documents, totals)
+
+ stage1_tokens = sum(e["stage1"]["registered_tokens"] for e in documents)
+ stage1_found = sum(e["stage1"]["tokens_in_text"] for e in documents)
+
+ evaluation = {
+ "inputs_sha256": __import__("hashlib").sha256(INPUTS_PATH.read_bytes()).hexdigest(),
+ "documents_registered": len(documents),
+ "documents_displayed": sum(1 for e in documents if e["displayed"]),
+ "stage1": {
+ "model": inputs["stage1"]["model"],
+ "registered_tokens": stage1_tokens,
+ "tokens_in_text": stage1_found,
+ },
+ "stage2_totals": totals,
+ "predictions": predictions,
+ "documents": documents,
+ }
+ EVALUATION_PATH.write_text(
+ json.dumps(evaluation, indent="\t", ensure_ascii=False) + "\n", encoding="utf-8"
+ )
+
+ print(f"stage 1: {stage1_found}/{stage1_tokens} registered printed tokens survive into the Markdown")
+ for model_key, total in totals.items():
+ print(
+ f"stage 2 {model_key} ({total['model']}): {total['matched']}/{total['registered_fields']} fields,"
+ f" {total['schema_valid']}/{total['calls']} schema-valid replies, {total['verdicts']}"
+ )
+ for entry in documents:
+ for call in entry["calls"]:
+ if call["model_key"] != "primary":
+ continue
+ bad = [f for f in call["fields"] if f["verdict"] != "match"]
+ if bad:
+ print(f"\n{entry['document']} / {call['call']}:")
+ for field in bad:
+ print(
+ f" {field['verdict']:16} {field['path']}"
+ f" printed={field['printed']!r} returned={field['returned']!r}"
+ )
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/examples/ocr-two-stage/run.py b/examples/ocr-two-stage/run.py
new file mode 100644
index 000000000..6acafe49a
--- /dev/null
+++ b/examples/ocr-two-stage/run.py
@@ -0,0 +1,623 @@
+#!/usr/bin/env python3
+"""Record the /ocr two-stage page evidence against SIE Cloud.
+
+Stage 1 turns each page image into Markdown with LightOnOCR. Stage 2 turns
+*that recorded Markdown* into typed fields under a pre-registered JSON schema.
+The page image never reaches stage 2, which is what makes this a pipeline
+rather than two independent demos.
+
+Usage (from the repository root):
+
+ python3 examples/ocr-two-stage/run.py --probe
+ python3 examples/ocr-two-stage/run.py --stage 1
+ python3 examples/ocr-two-stage/run.py --stage 2
+ python3 examples/ocr-two-stage/run.py # both stages
+ python3 examples/ocr-two-stage/run.py --doc ID
+ python3 examples/ocr-two-stage/run.py --verify-inputs # fetch + digests only
+
+Stage 1 sends the shape packages/tasks/src/codegen.ts generates for the `ocr`
+task: POST /v1/extract/<model with / as __> with one base64 image. Stage 2
+sends POST /v1/chat/completions with a strict JSON-schema response format and
+the stage-1 Markdown pasted into one user message.
+
+Credentials:
+ SIE_API_KEY bearer key; when unset, the script reads SIE_KEY_FILE
+ SIE_KEY_FILE a bare one-line key (default: ~/.secrets/sie_api_key_sep)
+ SIE_CLUSTER_URL endpoint; SIE_BASE_URL is accepted as an alias
+ (default: https://api.superlinked.com)
+
+The key only ever goes into the Authorization header. It is never printed, and
+the script deletes any file it wrote that contains it. Stored stage-1 requests
+replace the base64 image with the image path and its SHA-256, so the exact
+payload can be rebuilt from the committed image.
+
+Standard library only.
+"""
+
+from __future__ import annotations
+
+import argparse
+import base64
+import hashlib
+import json
+import os
+import sys
+import time
+import urllib.error
+import urllib.parse
+import urllib.request
+import uuid
+from datetime import UTC, datetime
+from pathlib import Path
+from typing import Any
+
+ROOT = Path(__file__).resolve().parent
+INPUTS_PATH = ROOT / "data" / "inputs.json"
+RUN_DIR = ROOT / "verified-run"
+CALLS_PATH = RUN_DIR / "calls.json"
+# Per-call working files. Gitignored: the committed artifact is calls.json.
+WORK_DIR = RUN_DIR / ".work"
+REQUESTS_DIR = WORK_DIR / "requests"
+RESPONSES_DIR = WORK_DIR / "responses"
+MANIFEST_PATH = WORK_DIR / "manifest.json"
+# Diagnostics for --probe, kept out of the committed run.
+PROBE_DIR = WORK_DIR / "probe"
+
+DEFAULT_ENDPOINT = "https://api.superlinked.com"
+DEFAULT_KEY_FILE = Path.home() / ".secrets" / "sie_api_key_sep"
+PROVISION_TIMEOUT_S = 900
+ATTEMPT_TIMEOUT_S = 300
+RETRY_STATUSES = {202, 429, 502, 503, 504}
+PROBE_DOC = "product-gs1-128-label"
+
+
+def sha256_bytes(value: bytes) -> str:
+ return hashlib.sha256(value).hexdigest()
+
+
+def sha256_text(value: str) -> str:
+ return sha256_bytes(value.encode("utf-8"))
+
+
+def canonical_sha256(value: Any) -> str:
+ return sha256_bytes(
+ json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode("utf-8")
+ )
+
+
+def write_json(path: Path, value: Any) -> None:
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text(json.dumps(value, indent="\t", ensure_ascii=False) + "\n", encoding="utf-8")
+
+
+def read_json(path: Path) -> Any:
+ return json.loads(path.read_text(encoding="utf-8"))
+
+
+def wire_primitive_model(model: str) -> str:
+ """Byte-identical to wirePrimitiveModel() in packages/tasks/src/codegen.ts."""
+ return urllib.parse.quote(model.replace("/", "__"), safe="")
+
+
+def load_credentials() -> tuple[str, str]:
+ key = os.environ.get("SIE_API_KEY", "").strip()
+ endpoint = (os.environ.get("SIE_CLUSTER_URL") or os.environ.get("SIE_BASE_URL") or "").strip()
+ if not key:
+ key_file = Path(os.environ.get("SIE_KEY_FILE", str(DEFAULT_KEY_FILE))).expanduser()
+ key = key_file.read_text(encoding="utf-8").strip()
+ if not key or "\n" in key:
+ raise SystemExit("No usable SIE API key found (set SIE_API_KEY or SIE_KEY_FILE)")
+ resolved = (endpoint or DEFAULT_ENDPOINT).rstrip("/")
+ if urllib.parse.urlparse(resolved).scheme != "https":
+ raise SystemExit(f"Refusing to send the API key to a non-HTTPS endpoint: {resolved}")
+ return key, resolved
+
+
+def post_json(endpoint: str, key: str, path: str, payload: bytes) -> dict[str, Any]:
+ deadline = time.monotonic() + PROVISION_TIMEOUT_S
+ attempts = 0
+ while True:
+ attempts += 1
+ request = urllib.request.Request(
+ endpoint + path,
+ data=payload,
+ method="POST",
+ headers={
+ "Content-Type": "application/json",
+ "Accept": "application/json",
+ },
+ )
+ # Unredirected: urllib replays normal headers on a redirect, which
+ # would hand the bearer token to whatever host the redirect names.
+ request.add_unredirected_header("Authorization", f"Bearer {key}")
+ started = time.monotonic()
+ try:
+ with urllib.request.urlopen(request, timeout=ATTEMPT_TIMEOUT_S) as response:
+ status = response.status
+ headers = dict(response.headers.items())
+ raw = response.read()
+ except urllib.error.HTTPError as error:
+ status = error.code
+ headers = dict(error.headers.items()) if error.headers else {}
+ raw = error.read()
+ except (urllib.error.URLError, TimeoutError) as error:
+ if time.monotonic() > deadline:
+ raise
+ print(f" transport error ({type(error).__name__}), retrying", file=sys.stderr)
+ time.sleep(10)
+ continue
+ latency_s = time.monotonic() - started
+ if status in RETRY_STATUSES and time.monotonic() < deadline:
+ retry_after = headers.get("Retry-After") or headers.get("retry-after")
+ try:
+ wait = min(float(retry_after) if retry_after else 15.0, 30.0)
+ except ValueError:
+ wait = 15.0
+ print(f" HTTP {status}, waiting {wait:.0f}s for capacity", file=sys.stderr)
+ time.sleep(wait)
+ continue
+ text = raw.decode("utf-8", errors="replace")
+ try:
+ parsed: Any = json.loads(text)
+ except json.JSONDecodeError:
+ parsed = None
+ return {
+ "status": status,
+ "latency_s": round(latency_s, 4),
+ "attempts": attempts,
+ # Keep model, version, usage and request-id headers; drop the
+ # account key identifier so no key metadata reaches the repository.
+ "headers": {
+ name.lower(): value
+ for name, value in headers.items()
+ if (name.lower().startswith("x-sie") and name.lower() != "x-sie-key-id")
+ or name.lower() in {"content-type", "date"}
+ },
+ "json": parsed,
+ "text": None if parsed is not None else text,
+ }
+
+
+def image_for(doc: dict[str, Any]) -> bytes:
+ """Fetch the exact bytes that were sent, and refuse anything else.
+
+ The images are not committed: several carry licences that do not allow
+ redistribution here, and one is a copyrighted investor page used as an
+ attributed excerpt. `source.url` serves the same bytes the run used, and
+ `source.sha256` is what makes the fetch trustworthy.
+ """
+ source = doc["source"]
+ with urllib.request.urlopen(source["url"], timeout=120) as response:
+ data = response.read()
+ if len(data) != source["bytes"]:
+ raise SystemExit(
+ f"{doc['id']}: fetched {len(data)} bytes, registered {source['bytes']}"
+ )
+ digest = sha256_bytes(data)
+ if digest != doc["image_sha256"]:
+ raise SystemExit(
+ f"{doc['id']}: {doc['image']} does not match the checksum registered in inputs.json"
+ )
+ return data
+
+
+def verify_inputs(inputs: dict[str, Any]) -> None:
+ for doc in inputs["documents"]:
+ image_for(doc)
+ print(f"verified {len(inputs['documents'])} registered images", file=sys.stderr)
+
+
+def stage1_body(image_b64: str, fmt: str) -> dict[str, Any]:
+ return {"items": [{"images": [{"data": image_b64, "format": fmt}]}]}
+
+
+def run_stage1(
+ invocation: str,
+ endpoint: str,
+ key: str,
+ inputs: dict[str, Any],
+ doc: dict[str, Any],
+ out_requests: Path,
+ out_responses: Path,
+) -> tuple[dict[str, Any], list[Path]]:
+ model = inputs["stage1"]["model"]
+ path = f"/v1/extract/{wire_primitive_model(model)}"
+ raw = image_for(doc)
+ body = stage1_body(base64.b64encode(raw).decode("ascii"), doc["format"])
+ payload = json.dumps(body, ensure_ascii=False).encode("utf-8")
+ name = f"{doc['id']}__stage1"
+ print(f"{name}: POST {path}", file=sys.stderr)
+ started_utc = datetime.now(UTC).isoformat().replace("+00:00", "Z")
+ response = post_json(endpoint, key, path, payload)
+
+ stored_body = stage1_body(
+ f"<base64 of apps/site/public/reference/ocr-review/{doc['image']}, sha256 {doc['image_sha256']}>",
+ doc["format"],
+ )
+ request_record = {
+ "method": "POST",
+ "endpoint": endpoint,
+ "path": path,
+ "model": model,
+ "headers": {"Content-Type": "application/json", "Accept": "application/json"},
+ "payload_sha256": sha256_bytes(payload),
+ "body": stored_body,
+ }
+ response_record = {
+ "status": response["status"],
+ "headers": response["headers"],
+ "body": response["json"] if response["json"] is not None else response["text"],
+ }
+ request_path = out_requests / f"{name}.json"
+ response_path = out_responses / f"{name}.json"
+ write_json(request_path, request_record)
+ write_json(response_path, response_record)
+
+ markdown = stage1_markdown(response_record)
+ record = {
+ "document": doc["id"],
+ "stage": 1,
+ "invocation_id": invocation,
+ "endpoint": endpoint,
+ "call_started_utc": started_utc,
+ "model": model,
+ "model_revision": response["headers"].get("x-sie-model-revision"),
+ "server_version": response["headers"].get("x-sie-server-version"),
+ "status": response["status"],
+ "latency_s": response["latency_s"],
+ "attempts": response["attempts"],
+ "image": doc["image"],
+ "image_sha256": doc["image_sha256"],
+ "markdown_chars": len(markdown) if markdown is not None else None,
+ "markdown_sha256": sha256_text(markdown) if markdown is not None else None,
+ "payload_sha256": request_record["payload_sha256"],
+ "request_sha256": canonical_sha256(request_record),
+ "response_sha256": canonical_sha256(response_record),
+ }
+ print(
+ f" HTTP {response['status']} in {response['latency_s']:.1f}s,"
+ f" markdown chars={record['markdown_chars']}",
+ file=sys.stderr,
+ )
+ return record, [request_path, response_path]
+
+
+def stage1_markdown(response_record: dict[str, Any]) -> str | None:
+ """Read entities[0].text, the field the generated OCR snippet prints."""
+ body = response_record.get("body")
+ if not isinstance(body, dict):
+ return None
+ items = body.get("items")
+ if isinstance(items, list) and items and isinstance(items[0], dict):
+ body = items[0]
+ entities = body.get("entities")
+ if isinstance(entities, list) and entities and isinstance(entities[0], dict):
+ text = entities[0].get("text")
+ return text if isinstance(text, str) else None
+ data = body.get("data")
+ if isinstance(data, dict):
+ for field in ("markdown", "text"):
+ if isinstance(data.get(field), str):
+ return data[field]
+ for field in ("markdown", "text"):
+ if isinstance(body.get(field), str):
+ return body[field]
+ return None
+
+
+def stage2_body(
+ inputs: dict[str, Any], model: str, schema_id: str, document_type: str, markdown: str
+) -> dict[str, Any]:
+ stage2 = inputs["stage2"]
+ content = stage2["instruction_template"].format(
+ document_type=document_type, markdown=markdown
+ )
+ return {
+ "model": model,
+ "messages": [{"role": "user", "content": content}],
+ "temperature": stage2["temperature"],
+ "max_tokens": stage2["max_tokens"],
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": schema_id,
+ "strict": True,
+ "schema": inputs["schemas"][schema_id],
+ },
+ },
+ }
+
+
+def run_stage2(
+ invocation: str,
+ endpoint: str,
+ key: str,
+ inputs: dict[str, Any],
+ doc: dict[str, Any],
+ call: dict[str, Any],
+ model: str,
+ model_key: str,
+ markdown: str,
+ markdown_sha256: str,
+ out_requests: Path,
+ out_responses: Path,
+) -> tuple[dict[str, Any], list[Path]]:
+ path = inputs["stage2"]["path"]
+ body = stage2_body(inputs, model, call["schema"], doc["document_type"], markdown)
+ payload = json.dumps(body, ensure_ascii=False).encode("utf-8")
+ name = f"{doc['id']}__{call['id']}__stage2__{model_key}"
+ print(f"{name}: POST {path}", file=sys.stderr)
+ started_utc = datetime.now(UTC).isoformat().replace("+00:00", "Z")
+ response = post_json(endpoint, key, path, payload)
+
+ request_record = {
+ "method": "POST",
+ "endpoint": endpoint,
+ "path": path,
+ "model": model,
+ "headers": {"Content-Type": "application/json", "Accept": "application/json"},
+ "payload_sha256": sha256_bytes(payload),
+ "stage1_markdown_sha256": markdown_sha256,
+ "body": body,
+ }
+ response_record = {
+ "status": response["status"],
+ "headers": response["headers"],
+ "body": response["json"] if response["json"] is not None else response["text"],
+ }
+ request_path = out_requests / f"{name}.json"
+ response_path = out_responses / f"{name}.json"
+ write_json(request_path, request_record)
+ write_json(response_path, response_record)
+
+ content = stage2_content(response_record)
+ parsed: Any = None
+ parse_error: str | None = None
+ if isinstance(content, str):
+ try:
+ parsed = json.loads(content)
+ except json.JSONDecodeError as error:
+ parse_error = str(error)
+
+ body_json = response["json"] if isinstance(response["json"], dict) else {}
+ usage = body_json.get("usage") or {}
+ choices = body_json.get("choices") or []
+ finish = choices[0].get("finish_reason") if choices and isinstance(choices[0], dict) else None
+ record = {
+ "document": doc["id"],
+ "call": call["id"],
+ "stage": 2,
+ "invocation_id": invocation,
+ "endpoint": endpoint,
+ "call_started_utc": started_utc,
+ "model": model,
+ "model_key": model_key,
+ "schema": call["schema"],
+ "model_revision": response["headers"].get("x-sie-model-revision"),
+ "server_version": response["headers"].get("x-sie-server-version"),
+ "status": response["status"],
+ "latency_s": response["latency_s"],
+ "attempts": response["attempts"],
+ "finish_reason": finish,
+ "prompt_tokens": usage.get("prompt_tokens"),
+ "completion_tokens": usage.get("completion_tokens"),
+ "stage1_markdown_sha256": markdown_sha256,
+ "json_parsed": parsed is not None,
+ "parse_error": parse_error,
+ "content_sha256": sha256_text(content) if isinstance(content, str) else None,
+ "payload_sha256": request_record["payload_sha256"],
+ "request_sha256": canonical_sha256(request_record),
+ "response_sha256": canonical_sha256(response_record),
+ }
+ print(
+ f" HTTP {response['status']} in {response['latency_s']:.1f}s, finish={finish},"
+ f" tokens in/out={usage.get('prompt_tokens')}/{usage.get('completion_tokens')},"
+ f" json={'ok' if parsed is not None else parse_error or 'missing'}",
+ file=sys.stderr,
+ )
+ return record, [request_path, response_path]
+
+
+def stage2_content(response_record: dict[str, Any]) -> str | None:
+ body = response_record.get("body")
+ if not isinstance(body, dict):
+ return None
+ choices = body.get("choices")
+ if isinstance(choices, list) and choices and isinstance(choices[0], dict):
+ message = choices[0].get("message")
+ if isinstance(message, dict) and isinstance(message.get("content"), str):
+ return message["content"]
+ return None
+
+
+def load_stage1_markdown(doc_id: str) -> tuple[str, str]:
+ path = RESPONSES_DIR / f"{doc_id}__stage1.json"
+ if not path.exists():
+ raise SystemExit(f"{doc_id}: no recorded stage-1 response; run --stage 1 first")
+ markdown = stage1_markdown(read_json(path))
+ if not isinstance(markdown, str):
+ raise SystemExit(f"{doc_id}: recorded stage-1 response carries no text")
+ return markdown, sha256_text(markdown)
+
+
+def assert_no_key(key: str, paths: list[Path]) -> None:
+ for path in paths:
+ if key in path.read_text(encoding="utf-8"):
+ path.unlink()
+ raise SystemExit(f"Refusing to keep {path.name}: it contains the API key")
+
+
+def merge_manifest(new_records: list[dict[str, Any]], started: str) -> None:
+ manifest: dict[str, Any] = {}
+ if MANIFEST_PATH.exists():
+ manifest = read_json(MANIFEST_PATH)
+ calls: list[dict[str, Any]] = manifest.get("calls", [])
+ index = {(c.get("document"), c.get("call"), c.get("stage"), c.get("model_key")): i for i, c in enumerate(calls)}
+ for record in new_records:
+ keyed = (record.get("document"), record.get("call"), record.get("stage"), record.get("model_key"))
+ if keyed in index:
+ calls[index[keyed]] = record
+ else:
+ index[keyed] = len(calls)
+ calls.append(record)
+ # A manifest accumulates calls from several invocations, so the top-level
+ # time is only the latest write. Provenance lives per call: its invocation
+ # id, its endpoint and its start time. The page derives its run date from
+ # the recorded response headers, not from any of this.
+ endpoints = {call.get("endpoint") for call in calls if call.get("endpoint")}
+ manifest.update(
+ {
+ "last_run_started_utc": started,
+ "composite": len({call.get("invocation_id") for call in calls}) > 1,
+ "endpoints": sorted(endpoints),
+ "inputs_sha256": sha256_bytes(INPUTS_PATH.read_bytes()),
+ "calls": calls,
+ }
+ )
+ write_json(MANIFEST_PATH, manifest)
+
+
+def consolidate() -> None:
+ """Fold the per-call working files into verified-run/calls.json.
+
+ This is the file a reader checks our numbers from, and the only one the
+ example commits. evaluate.py reads it and nothing else, so the published
+ figures can be re-derived with no API key and no network.
+ """
+ manifest = read_json(MANIFEST_PATH)
+ calls = []
+ for entry in manifest["calls"]:
+ if entry["stage"] == 1:
+ slug = f"{entry['document']}__stage1"
+ else:
+ slug = f"{entry['document']}__{entry['call']}__stage2__{entry['model_key']}"
+ calls.append(
+ {
+ "slug": slug,
+ "document": entry["document"],
+ "stage": entry["stage"],
+ "model": entry["model"],
+ "model_revision": entry.get("model_revision"),
+ "server_version": entry.get("server_version"),
+ "status": entry["status"],
+ "attempts": entry.get("attempts"),
+ "timing": {"duration_s": entry.get("latency_s")},
+ "request": read_json(REQUESTS_DIR / f"{slug}.json"),
+ "response": read_json(RESPONSES_DIR / f"{slug}.json"),
+ }
+ )
+ write_json(
+ CALLS_PATH,
+ {
+ "about": (
+ "Every call the run made, request and response, in recorded "
+ "order. With data/inputs.json and data/predictions.json, "
+ "which carry the pre-registered expectations, this is "
+ "everything evaluate.py needs: no API key, no network."
+ ),
+ "recorded_utc": manifest.get("last_run_started_utc"),
+ "endpoint": manifest["endpoints"][0] if manifest.get("endpoints") else None,
+ "models": sorted({call["model"] for call in calls}),
+ "calls": calls,
+ },
+ )
+ print(f"wrote {CALLS_PATH.relative_to(ROOT)} with {len(calls)} calls")
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(
+ description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
+ )
+ parser.add_argument("--doc", help="run one document id")
+ parser.add_argument("--stage", type=int, choices=[1, 2], help="run one stage")
+ parser.add_argument(
+ "--stage2-model",
+ choices=["primary", "secondary"],
+ help="run one stage-2 model (default: both)",
+ )
+ parser.add_argument(
+ "--probe",
+ action="store_true",
+ help=f"both stages on {PROBE_DOC}, stored under diagnostics/probe",
+ )
+ parser.add_argument(
+ "--verify-inputs", action="store_true", help="check every registered image checksum"
+ )
+ args = parser.parse_args()
+
+ inputs = read_json(INPUTS_PATH)
+
+ if args.verify_inputs:
+ verify_inputs(inputs)
+ return
+
+ key, endpoint = load_credentials()
+ started = datetime.now(UTC).isoformat().replace("+00:00", "Z")
+ invocation = uuid.uuid4().hex
+ docs = [d for d in inputs["documents"] if args.doc in (None, d["id"])]
+ if not docs:
+ raise SystemExit(f"No registered document matches {args.doc!r}")
+
+ model_keys = [args.stage2_model] if args.stage2_model else ["primary", "secondary"]
+ models = inputs["stage2"]["models"]
+
+ if args.probe:
+ doc = next(d for d in inputs["documents"] if d["id"] == PROBE_DOC)
+ req_dir, res_dir = PROBE_DIR / "requests", PROBE_DIR / "responses"
+ record, written = run_stage1(invocation, endpoint, key, inputs, doc, req_dir, res_dir)
+ assert_no_key(key, written)
+ markdown = stage1_markdown(read_json(written[1]))
+ print("--- stage 1 markdown ---")
+ print(markdown)
+ if not isinstance(markdown, str):
+ raise SystemExit("probe: stage 1 returned no text")
+ call = doc["calls"][0]
+ record2, written2 = run_stage2(
+ invocation, endpoint, key, inputs, doc, call, models["primary"],
+ "primary", markdown, sha256_text(markdown), req_dir, res_dir,
+ )
+ assert_no_key(key, written2)
+ print("--- stage 2 content ---")
+ print(stage2_content(read_json(written2[1])))
+ write_json(PROBE_DIR / "manifest.json", {"run_started_utc": started, "calls": [record, record2]})
+ return
+
+ records: list[dict[str, Any]] = []
+ written_all: list[Path] = []
+
+ if args.stage in (None, 1):
+ for doc in docs:
+ record, written = run_stage1(invocation, endpoint, key, inputs, doc, REQUESTS_DIR, RESPONSES_DIR)
+ records.append(record)
+ written_all.extend(written)
+ assert_no_key(key, written)
+
+ if args.stage in (None, 2):
+ for doc in docs:
+ markdown, markdown_sha = load_stage1_markdown(doc["id"])
+ for call in doc["calls"]:
+ for model_key in model_keys:
+ record, written = run_stage2(
+ invocation, endpoint, key, inputs, doc, call,
+ models[model_key], model_key, markdown, markdown_sha,
+ REQUESTS_DIR, RESPONSES_DIR,
+ )
+ records.append(record)
+ written_all.extend(written)
+ assert_no_key(key, written)
+
+ merge_manifest(records, started)
+ consolidate()
+ assert_no_key(key, [MANIFEST_PATH, CALLS_PATH])
+ failed = [r for r in records if r["status"] != 200]
+ print(
+ f"\n{len(records)} calls, {len(records) - len(failed)} HTTP 200, {len(failed)} other",
+ file=sys.stderr,
+ )
+ for record in failed:
+ where = f"{record.get('document')} {record.get('call', 'stage1')}"
+ print(f" FAILED {where}: HTTP {record['status']}", file=sys.stderr)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/ocr-two-stage/verified-run/calls.json b/examples/ocr-two-stage/verified-run/calls.json
new file mode 100644
index 000000000..dd0b2c366
--- /dev/null
+++ b/examples/ocr-two-stage/verified-run/calls.json
@@ -0,0 +1,2500 @@
+{
+ "about": "Every call the run made, request and response, in recorded order. A reader can check the published numbers from this file alone, with no API key: evaluate.py reads nothing else.",
+ "recorded_utc": "2026-09-16T03:08:40.601728Z",
+ "endpoint": "https://api.superlinked.com",
+ "models": [
+ "Qwen/Qwen3.5-4B",
+ "Qwen/Qwen3.8-27B-FP8",
+ "lightonai/LightOnOCR-2-1B"
+ ],
+ "calls": [
+ {
+ "slug": "nvidia-annual-report-p78__stage1",
+ "document": "nvidia-annual-report-p78",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 12.155
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "f05114d3b65f71aa7082f902273d29914339856e73b8e05ea68318810347d296",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/nvidia-annual-report-page-166.png, sha256 19ea06de9cdbd0c643fac69fbae1b53a8d94c769ec9700878b2fd733fadb5ba7>",
+ "format": "png"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:04 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82b-b8a1-7061-b772-306776acdc54",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82b-b8a1-7061-b772-306776acdc54"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "# NVIDIA Corporation and Subsidiaries \n## Notes to the Consolidated Financial Statements \n(Continued)\n\nA reconciliation of segment operating income to consolidated income before income tax for fiscal years 2026, 2025, and 2024 were as follows:\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\"></th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Segment operating income</td>\n <td>$ 139,297</td>\n <td>$ 87,960</td>\n <td>$ 37,862</td>\n </tr>\n <tr>\n <td>Stock-based compensation expense</td>\n <td>(6,386)</td>\n <td>(4,737)</td>\n <td>(3,549)</td>\n </tr>\n <tr>\n <td>Unallocated operating expenses</td>\n <td>(1,997)</td>\n <td>(1,171)</td>\n <td>(728)</td>\n </tr>\n <tr>\n <td>Acquisition-related and other costs</td>\n <td>(527)</td>\n <td>(599)</td>\n <td>(613)</td>\n </tr>\n <tr>\n <td>Interest income</td>\n <td>2,300</td>\n <td>1,786</td>\n <td>866</td>\n </tr>\n <tr>\n <td>Interest expense</td>\n <td>(259)</td>\n <td>(247)</td>\n <td>(257)</td>\n </tr>\n <tr>\n <td>Other income, net</td>\n <td>9,022</td>\n <td>1,034</td>\n <td>237</td>\n </tr>\n <tr>\n <td>Consolidated income before income tax</td>\n <td>$ 141,450</td>\n <td>$ 84,026</td>\n <td>$ 33,818</td>\n </tr>\n </tbody>\n</table>\n\nRevenue by geographic area is based upon the location of the customers’ headquarters. The end customer and shipping location may be different from our customers’ headquarters location.\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\">Geographic Revenue based upon Customer Headquarters Location (1):</th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>United States</td>\n <td>$ 149,617</td>\n <td>$ 77,482</td>\n <td>$ 31,533</td>\n </tr>\n <tr>\n <td>Taiwan (2)</td>\n <td>42,345</td>\n <td>23,600</td>\n <td>14,912</td>\n </tr>\n <tr>\n <td>China (including Hong Kong)</td>\n <td>19,677</td>\n <td>25,048</td>\n <td>12,330</td>\n </tr>\n <tr>\n <td>Other</td>\n <td>4,299</td>\n <td>4,367</td>\n <td>2,147</td>\n </tr>\n <tr>\n <td>Total revenue</td>\n <td>$ 215,938</td>\n <td>$ 130,497</td>\n <td>$ 60,922</td>\n </tr>\n </tbody>\n</table>\n\n(1) In the third quarter of fiscal year 2026, we changed to revenue based upon the location of our customers’ headquarters as we believe it provides a better representation of the geographic profile of our revenue. Prior period information has been recast to reflect this change.\n\n(2) In fiscal year 2026, we estimate 76% of Data Center revenue from Taiwan-headquartered customers was attributed to end customers based in the United States and Europe.\n\nRevenue from sales to customers headquartered outside of the United States accounted for 31%, 41%, and 48% of total revenue for fiscal years 2026, 2025, and 2024, respectively. The increase in revenue to the United States for fiscal years 2026 and 2025 was primarily due to higher U.S.-based Compute & Networking segment demand.\n\nWe refer to customers who purchase products directly from NVIDIA as direct customers, such as AIBs, distributors, ODMs, OEMs, CSPs, AI model makers, and system integrators. Certain direct customers may use either internal resources or third-party system integrators to complete their build. We refer to indirect customers as those who purchase products through our direct customers; indirect customers include CSPs, Neocloud builders, AI model makers, enterprises, and public sector entities. Our revenue is concentrated among a limited number of direct and indirect customers and this trend may continue.\n\n**Direct Customers** – For fiscal year 2026, sales to one direct customer represented 22% of total revenue and sales to another direct customer represented 14% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2025, sales to one direct customer represented 12% of total revenue and sales to two direct customers each represented 11% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2024, sales to one direct customer represented 13% of total revenue, and were primarily attributable to the Compute & Networking segment.\n\n78"
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "receipt-cord-0007__stage1",
+ "document": "receipt-cord-0007",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 1.1943
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "1897b46bc3646a38550a721a5c059a0090e12f35dd03d37b8a48d8fef149ce7f",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/receipt-cord-0007.jpg, sha256 15494cb391bd72c057e2ca8eea9ddc4942ce0df001b1d7d3acea51053e2ce052>",
+ "format": "jpeg"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:05 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82b-e789-7eb2-a32e-7966fcd9bcce",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82b-e789-7eb2-a32e-7966fcd9bcce"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "Kupon 15 100,000 \nADD CHICKEN BOX 909 \n\nSubtotal 100,909 \nPBI (10%) 10,091 \n\nTotal 111,000 \n\nCash Rp. 111,000"
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "product-gs1-128-label__stage1",
+ "document": "product-gs1-128-label",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 3.0845
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "44387c8c3af5066a38973afce8bb0d421b2af9bc9d1171d2cd8344ae4db8282d",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/product-gs1-128-barcode.jpg, sha256 1412e09c45718f67c50cff437cb831262b30eedfc7df611492c768bd8c007f24>",
+ "format": "jpeg"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:08 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82b-ef57-7ee3-a765-b51194c79207",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82b-ef57-7ee3-a765-b51194c79207"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "61622\n\n<table>\n <tr>\n <td>Oatly Oat Drink Barista Edition 1,0<br>6 x 1,0 Lit</td>\n <td>GTIN: 27394376616222<br>BEST BEFORE: 12/02/2024</td>\n </tr>\n</table>\n\n(01)27394376616222(15)240212(10)3043AAG\n\nNights!\n\n\nNote: The image contains various decorative elements and partial text (e.g., \"L.\", \"LIE\", \"AAG\", \"A\", \"“I”, \"!! P!\", \"Nights!\") which appear to be part of a background or watermark design and not part of the main document content. These have been omitted from the Markdown as they do not form part of the structured document content. The barcode is represented as a visual element and not transcribed as text."
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "shipping-container__stage1",
+ "document": "shipping-container",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 6.0801
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "03eb6079556b46b93805ba2d75d7b498c43ccf0929d0199c2fa85983f3eda2f4",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/shipping-container-cclu-714026-4.jpg, sha256 5f77054ff6e07381ed4535e8642a94e26d9b63f03e4093919f5f7f64d47abdf0>",
+ "format": "jpeg"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:14 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82b-f985-71e2-8367-02b106a6b818",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82b-f985-71e2-8367-02b106a6b818"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "CCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n\nNote: The image contains a photograph of a train with a green cab, a black locomotive, and a person standing near the cab. The text extracted above represents all visible text on the train and the side of the train. The layout and positioning of text are preserved as closely as possible in the Markdown format. The \"CCLU 7140264\" appears multiple times, indicating it may be a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The numbers and units (KGS, LBS, CUMT, CUFT) are likely weight or volume measurements. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train."
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "milk-factory-control-panel__stage1",
+ "document": "milk-factory-control-panel",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 31.8832
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "ecc4dd27c4c6227af0f6568e41416f4cfab7366a37f4f554ddad451036e8b326",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/milk-factory-control-panel.jpg, sha256 45b70a17a302e72cb37f1bf4cb2505cd9f7a940e77885750a537d998f6bce3ac>",
+ "format": "jpeg"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:46 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82c-1105-74c1-a68a-a5baa6da6191",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82c-1105-74c1-a68a-a5baa6da6191"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "# FOGG\n\n## THINK!\n\n## E-STOP RESET\n\n## CONVEYORS ON/OFF\n\n## NO CAP DETECTOR OFF\n\n## NO CAP OFF\n\n## BACKLOG EYE ON\n\n## CAP FEEDER START\n\n## FILLER START\n\n## FILLER SPEED\n\n## UP CLIPPER DOWN\n\n## FILLER JOG\n\n## BOWL UP DOWN\n\n## SPEED MIN MAX\n\n## 53977 h\n\n## 416 34\n\n## red bin\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n##"
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "invoice-mit-sample__stage1",
+ "document": "invoice-mit-sample",
+ "stage": 1,
+ "model": "lightonai/LightOnOCR-2-1B",
+ "model_revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 4.1681
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/extract/lightonai__LightOnOCR-2-1B",
+ "model": "lightonai/LightOnOCR-2-1B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "0016f166a61cbd0c6d1b90c4779460b91e255bcde20400110ea99d481e5cdbb5",
+ "body": {
+ "items": [
+ {
+ "images": [
+ {
+ "data": "<base64 of apps/site/public/reference/ocr-review/invoice-mit-sample-page-1.png, sha256 17322de73e201e8a96ef6c0f6810614806ba89b155f7003eee09da29d5358d8b>",
+ "format": "png"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:04:50 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "200",
+ "x-sie-execution-binding-sha256": "ea30b6a26d671573d55ab6ff2cb1b17858ab2258d04347d9a9e96fb02fa48712",
+ "x-sie-execution-identity-sha256": "5152dbad99ec60f65e13c370bfa93ab6644587b21ea7f0dbbf376b4332174a72",
+ "x-sie-model-revision": "833dd8e133e7f4cd3573239f2ebf0567bcb706600273fae584eb478c68bbf1d1",
+ "x-sie-request-id": "01a0a82c-8d41-7ae1-93d5-353ae4f5a7fe",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-pages": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82c-8d41-7ae1-93d5-353ae4f5a7fe"
+ },
+ "body": {
+ "items": [
+ {
+ "classifications": [],
+ "data": {},
+ "entities": [
+ {
+ "label": "markdown",
+ "score": 1.0,
+ "text": "# A simple, clean, and responsive HTML invoice template\n\n*Because sometimes, all you need is something simple.*\n\nFind the code on GitHub. Licensed under the MIT license.\n\n---\n\n<div style=\"display: flex; justify-content: space-between; align-items: flex-start;\">\n\n<div style=\"flex: 1;\">\n\n**SPARKSUITE**\n\nSparksuite, Inc. \n12345 Sunny Road \nSunnyville, TX 12345\n\n</div>\n\n<div style=\"flex: 1; text-align: right;\">\n\nInvoice #: 123 \nCreated: January 1, 2023 \nDue: February 1, 2023\n\nAcme Corp. \nJohn Doe \[email protected]\n\n</div>\n\n</div>\n\n<table>\n <thead>\n <tr>\n <th>Payment Method</th>\n <th>Check #</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Check</td>\n <td>1000</td>\n </tr>\n </tbody>\n</table>\n\n<table>\n <thead>\n <tr>\n <th>Item</th>\n <th>Price</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Website design</td>\n <td>$300.00</td>\n </tr>\n <tr>\n <td>Hosting (3 months)</td>\n <td>$75.00</td>\n </tr>\n <tr>\n <td>Domain name (1 year)</td>\n <td>$10.00</td>\n </tr>\n <tr>\n <td colspan=\"2\" style=\"text-align: right;\">Total: $385.00</td>\n </tr>\n </tbody>\n</table>"
+ }
+ ],
+ "id": "item-0",
+ "objects": [],
+ "relations": []
+ }
+ ],
+ "model": "lightonai/LightOnOCR-2-1B",
+ "usage": {
+ "credits_charged": 200,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4"
+ }
+ }
+ }
+ },
+ {
+ "slug": "nvidia-annual-report-p78__segment-reconciliation__stage2__primary",
+ "document": "nvidia-annual-report-p78",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 33.9312
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "7306cd6562651a3bb5e1f6ee71cd18a65f312e29d79a401f0c9e7002c5726944",
+ "stage1_markdown_sha256": "201cf308901f8b8f7da8b50dbfaabb714a27e976e9555ec949e55ab0f8e13f45",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a page from an annual report. Use only what the text states. Use null when the text does not state a value.\n\n---\n# NVIDIA Corporation and Subsidiaries \n## Notes to the Consolidated Financial Statements \n(Continued)\n\nA reconciliation of segment operating income to consolidated income before income tax for fiscal years 2026, 2025, and 2024 were as follows:\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\"></th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Segment operating income</td>\n <td>$ 139,297</td>\n <td>$ 87,960</td>\n <td>$ 37,862</td>\n </tr>\n <tr>\n <td>Stock-based compensation expense</td>\n <td>(6,386)</td>\n <td>(4,737)</td>\n <td>(3,549)</td>\n </tr>\n <tr>\n <td>Unallocated operating expenses</td>\n <td>(1,997)</td>\n <td>(1,171)</td>\n <td>(728)</td>\n </tr>\n <tr>\n <td>Acquisition-related and other costs</td>\n <td>(527)</td>\n <td>(599)</td>\n <td>(613)</td>\n </tr>\n <tr>\n <td>Interest income</td>\n <td>2,300</td>\n <td>1,786</td>\n <td>866</td>\n </tr>\n <tr>\n <td>Interest expense</td>\n <td>(259)</td>\n <td>(247)</td>\n <td>(257)</td>\n </tr>\n <tr>\n <td>Other income, net</td>\n <td>9,022</td>\n <td>1,034</td>\n <td>237</td>\n </tr>\n <tr>\n <td>Consolidated income before income tax</td>\n <td>$ 141,450</td>\n <td>$ 84,026</td>\n <td>$ 33,818</td>\n </tr>\n </tbody>\n</table>\n\nRevenue by geographic area is based upon the location of the customers’ headquarters. The end customer and shipping location may be different from our customers’ headquarters location.\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\">Geographic Revenue based upon Customer Headquarters Location (1):</th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>United States</td>\n <td>$ 149,617</td>\n <td>$ 77,482</td>\n <td>$ 31,533</td>\n </tr>\n <tr>\n <td>Taiwan (2)</td>\n <td>42,345</td>\n <td>23,600</td>\n <td>14,912</td>\n </tr>\n <tr>\n <td>China (including Hong Kong)</td>\n <td>19,677</td>\n <td>25,048</td>\n <td>12,330</td>\n </tr>\n <tr>\n <td>Other</td>\n <td>4,299</td>\n <td>4,367</td>\n <td>2,147</td>\n </tr>\n <tr>\n <td>Total revenue</td>\n <td>$ 215,938</td>\n <td>$ 130,497</td>\n <td>$ 60,922</td>\n </tr>\n </tbody>\n</table>\n\n(1) In the third quarter of fiscal year 2026, we changed to revenue based upon the location of our customers’ headquarters as we believe it provides a better representation of the geographic profile of our revenue. Prior period information has been recast to reflect this change.\n\n(2) In fiscal year 2026, we estimate 76% of Data Center revenue from Taiwan-headquartered customers was attributed to end customers based in the United States and Europe.\n\nRevenue from sales to customers headquartered outside of the United States accounted for 31%, 41%, and 48% of total revenue for fiscal years 2026, 2025, and 2024, respectively. The increase in revenue to the United States for fiscal years 2026 and 2025 was primarily due to higher U.S.-based Compute & Networking segment demand.\n\nWe refer to customers who purchase products directly from NVIDIA as direct customers, such as AIBs, distributors, ODMs, OEMs, CSPs, AI model makers, and system integrators. Certain direct customers may use either internal resources or third-party system integrators to complete their build. We refer to indirect customers as those who purchase products through our direct customers; indirect customers include CSPs, Neocloud builders, AI model makers, enterprises, and public sector entities. Our revenue is concentrated among a limited number of direct and indirect customers and this trend may continue.\n\n**Direct Customers** – For fiscal year 2026, sales to one direct customer represented 22% of total revenue and sales to another direct customer represented 14% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2025, sales to one direct customer represented 12% of total revenue and sales to two direct customers each represented 11% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2024, sales to one direct customer represented 13% of total revenue, and were primarily attributable to the Compute & Networking segment.\n\n78"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "nvidia_segment",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "line_item": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line_item",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ }
+ },
+ "required": [
+ "unit",
+ "rows"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:05:38 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "161",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82c-d2be-7023-8185-8c4ffb0740f7",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1701",
+ "x-sie-units-output-tokens": "534",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82c-d2be-7023-8185-8c4ffb0740f7"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"rows\": [\n {\n \"fy2024\": 37862,\n \"fy2025\": 87960,\n \"fy2026\": 139297,\n \"line_item\": \"Segment operating income\"\n },\n {\n \"fy2024\": -3549,\n \"fy2025\": -4737,\n \"fy2026\": -6386,\n \"line_item\": \"Stock-based compensation expense\"\n },\n {\n \"fy2024\": -728,\n \"fy2025\": -1171,\n \"fy2026\": -1997,\n \"line_item\": \"Unallocated operating expenses\"\n },\n {\n \"fy2024\": -613,\n \"fy2025\": -599,\n \"fy2026\": -527,\n \"line_item\": \"Acquisition-related and other costs\"\n },\n {\n \"fy2024\": 866,\n \"fy2025\": 1786,\n \"fy2026\": 2300,\n \"line_item\": \"Interest income\"\n },\n {\n \"fy2024\": -257,\n \"fy2025\": -247,\n \"fy2026\": -259,\n \"line_item\": \"Interest expense\"\n },\n {\n \"fy2024\": 237,\n \"fy2025\": 1034,\n \"fy2026\": 9022,\n \"line_item\": \"Other income, net\"\n },\n {\n \"fy2024\": 33818,\n \"fy2025\": 84026,\n \"fy2026\": 141450,\n \"line_item\": \"Consolidated income before income tax\"\n }\n ],\n \"unit\": \"In millions\"\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789527938,
+ "id": "chatcmpl-01a0a82c-d2be-7023-8185-8c4ffb0740f7",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 534,
+ "credits_charged": 161,
+ "prompt_tokens": 1701,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2235
+ }
+ }
+ }
+ },
+ {
+ "slug": "nvidia-annual-report-p78__segment-reconciliation__stage2__secondary",
+ "document": "nvidia-annual-report-p78",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 19.7422
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "ae3053bf5f50c2a9cfe1226734f489c4d1a777a346f9bac398cd0ed95e858026",
+ "stage1_markdown_sha256": "201cf308901f8b8f7da8b50dbfaabb714a27e976e9555ec949e55ab0f8e13f45",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a page from an annual report. Use only what the text states. Use null when the text does not state a value.\n\n---\n# NVIDIA Corporation and Subsidiaries \n## Notes to the Consolidated Financial Statements \n(Continued)\n\nA reconciliation of segment operating income to consolidated income before income tax for fiscal years 2026, 2025, and 2024 were as follows:\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\"></th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Segment operating income</td>\n <td>$ 139,297</td>\n <td>$ 87,960</td>\n <td>$ 37,862</td>\n </tr>\n <tr>\n <td>Stock-based compensation expense</td>\n <td>(6,386)</td>\n <td>(4,737)</td>\n <td>(3,549)</td>\n </tr>\n <tr>\n <td>Unallocated operating expenses</td>\n <td>(1,997)</td>\n <td>(1,171)</td>\n <td>(728)</td>\n </tr>\n <tr>\n <td>Acquisition-related and other costs</td>\n <td>(527)</td>\n <td>(599)</td>\n <td>(613)</td>\n </tr>\n <tr>\n <td>Interest income</td>\n <td>2,300</td>\n <td>1,786</td>\n <td>866</td>\n </tr>\n <tr>\n <td>Interest expense</td>\n <td>(259)</td>\n <td>(247)</td>\n <td>(257)</td>\n </tr>\n <tr>\n <td>Other income, net</td>\n <td>9,022</td>\n <td>1,034</td>\n <td>237</td>\n </tr>\n <tr>\n <td>Consolidated income before income tax</td>\n <td>$ 141,450</td>\n <td>$ 84,026</td>\n <td>$ 33,818</td>\n </tr>\n </tbody>\n</table>\n\nRevenue by geographic area is based upon the location of the customers’ headquarters. The end customer and shipping location may be different from our customers’ headquarters location.\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\">Geographic Revenue based upon Customer Headquarters Location (1):</th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>United States</td>\n <td>$ 149,617</td>\n <td>$ 77,482</td>\n <td>$ 31,533</td>\n </tr>\n <tr>\n <td>Taiwan (2)</td>\n <td>42,345</td>\n <td>23,600</td>\n <td>14,912</td>\n </tr>\n <tr>\n <td>China (including Hong Kong)</td>\n <td>19,677</td>\n <td>25,048</td>\n <td>12,330</td>\n </tr>\n <tr>\n <td>Other</td>\n <td>4,299</td>\n <td>4,367</td>\n <td>2,147</td>\n </tr>\n <tr>\n <td>Total revenue</td>\n <td>$ 215,938</td>\n <td>$ 130,497</td>\n <td>$ 60,922</td>\n </tr>\n </tbody>\n</table>\n\n(1) In the third quarter of fiscal year 2026, we changed to revenue based upon the location of our customers’ headquarters as we believe it provides a better representation of the geographic profile of our revenue. Prior period information has been recast to reflect this change.\n\n(2) In fiscal year 2026, we estimate 76% of Data Center revenue from Taiwan-headquartered customers was attributed to end customers based in the United States and Europe.\n\nRevenue from sales to customers headquartered outside of the United States accounted for 31%, 41%, and 48% of total revenue for fiscal years 2026, 2025, and 2024, respectively. The increase in revenue to the United States for fiscal years 2026 and 2025 was primarily due to higher U.S.-based Compute & Networking segment demand.\n\nWe refer to customers who purchase products directly from NVIDIA as direct customers, such as AIBs, distributors, ODMs, OEMs, CSPs, AI model makers, and system integrators. Certain direct customers may use either internal resources or third-party system integrators to complete their build. We refer to indirect customers as those who purchase products through our direct customers; indirect customers include CSPs, Neocloud builders, AI model makers, enterprises, and public sector entities. Our revenue is concentrated among a limited number of direct and indirect customers and this trend may continue.\n\n**Direct Customers** – For fiscal year 2026, sales to one direct customer represented 22% of total revenue and sales to another direct customer represented 14% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2025, sales to one direct customer represented 12% of total revenue and sales to two direct customers each represented 11% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2024, sales to one direct customer represented 13% of total revenue, and were primarily attributable to the Compute & Networking segment.\n\n78"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "nvidia_segment",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "line_item": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line_item",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ }
+ },
+ "required": [
+ "unit",
+ "rows"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:00 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "117",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-1e95-7f83-9a39-844ba0ab4cb2",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1701",
+ "x-sie-units-output-tokens": "424",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-1e95-7f83-9a39-844ba0ab4cb2"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{ \"rows\": [ { \"fy2024\": 37862, \"fy2025\": 87960, \"fy2026\": 139297, \"line_item\": \"Segment operating income\" }, { \"fy2024\": -3549, \"fy2025\": -4737, \"fy2026\": -6386, \"line_item\": \"Stock-based compensation expense\" }, { \"fy2024\": -728, \"fy2025\": -1171, \"fy2026\": -1997, \"line_item\": \"Unallocated operating expenses\" }, { \"fy2024\": -613, \"fy2025\": -599, \"fy2026\": -527, \"line_item\": \"Acquisition-related and other costs\" }, { \"fy2024\": 866, \"fy2025\": 1786, \"fy2026\": 2300, \"line_item\": \"Interest income\" }, { \"fy2024\": -257, \"fy2025\": -247, \"fy2026\": -259, \"line_item\": \"Interest expense\" }, { \"fy2024\": 237, \"fy2025\": 1034, \"fy2026\": 9022, \"line_item\": \"Other income, net\" }, { \"fy2024\": 33818, \"fy2025\": 84026, \"fy2026\": 141450, \"line_item\": \"Consolidated income before income tax\" } ], \"unit\": \"millions\" }",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528140,
+ "id": "chatcmpl-01a0a830-1e95-7f83-9a39-844ba0ab4cb2",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 424,
+ "credits_charged": 117,
+ "prompt_tokens": 1701,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2125
+ }
+ }
+ }
+ },
+ {
+ "slug": "nvidia-annual-report-p78__geographic-revenue__stage2__primary",
+ "document": "nvidia-annual-report-p78",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 23.4961
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "1b6ffec4bad36b92e1c584169af44a61feaa845977a9450d5b4ab18f76e2502d",
+ "stage1_markdown_sha256": "201cf308901f8b8f7da8b50dbfaabb714a27e976e9555ec949e55ab0f8e13f45",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a page from an annual report. Use only what the text states. Use null when the text does not state a value.\n\n---\n# NVIDIA Corporation and Subsidiaries \n## Notes to the Consolidated Financial Statements \n(Continued)\n\nA reconciliation of segment operating income to consolidated income before income tax for fiscal years 2026, 2025, and 2024 were as follows:\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\"></th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Segment operating income</td>\n <td>$ 139,297</td>\n <td>$ 87,960</td>\n <td>$ 37,862</td>\n </tr>\n <tr>\n <td>Stock-based compensation expense</td>\n <td>(6,386)</td>\n <td>(4,737)</td>\n <td>(3,549)</td>\n </tr>\n <tr>\n <td>Unallocated operating expenses</td>\n <td>(1,997)</td>\n <td>(1,171)</td>\n <td>(728)</td>\n </tr>\n <tr>\n <td>Acquisition-related and other costs</td>\n <td>(527)</td>\n <td>(599)</td>\n <td>(613)</td>\n </tr>\n <tr>\n <td>Interest income</td>\n <td>2,300</td>\n <td>1,786</td>\n <td>866</td>\n </tr>\n <tr>\n <td>Interest expense</td>\n <td>(259)</td>\n <td>(247)</td>\n <td>(257)</td>\n </tr>\n <tr>\n <td>Other income, net</td>\n <td>9,022</td>\n <td>1,034</td>\n <td>237</td>\n </tr>\n <tr>\n <td>Consolidated income before income tax</td>\n <td>$ 141,450</td>\n <td>$ 84,026</td>\n <td>$ 33,818</td>\n </tr>\n </tbody>\n</table>\n\nRevenue by geographic area is based upon the location of the customers’ headquarters. The end customer and shipping location may be different from our customers’ headquarters location.\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\">Geographic Revenue based upon Customer Headquarters Location (1):</th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>United States</td>\n <td>$ 149,617</td>\n <td>$ 77,482</td>\n <td>$ 31,533</td>\n </tr>\n <tr>\n <td>Taiwan (2)</td>\n <td>42,345</td>\n <td>23,600</td>\n <td>14,912</td>\n </tr>\n <tr>\n <td>China (including Hong Kong)</td>\n <td>19,677</td>\n <td>25,048</td>\n <td>12,330</td>\n </tr>\n <tr>\n <td>Other</td>\n <td>4,299</td>\n <td>4,367</td>\n <td>2,147</td>\n </tr>\n <tr>\n <td>Total revenue</td>\n <td>$ 215,938</td>\n <td>$ 130,497</td>\n <td>$ 60,922</td>\n </tr>\n </tbody>\n</table>\n\n(1) In the third quarter of fiscal year 2026, we changed to revenue based upon the location of our customers’ headquarters as we believe it provides a better representation of the geographic profile of our revenue. Prior period information has been recast to reflect this change.\n\n(2) In fiscal year 2026, we estimate 76% of Data Center revenue from Taiwan-headquartered customers was attributed to end customers based in the United States and Europe.\n\nRevenue from sales to customers headquartered outside of the United States accounted for 31%, 41%, and 48% of total revenue for fiscal years 2026, 2025, and 2024, respectively. The increase in revenue to the United States for fiscal years 2026 and 2025 was primarily due to higher U.S.-based Compute & Networking segment demand.\n\nWe refer to customers who purchase products directly from NVIDIA as direct customers, such as AIBs, distributors, ODMs, OEMs, CSPs, AI model makers, and system integrators. Certain direct customers may use either internal resources or third-party system integrators to complete their build. We refer to indirect customers as those who purchase products through our direct customers; indirect customers include CSPs, Neocloud builders, AI model makers, enterprises, and public sector entities. Our revenue is concentrated among a limited number of direct and indirect customers and this trend may continue.\n\n**Direct Customers** – For fiscal year 2026, sales to one direct customer represented 22% of total revenue and sales to another direct customer represented 14% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2025, sales to one direct customer represented 12% of total revenue and sales to two direct customers each represented 11% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2024, sales to one direct customer represented 13% of total revenue, and were primarily attributable to the Compute & Networking segment.\n\n78"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "nvidia_geographic",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "basis": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "location",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "total_revenue": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "required": [
+ "unit",
+ "basis",
+ "rows",
+ "total_revenue"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:06:38 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "150",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82d-e409-71d3-9508-02b09cb9a099",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1701",
+ "x-sie-units-output-tokens": "371",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82d-e409-71d3-9508-02b09cb9a099"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"basis\": \"NVIDIA Corporation and Subsidiaries Notes to the Consolidated Financial Statements\",\n \"rows\": [\n {\n \"fy2024\": 37862,\n \"fy2025\": 87960,\n \"fy2026\": 139297,\n \"location\": \"United States\"\n },\n {\n \"fy2024\": 14912,\n \"fy2025\": 23600,\n \"fy2026\": 42345,\n \"location\": \"Taiwan\"\n },\n {\n \"fy2024\": 12330,\n \"fy2025\": 25048,\n \"fy2026\": 19677,\n \"location\": \"China (including Hong Kong)\"\n },\n {\n \"fy2024\": 2147,\n \"fy2025\": 4367,\n \"fy2026\": 4299,\n \"location\": \"Other\"\n }\n ]\n, \"total_revenue\": {\n \"fy2024\": 60922,\n \"fy2025\": 130497,\n \"fy2026\": 215938\n }\n , \"unit\": \"In millions\"\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789527998,
+ "id": "chatcmpl-01a0a82d-e409-71d3-9508-02b09cb9a099",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 371,
+ "credits_charged": 150,
+ "prompt_tokens": 1701,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2072
+ }
+ }
+ }
+ },
+ {
+ "slug": "nvidia-annual-report-p78__geographic-revenue__stage2__secondary",
+ "document": "nvidia-annual-report-p78",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 28.6611
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "21260e5aec9091988134a4183bd2fe94e77ea8af86e7c01dc066e3fd3d8ea7f5",
+ "stage1_markdown_sha256": "201cf308901f8b8f7da8b50dbfaabb714a27e976e9555ec949e55ab0f8e13f45",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a page from an annual report. Use only what the text states. Use null when the text does not state a value.\n\n---\n# NVIDIA Corporation and Subsidiaries \n## Notes to the Consolidated Financial Statements \n(Continued)\n\nA reconciliation of segment operating income to consolidated income before income tax for fiscal years 2026, 2025, and 2024 were as follows:\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\"></th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Segment operating income</td>\n <td>$ 139,297</td>\n <td>$ 87,960</td>\n <td>$ 37,862</td>\n </tr>\n <tr>\n <td>Stock-based compensation expense</td>\n <td>(6,386)</td>\n <td>(4,737)</td>\n <td>(3,549)</td>\n </tr>\n <tr>\n <td>Unallocated operating expenses</td>\n <td>(1,997)</td>\n <td>(1,171)</td>\n <td>(728)</td>\n </tr>\n <tr>\n <td>Acquisition-related and other costs</td>\n <td>(527)</td>\n <td>(599)</td>\n <td>(613)</td>\n </tr>\n <tr>\n <td>Interest income</td>\n <td>2,300</td>\n <td>1,786</td>\n <td>866</td>\n </tr>\n <tr>\n <td>Interest expense</td>\n <td>(259)</td>\n <td>(247)</td>\n <td>(257)</td>\n </tr>\n <tr>\n <td>Other income, net</td>\n <td>9,022</td>\n <td>1,034</td>\n <td>237</td>\n </tr>\n <tr>\n <td>Consolidated income before income tax</td>\n <td>$ 141,450</td>\n <td>$ 84,026</td>\n <td>$ 33,818</td>\n </tr>\n </tbody>\n</table>\n\nRevenue by geographic area is based upon the location of the customers’ headquarters. The end customer and shipping location may be different from our customers’ headquarters location.\n\n<table>\n <thead>\n <tr>\n <th rowspan=\"2\">Geographic Revenue based upon Customer Headquarters Location (1):</th>\n <th colspan=\"3\">Year Ended</th>\n </tr>\n <tr>\n <th>Jan 25, 2026</th>\n <th>Jan 26, 2025</th>\n <th>Jan 28, 2024</th>\n </tr>\n <tr>\n <th colspan=\"4\">(In millions)</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>United States</td>\n <td>$ 149,617</td>\n <td>$ 77,482</td>\n <td>$ 31,533</td>\n </tr>\n <tr>\n <td>Taiwan (2)</td>\n <td>42,345</td>\n <td>23,600</td>\n <td>14,912</td>\n </tr>\n <tr>\n <td>China (including Hong Kong)</td>\n <td>19,677</td>\n <td>25,048</td>\n <td>12,330</td>\n </tr>\n <tr>\n <td>Other</td>\n <td>4,299</td>\n <td>4,367</td>\n <td>2,147</td>\n </tr>\n <tr>\n <td>Total revenue</td>\n <td>$ 215,938</td>\n <td>$ 130,497</td>\n <td>$ 60,922</td>\n </tr>\n </tbody>\n</table>\n\n(1) In the third quarter of fiscal year 2026, we changed to revenue based upon the location of our customers’ headquarters as we believe it provides a better representation of the geographic profile of our revenue. Prior period information has been recast to reflect this change.\n\n(2) In fiscal year 2026, we estimate 76% of Data Center revenue from Taiwan-headquartered customers was attributed to end customers based in the United States and Europe.\n\nRevenue from sales to customers headquartered outside of the United States accounted for 31%, 41%, and 48% of total revenue for fiscal years 2026, 2025, and 2024, respectively. The increase in revenue to the United States for fiscal years 2026 and 2025 was primarily due to higher U.S.-based Compute & Networking segment demand.\n\nWe refer to customers who purchase products directly from NVIDIA as direct customers, such as AIBs, distributors, ODMs, OEMs, CSPs, AI model makers, and system integrators. Certain direct customers may use either internal resources or third-party system integrators to complete their build. We refer to indirect customers as those who purchase products through our direct customers; indirect customers include CSPs, Neocloud builders, AI model makers, enterprises, and public sector entities. Our revenue is concentrated among a limited number of direct and indirect customers and this trend may continue.\n\n**Direct Customers** – For fiscal year 2026, sales to one direct customer represented 22% of total revenue and sales to another direct customer represented 14% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2025, sales to one direct customer represented 12% of total revenue and sales to two direct customers each represented 11% of total revenue, all of which were primarily attributable to the Compute & Networking segment.\n\nFor fiscal year 2024, sales to one direct customer represented 13% of total revenue, and were primarily attributable to the Compute & Networking segment.\n\n78"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "nvidia_geographic",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "unit": {
+ "type": "string"
+ },
+ "basis": {
+ "type": "string"
+ },
+ "rows": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "location",
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "total_revenue": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "fy2026": {
+ "type": "integer"
+ },
+ "fy2025": {
+ "type": "integer"
+ },
+ "fy2024": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "fy2026",
+ "fy2025",
+ "fy2024"
+ ]
+ }
+ },
+ "required": [
+ "unit",
+ "basis",
+ "rows",
+ "total_revenue"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:28 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "140",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-6b56-76b0-ae43-162f89fa45bd",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1701",
+ "x-sie-units-output-tokens": "576",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-6b56-76b0-ae43-162f89fa45bd"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{ \"basis\": \"NVIDIA Corporation and Subsidiaries\", \"rows\": [ { \"fy2024\": 37862, \"fy2025\": 87960, \"fy2026\": 139297, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": -3549, \"fy2025\": -4737, \"fy2026\": -6386, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": -728, \"fy2025\": -1171, \"fy2026\": -1997, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": -613, \"fy2025\": -599, \"fy2026\": -527, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": 866, \"fy2025\": 1786, \"fy2026\": 2300, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": -257, \"fy2025\": -247, \"fy2026\": -259, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": 237, \"fy2025\": 1034, \"fy2026\": 9022, \"location\": \"Jan 25, 2026\" }, { \"fy2024\": 33818, \"fy2025\": 84026, \"fy2026\": 141450, \"location\": \"Jan 25, 2026\" } ], \"total_revenue\": { \"fy2024\": 60922, \"fy2025\": 130497, \"fy2026\": 215938 }, \"unit\": \"millions\" }",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528168,
+ "id": "chatcmpl-01a0a830-6b56-76b0-ae43-162f89fa45bd",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 576,
+ "credits_charged": 140,
+ "prompt_tokens": 1701,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2277
+ }
+ }
+ }
+ },
+ {
+ "slug": "receipt-cord-0007__receipt__stage2__primary",
+ "document": "receipt-cord-0007",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 11.3265
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "4d759fb97561de7f65c86116fe9de3c3953570c0cc0b7ae93bece0eaa253011d",
+ "stage1_markdown_sha256": "1bc1e6bfef4b892ff7434da2df9e3d800fd1d841917635ff4c4b7343f2b1fb70",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a till receipt. Use only what the text states. Use null when the text does not state a value.\n\n---\nKupon 15 100,000 \nADD CHICKEN BOX 909 \n\nSubtotal 100,909 \nPBI (10%) 10,091 \n\nTotal 111,000 \n\nCash Rp. 111,000"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "receipt",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "merchant_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "transaction_date": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "subtotal": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tax": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "amount_paid": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "merchant_name",
+ "transaction_date",
+ "line_items",
+ "subtotal",
+ "tax",
+ "total",
+ "amount_paid",
+ "payment_method",
+ "currency"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:07:21 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "21",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82e-bd41-7be2-8a78-e0b3b9858df4",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "115",
+ "x-sie-units-output-tokens": "166",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82e-bd41-7be2-8a78-e0b3b9858df4"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"amount_paid\": \"111,000\",\n \"currency\": \"Rp.\",\n \"line_items\": [\n {\n \"amount\": \"15 100,000\",\n \"description\": \"Kupon\"\n },\n {\n \"amount\": \"909\",\n \"description\": \"ADD CHICKEN BOX\"\n }\n ],\n \"merchant_name\": null,\n \"payment_method\": \"Cash\",\n \"subtotal\": \"100,909\",\n \"tax\": \"10,091\",\n \"total\": \"111,000\"\n ,\n \"transaction_date\": null\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528041,
+ "id": "chatcmpl-01a0a82e-bd41-7be2-8a78-e0b3b9858df4",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 166,
+ "credits_charged": 21,
+ "prompt_tokens": 115,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 281
+ }
+ }
+ }
+ },
+ {
+ "slug": "receipt-cord-0007__receipt__stage2__secondary",
+ "document": "receipt-cord-0007",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 0.6172
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "4b0c81813d4251660b691b45ffa4660f6d6bd49fd8ae5a769983fc9c657488df",
+ "stage1_markdown_sha256": "1bc1e6bfef4b892ff7434da2df9e3d800fd1d841917635ff4c4b7343f2b1fb70",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a till receipt. Use only what the text states. Use null when the text does not state a value.\n\n---\nKupon 15 100,000 \nADD CHICKEN BOX 909 \n\nSubtotal 100,909 \nPBI (10%) 10,091 \n\nTotal 111,000 \n\nCash Rp. 111,000"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "receipt",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "merchant_name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "transaction_date": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "subtotal": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tax": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "amount_paid": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "merchant_name",
+ "transaction_date",
+ "line_items",
+ "subtotal",
+ "tax",
+ "total",
+ "amount_paid",
+ "payment_method",
+ "currency"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:29 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "1",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-db9e-7980-9e0d-fea5a8f2c75a",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1",
+ "x-sie-units-output-tokens": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-db9e-7980-9e0d-fea5a8f2c75a"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "[]",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528169,
+ "id": "chatcmpl-01a0a830-db9e-7980-9e0d-fea5a8f2c75a",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 1,
+ "credits_charged": 1,
+ "prompt_tokens": 1,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2
+ }
+ }
+ }
+ },
+ {
+ "slug": "product-gs1-128-label__label__stage2__primary",
+ "document": "product-gs1-128-label",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 8.2011
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "1c26b1cd414a31c67804f4d3b8a0e717a794500310b373308071d08c0a2b957c",
+ "stage1_markdown_sha256": "1d96d07f940b75299279cdd5c5b1603cc8319120f8edb3a13962d5af69c848fb",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a product label. Use only what the text states. Use null when the text does not state a value.\n\n---\n61622\n\n<table>\n <tr>\n <td>Oatly Oat Drink Barista Edition 1,0<br>6 x 1,0 Lit</td>\n <td>GTIN: 27394376616222<br>BEST BEFORE: 12/02/2024</td>\n </tr>\n</table>\n\n(01)27394376616222(15)240212(10)3043AAG\n\nNights!\n\n\nNote: The image contains various decorative elements and partial text (e.g., \"L.\", \"LIE\", \"AAG\", \"A\", \"“I”, \"!! P!\", \"Nights!\") which appear to be part of a background or watermark design and not part of the main document content. These have been omitted from the Markdown as they do not form part of the structured document content. The barcode is represented as a visual element and not transcribed as text."
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "product_label",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "product": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "pack": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "gtin": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "printed_best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date exactly as printed in human-readable text"
+ },
+ "best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date as an ISO 8601 calendar date, YYYY-MM-DD"
+ },
+ "batch": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "internal_code": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "product",
+ "pack",
+ "gtin",
+ "printed_best_before",
+ "best_before",
+ "batch",
+ "internal_code"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:07:30 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "30",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82e-ebac-7c41-95ee-1cc4df5c7171",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "277",
+ "x-sie-units-output-tokens": "126",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82e-ebac-7c41-95ee-1cc4df5c7171"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"batch\": \"3043AAG\",\n \"best_before\": \"2024-02-12\",\n \"gtin\": \"27394376616222\",\n \"internal_code\": \"61622\",\n \"pack\": \"6 x 1,0 Lit\",\n \"printed_best_before\": \"12/02/2024\",\n \"product\": \"Oatly Oat Drink Barista Edition 1,0\"\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528050,
+ "id": "chatcmpl-01a0a82e-ebac-7c41-95ee-1cc4df5c7171",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 126,
+ "credits_charged": 30,
+ "prompt_tokens": 277,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 403
+ }
+ }
+ }
+ },
+ {
+ "slug": "product-gs1-128-label__label__stage2__secondary",
+ "document": "product-gs1-128-label",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 0.5513
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "a5ef96f6e0e02ce60c7b48bbb179ee5083d814700caabb41b45ebb4a84e13e95",
+ "stage1_markdown_sha256": "1d96d07f940b75299279cdd5c5b1603cc8319120f8edb3a13962d5af69c848fb",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a product label. Use only what the text states. Use null when the text does not state a value.\n\n---\n61622\n\n<table>\n <tr>\n <td>Oatly Oat Drink Barista Edition 1,0<br>6 x 1,0 Lit</td>\n <td>GTIN: 27394376616222<br>BEST BEFORE: 12/02/2024</td>\n </tr>\n</table>\n\n(01)27394376616222(15)240212(10)3043AAG\n\nNights!\n\n\nNote: The image contains various decorative elements and partial text (e.g., \"L.\", \"LIE\", \"AAG\", \"A\", \"“I”, \"!! P!\", \"Nights!\") which appear to be part of a background or watermark design and not part of the main document content. These have been omitted from the Markdown as they do not form part of the structured document content. The barcode is represented as a visual element and not transcribed as text."
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "product_label",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "product": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "pack": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "gtin": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "printed_best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date exactly as printed in human-readable text"
+ },
+ "best_before": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "the best-before date as an ISO 8601 calendar date, YYYY-MM-DD"
+ },
+ "batch": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "internal_code": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "product",
+ "pack",
+ "gtin",
+ "printed_best_before",
+ "best_before",
+ "batch",
+ "internal_code"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:30 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "1",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-ddd0-76c2-8ba1-a818a5f2a6e4",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1",
+ "x-sie-units-output-tokens": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-ddd0-76c2-8ba1-a818a5f2a6e4"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "[]",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528170,
+ "id": "chatcmpl-01a0a830-ddd0-76c2-8ba1-a818a5f2a6e4",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 1,
+ "credits_charged": 1,
+ "prompt_tokens": 1,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2
+ }
+ }
+ }
+ },
+ {
+ "slug": "shipping-container__container__stage2__primary",
+ "document": "shipping-container",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 4.175
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "19e3566b950543bc5d2de25f0a8379f67c2680dfc5a4460bcab8e5eda40ac931",
+ "stage1_markdown_sha256": "cbfc9ec4e2fe08b2c6d46efdc2e160e6a974f421fb9c02610917e5baffe13bbb",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a photo of shipping container markings. Use only what the text states. Use null when the text does not state a value.\n\n---\nCCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n\nNote: The image contains a photograph of a train with a green cab, a black locomotive, and a person standing near the cab. The text extracted above represents all visible text on the train and the side of the train. The layout and positioning of text are preserved as closely as possible in the Markdown format. The \"CCLU 7140264\" appears multiple times, indicating it may be a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The numbers and units (KGS, LBS, CUMT, CUFT) are likely weight or volume measurements. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train."
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "container_markings",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "containers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "container_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "iso_type": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "operator": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "container_id",
+ "iso_type",
+ "operator"
+ ]
+ }
+ }
+ },
+ "required": [
+ "containers"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:07:35 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "54",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82f-0ddd-7400-a1ce-e49ddf225c7a",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "692",
+ "x-sie-units-output-tokens": "58",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82f-0ddd-7400-a1ce-e49ddf225c7a"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"containers\": [\n {\n \"container_id\": \"CCLU 7140264\",\n \"iso_type\": \"45G1\",\n \"operator\": null\n }\n ]\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528054,
+ "id": "chatcmpl-01a0a82f-0ddd-7400-a1ce-e49ddf225c7a",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 58,
+ "credits_charged": 54,
+ "prompt_tokens": 692,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 750
+ }
+ }
+ }
+ },
+ {
+ "slug": "shipping-container__container__stage2__secondary",
+ "document": "shipping-container",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 0.4967
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "b5206f013ebf791c4f50e582589ad8691511b31046a84515460c3091f5fbdf24",
+ "stage1_markdown_sha256": "cbfc9ec4e2fe08b2c6d46efdc2e160e6a974f421fb9c02610917e5baffe13bbb",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a photo of shipping container markings. Use only what the text states. Use null when the text does not state a value.\n\n---\nCCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n917693\n45G1\n\n130.480 KGS\n67.200 LBS\n3.990 KGS\n8.800 LBS\n\n26.490 KGS\n58.400 LBS\n76.2 CUMT\n2.690 CUFT\n\nCAUTION\n3H TRAILER\n\nATM\n\nSUPER HEAVY\n\nCCLU 7140264\n\n\nNote: The image contains a photograph of a train with a green cab, a black locomotive, and a person standing near the cab. The text extracted above represents all visible text on the train and the side of the train. The layout and positioning of text are preserved as closely as possible in the Markdown format. The \"CCLU 7140264\" appears multiple times, indicating it may be a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The numbers and units (KGS, LBS, CUMT, CUFT) are likely weight or volume measurements. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"ATM\" and \"SUPER HEAVY\" are likely labels for the train or equipment. The \"CAUTION 3H TRAILER\" is a safety instruction. The \"CCLU 7140264\" is likely a reference or identifier for the train. The \"917693 45G1\" is a reference number or identifier for the train. The \"CCLU 7140264\" is likely a reference or identifier for the train."
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "container_markings",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "containers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "container_id": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "iso_type": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "operator": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "container_id",
+ "iso_type",
+ "operator"
+ ]
+ }
+ }
+ },
+ "required": [
+ "containers"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:30 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "1",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-dfce-7621-9f26-7210c03d1659",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1",
+ "x-sie-units-output-tokens": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-dfce-7621-9f26-7210c03d1659"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "[]",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528170,
+ "id": "chatcmpl-01a0a830-dfce-7621-9f26-7210c03d1659",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 1,
+ "credits_charged": 1,
+ "prompt_tokens": 1,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2
+ }
+ }
+ }
+ },
+ {
+ "slug": "milk-factory-control-panel__panel__stage2__primary",
+ "document": "milk-factory-control-panel",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 20.2181
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "66a620bf265f8368d08c3b314e08b49082d57f10f9539968420d551afbfc0146",
+ "stage1_markdown_sha256": "f3701cace5d492b245050241f73f07e51a28680778cc8a4bf85ba2639e9cfcad",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a photo of a machine control panel. Use only what the text states. Use null when the text does not state a value.\n\n---\n# FOGG\n\n## THINK!\n\n## E-STOP RESET\n\n## CONVEYORS ON/OFF\n\n## NO CAP DETECTOR OFF\n\n## NO CAP OFF\n\n## BACKLOG EYE ON\n\n## CAP FEEDER START\n\n## FILLER START\n\n## FILLER SPEED\n\n## UP CLIPPER DOWN\n\n## FILLER JOG\n\n## BOWL UP DOWN\n\n## SPEED MIN MAX\n\n## 53977 h\n\n## 416 34\n\n## red bin\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n##"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "control_panel",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "manufacturer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "controls": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "kind": {
+ "type": "string",
+ "enum": [
+ "button",
+ "switch",
+ "dial",
+ "indicator",
+ "display",
+ "plate",
+ "unknown"
+ ]
+ }
+ },
+ "required": [
+ "label",
+ "kind"
+ ]
+ }
+ }
+ },
+ "required": [
+ "manufacturer",
+ "controls"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:07:55 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "321",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82f-2015-7fc3-96d4-3adafa86a615",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "4146",
+ "x-sie-units-output-tokens": "308",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82f-2015-7fc3-96d4-3adafa86a615"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"controls\": [\n {\n \"kind\": \"button\",\n \"label\": \"E-STOP RESET\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"CONVEYORS ON/OFF\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"NO CAP DETECTOR OFF\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"NO CAP OFF\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"BACKLOG EYE ON\"\n },\n {\n \"kind\": \"button\",\n \"label\": \"CAP FEEDER START\"\n },\n {\n \"kind\": \"button\",\n \"label\": \"FILLER START\"\n },\n {\n \"kind\": \"display\",\n \"label\": \"FILLER SPEED\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"UP CLIPPER DOWN\"\n },\n {\n \"kind\": \"button\",\n \"label\": \"FILLER JOG\"\n },\n {\n \"kind\": \"switch\",\n \"label\": \"BOWL UP DOWN\"\n }\n ],\n \"manufacturer\": \"FOGG\"\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528075,
+ "id": "chatcmpl-01a0a82f-2015-7fc3-96d4-3adafa86a615",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 308,
+ "credits_charged": 321,
+ "prompt_tokens": 4146,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 4454
+ }
+ }
+ }
+ },
+ {
+ "slug": "milk-factory-control-panel__panel__stage2__secondary",
+ "document": "milk-factory-control-panel",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 0.5443
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "8ed6a08ef9ba1a7c345cc4074bfb58191e0dd212984db7af395e11d9b259b919",
+ "stage1_markdown_sha256": "f3701cace5d492b245050241f73f07e51a28680778cc8a4bf85ba2639e9cfcad",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a photo of a machine control panel. Use only what the text states. Use null when the text does not state a value.\n\n---\n# FOGG\n\n## THINK!\n\n## E-STOP RESET\n\n## CONVEYORS ON/OFF\n\n## NO CAP DETECTOR OFF\n\n## NO CAP OFF\n\n## BACKLOG EYE ON\n\n## CAP FEEDER START\n\n## FILLER START\n\n## FILLER SPEED\n\n## UP CLIPPER DOWN\n\n## FILLER JOG\n\n## BOWL UP DOWN\n\n## SPEED MIN MAX\n\n## 53977 h\n\n## 416 34\n\n## red bin\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n## 416 34\n\n## 53977 h\n\n##"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "control_panel",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "manufacturer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "controls": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "kind": {
+ "type": "string",
+ "enum": [
+ "button",
+ "switch",
+ "dial",
+ "indicator",
+ "display",
+ "plate",
+ "unknown"
+ ]
+ }
+ },
+ "required": [
+ "label",
+ "kind"
+ ]
+ }
+ }
+ },
+ "required": [
+ "manufacturer",
+ "controls"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:31 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "1",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-e1c6-7460-b0e4-48b2f605a9cd",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1",
+ "x-sie-units-output-tokens": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-e1c6-7460-b0e4-48b2f605a9cd"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "[]",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528171,
+ "id": "chatcmpl-01a0a830-e1c6-7460-b0e4-48b2f605a9cd",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 1,
+ "credits_charged": 1,
+ "prompt_tokens": 1,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2
+ }
+ }
+ }
+ },
+ {
+ "slug": "invoice-mit-sample__invoice__stage2__primary",
+ "document": "invoice-mit-sample",
+ "stage": 2,
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "model_revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 15.0748
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "99991df0d30b2b90400fab614d85410ae2acaffbb6d286133c36901d7aff4d7e",
+ "stage1_markdown_sha256": "372505c7edb65f969b5a7b163cbf7e42e953b9afac184b01cfa80ccac4dc2e64",
+ "body": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a invoice. Use only what the text states. Use null when the text does not state a value.\n\n---\n# A simple, clean, and responsive HTML invoice template\n\n*Because sometimes, all you need is something simple.*\n\nFind the code on GitHub. Licensed under the MIT license.\n\n---\n\n<div style=\"display: flex; justify-content: space-between; align-items: flex-start;\">\n\n<div style=\"flex: 1;\">\n\n**SPARKSUITE**\n\nSparksuite, Inc. \n12345 Sunny Road \nSunnyville, TX 12345\n\n</div>\n\n<div style=\"flex: 1; text-align: right;\">\n\nInvoice #: 123 \nCreated: January 1, 2023 \nDue: February 1, 2023\n\nAcme Corp. \nJohn Doe \[email protected]\n\n</div>\n\n</div>\n\n<table>\n <thead>\n <tr>\n <th>Payment Method</th>\n <th>Check #</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Check</td>\n <td>1000</td>\n </tr>\n </tbody>\n</table>\n\n<table>\n <thead>\n <tr>\n <th>Item</th>\n <th>Price</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Website design</td>\n <td>$300.00</td>\n </tr>\n <tr>\n <td>Hosting (3 months)</td>\n <td>$75.00</td>\n </tr>\n <tr>\n <td>Domain name (1 year)</td>\n <td>$10.00</td>\n </tr>\n <tr>\n <td colspan=\"2\" style=\"text-align: right;\">Total: $385.00</td>\n </tr>\n </tbody>\n</table>"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "invoice",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "invoice_no": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "due": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "vendor": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "customer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "contact_email": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "check_number": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "invoice_no",
+ "created",
+ "due",
+ "vendor",
+ "customer",
+ "contact_email",
+ "payment_method",
+ "check_number",
+ "line_items",
+ "total",
+ "currency"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:08:11 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "53",
+ "x-sie-execution-identity-sha256": "bf95897e36065187988b85bce514bbe6237d87312d27f8e64c22fae6558db20b",
+ "x-sie-model-revision": "8bd714204e67a1c6c81f84b0dc486b6a6e96e943c42ff488f6b3cbf936e07955",
+ "x-sie-request-id": "01a0a82f-714a-7602-94f2-ca7ddf6c5187",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "499",
+ "x-sie-units-output-tokens": "228",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a82f-714a-7602-94f2-ca7ddf6c5187"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "{\n \"check_number\": \"1000\",\n \"contact_email\": \"[email protected]\",\n \"created\": \"January 1, 2023\",\n \"currency\": \"USD\",\n \"customer\": \"Acme Corp.\",\n \"due\": \"February 1, 2023\",\n \"invoice_no\": \"123\",\n \"line_items\": [\n {\n \"amount\": \"$300.00\",\n \"description\": \"Website design\"\n },\n {\n \"amount\": \"$75.00\",\n \"description\": \"Hosting (3 months)\"\n },\n {\n \"amount\": \"$10.00\",\n \"description\": \"Domain name (1 year)\"\n }\n ],\n \"payment_method\": \"Check\",\n \"total\": \"$385.00\"\n ,\n \"vendor\": \"Sparksuite, Inc.\"\n}",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528091,
+ "id": "chatcmpl-01a0a82f-714a-7602-94f2-ca7ddf6c5187",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_3574fec4ad25145e",
+ "usage": {
+ "completion_tokens": 228,
+ "credits_charged": 53,
+ "prompt_tokens": 499,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 727
+ }
+ }
+ }
+ },
+ {
+ "slug": "invoice-mit-sample__invoice__stage2__secondary",
+ "document": "invoice-mit-sample",
+ "stage": 2,
+ "model": "Qwen/Qwen3.5-4B",
+ "model_revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "server_version": "0.7.3",
+ "status": 200,
+ "attempts": 1,
+ "timing": {
+ "duration_s": 0.4997
+ },
+ "request": {
+ "method": "POST",
+ "endpoint": "https://api.superlinked.com",
+ "path": "/v1/chat/completions",
+ "model": "Qwen/Qwen3.5-4B",
+ "headers": {
+ "Content-Type": "application/json",
+ "Accept": "application/json"
+ },
+ "payload_sha256": "bf5b9ac215228448745e86d92f0e74e728545eabf2f2213cfda2218f2be1691f",
+ "stage1_markdown_sha256": "372505c7edb65f969b5a7b163cbf7e42e953b9afac184b01cfa80ccac4dc2e64",
+ "body": {
+ "model": "Qwen/Qwen3.5-4B",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Fill the schema from this OCR text of a invoice. Use only what the text states. Use null when the text does not state a value.\n\n---\n# A simple, clean, and responsive HTML invoice template\n\n*Because sometimes, all you need is something simple.*\n\nFind the code on GitHub. Licensed under the MIT license.\n\n---\n\n<div style=\"display: flex; justify-content: space-between; align-items: flex-start;\">\n\n<div style=\"flex: 1;\">\n\n**SPARKSUITE**\n\nSparksuite, Inc. \n12345 Sunny Road \nSunnyville, TX 12345\n\n</div>\n\n<div style=\"flex: 1; text-align: right;\">\n\nInvoice #: 123 \nCreated: January 1, 2023 \nDue: February 1, 2023\n\nAcme Corp. \nJohn Doe \[email protected]\n\n</div>\n\n</div>\n\n<table>\n <thead>\n <tr>\n <th>Payment Method</th>\n <th>Check #</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Check</td>\n <td>1000</td>\n </tr>\n </tbody>\n</table>\n\n<table>\n <thead>\n <tr>\n <th>Item</th>\n <th>Price</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Website design</td>\n <td>$300.00</td>\n </tr>\n <tr>\n <td>Hosting (3 months)</td>\n <td>$75.00</td>\n </tr>\n <tr>\n <td>Domain name (1 year)</td>\n <td>$10.00</td>\n </tr>\n <tr>\n <td colspan=\"2\" style=\"text-align: right;\">Total: $385.00</td>\n </tr>\n </tbody>\n</table>"
+ }
+ ],
+ "temperature": 0,
+ "max_tokens": 2048,
+ "response_format": {
+ "type": "json_schema",
+ "json_schema": {
+ "name": "invoice",
+ "strict": true,
+ "schema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "invoice_no": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "due": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "vendor": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "customer": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "contact_email": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "payment_method": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "check_number": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "line_items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "amount": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "description",
+ "amount"
+ ]
+ }
+ },
+ "total": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "invoice_no",
+ "created",
+ "due",
+ "vendor",
+ "customer",
+ "contact_email",
+ "payment_method",
+ "check_number",
+ "line_items",
+ "total",
+ "currency"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "headers": {
+ "date": "Wed, 16 Sep 2026 03:09:31 GMT",
+ "content-type": "application/json",
+ "x-sie-credits-debited": "1",
+ "x-sie-execution-identity-sha256": "0e4e7f088d31b02d6d2fb86318d8fd7e270339fcb49f1546dc42fde367e766fa",
+ "x-sie-model-revision": "270e3ce6d0c13fe580d466db247137efe5c3f99e7b08177bb09f8c5ba2249532",
+ "x-sie-request-id": "01a0a830-e3dd-7ac1-bb10-1c92bb2a749a",
+ "x-sie-server-version": "0.7.3",
+ "x-sie-units-input-tokens": "1",
+ "x-sie-units-output-tokens": "1",
+ "x-sie-version": "0.7.3",
+ "x-sie-worker": "queue:01a0a830-e3dd-7ac1-bb10-1c92bb2a749a"
+ },
+ "body": {
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "content": "[]",
+ "role": "assistant"
+ }
+ }
+ ],
+ "created": 1789528171,
+ "id": "chatcmpl-01a0a830-e3dd-7ac1-bb10-1c92bb2a749a",
+ "model": "Qwen/Qwen3.5-4B",
+ "object": "chat.completion",
+ "system_fingerprint": "fp_4b4af973de2ed3db",
+ "usage": {
+ "completion_tokens": 1,
+ "credits_charged": 1,
+ "prompt_tokens": 1,
+ "rate_book_version": "2026-09-05-production-bootstrap-v4",
+ "total_tokens": 2
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/examples/ocr-two-stage/verified-run/evaluation.json b/examples/ocr-two-stage/verified-run/evaluation.json
new file mode 100644
index 000000000..39c151a39
--- /dev/null
+++ b/examples/ocr-two-stage/verified-run/evaluation.json
@@ -0,0 +1,2593 @@
+{
+ "inputs_sha256": "00e8bc8c721efdb5813fccd5dc9506201a8d09cecc187af3385fe5a431f86887",
+ "documents_registered": 6,
+ "documents_displayed": 3,
+ "stage1": {
+ "model": "lightonai/LightOnOCR-2-1B",
+ "registered_tokens": 86,
+ "tokens_in_text": 81
+ },
+ "stage2_totals": {
+ "primary": {
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "calls": 7,
+ "json_parsed": 7,
+ "schema_valid": 7,
+ "registered_fields": 89,
+ "matched": 78,
+ "verdicts": {
+ "match": 78,
+ "stage2_error": 9,
+ "stage1_lost": 1,
+ "stage1_error": 1
+ }
+ },
+ "secondary": {
+ "model": "Qwen/Qwen3.5-4B",
+ "calls": 7,
+ "json_parsed": 7,
+ "schema_valid": 2,
+ "registered_fields": 89,
+ "matched": 27,
+ "verdicts": {
+ "stage2_error": 16,
+ "match": 27,
+ "stage2_unusable": 46
+ }
+ }
+ },
+ "predictions": [
+ {
+ "index": 0,
+ "text": "At least one of NVIDIA's parenthesised rows comes back with the wrong sign, scored stage2_error.",
+ "short": "A parenthesised row comes back with the wrong sign",
+ "held": false,
+ "evidence": "All 12 parenthesised values came back negative, from -6386 to -257."
+ },
+ {
+ "index": 1,
+ "text": "NVIDIA's `Taiwan (2)` carries its footnote marker into the location field, scored stage2_error.",
+ "short": "A footnote marker rides into a field",
+ "held": false,
+ "evidence": "The page prints Taiwan (2); the field came back Taiwan."
+ },
+ {
+ "index": 2,
+ "text": "The label's best_before comes back 2023-12-02, a US reading of 12/02/2024, against the barcode's 2024-02-12.",
+ "short": "An ambiguous date is read the American way",
+ "held": false,
+ "evidence": "It came back 2024-02-12, taken from the GS1 element string the OCR kept. Scored against both 2023-12-02 as registered and 2024-12-02, which is what a US reading of 12/02/2024 actually gives."
+ },
+ {
+ "index": 3,
+ "text": "Stage 1 loses the blurred receipt header, and stage 2 invents a merchant name or a transaction date rather than returning null.",
+ "short": "An unreadable header comes back as an invented value",
+ "held": false,
+ "evidence": "Stage 1 did lose the header, as predicted. Stage 2 returned null for both fields rather than filling them, and invented nothing anywhere in the set."
+ },
+ {
+ "index": 4,
+ "text": "Across the whole registered set, most fields match.",
+ "short": "Most fields match",
+ "held": true,
+ "evidence": "78 of 89 fields match the printed page."
+ }
+ ],
+ "documents": [
+ {
+ "document": "nvidia-annual-report-p78",
+ "kind": "clean born-digital page",
+ "displayed": true,
+ "image": "nvidia-annual-report-page-166.png",
+ "image_sha256": "19ea06de9cdbd0c643fac69fbae1b53a8d94c769ec9700878b2fd733fadb5ba7",
+ "stage1": {
+ "markdown_chars": 4755,
+ "registered_tokens": 42,
+ "tokens_in_text": 42,
+ "tokens_missing": []
+ },
+ "calls": [
+ {
+ "document": "nvidia-annual-report-p78",
+ "call": "segment-reconciliation",
+ "schema": "nvidia_segment",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "rule": "contains",
+ "expected": "In millions",
+ "path_resolved": true,
+ "returned": "In millions",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2026",
+ "printed": "139,297",
+ "rule": "integer",
+ "expected": 139297,
+ "path_resolved": true,
+ "returned": 139297,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2025",
+ "printed": "87,960",
+ "rule": "integer",
+ "expected": 87960,
+ "path_resolved": true,
+ "returned": 87960,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2024",
+ "printed": "37,862",
+ "rule": "integer",
+ "expected": 37862,
+ "path_resolved": true,
+ "returned": 37862,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2026",
+ "printed": "(6,386)",
+ "rule": "signed_parenthesis",
+ "expected": -6386,
+ "path_resolved": true,
+ "returned": -6386,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2025",
+ "printed": "(4,737)",
+ "rule": "signed_parenthesis",
+ "expected": -4737,
+ "path_resolved": true,
+ "returned": -4737,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2024",
+ "printed": "(3,549)",
+ "rule": "signed_parenthesis",
+ "expected": -3549,
+ "path_resolved": true,
+ "returned": -3549,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2026",
+ "printed": "(1,997)",
+ "rule": "signed_parenthesis",
+ "expected": -1997,
+ "path_resolved": true,
+ "returned": -1997,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2025",
+ "printed": "(1,171)",
+ "rule": "signed_parenthesis",
+ "expected": -1171,
+ "path_resolved": true,
+ "returned": -1171,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2024",
+ "printed": "(728)",
+ "rule": "signed_parenthesis",
+ "expected": -728,
+ "path_resolved": true,
+ "returned": -728,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2026",
+ "printed": "(527)",
+ "rule": "signed_parenthesis",
+ "expected": -527,
+ "path_resolved": true,
+ "returned": -527,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2025",
+ "printed": "(599)",
+ "rule": "signed_parenthesis",
+ "expected": -599,
+ "path_resolved": true,
+ "returned": -599,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2024",
+ "printed": "(613)",
+ "rule": "signed_parenthesis",
+ "expected": -613,
+ "path_resolved": true,
+ "returned": -613,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2026",
+ "printed": "2,300",
+ "rule": "integer",
+ "expected": 2300,
+ "path_resolved": true,
+ "returned": 2300,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2025",
+ "printed": "1,786",
+ "rule": "integer",
+ "expected": 1786,
+ "path_resolved": true,
+ "returned": 1786,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2024",
+ "printed": "866",
+ "rule": "integer",
+ "expected": 866,
+ "path_resolved": true,
+ "returned": 866,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2026",
+ "printed": "(259)",
+ "rule": "signed_parenthesis",
+ "expected": -259,
+ "path_resolved": true,
+ "returned": -259,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2025",
+ "printed": "(247)",
+ "rule": "signed_parenthesis",
+ "expected": -247,
+ "path_resolved": true,
+ "returned": -247,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2024",
+ "printed": "(257)",
+ "rule": "signed_parenthesis",
+ "expected": -257,
+ "path_resolved": true,
+ "returned": -257,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2026",
+ "printed": "9,022",
+ "rule": "integer",
+ "expected": 9022,
+ "path_resolved": true,
+ "returned": 9022,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2025",
+ "printed": "1,034",
+ "rule": "integer",
+ "expected": 1034,
+ "path_resolved": true,
+ "returned": 1034,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2024",
+ "printed": "237",
+ "rule": "integer",
+ "expected": 237,
+ "path_resolved": true,
+ "returned": 237,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2026",
+ "printed": "141,450",
+ "rule": "integer",
+ "expected": 141450,
+ "path_resolved": true,
+ "returned": 141450,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2025",
+ "printed": "84,026",
+ "rule": "integer",
+ "expected": 84026,
+ "path_resolved": true,
+ "returned": 84026,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2024",
+ "printed": "33,818",
+ "rule": "integer",
+ "expected": 33818,
+ "path_resolved": true,
+ "returned": 33818,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "match": 25
+ },
+ "registered_fields": 25,
+ "matched": 25
+ },
+ {
+ "document": "nvidia-annual-report-p78",
+ "call": "segment-reconciliation",
+ "schema": "nvidia_segment",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "rule": "contains",
+ "expected": "In millions",
+ "path_resolved": true,
+ "returned": "millions",
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2026",
+ "printed": "139,297",
+ "rule": "integer",
+ "expected": 139297,
+ "path_resolved": true,
+ "returned": 139297,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2025",
+ "printed": "87,960",
+ "rule": "integer",
+ "expected": 87960,
+ "path_resolved": true,
+ "returned": 87960,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Segment operating income].fy2024",
+ "printed": "37,862",
+ "rule": "integer",
+ "expected": 37862,
+ "path_resolved": true,
+ "returned": 37862,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2026",
+ "printed": "(6,386)",
+ "rule": "signed_parenthesis",
+ "expected": -6386,
+ "path_resolved": true,
+ "returned": -6386,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2025",
+ "printed": "(4,737)",
+ "rule": "signed_parenthesis",
+ "expected": -4737,
+ "path_resolved": true,
+ "returned": -4737,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Stock-based compensation expense].fy2024",
+ "printed": "(3,549)",
+ "rule": "signed_parenthesis",
+ "expected": -3549,
+ "path_resolved": true,
+ "returned": -3549,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2026",
+ "printed": "(1,997)",
+ "rule": "signed_parenthesis",
+ "expected": -1997,
+ "path_resolved": true,
+ "returned": -1997,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2025",
+ "printed": "(1,171)",
+ "rule": "signed_parenthesis",
+ "expected": -1171,
+ "path_resolved": true,
+ "returned": -1171,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Unallocated operating expenses].fy2024",
+ "printed": "(728)",
+ "rule": "signed_parenthesis",
+ "expected": -728,
+ "path_resolved": true,
+ "returned": -728,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2026",
+ "printed": "(527)",
+ "rule": "signed_parenthesis",
+ "expected": -527,
+ "path_resolved": true,
+ "returned": -527,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2025",
+ "printed": "(599)",
+ "rule": "signed_parenthesis",
+ "expected": -599,
+ "path_resolved": true,
+ "returned": -599,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Acquisition-related and other costs].fy2024",
+ "printed": "(613)",
+ "rule": "signed_parenthesis",
+ "expected": -613,
+ "path_resolved": true,
+ "returned": -613,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2026",
+ "printed": "2,300",
+ "rule": "integer",
+ "expected": 2300,
+ "path_resolved": true,
+ "returned": 2300,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2025",
+ "printed": "1,786",
+ "rule": "integer",
+ "expected": 1786,
+ "path_resolved": true,
+ "returned": 1786,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest income].fy2024",
+ "printed": "866",
+ "rule": "integer",
+ "expected": 866,
+ "path_resolved": true,
+ "returned": 866,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2026",
+ "printed": "(259)",
+ "rule": "signed_parenthesis",
+ "expected": -259,
+ "path_resolved": true,
+ "returned": -259,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2025",
+ "printed": "(247)",
+ "rule": "signed_parenthesis",
+ "expected": -247,
+ "path_resolved": true,
+ "returned": -247,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Interest expense].fy2024",
+ "printed": "(257)",
+ "rule": "signed_parenthesis",
+ "expected": -257,
+ "path_resolved": true,
+ "returned": -257,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2026",
+ "printed": "9,022",
+ "rule": "integer",
+ "expected": 9022,
+ "path_resolved": true,
+ "returned": 9022,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2025",
+ "printed": "1,034",
+ "rule": "integer",
+ "expected": 1034,
+ "path_resolved": true,
+ "returned": 1034,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Other income, net].fy2024",
+ "printed": "237",
+ "rule": "integer",
+ "expected": 237,
+ "path_resolved": true,
+ "returned": 237,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2026",
+ "printed": "141,450",
+ "rule": "integer",
+ "expected": 141450,
+ "path_resolved": true,
+ "returned": 141450,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2025",
+ "printed": "84,026",
+ "rule": "integer",
+ "expected": 84026,
+ "path_resolved": true,
+ "returned": 84026,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[line_item=Consolidated income before income tax].fy2024",
+ "printed": "33,818",
+ "rule": "integer",
+ "expected": 33818,
+ "path_resolved": true,
+ "returned": 33818,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "stage2_error": 1,
+ "match": 24
+ },
+ "registered_fields": 25,
+ "matched": 24
+ },
+ {
+ "document": "nvidia-annual-report-p78",
+ "call": "geographic-revenue",
+ "schema": "nvidia_geographic",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "rule": "contains",
+ "expected": "In millions",
+ "path_resolved": true,
+ "returned": "In millions",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "basis",
+ "printed": "Revenue by geographic area is based upon the location of the customers' headquarters.",
+ "rule": "contains",
+ "expected": "headquarters",
+ "path_resolved": true,
+ "returned": "NVIDIA Corporation and Subsidiaries Notes to the Consolidated Financial Statements",
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2026",
+ "printed": "149,617",
+ "rule": "integer",
+ "expected": 149617,
+ "path_resolved": true,
+ "returned": 139297,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2025",
+ "printed": "77,482",
+ "rule": "integer",
+ "expected": 77482,
+ "path_resolved": true,
+ "returned": 87960,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2024",
+ "printed": "31,533",
+ "rule": "integer",
+ "expected": 31533,
+ "path_resolved": true,
+ "returned": 37862,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Taiwan].location",
+ "printed": "Taiwan (2)",
+ "rule": "strip_footnote_marker",
+ "expected": "Taiwan",
+ "path_resolved": true,
+ "returned": "Taiwan",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2026",
+ "printed": "42,345",
+ "rule": "integer",
+ "expected": 42345,
+ "path_resolved": true,
+ "returned": 42345,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2025",
+ "printed": "23,600",
+ "rule": "integer",
+ "expected": 23600,
+ "path_resolved": true,
+ "returned": 23600,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2024",
+ "printed": "14,912",
+ "rule": "integer",
+ "expected": 14912,
+ "path_resolved": true,
+ "returned": 14912,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2026",
+ "printed": "19,677",
+ "rule": "integer",
+ "expected": 19677,
+ "path_resolved": true,
+ "returned": 19677,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2025",
+ "printed": "25,048",
+ "rule": "integer",
+ "expected": 25048,
+ "path_resolved": true,
+ "returned": 25048,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2024",
+ "printed": "12,330",
+ "rule": "integer",
+ "expected": 12330,
+ "path_resolved": true,
+ "returned": 12330,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Other].fy2026",
+ "printed": "4,299",
+ "rule": "integer",
+ "expected": 4299,
+ "path_resolved": true,
+ "returned": 4299,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Other].fy2025",
+ "printed": "4,367",
+ "rule": "integer",
+ "expected": 4367,
+ "path_resolved": true,
+ "returned": 4367,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "rows[location=Other].fy2024",
+ "printed": "2,147",
+ "rule": "integer",
+ "expected": 2147,
+ "path_resolved": true,
+ "returned": 2147,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total_revenue.fy2026",
+ "printed": "215,938",
+ "rule": "integer",
+ "expected": 215938,
+ "path_resolved": true,
+ "returned": 215938,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total_revenue.fy2025",
+ "printed": "130,497",
+ "rule": "integer",
+ "expected": 130497,
+ "path_resolved": true,
+ "returned": 130497,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total_revenue.fy2024",
+ "printed": "60,922",
+ "rule": "integer",
+ "expected": 60922,
+ "path_resolved": true,
+ "returned": 60922,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "match": 14,
+ "stage2_error": 4
+ },
+ "registered_fields": 18,
+ "matched": 14
+ },
+ {
+ "document": "nvidia-annual-report-p78",
+ "call": "geographic-revenue",
+ "schema": "nvidia_geographic",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "unit",
+ "printed": "(In millions)",
+ "rule": "contains",
+ "expected": "In millions",
+ "path_resolved": true,
+ "returned": "millions",
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "basis",
+ "printed": "Revenue by geographic area is based upon the location of the customers' headquarters.",
+ "rule": "contains",
+ "expected": "headquarters",
+ "path_resolved": true,
+ "returned": "NVIDIA Corporation and Subsidiaries",
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2026",
+ "printed": "149,617",
+ "rule": "integer",
+ "expected": 149617,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2025",
+ "printed": "77,482",
+ "rule": "integer",
+ "expected": 77482,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=United States].fy2024",
+ "printed": "31,533",
+ "rule": "integer",
+ "expected": 31533,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Taiwan].location",
+ "printed": "Taiwan (2)",
+ "rule": "strip_footnote_marker",
+ "expected": "Taiwan",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2026",
+ "printed": "42,345",
+ "rule": "integer",
+ "expected": 42345,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2025",
+ "printed": "23,600",
+ "rule": "integer",
+ "expected": 23600,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Taiwan].fy2024",
+ "printed": "14,912",
+ "rule": "integer",
+ "expected": 14912,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2026",
+ "printed": "19,677",
+ "rule": "integer",
+ "expected": 19677,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2025",
+ "printed": "25,048",
+ "rule": "integer",
+ "expected": 25048,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=China (including Hong Kong)].fy2024",
+ "printed": "12,330",
+ "rule": "integer",
+ "expected": 12330,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Other].fy2026",
+ "printed": "4,299",
+ "rule": "integer",
+ "expected": 4299,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Other].fy2025",
+ "printed": "4,367",
+ "rule": "integer",
+ "expected": 4367,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "rows[location=Other].fy2024",
+ "printed": "2,147",
+ "rule": "integer",
+ "expected": 2147,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "total_revenue.fy2026",
+ "printed": "215,938",
+ "rule": "integer",
+ "expected": 215938,
+ "path_resolved": true,
+ "returned": 215938,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total_revenue.fy2025",
+ "printed": "130,497",
+ "rule": "integer",
+ "expected": 130497,
+ "path_resolved": true,
+ "returned": 130497,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total_revenue.fy2024",
+ "printed": "60,922",
+ "rule": "integer",
+ "expected": 60922,
+ "path_resolved": true,
+ "returned": 60922,
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "stage2_error": 15,
+ "match": 3
+ },
+ "registered_fields": 18,
+ "matched": 3
+ }
+ ]
+ },
+ {
+ "document": "receipt-cord-0007",
+ "kind": "degraded thermal receipt",
+ "displayed": true,
+ "image": "receipt-cord-0007.jpg",
+ "image_sha256": "15494cb391bd72c057e2ca8eea9ddc4942ce0df001b1d7d3acea51053e2ce052",
+ "stage1": {
+ "markdown_chars": 114,
+ "registered_tokens": 8,
+ "tokens_in_text": 7,
+ "tokens_missing": [
+ "Rp.111,000"
+ ]
+ },
+ "calls": [
+ {
+ "document": "receipt-cord-0007",
+ "call": "receipt",
+ "schema": "receipt",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "merchant_name",
+ "printed": null,
+ "rule": "absent",
+ "expected": null,
+ "path_resolved": true,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "match"
+ },
+ {
+ "path": "transaction_date",
+ "printed": null,
+ "rule": "absent",
+ "expected": null,
+ "path_resolved": true,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "match"
+ },
+ {
+ "path": "line_items[description=Kupon 15].amount",
+ "printed": "100,000",
+ "rule": "any_of",
+ "expected": [
+ "100,000",
+ "100000"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "line_items[description=ADD CHICKEN BOX].amount",
+ "printed": "909",
+ "rule": "any_of",
+ "expected": [
+ "909"
+ ],
+ "path_resolved": true,
+ "returned": "909",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "subtotal",
+ "printed": "100,909",
+ "rule": "any_of",
+ "expected": [
+ "100,909",
+ "100909"
+ ],
+ "path_resolved": true,
+ "returned": "100,909",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "tax",
+ "printed": "10,091",
+ "rule": "any_of",
+ "expected": [
+ "10,091",
+ "10091"
+ ],
+ "path_resolved": true,
+ "returned": "10,091",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total",
+ "printed": "111,000",
+ "rule": "any_of",
+ "expected": [
+ "111,000",
+ "111000"
+ ],
+ "path_resolved": true,
+ "returned": "111,000",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "amount_paid",
+ "printed": "Rp.111,000",
+ "rule": "any_of",
+ "expected": [
+ "111,000",
+ "111000",
+ "Rp.111,000",
+ "Rp. 111,000",
+ "Rp 111,000"
+ ],
+ "path_resolved": true,
+ "returned": "111,000",
+ "printed_token_in_stage1_text": false,
+ "verdict": "match"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Cash",
+ "rule": "any_of",
+ "expected": [
+ "Cash",
+ "cash"
+ ],
+ "path_resolved": true,
+ "returned": "Cash",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "currency",
+ "printed": "Rp.",
+ "rule": "any_of",
+ "expected": [
+ "IDR",
+ "Rp",
+ "Rp.",
+ "Indonesian rupiah"
+ ],
+ "path_resolved": true,
+ "returned": "Rp.",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "match": 9,
+ "stage2_error": 1
+ },
+ "registered_fields": 10,
+ "matched": 9
+ },
+ {
+ "document": "receipt-cord-0007",
+ "call": "receipt",
+ "schema": "receipt",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": false,
+ "schema_errors": [
+ "$: expected object, got list"
+ ],
+ "fields": [
+ {
+ "path": "merchant_name",
+ "printed": null,
+ "rule": "absent",
+ "expected": null,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "transaction_date",
+ "printed": null,
+ "rule": "absent",
+ "expected": null,
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "line_items[description=Kupon 15].amount",
+ "printed": "100,000",
+ "rule": "any_of",
+ "expected": [
+ "100,000",
+ "100000"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "line_items[description=ADD CHICKEN BOX].amount",
+ "printed": "909",
+ "rule": "any_of",
+ "expected": [
+ "909"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "subtotal",
+ "printed": "100,909",
+ "rule": "any_of",
+ "expected": [
+ "100,909",
+ "100909"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "tax",
+ "printed": "10,091",
+ "rule": "any_of",
+ "expected": [
+ "10,091",
+ "10091"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "total",
+ "printed": "111,000",
+ "rule": "any_of",
+ "expected": [
+ "111,000",
+ "111000"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "amount_paid",
+ "printed": "Rp.111,000",
+ "rule": "any_of",
+ "expected": [
+ "111,000",
+ "111000",
+ "Rp.111,000",
+ "Rp. 111,000",
+ "Rp 111,000"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Cash",
+ "rule": "any_of",
+ "expected": [
+ "Cash",
+ "cash"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "currency",
+ "printed": "Rp.",
+ "rule": "any_of",
+ "expected": [
+ "IDR",
+ "Rp",
+ "Rp.",
+ "Indonesian rupiah"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ }
+ ],
+ "counts": {
+ "stage2_unusable": 10
+ },
+ "registered_fields": 10,
+ "matched": 0
+ }
+ ]
+ },
+ {
+ "document": "product-gs1-128-label",
+ "kind": "photographed printed label",
+ "displayed": true,
+ "image": "product-gs1-128-barcode.jpg",
+ "image_sha256": "1412e09c45718f67c50cff437cb831262b30eedfc7df611492c768bd8c007f24",
+ "stage1": {
+ "markdown_chars": 625,
+ "registered_tokens": 7,
+ "tokens_in_text": 7,
+ "tokens_missing": []
+ },
+ "calls": [
+ {
+ "document": "product-gs1-128-label",
+ "call": "label",
+ "schema": "product_label",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "product",
+ "printed": "Oatly Oat Drink Barista Edition 1,0",
+ "rule": "verbatim",
+ "expected": "Oatly Oat Drink Barista Edition 1,0",
+ "path_resolved": true,
+ "returned": "Oatly Oat Drink Barista Edition 1,0",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "pack",
+ "printed": "6 x 1,0 Lit",
+ "rule": "any_of",
+ "expected": [
+ "6 x 1,0 Lit",
+ "6 x 1,0 L",
+ "6 x 1,0 Lit."
+ ],
+ "path_resolved": true,
+ "returned": "6 x 1,0 Lit",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "gtin",
+ "printed": "27394376616222",
+ "rule": "verbatim",
+ "expected": "27394376616222",
+ "path_resolved": true,
+ "returned": "27394376616222",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "printed_best_before",
+ "printed": "12/02/2024",
+ "rule": "verbatim",
+ "expected": "12/02/2024",
+ "path_resolved": true,
+ "returned": "12/02/2024",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "best_before",
+ "printed": "240212",
+ "rule": "gs1_element_string",
+ "expected": "2024-02-12",
+ "path_resolved": true,
+ "returned": "2024-02-12",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "batch",
+ "printed": "3043AAG",
+ "rule": "verbatim",
+ "expected": "3043AAG",
+ "path_resolved": true,
+ "returned": "3043AAG",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "internal_code",
+ "printed": "61622",
+ "rule": "verbatim",
+ "expected": "61622",
+ "path_resolved": true,
+ "returned": "61622",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "match": 7
+ },
+ "registered_fields": 7,
+ "matched": 7
+ },
+ {
+ "document": "product-gs1-128-label",
+ "call": "label",
+ "schema": "product_label",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": false,
+ "schema_errors": [
+ "$: expected object, got list"
+ ],
+ "fields": [
+ {
+ "path": "product",
+ "printed": "Oatly Oat Drink Barista Edition 1,0",
+ "rule": "verbatim",
+ "expected": "Oatly Oat Drink Barista Edition 1,0",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "pack",
+ "printed": "6 x 1,0 Lit",
+ "rule": "any_of",
+ "expected": [
+ "6 x 1,0 Lit",
+ "6 x 1,0 L",
+ "6 x 1,0 Lit."
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "gtin",
+ "printed": "27394376616222",
+ "rule": "verbatim",
+ "expected": "27394376616222",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "printed_best_before",
+ "printed": "12/02/2024",
+ "rule": "verbatim",
+ "expected": "12/02/2024",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "best_before",
+ "printed": "240212",
+ "rule": "gs1_element_string",
+ "expected": "2024-02-12",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "batch",
+ "printed": "3043AAG",
+ "rule": "verbatim",
+ "expected": "3043AAG",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "internal_code",
+ "printed": "61622",
+ "rule": "verbatim",
+ "expected": "61622",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ }
+ ],
+ "counts": {
+ "stage2_unusable": 7
+ },
+ "registered_fields": 7,
+ "matched": 0
+ }
+ ]
+ },
+ {
+ "document": "shipping-container",
+ "kind": "photographed container in a yard",
+ "displayed": false,
+ "image": "shipping-container-cclu-714026-4.jpg",
+ "image_sha256": "5f77054ff6e07381ed4535e8642a94e26d9b63f03e4093919f5f7f64d47abdf0",
+ "stage1": {
+ "markdown_chars": 1753,
+ "registered_tokens": 3,
+ "tokens_in_text": 1,
+ "tokens_missing": [
+ "CCLU 71 40 26 4",
+ "CHINA SHIPPING"
+ ]
+ },
+ "calls": [
+ {
+ "document": "shipping-container",
+ "call": "container",
+ "schema": "container_markings",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "containers[*].container_id",
+ "printed": "CCLU 71 40 26 4",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CCLU7140264"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "CCLU 7140264"
+ ],
+ "printed_token_in_stage1_text": false,
+ "verdict": "match"
+ },
+ {
+ "path": "containers[*].iso_type",
+ "printed": "45G1",
+ "rule": "any_of_in_list",
+ "expected": [
+ "45G1"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "45G1"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "containers[*].operator",
+ "printed": "CHINA SHIPPING",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CHINA SHIPPING",
+ "China Shipping"
+ ],
+ "path_resolved": true,
+ "returned": [
+ null
+ ],
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage1_lost"
+ }
+ ],
+ "counts": {
+ "match": 2,
+ "stage1_lost": 1
+ },
+ "registered_fields": 3,
+ "matched": 2
+ },
+ {
+ "document": "shipping-container",
+ "call": "container",
+ "schema": "container_markings",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": false,
+ "schema_errors": [
+ "$: expected object, got list"
+ ],
+ "fields": [
+ {
+ "path": "containers[*].container_id",
+ "printed": "CCLU 71 40 26 4",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CCLU7140264"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "containers[*].iso_type",
+ "printed": "45G1",
+ "rule": "any_of_in_list",
+ "expected": [
+ "45G1"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "containers[*].operator",
+ "printed": "CHINA SHIPPING",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CHINA SHIPPING",
+ "China Shipping"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ }
+ ],
+ "counts": {
+ "stage2_unusable": 3
+ },
+ "registered_fields": 3,
+ "matched": 0
+ }
+ ]
+ },
+ {
+ "document": "milk-factory-control-panel",
+ "kind": "photographed industrial control panel",
+ "displayed": false,
+ "image": "milk-factory-control-panel.jpg",
+ "image_sha256": "45b70a17a302e72cb37f1bf4cb2505cd9f7a940e77885750a537d998f6bce3ac",
+ "stage1": {
+ "markdown_chars": 5372,
+ "registered_tokens": 13,
+ "tokens_in_text": 11,
+ "tokens_missing": [
+ "BOWL UP/DOWN",
+ "CAPPER UP/DOWN"
+ ]
+ },
+ "calls": [
+ {
+ "document": "milk-factory-control-panel",
+ "call": "panel",
+ "schema": "control_panel",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "manufacturer",
+ "printed": "FOGG",
+ "rule": "any_of",
+ "expected": [
+ "FOGG"
+ ],
+ "path_resolved": true,
+ "returned": "FOGG",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "E-STOP RESET",
+ "rule": "any_of_in_list",
+ "expected": [
+ "E-STOP RESET"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CONVEYORS ON/OFF",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CONVEYORS ON/OFF",
+ "CONVEYORS"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP DETECTOR",
+ "rule": "any_of_in_list",
+ "expected": [
+ "NO CAP DETECTOR"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP",
+ "rule": "any_of_in_list",
+ "expected": [
+ "NO CAP"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BACKLOG EYE",
+ "rule": "any_of_in_list",
+ "expected": [
+ "BACKLOG EYE"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAP FEEDER START",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CAP FEEDER START"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER START",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER START"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER SPEED",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER SPEED"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAPPER UP/DOWN",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CAPPER UP/DOWN",
+ "CAPPER UP DOWN",
+ "UP CAPPER DOWN"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage1_error"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER JOG",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER JOG"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BOWL UP/DOWN",
+ "rule": "any_of_in_list",
+ "expected": [
+ "BOWL UP/DOWN",
+ "BOWL UP DOWN",
+ "UP BOWL DOWN"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": false,
+ "verdict": "match"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "SPEED",
+ "rule": "any_of_in_list",
+ "expected": [
+ "SPEED"
+ ],
+ "path_resolved": true,
+ "returned": [
+ "E-STOP RESET",
+ "CONVEYORS ON/OFF",
+ "NO CAP DETECTOR OFF",
+ "NO CAP OFF",
+ "BACKLOG EYE ON",
+ "CAP FEEDER START",
+ "FILLER START",
+ "FILLER SPEED",
+ "UP CLIPPER DOWN",
+ "FILLER JOG",
+ "BOWL UP DOWN"
+ ],
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_error"
+ }
+ ],
+ "counts": {
+ "match": 8,
+ "stage2_error": 4,
+ "stage1_error": 1
+ },
+ "registered_fields": 13,
+ "matched": 8
+ },
+ {
+ "document": "milk-factory-control-panel",
+ "call": "panel",
+ "schema": "control_panel",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": false,
+ "schema_errors": [
+ "$: expected object, got list"
+ ],
+ "fields": [
+ {
+ "path": "manufacturer",
+ "printed": "FOGG",
+ "rule": "any_of",
+ "expected": [
+ "FOGG"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "E-STOP RESET",
+ "rule": "any_of_in_list",
+ "expected": [
+ "E-STOP RESET"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CONVEYORS ON/OFF",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CONVEYORS ON/OFF",
+ "CONVEYORS"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP DETECTOR",
+ "rule": "any_of_in_list",
+ "expected": [
+ "NO CAP DETECTOR"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "NO CAP",
+ "rule": "any_of_in_list",
+ "expected": [
+ "NO CAP"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BACKLOG EYE",
+ "rule": "any_of_in_list",
+ "expected": [
+ "BACKLOG EYE"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAP FEEDER START",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CAP FEEDER START"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER START",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER START"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER SPEED",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER SPEED"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "CAPPER UP/DOWN",
+ "rule": "any_of_in_list",
+ "expected": [
+ "CAPPER UP/DOWN",
+ "CAPPER UP DOWN",
+ "UP CAPPER DOWN"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "FILLER JOG",
+ "rule": "any_of_in_list",
+ "expected": [
+ "FILLER JOG"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "BOWL UP/DOWN",
+ "rule": "any_of_in_list",
+ "expected": [
+ "BOWL UP/DOWN",
+ "BOWL UP DOWN",
+ "UP BOWL DOWN"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": false,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "controls[*].label",
+ "printed": "SPEED",
+ "rule": "any_of_in_list",
+ "expected": [
+ "SPEED"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ }
+ ],
+ "counts": {
+ "stage2_unusable": 13
+ },
+ "registered_fields": 13,
+ "matched": 0
+ }
+ ]
+ },
+ {
+ "document": "invoice-mit-sample",
+ "kind": "born-digital invoice",
+ "displayed": false,
+ "image": "invoice-mit-sample-page-1.png",
+ "image_sha256": "17322de73e201e8a96ef6c0f6810614806ba89b155f7003eee09da29d5358d8b",
+ "stage1": {
+ "markdown_chars": 1161,
+ "registered_tokens": 13,
+ "tokens_in_text": 13,
+ "tokens_missing": []
+ },
+ "calls": [
+ {
+ "document": "invoice-mit-sample",
+ "call": "invoice",
+ "schema": "invoice",
+ "model_key": "primary",
+ "model": "Qwen/Qwen3.8-27B-FP8",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": true,
+ "schema_errors": [],
+ "fields": [
+ {
+ "path": "invoice_no",
+ "printed": "Invoice #: 123",
+ "rule": "any_of",
+ "expected": [
+ "123"
+ ],
+ "path_resolved": true,
+ "returned": "123",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "created",
+ "printed": "January 1, 2023",
+ "rule": "any_of",
+ "expected": [
+ "January 1, 2023",
+ "2023-01-01"
+ ],
+ "path_resolved": true,
+ "returned": "January 1, 2023",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "due",
+ "printed": "February 1, 2023",
+ "rule": "any_of",
+ "expected": [
+ "February 1, 2023",
+ "2023-02-01"
+ ],
+ "path_resolved": true,
+ "returned": "February 1, 2023",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "vendor",
+ "printed": "Sparksuite, Inc.",
+ "rule": "any_of",
+ "expected": [
+ "Sparksuite, Inc.",
+ "Sparksuite Inc.",
+ "SPARKSUITE"
+ ],
+ "path_resolved": true,
+ "returned": "Sparksuite, Inc.",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "customer",
+ "printed": "Acme Corp.",
+ "rule": "any_of",
+ "expected": [
+ "Acme Corp.",
+ "Acme Corp"
+ ],
+ "path_resolved": true,
+ "returned": "Acme Corp.",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "contact_email",
+ "printed": "[email protected]",
+ "rule": "verbatim",
+ "expected": "[email protected]",
+ "path_resolved": true,
+ "returned": "[email protected]",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Check",
+ "rule": "any_of",
+ "expected": [
+ "Check",
+ "check"
+ ],
+ "path_resolved": true,
+ "returned": "Check",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "check_number",
+ "printed": "1000",
+ "rule": "any_of",
+ "expected": [
+ "1000"
+ ],
+ "path_resolved": true,
+ "returned": "1000",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "line_items[description=Website design].amount",
+ "printed": "$300.00",
+ "rule": "any_of",
+ "expected": [
+ "$300.00",
+ "300.00",
+ "300"
+ ],
+ "path_resolved": true,
+ "returned": "$300.00",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "line_items[description=Hosting (3 months)].amount",
+ "printed": "$75.00",
+ "rule": "any_of",
+ "expected": [
+ "$75.00",
+ "75.00",
+ "75"
+ ],
+ "path_resolved": true,
+ "returned": "$75.00",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "line_items[description=Domain name (1 year)].amount",
+ "printed": "$10.00",
+ "rule": "any_of",
+ "expected": [
+ "$10.00",
+ "10.00",
+ "10"
+ ],
+ "path_resolved": true,
+ "returned": "$10.00",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "total",
+ "printed": "Total: $385.00",
+ "rule": "any_of",
+ "expected": [
+ "$385.00",
+ "385.00",
+ "385"
+ ],
+ "path_resolved": true,
+ "returned": "$385.00",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ },
+ {
+ "path": "currency",
+ "printed": "$",
+ "rule": "any_of",
+ "expected": [
+ "USD",
+ "$"
+ ],
+ "path_resolved": true,
+ "returned": "USD",
+ "printed_token_in_stage1_text": true,
+ "verdict": "match"
+ }
+ ],
+ "counts": {
+ "match": 13
+ },
+ "registered_fields": 13,
+ "matched": 13
+ },
+ {
+ "document": "invoice-mit-sample",
+ "call": "invoice",
+ "schema": "invoice",
+ "model_key": "secondary",
+ "model": "Qwen/Qwen3.5-4B",
+ "json_parsed": true,
+ "parse_error": null,
+ "schema_valid": false,
+ "schema_errors": [
+ "$: expected object, got list"
+ ],
+ "fields": [
+ {
+ "path": "invoice_no",
+ "printed": "Invoice #: 123",
+ "rule": "any_of",
+ "expected": [
+ "123"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "created",
+ "printed": "January 1, 2023",
+ "rule": "any_of",
+ "expected": [
+ "January 1, 2023",
+ "2023-01-01"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "due",
+ "printed": "February 1, 2023",
+ "rule": "any_of",
+ "expected": [
+ "February 1, 2023",
+ "2023-02-01"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "vendor",
+ "printed": "Sparksuite, Inc.",
+ "rule": "any_of",
+ "expected": [
+ "Sparksuite, Inc.",
+ "Sparksuite Inc.",
+ "SPARKSUITE"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "customer",
+ "printed": "Acme Corp.",
+ "rule": "any_of",
+ "expected": [
+ "Acme Corp.",
+ "Acme Corp"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "contact_email",
+ "printed": "[email protected]",
+ "rule": "verbatim",
+ "expected": "[email protected]",
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "payment_method",
+ "printed": "Check",
+ "rule": "any_of",
+ "expected": [
+ "Check",
+ "check"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "check_number",
+ "printed": "1000",
+ "rule": "any_of",
+ "expected": [
+ "1000"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "line_items[description=Website design].amount",
+ "printed": "$300.00",
+ "rule": "any_of",
+ "expected": [
+ "$300.00",
+ "300.00",
+ "300"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "line_items[description=Hosting (3 months)].amount",
+ "printed": "$75.00",
+ "rule": "any_of",
+ "expected": [
+ "$75.00",
+ "75.00",
+ "75"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "line_items[description=Domain name (1 year)].amount",
+ "printed": "$10.00",
+ "rule": "any_of",
+ "expected": [
+ "$10.00",
+ "10.00",
+ "10"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "total",
+ "printed": "Total: $385.00",
+ "rule": "any_of",
+ "expected": [
+ "$385.00",
+ "385.00",
+ "385"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ },
+ {
+ "path": "currency",
+ "printed": "$",
+ "rule": "any_of",
+ "expected": [
+ "USD",
+ "$"
+ ],
+ "path_resolved": false,
+ "returned": null,
+ "printed_token_in_stage1_text": true,
+ "verdict": "stage2_unusable"
+ }
+ ],
+ "counts": {
+ "stage2_unusable": 13
+ },
+ "registered_fields": 13,
+ "matched": 0
+ }
+ ]
+ }
+ ]
+}