Skip to content
Adeptic AI
← All proofs

Document extraction

Upload an invoice, contract, or form and get typed JSON back, with every value checked against the source rather than a confidence score it invented about itself.

The problem

The most common expensive workflow at most companies is a person reading a document and typing its contents into another system. It is slow, it is error prone, and it does not scale with volume.

How it is built

  1. 01

    Output is constrained to a schema, so downstream code receives predictable types rather than prose it has to interpret.

  2. 02

    Every field carries the exact quote it was read from, so the value can be located and checked against the source document rather than taken on faith.

  3. 03

    Fields are graded by what can actually be verified: whether the quote is really in the document, whether totals reconcile, whether dates agree with the stated terms. Anything that fails a check goes to a human instead of being silently guessed.

  4. 04

    Fields genuinely absent from the source come back null rather than invented, which is the failure mode that destroys trust in extraction systems.

Stack

Claude Sonnet 5AI SDK streamObjectZod schemaServer-side verification

Demonstrates

  • Schema-constrained extraction from an uploaded document or pasted text
  • Verification computed from the source instead of a self-reported confidence score
  • Explicit nulls instead of fabricated values

Where it falls short

  • Uploaded PDFs and images can be verified on totals and dates, but the quoted text itself cannot be highlighted in the source, since there is no text layer in the browser to search against.
  • Production versions are tuned to your specific document types, which is most of the actual work.