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 infield_confidence contains:
Common Reasons
Confidence Threshold
Control when the fallback model is triggered usingconfidence_threshold:
0.85
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.
metadata.fallback_triggered field tells you if the fallback was used:
Required vs Optional Fields (Critical for Billing)
Why This Matters
If a required field returnsnull 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:Score Interpretation
The Issues Array
Theissues 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
