Validation and Review
AI extraction must use a human-in-the-loop model. The user remains responsible for confirming business data before it is saved.
Review principles
- Pre-fill forms from AI JSON.
- Highlight low-confidence fields.
- Show source page or text when available.
- Allow the user to correct every extracted value.
- Require confirmation before saving.
- Run backend validation after confirmation.
Confidence thresholds
| Level | Suggested threshold | Behavior |
|---|---|---|
| High | >= 0.90 | Can be auto-filled without warning. |
| Medium | 0.70 - 0.89 | Auto-filled but highlighted for review. |
| Low | < 0.70 | Manual review required. |
Auto-approve vs manual review
Auto-approval should be limited to low-risk fields and mature extraction profiles.
| Field type | Auto-approval recommendation |
|---|---|
| Document language | Usually safe. |
| Provider name | Safe only if matched to an existing provider. |
| Monetary amount | Require review unless matched against known total. |
| Contract dates | Require review. |
| Fiscal code, VAT, IBAN | Validate deterministically and require review when confidence is not high. |
| Tax regime | Require review. |
| Party role | Require review when multiple parties appear. |
Error handling
- If document classification fails, ask the user to select the document type.
- If OCR quality is poor, show a manual-entry fallback.
- If mandatory fields are missing, keep the draft but block final save.
- If two existing entities match the same extracted party, require user selection.
- If the model returns invalid JSON, retry with a stricter schema prompt or fallback model.
Edge cases
| Edge case | Handling |
|---|---|
| Missing data | Leave field empty and mark as required when needed. |
| Ambiguous date | Show extracted text and require user confirmation. |
| Multiple tenants | Create multiple party drafts and roles. |
| Multiple properties in one document | Ask user to select or split into separate records. |
| Bank account without holder | Save as draft only until holder is confirmed. |
| Scanned low-quality document | Run OCR enhancement or request a clearer upload. |
Auditability
Each saved record created from AI-assisted extraction should keep a trace to:
- source document
- extraction job
- model provider and model name
- prompt version
- extraction timestamp
- user who confirmed the data