Structured extraction from messy documents
Extract structured data from the document below into this schema: {{list fields with types and whether required}}.
Rules:
1. Return valid JSON only, matching the schema exactly. No commentary, no markdown fence.
2. Use null for anything not present. Never infer, never fill from general knowledge, never average.
3. For every extracted value, include the verbatim source snippet in a parallel `evidence` object keyed by field name.
4. If a field appears more than once with conflicting values, return the conflict in an `ambiguities` array with both values and their locations rather than picking one.
5. Normalise formats explicitly: dates to ISO 8601, amounts as numbers with a separate currency field, names as written.
6. Add a `confidence` field per extracted value: high (stated plainly), medium (requires interpretation), low (inferred from layout).
7. If the document isn't the type expected, return `{"error": "unexpected_document_type", "detected": "..."}`.
DOCUMENT:
{{paste}}
How to use it
The evidence object is what makes this auditable at scale — spot-check the low-confidence fields only.
Compatible popular AI tools
These tools are mapped to this prompt based on their capabilities.
People who liked this prompt
1 community likes
No likes yet. Be the first.