A document extraction pipeline has five stages, and at each one the architecture question is the same: what does the platform handle, and what does the calling application own? LandingAI Agentic Document Extraction (ADE) handles document complexity, long-running processing, retry behaviour, and compliance constraints, while the application owns routing decisions and output destinations.
Stage 1: Document Ingestion
- Documents arrive from a storage bucket such as Amazon S3, Azure Blob Storage, or Google Cloud Storage, from an internal system, or from an inbound upload.
- ADE accepts them as a direct file upload or by URL reference.
- Teams handling the most sensitive documents can reference them by pre-signed URL to keep content out of the request body.
- Check supported file types against the formats your sources produce.
Stage 2: Parse Path Selection
Route each document to one of two paths based on size and urgency.
| Condition | Parse path |
|---|---|
| Real-time, latency-sensitive, single document | Synchronous |
| Batch, large file, high concurrency | Asynchronous |
- The asynchronous path accepts large, long-running documents, returns immediately, and is polled for the result.
- Both the Python and TypeScript libraries include a wait helper that polls a job to completion, so the application does not manage its own polling loop.
- Both libraries retry connection errors and transient failures automatically with exponential backoff, and the retry count is configurable.
- Both ship async clients for teams running high concurrency.
Stage 3: Parsing
ADE converts the document into reading-order Markdown and a grounded structure hierarchy, recording the page, the location in the text, and a bounding box for every element.
Parsing preserves tables with merged cells and nested headers, figures, headers, multi-column layouts, and form-like elements regardless of how the source is formatted.
Stage 4: Field Extraction
Parsed output goes to extraction with a JSON schema naming the fields you want and their expected types.
The schema is the stable contract between the document and the downstream system. It specifies what data to pull out rather than where to find it in a particular layout, so it holds when source documents change format.
Extraction returns the structured values plus per-field source grounding that locates each value in the parsed text, which pairs with the parsed element to give the page and bounding box for review overlays.
Stage 5: Routing and Output Delivery
Route extraction output on three signals before it reaches any downstream system.
- Located value: the field was found and grounded to its source. The value passes downstream with its location stored for audit and reviewer navigation.
- Empty result: the field was not present. Primitives return
nulland lists return an empty array, so route these to a missing-data branch rather than a review queue. - Unresolved field: where a schema field cannot be resolved, route that field to review with the parsed output attached so a reviewer can locate the value manually.
For delivery, asynchronous jobs can write results directly to a pre-signed URL you control on S3, Azure Blob, or Google Cloud Storage, which keeps large outputs out of the polling path and inside your own storage.
For review interfaces, extraction grounding pairs with the parsed structure to surface each element's page and bounding box for highlight overlays.
FAQ
Does the architecture change when Zero Data Retention is required?
The parsing, extraction, and routing stages are unchanged. Requirements around how documents are submitted and results delivered differ by API, so confirm the current rules in the ZDR documentation before finalising the design. For the strictest control, reference documents and write results through your own pre-signed storage URLs so content stays in infrastructure you own.
What does the application build versus what ADE provides?
ADE provides parsing with layout preservation and per-element grounding, asynchronous processing for large documents, automatic retry on transient failures, and per-field source grounding from extraction. The application owns parse-path routing, job tracking, the schema definition, empty-result and review routing, and writes to output destinations.
How should the extraction schema be managed across deployments?
Store it version-controlled alongside application code rather than building it at runtime. Adding fields or changing field types can break downstream consumers if deployed without coordination, so add new fields first, confirm consumers handle them, then tighten the contract on your side. Note that ADE attempts every field in the schema and returns an empty result when a value is absent, so the strictness lives in your validation layer rather than in the schema.