Evidence
Every value an extractor returns comes with evidence: the page it was read from, a bounding box on that page, the printed text it was read from, and a confidence. The point is a review screen where a person clicks a value and sees the exact spot on the scan. extraction.evidence is present unless the definition sets output.include_evidence: false.
"evidence": { "invoice_number": { "page": 1, "bbox": [0.71, 0.08, 0.93, 0.10], "source": "Bill No: INV-2026/0912", "confidence": 1.0 }, "admission_date": { "page": 1, "bbox": [0.10, 0.12, 0.90, 0.15], "source": "Admission: 02/11/2026", "confidence": 1.0 }, "line_items[0]": { "page": 1, "bbox": [0.10, 0.30, 0.90, 0.33], "source": null, "confidence": 1.0 }, "line_items[0].amount": { "page": 1, "bbox": [0.10, 0.30, 0.90, 0.33], "source": "25,500.00", "confidence": 1.0 }, "total": { "page": 2, "bbox": [0.62, 0.81, 0.95, 0.84], "source": "Grand Total Rs. 29,800.00", "confidence": 0.85 }, "hospital.gstin": { "page": 1, "bbox": null, "source": "GSTIN 36AAACA1234F1ZP", "confidence": 0.0, "reason": "unverified_source" }, "currency": { "page": null, "bbox": null, "source": null, "confidence": 0.6, "reason": "inferred_from_amounts" }, "subtotal": { "page": null, "bbox": null, "source": null, "confidence": 0.0, "reason": "not_found" }, "discharge_date": { "page": 1, "bbox": [0.10, 0.12, 0.90, 0.15], "source": "Discharge: sometime", "confidence": 0.5, "raw": "sometime" }}Keys are field paths in the same notation rules use: total, hospital.gstin, line_items[0].amount. Every scalar leaf has an entry. Each group row also has an entry of its own (line_items[0]) so a reviewer can highlight a whole line.
Per-field entry
Section titled “Per-field entry”| Field | Type | Meaning |
|---|---|---|
page |
integer | null | 1-based page the value was found on. This is the page where Deskew located the source text, which can differ from the page the model named |
bbox |
number[4] | null | [x0, y0, x1, y1] normalised to 0 to 1 of the page, origin top left, the same convention as blocks[].bbox. null when the text could not be located or the page has no geometry (DOCX, email, text) |
source |
string | null | The printed text the value was read from, as quoted by the model. null on row entries and when nothing was found |
confidence |
number | 0 to 1. 1.0 when the source text was found verbatim in a block on the stated page; 0.85 when found on another page; multiplied by 0.6 when the block has no box; lower for a partial match. 0.0 when not found. Capped at 0.5 when the value could not be normalised |
reason |
string | Only when bbox is null; see Reason codes |
raw |
any | Only when normalisation failed or the pattern did not match: the text the model returned, so nothing is lost |
Row-level entries
Section titled “Row-level entries”A group row’s entry is the union of its members’ boxes on the same page: the smallest rectangle covering every member that had a box, on the page of the first located member. source is null; confidence is the mean of the members’ confidences. Rows whose members all lack a box have no row entry.
Where boxes come from
Section titled “Where boxes come from”The model is asked, for each value, for the page number and the exact text it read the value from. It is not asked for coordinates, and any it might produce would be ignored. Deskew then searches the parsed blocks and tables of that page (the output of the text-layer or OCR pass, the same blocks you get with bbox=true) for that text:
- An exact, whitespace- and case-insensitive substring match in a block on the stated page: confidence
1.0, the block’s box. - The same match on any other page:
0.85, andpageis corrected. - A partial match where at least 60% of the snippet’s words appear in one block: confidence is that fraction, times the page penalty.
- Nothing found:
bbox: null,confidence: 0.0,reason: "unverified_source".
Boxes are therefore as good as the layout pass: exact for PDF text layers, tight for deskew-vl, approximate for deskew-ocr and premium pages (see Engines). A box is always a real block of the page, never an estimate drawn around text the model imagined.
Reason codes
Section titled “Reason codes”reason |
Meaning | What to do |
|---|---|---|
not_found |
The model returned no value and no source. The field is null in data; if it was required, there is also a missing_required flag |
Check the description and aliases; look at whether the value is really on the page |
unverified_source |
The model quoted a source text that Deskew could not find in any block. The value is kept but should be looked at: it may be read from an image region the OCR missed, or it may be invented | Treat as low confidence; show the source to the reviewer |
inferred_from_amounts |
Only on the top-level currency field: the page never named the currency, so it was inferred from the symbols on the money fields (confidence 0.6) |
Fine for most documents; see Money and currency |
Turning evidence off
Section titled “Turning evidence off”Set output.include_evidence: false in the definition to drop the object from results. The locating step still runs, because it feeds page corrections and confidence into flags, but the payload is smaller. There is no per-request switch.