File Intake
PDFs, scans, and images land in S3-style object storage with source metadata and intake status.
Interactive Demo | Document AI
Review a document queue, inspect extracted fields, trace each value back to source evidence, and decide whether the output can be approved or needs human review.
Evidence Layer
For a real client, this is the part that makes document AI usable: the model output is not a black box. Each value has evidence, confidence, validation state, and a review path.
System Architecture
The static demo mirrors a production implementation: files land in object storage, OCR extracts text, an LLM produces structured fields, validation gates the result, and reviewers approve exceptions.
PDFs, scans, and images land in S3-style object storage with source metadata and intake status.
OCR captures text, tables, page coordinates, and layout blocks so extraction can point back to evidence.
A structured prompt returns normalized JSON, field confidence, source references, and unresolved values.
JSON schema checks required fields, date formats, amount formats, allowed document types, and business rules.
Low-confidence or invalid fields route to a human reviewer with the evidence line already attached.
Approved outputs write to Postgres, trigger downstream workflow, and preserve audit lineage.
Implementation Pattern
This is the engineering layer behind the visual: typed extraction outputs, deterministic validation, and explicit review routing.
{
"document_id": "INV-1048",
"document_type": "vendor_invoice",
"fields": [
{
"name": "invoice_total",
"value": "4825.30",
"confidence": 0.96,
"evidence": "Total Amount Due: $4,825.30"
}
],
"review_status": "needs_review"
}
for field in extraction.fields:
schema.validate(field)
if field.confidence < 0.88:
route_to_review(field)
if extraction.has_required_fields() and not extraction.has_errors():
persist_to_postgres(extraction)