Skip to main content
Folio attaches a confidence score to every extracted field and compares it against a configurable threshold to decide whether a document needs human review. This guide explains the signals available and how to build a human-in-the-loop (HITL) workflow around them.

Per-field confidence

Every field in the extract object carries two signals:
When found is false, value is null and confidence is 0.0.

Human-review threshold

The human_review_threshold parameter (0–1) sets the minimum per-field confidence required to pass without flagging for review. Any field whose confidence falls below this threshold causes the document’s review_status to be set to needs_review.
  • Default server-side threshold: 0.85
  • Per-request override: pass human_review_threshold as a form field in POST /v1/documents.
A threshold of 1.0 forces every document into needs_review. A threshold of 0.0 disables per-field confidence gating (documents can still be flagged for other reasons).

review_status

review_status is set once when the document reaches a terminal state and does not change.

Flags

The flags array lists all reasons that contributed to needs_review. Flags are strings: Example result with flags:

Routing needs_review documents

A typical HITL workflow:
1

Receive the result

Via webhook or poll, check review_status.
2

Surface flagged fields to the reviewer

Parse the flags array to highlight only the fields that need attention, rather than asking the reviewer to check everything.
Use bbox coordinates to draw overlays on the document image so the reviewer can locate the field at a glance.
3

Record the correction

Your application stores the human-corrected values. Folio does not accept corrections back via the API — the correction lives in your system of record.

document_type_confidence

In addition to per-field confidence, the result includes a top-level document_type_confidence (0–1) indicating how confident the classifier was about the detected document type. When this is low, the low_confidence_classification flag is raised, and review_status becomes needs_review even if all field confidences are high.