The _meta Field
Every Parsefy extraction automatically includes a _meta field with quality metrics:
You don’t need to define
_meta in your schema—it’s injected automatically.Confidence Score
Theconfidence_score is a floating-point number from 0.0 to 1.0 that represents the AI’s certainty in the extraction quality.
Score Interpretation
| Score | Level | Meaning | Recommended Action |
|---|---|---|---|
| 1.0 | Perfect | All fields found with complete certainty | Use directly |
| 0.95 - 0.99 | Very High | Minor uncertainties, excellent extraction | Use directly |
| 0.90 - 0.94 | High | One or two slightly ambiguous fields | Review if critical |
| 0.85 - 0.89 | Moderate | Some unclear fields | Manual review recommended |
| 0.70 - 0.84 | Low | Multiple issues detected | Requires verification |
| < 0.70 | Very Low | Significant problems | Results may be unreliable |
What Affects Confidence?
Document Quality
Blurry scans, low resolution, or damaged documents reduce confidence.
Field Ambiguity
Multiple possible values for a field (e.g., multiple dates) lower confidence.
Missing Data
Required fields that couldn’t be found reduce the score.
Complex Layouts
Unusual document structures may introduce uncertainty.
The Issues Array
Theissues array contains human-readable descriptions of any problems encountered during extraction:
Common Issue Types
Format Ambiguity
Format Ambiguity
Multiple Values
Multiple Values
Missing Fields
Missing Fields
Quality Issues
Quality Issues
Inferred Values
Inferred Values
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
confidence_score < 0.85, the extraction is automatically re-run.3
Tier 2 Fallback
A more powerful model processes the document for improved accuracy.
metadata.fallback_triggered field tells you if the fallback was used:
Using Confidence in Your Application
Basic Threshold Check
Checking Specific Issues
TypeScript Example
Best Practices
Set Appropriate Thresholds
Different use cases need different confidence levels. Financial data may require 0.95+, while general categorization might accept 0.80+.
Log Issues
Always log the
issues array for debugging and improving your schemas over time.Handle Low Confidence
Build workflows that route low-confidence extractions to human review.
Use Rules
Add extraction rules to improve accuracy for problematic fields.
Confidence vs. Correctness
The confidence score is based on:- How clearly the AI found each field
- Whether values match expected patterns
- Document quality and readability
- Presence/absence of ambiguities
- Mathematical correctness (e.g., line items summing to total)
- Business logic validation
- Cross-field consistency
