Skip to main content

Overview

Parsefy provides field-level confidence scoring with evidence tracking. Every extracted field comes with:
  • A confidence score (0.0 to 1.0)
  • The source text evidence
  • The page number where it was found
  • A reason explaining the score
Our goal: 0% silent errors. If a required field can’t be extracted with sufficient confidence, the API triggers a fallback model or fails with clear reasons; never returns unreliable data silently.

The _meta Structure

Every extraction includes detailed metadata:
You don’t need to define _meta in your schema; it’s injected automatically.

Field Confidence Object

Each entry in field_confidence contains:

Common Reasons

Confidence Threshold

Control when the fallback model is triggered using confidence_threshold:
Default: 0.85
Lower confidence_threshold = faster and cheaper (accepts Tier 1 more often). Higher confidence_threshold = more accurate but more expensive (triggers Tier 2 fallback more often).

Automatic Fallback

Parsefy uses a two-tier model architecture for reliability:
1

Tier 1 Extraction

Your document is first processed by a fast, efficient model.
2

Confidence Check

If any required field returns null or falls below confidence_threshold, the extraction is automatically re-run.
3

Tier 2 Fallback

A more powerful (and more expensive) model processes the document for improved accuracy.
Important: If a required field can’t be extracted with sufficient confidence, it triggers the fallback model. This is critical for billing. See the section on Required vs Optional Fields.
The metadata.fallback_triggered field tells you if the fallback was used:

Required vs Optional Fields (Critical for Billing)

All fields are required by default in both SDKs. This is intentional for data safety, but it significantly impacts your costs.

Why This Matters

If a required field returns null or falls below the confidence_threshold, the API triggers the fallback model (Tier 2), which is significantly more expensive.

To Avoid Unexpected High Billing

Mark fields as optional if they might be missing in >20% of your documents:
Rule of thumb: If a field might be missing in >20% of your documents, mark it as optional.

Score Interpretation

The Issues Array

The issues array contains human-readable descriptions of any problems encountered:

Using Confidence in Your Application

TypeScript Example

Python Example

Best Practices

Mark Optional Fields

Any field that might be missing in >20% of documents should be optional to avoid unnecessary fallback triggers.

Set Appropriate Thresholds

Financial reconciliation may need 0.95+, while categorization might accept 0.80+.

Log Field Evidence

Store field_confidence for audit trails and debugging extraction issues.

Handle Low Confidence

Build workflows that route low-confidence extractions to human review.

Next Steps

Schema Basics

Learn how to define schemas with required vs optional fields

Error Handling

Handle extraction errors gracefully