Private cloud
Document extraction pipeline in your cloud account
A landing zone in object storage, a managed document-understanding service (Azure AI Document Intelligence, Amazon Textract or Google Document AI), a managed model constrained to a JSON schema, validation in code, and a confidence-thresholded review queue — all in the region you pin, reached over private networking.
- Source
- Editorial recipe — no step evidence has been fetched yet
- Verified
- Evidence not verified
- Confidence
- Low
01Objective
Turn documents arriving in bulk into validated structured records inside one cloud account, using a managed extraction service and a managed model, with a human review path for the rows the model is unsure of.
- use caseData extractionPulling defined fields out of unstructured text into a schema — from forms, reports, emails, filings or web pages. The general case of invoice extraction, and the step that turns documents into something a database can hold.
- use caseDocument classificationSorting incoming documents into types and routing them — which team, which folder, which workflow, which retention rule. Usually the first step of a larger pipeline and the cheapest place to remove manual handling.
- use caseInvoice extractionReading supplier invoices — header fields, line items, tax, totals — into structured records. The extraction step only. What happens to the record afterwards is invoice processing automation.
- use caseInvoice processing automationThe whole accounts-payable path: capture, extraction, supplier matching, purchase-order and goods-receipt matching, approval routing, and posting to the finance system. Extraction is one step of it; exceptions are where the work actually is.
- use caseOCRTurning images of text — scans, photographs, faxes, historic files — into machine-readable text with layout. The step everything else depends on: no extraction, search or classification pipeline is better than the text layer underneath it.
02Recommended stack
| Role | Component |
|---|---|
| Inferenceoptional | Amazon Bedrock |
| Inference | Azure OpenAI (structured outputs) |
| Inferenceoptional | Google Vertex AI |
| Inference | GPT-5 (or another catalogue model) |
| Ingestionoptional | Amazon Textract |
| Ingestion | Azure AI Document Intelligence |
| Ingestionoptional | Google Document AI |
| Observability | Human review queue |
| Storage | Object storage (per-stage landing zone) |
Architecture and data flow
Components
- Operations team (exception queue) — people
- Managed document-understanding service — storage
- Private endpoints — network
- Pipeline orchestrator + review screen — application
- Normalisation + validation service — retrieval
- Extracted records + exception queue — database
- Object storage (landing zone) — storage
- Managed model (schema-constrained) — inference server
- Frontier model under structured outputs — model
Connections
- Operations team (exception queue) to Private endpoints — HTTPS (confidential data)
- Private endpoints to Pipeline orchestrator + review screen — reverse proxy (confidential data)
- Managed document-understanding service to Normalisation + validation service — documents to index (confidential data)
- Pipeline orchestrator + review screen to Normalisation + validation service — question + user groups (confidential data)
- Normalisation + validation service to Extracted records + exception queue — documents + permissions (confidential data)
- Pipeline orchestrator + review screen to Extracted records + exception queue — chats, users, settings (personal data)
- Normalisation + validation service to Object storage (landing zone) — original files (confidential data)
- Normalisation + validation service to Managed model (schema-constrained) — prompt + retrieved passages (confidential data)
- Managed model (schema-constrained) to Frontier model under structured outputs — loaded weights
External data transfer · SOME
- confidential content leaves your premises for your own cloud tenancy ("Private endpoints"). You keep control of the account; the provider is a processor, so a DPA and a documented region apply.
- The documents are read and normalised by managed services inside one cloud account and region you control; the provider is a processor, so a DPA and a pinned region apply to each service.
- The originals sit in the landing zone: the most sensitive copy, and the one whose retention and access rules matter most.
03Suitable for
- Organisation size
- 50–20000 employees
- Data classes
- confidential, personal
- Constraints
- a cloud account with a region that satisfies your residency requirement; documents that arrive in enough volume to justify a pipeline over manual entry; well-defined target fields and a system to write the validated records into
- Industries
- Financial services, Insurance, Logistics, Accounting, Manufacturing
- Jurisdictions
- any
04Hardware
No hardware profile was sized for this answer.
Indicative costUSD · one-off plus monthly
- Software
- No third-party licence: the orchestrator is yours and the managed services bill on usage. Extraction and model usage sit on their own lines.
- US$0
- Model usage
- Not estimated here: priced per token — see the cost section, which multiplies a fetched price by the usage band read from your brief. Nothing in this seed asserts a price.
- Not estimated
- Document extraction, storage and network
- Not estimated: the document-understanding service is priced per page, storage per gigabyte and private networking per hour, all per provider and region. No price list was fetched — read yours, and note extraction scales with document volume, not user count.
- Not estimated
- Implementation (8–22 FDE-days)
- 8–22 FDE-days at US$760–1940 per day, converted from the HK$6,000–15,000 band at the HKMA Linked Exchange Rate band of HK$7.75–7.85 to one US dollar. One-off; excludes internal staff time.
- US$6,080 – US$42,680
- The two metered lines — the extraction service (per page) and the model (per token) — scale with document volume; the cost section computes the model line from a fetched price.
- Implementation covers the landing zone, the extraction and normalisation stages, validation, the review queue and an accuracy measurement; it excludes the metered usage entirely.
- Assumes a cloud account and a target system to write the validated records into already exist.
05Difficulty
3 / 5
A project week with Linux, Docker and GPU experience
06Skills
- API integrationapi-integration
- development
- Compliance and governancecompliance-governance
- compliance
- Data engineeringdata-engineering
- data
- Networkingnetworking
- networking
- OCR and document parsingocr
- ml
- Pythonpython
- development
- Security hardeningsecurity-hardening
- security
07Deployment steps
Commands are copied from each project’s own documentation, and the page they came from is linked under the step. 0 of 8 steps currently open an evidence record. The rest are linked to their source; §10 says which of those documents were fetched and which were fetched without their anchor being found — two different states, named differently there.
- 01
Pick the cloud you already run, then pin the region
AssessmentThis design is the same in all three clouds, so the choice is an operational one: use the account you already have an agreement, a network and an on-call rota for. Then pin the region and check what the model deployment type does to it. Azure documents that for a deployment type labelled Global, "prompts and responses may be processed in any geography where the relevant model sold by Azure is deployed" — which can undo a residency requirement that the storage account satisfies perfectly well.
- 02
Land every document in object storage before anything reads it
AssessmentOne bucket or container per stage — arrived, extracted, normalised, failed — in the region you pinned, with versioning on and a lifecycle rule that matches your retention policy. A landing zone gives you a replayable input: when the schema changes or the model is swapped, you re-run over the originals instead of asking the business to send them again. Size the batches for asynchronous extraction: Textract "also provides asynchronous operations to extend support to multipage documents", and the other two services split the same way.
- 03
Run the managed document-understanding service
AssessmentAzure AI Document Intelligence, Amazon Textract and Google Document AI are interchangeable at this layer: each takes the file and returns text, tables and key–value pairs with per-field confidence. Google describes a processor as something that "lies between the document file and a machine learning model", which is the right mental model for all three — you choose a processor or model per document type rather than sending everything through one general reader. Start with the prebuilt models for invoices, receipts and IDs before training a custom one; Azure notes custom models are "trained by using your labeled datasets to extract distinct data from forms and documents", and labelling is the expensive part.
- 04
Make the model fill a schema, not write prose
AssessmentThe extraction service gives you fields as it found them on the page; the schema you want is the one your downstream system accepts. That is the model’s job, and it should be done under a JSON schema rather than by parsing free text. Bedrock states that structured outputs "ensures model responses conform to user-defined JSON schemas and tool definitions"; Azure OpenAI has the same feature and says to "use structured outputs for function calling, extracting structured data, and building complex multi-step workflows". Feed the model the extracted fields and the page text, not the raw image, so the reading and the normalising stay separately debuggable.
- 05
Check in code what a model cannot be asked to guarantee
AssessmentTotals that add up, dates that are dates, a supplier that exists in your master data, a currency that the contract allows: all of that is arithmetic and lookups, and belongs in code that runs after the model and before the database. A schema-conformant answer is not a correct one. Record every failed check against the document so the exception queue can be sorted by reason rather than by arrival time.
- 06
Route low-confidence rows to a person, and set the threshold from data
AssessmentMicrosoft states plainly that "for scenarios where accuracy is critical, confidence can be used to determine whether to automatically accept the prediction or flag it for human review". Pick the threshold by measuring, not by taste: score a labelled sample, plot accepted-and-wrong against reviewed-and-right, and choose the point your business can live with. Keep the reviewer’s correction — it is the training data for the next iteration and the evidence that the pipeline is improving.
- 07
Close the network and turn on the logs before the first real document
AssessmentReach every managed service over a private endpoint rather than the public internet — AWS opens its guidance with "to control access to your data, we recommend that you use a virtual private cloud (VPC)", and Azure and Google have the equivalent. Turn on account-level audit logging, decide the retention window for the pipeline’s own logs, and write down which services touch the documents and in which region each one runs. That list is what the DPA conversation will ask for.
- 08
Measure field-level accuracy on a labelled sample, then again in production
AssessmentReport accuracy per field, not per document: a pipeline that gets the invoice number right 99% of the time and the line-item quantities right 80% of the time has one number worth quoting and one worth fixing. Hold back a labelled set that the pipeline never trains or tunes on, re-run it whenever the model version or the processor changes, and publish the exception rate next to the volume so the saving is visible and arguable.
08Compliance considerations
Structured issue-spotting to support your own review — not legal advice. Verify against the cited primary sources and your counsel.
Applies everywhere
Data residency · Cross-border transfershigh
Pin the extraction service, the model, storage and logs to one region. Azure documents that a Global deployment may process prompts in any geography where the model is deployed — a setting that can undo a residency rule your storage satisfies. Choose the deployment type deliberately.
Data processing agreement · Subprocessors · Securityhigh
The extraction service and the model are both processors in your account. AWS documents per-provider deployment accounts per Region; get the DPA, confirm the region for each service, and reach them over private networking rather than the public internet.
Model training · Retentionhigh
For a model sold by Azure, Microsoft states prompts and completions are not used to train foundation models without your instruction. Verify the equivalent for the extraction service, and set the retention on each pipeline stage — the landing zone holds the originals, which are the most sensitive copy.
Human oversight · Automated decision-makinghigh
Route low-confidence rows to a person: Microsoft states confidence "can be used to determine whether to automatically accept the prediction or flag it for human review". Where an extracted value drives a decision about a person, a human-review step is not optional — set the threshold from measured data and record who reviewed what.
Personal data · Sensitive datamedium
Extracted fields are often personal data (names, addresses, account numbers). Minimise what the pipeline stores, apply retention to the extracted records and the exception queue as well as the originals, and log access to them.
09Alternatives
Self-hosted, if documents may not leave the network
Run OCR and the model on your own machines with Docling and vLLM. No processor touches the documents, at the cost of owning the GPU and the operations.
- — No managed service sees the documents
- — You size and operate a GPU, and the extraction quality is yours to reach
A finished document-automation product
When the document type is common (invoices, receipts, IDs), a specialised SaaS product may reach production accuracy faster than a pipeline you assemble — under a processor contract.
- — Fastest route to accuracy on a common document type
- — A vendor in the data path, and less control over the schema and the model
- Self-hostedInvoice capture and extractionInvoices arrive by email or watched folder, Docling converts them (OCR included), a local vision-capable model fills a JSON schema under constrained decoding, code checks the arithmetic and the supplier against your master data, and n8n posts the clean ones while routing the rest to a person.
- Enterprise SaaSDocument automation on a specialised SaaS productA specialised document-automation product — Rossum, Nanonets, Mindee or an equivalent — connected to your systems, scoped by your identity provider, covered by a DPA, with a human-validation step and an audit trail. The vendor runs the model and the extraction; you own the contract and the integration.
10Evidence
Not yet in the ledger
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
- Amazon Bedrock — data protection
Vendor page
not yet fetched
not yet fetched
11Community
Deployed this stack, or hit something this page does not cover? Corrections, sources and implementation reports are what keep a recipe worth reading.
Improve this page
Sign in to contribute
From the field
0 deployments · 0 questions
Nobody has reported deploying this here yet, and no question has been opened against this page. Both appear once a reviewer accepts them.
12Hire an FDE
If you would rather not build it, we can introduce a forward-deployed engineer who has deployed this stack before. The enquiry form starts from this recipe.