Want to be confident in the Data Extraction Results?
You may want to get the advantage of the Veryfi confidence details for extracted parameters. Please note, that by default this option is not enabled for user accounts, if your use case requires confidence details, please contact support@veryfi.com to enable that.
Once enabled, all you need to do is to add {"confidence_details" : 1} if you are using model v7 or {"confidence_details" : true} for v8 into the API call.

Let's look closer at how to interpret the JSON response including the score:
"total": {
"ocr_score": 1.0,
"score": 0.7478899359703064,
"value": 147.38
},
How to read score:
"ocr_score"
- The probability that value 147.38 is extracted correctly
"score"
- The probability that value 147.38 is "total"
"value"-
147.38
How to interpret score:
"ocr_score": 1.0,
1 = 100%
"score": 0.7478899359703064,
0.747 = 74.7%
The best practice is to flag documents for manual verification if the score is <0.7
Now let's look at the full JSON response sample:
{
"abn_number": {
"ocr_score": 1.0,
"score": 0.6379534006118774,
"value": "11 000 00 111"
},
"account_number": {
"ocr_score": 1.0,
"score": 0.827487051486969,
"value": "123456789"
},
"barcodes": [],
"bill_to_address": {
"ocr_score": 1.0,
"score": 0.30661505460739136,
"value": "COLITO, QLD 1026"
},
"bill_to_email": "",
"bill_to_name": "",
"bill_to_phone_number": "",
"bill_to_reg_number": "",
"card_number": "",
"category": {
"score": 0.9230912253260612,
"value": "Job Supplies"
},
"confidence_details": 1,
"created": "2021-09-14 15:00:22",
"currency_code": {
"score": 0.8220945000648499,
"value": "AUD"
},
"date": {
"ocr_score": 1.0,
"score": 0.9563543796539307,
"value": "2021-09-01 00:00:00"
},
"default_category": {
"score": 0.8785489797592163,
"value": "Job Supplies"
},
"delivery_date": "",
"discount": 0.0,
"document_reference_number": "",
"document_title": {
"ocr_score": 1.0,
"score": 0.9134917855262756,
"value": "TAX INVOICE"
},
"document_type": {
"score": 0.8537775874137878,
"value": "invoice"
},
"due_date": "",
"external_id": "",
"id": 12345678,
"invoice_number": {
"ocr_score": 1.0,
"score": 0.6190307140350342,
"value": "AA9876554342321"
},
"is_blurry": [
0
],
"is_document": 1,
"is_money_in": {
"score": 0.9380742311477661,
"value": 0
},
"order_date": {
"ocr_score": 1.0,
"score": 0.6745195388793945,
"value": "2021-01-01"
},
"payment_display_name": "",
"payment_terms": {
"ocr_score": 1.0,
"score": 0.8886095881462097,
"value": "NET 30"
},
"payment_type": "",
"phone_number": {
"ocr_score": 1.0,
"score": 0.5402393341064453,
"value": "07 9999 9444"
},
"purchase_order_number": {
"ocr_score": 1.0,
"score": 0.8996846079826355,
"value": "SO-I80038"
},
"reference_number": "ABCDE-4360",
"rounding": 0.0,
"service_end_date": "",
"service_start_date": "",
"ship_date": {
"ocr_score": 1.0,
"score": 0.7576338052749634,
"value": "2021-01-09"
},
"shipping": 0.0,
"subtotal": 133.98
"tags": [],
"tax": {
"ocr_score": 1.0,
"score": 0.8270134925842285,
"value": 13.4
},
"tax_lines": [],
"tip": 0.0,
"total": {
"ocr_score": 1.0,
"score": 0.7478899359703064,
"value": 147.38
},
"total_weight": "",
"tracking_number": "",
"updated": "2021-09-14 15:00:25",
"vat_number": "",
"vendor": {
"address": "",
"fax_number": {
"ocr_score": 1.0,
"score": 0.7157164812088013,
"value": "07 9999 9378"
},
"lat": 0.0,
"lng": 0.0,
"name": {
"ocr_score": 1.0,
"score": 0.5528350472450256,
"value": "Melit Technology"
},
"phone_number": {
"ocr_score": 1.0,
"score": 0.5402393341064453,
"value": "07 9999 3444"
},
"raw_name": {
"ocr_score": 1.0,
"score": 0.5528350472450256,
"value": "Melit Technology"
},
"vendor_logo": "https://cdn.veryfi.com/logos/tmp/12345.png",
"vendor_type": {
"score": 0.13089561462402344,
"value": "Car Repair"
}
},
"vendor_account_number": {
"ocr_score": 1.0,
"score": 0.5384502410888672,
"value": "000011111"
},
"vendor_bank_name": "",
"vendor_bank_number": {
"ocr_score": 1.0,
"score": 0.6036428809165955,
"value": "000001"
},
"vendor_bank_swift": "",
"vendor_iban": "",
You may notice that for some fields the system returns the score for some it does not
Below is the explanation of why JSON responses may vary:
1. The system returns both "ocr_score" , "score", "value"
The data extracted from the document and can be found on the document image.
e.g: "date", "invoice_number", "total", etc.
"date": {
"ocr_score": 1.0,
"score": 0.9563543796539307,
"value": "2021-09-01 00:00:00"
},
OR
"total": {
"ocr_score": 1.0,
"score": 0.7478899359703064,
"value": 147.38
},
*Applicable for both v7 and v8
2. The system returns "score"
only
Some fields have only "score" which either means that the value of this field was not extracted from the document but rather inferred from the whole document data.
e.g: "category", "currency_code", "vendor_type", etc.
"default_category": {
"score": 0.8785489797592163,
"value": "Job Supplies"
},
OR
"document_type": {
"score": 0.8537775874137878,
"value": "invoice"
},
*Applicable for both v7 only
Exceptions for v7 :
3. The system returns an empty value and no score
(a) System doesn't return the score for this particular parameter because this field doesn't support confidence scores.
"barcodes": [],
*Please find the full list of supported parameters below.
(b) The system returns an empty value for the parameter that supports confidence scores. In case most likely the data for this parameter was not found in the document by the model.
"due_date": "",
Due_date is missing in the Invoice sample.
4. The system returns the value for the parameter that supports confidence scores but without the score.
"subtotal": 133.98
We may assume that in this case score for “subtotal” could not be returned due to poor image quality or it was not found. In this case, most likely "subtotal" was calculated on the post-processing level.
Exceptions for v8 :
3. The system returns an empty value and no score
(a) System doesn't return the score for this particular parameter because this field doesn't support confidence scores.
"barcodes": [],
*Please find the full list of supported parameters below.
(b) The system returns an empty value for the parameter that supports confidence scores. In case most likely the data for this parameter was not found in the document by the model.
"due_date": "",
Due_date is missing in the Invoice sample.
4. The system returns the value for the parameter that supports confidence scores but without the score.
"total": 133.98
For v8 system will return a value only if the value of this field was not extracted from the document, but was enriched/calculated on the post-processing level.
e.g: the system failed to extract "total" and "total" was calculated on the post-processing level from the document context.
List of the parameters we return scores for:
JSON field | ocr_score/score/value |
id | n/a |
external_id | n/a |
is_duplicate | n/a |
img_url | n/a |
img_file_name | n/a |
img_thumbnail_url | n/a |
document_type | score/value |
document_title | ocr_score/score/value |
category | score/value |
default_category | score/value |
discount | ocr_score/score/value |
date | ocr_score/score/value |
due_date | ocr_score/score/value |
order_date | ocr_score/score/value |
delivery_date | ocr_score/score/value |
ship_date | ocr_score/score/value |
created | n/a |
updated | n/a |
currency_code | score/value |
card_number | ocr_score/score/value |
payment_type | score/value |
payment_terms | ocr_score/score/value |
tracking_number | ocr_score/score/value |
subtotal | ocr_score/score/value |
tax | ocr_score/score/value |
rounding | ocr_score/score/value |
cashback | ocr_score/score/value |
tax_lines { | |
base | n/a |
order | n/a |
name | n/a |
rate | n/a |
total | n/a |
} | |
tip | ocr_score/score/value |
discount | ocr_score/score/value |
shipping | ocr_score/score/value |
total | ocr_score/score/value |
service_start_date | ocr_score/score/value |
service_end_date | ocr_score/score/value |
invoice_number | ocr_score/score/value |
purchase_order_number | ocr_score/score/value |
document_reference_number | ocr_score/score/value |
abn_number | ocr_score/score/value |
bill_to_name | ocr_score/score/value |
bill_to_address | ocr_score/score/value |
bill_to_vat_number | ocr_score/score/value |
"bill_to_reg_number | ocr_score/score/value |
bill_to_email | ocr_score/score/value |
bill_to_phone_number | ocr_score/score/value |
ship_to_name | ocr_score/score/value |
ship_to_address | ocr_score/score/value |
vat_number | ocr_score/score/value |
vendor { | |
name | ocr_score/score/value |
raw_name | ocr_score/score/value |
address | ocr_score/score/value |
lat | n/a |
lng | n/a |
phone_number | ocr_score/score/value |
fax_number | ocr_score/score/value |
web | ocr_score/score/value |
ocr_score/score/value | |
vendor_type | score/value |
vendor_logo | n/a |
category | score/value |
vendor_reg_number | ocr_score/score/value |
} | |
line_items { | |
id | n/a |
order | n/a |
type | score/value |
date | n/a |
full_description | ocr_score/score/value |
description | ocr_score/score/value |
sku | ocr_score/score/value |
price | ocr_score/score/value |
quantity | ocr_score/score/value |
unit_of_measure | ocr_score/score/value |
weight | n/a |
tax_rate | n/a |
tax | n/a |
discount | ocr_score/score/value |
total | ocr_score/score/value |
} | |
vendor_bank_number | ocr_score/score/value |
vendor_bank_swift | ocr_score/score/value |
vendor_account_number | ocr_score/score/value |
vendor_bank_name | ocr_score/score/value |
vendor_iban | ocr_score/score/value |
ocr_text | n/a |
total_weight | ocr_score/score/value |
total_weight_list | score/value |
barcodes | n/a |
incoterms | ocr_score/score/value |
insurance | ocr_score/score/value |
is_document | n/a |
is_money_in | score/value |
notes | n/a |
payment_display_name | n/a |
reference_number | n/a |
updated | n/a |
duplicate_of | n/a |
exch_rate | n/a |
img_blur | n/a |
is_approved | n/a |
is_duplicate | n/a |
terms | ocr_score/score/value |
store_number | ocr_score/score/value |
Have any questions? Please contact us at support@veryfi.com.
Other related Articles:
Document Data Extraction Fields Explained
What Document Types Veryfi Supports
Languages Veryfi OCR API works with