Concepts

Human Review Flags

Human Review Flags

DeepRead flags uncertain extractions with needs_review so you can route only the ambiguous fields/pages to review and auto-accept the rest.

What you get back

extraction.fields is a list; each field carries review metadata:

{
  "extraction": {
    "fields": [
      {
        "key": "invoice_number",
        "value": "INV-12345",
        "needs_review": false,
        "location": { "page": 1 }
      },
      {
        "key": "total_amount",
        "value": null,
        "needs_review": true,
        "review_reason": "No value found matching field description"
      }
    ]
  }
}

When needs_review is true

DeepRead sets needs_review: true when:

  • Value is missing: Field not found in the document
  • Extraction is uncertain: AI model detected ambiguity or unclear text
  • Validation failed: A schema validation rule failed (if you use validation)

The review_reason field explains why the field was flagged.

How to use it in production

Route flagged fields to a review queue

Filter to a review queue, and auto-accept the rest:

Python Example
# fields is job["extraction"]["fields"]
for field in job["extraction"]["fields"]:
if field["needs_review"]:
review_queue.add(
{
"field": field["key"],
"value": field["value"],
"reason": field.get("review_reason"),
"page": (field.get("location") or {}).get("page"),
}
)

Track review rate

DeepRead also includes an aggregate review summary under review:

  • review.fields_needing_review
  • review.fields_total
  • review.review_rate (0–1)
review_rate = job["review"]["review_rate"]  # e.g. 0.05

Field-specific policy

Apply different logic based on field criticality:

Python Example
critical_fields = ["total_amount", "invoice_number", "account_number"]
 
for field in job["extraction"]["fields"]:
if field["key"] in critical_fields and field["needs_review"]:
require_review(field)
elif field["needs_review"]:
optional_review(field)

Improving review rate

To reduce flags:

  1. Use clean scans / digital PDFs
  2. Write better field descriptions (labels + location hints)
  3. Use the optimizer to generate better prompts