Skip to content

Welcome to the

0

Labs experiment

Document intelligence: turns invoices and contracts into clean, validated data

An extraction pipeline that turns invoices and contracts into clean, validated data. Documents are classified by type, the fields that matter are extracted, totals, dates and formats are validated, and anything uncertain goes to a person before the rows are exported to the ERP.

Where this pattern fits

  • Finance teams keying invoices into an ERP by hand
  • Operations teams pulling terms out of contracts
  • Any document flow where a wrong number is expensive
  • Claude
  • Gemini
  • FastAPI
  • PostgreSQL

How it works

PDF uploadExtraction pipelineClassifierExtractorValidatorReview queueOCRSchema storeERP export

Select any node to see what it does.

Simulated run
  1. 00.00upload42 invoices received
  2. 00.36classifier40 invoices, 2 credit notes
  3. 01.12validator39 passed, 3 sent to human review
  4. 01.30export39 rows written to the ERP

The architecture, step by step

Each part of the diagram, in the order a run moves through it.

  1. PDF uploadWhere every run starts.
  2. Extraction pipelineMoves each document from upload to clean data.
  3. ClassifierSorts documents by type.
  4. ExtractorPulls out the fields that matter.
  5. ValidatorChecks totals, dates and formats.
  6. Review queueSends anything uncertain to a person.
  7. ToolsThe agents act through the OCR, schema store and ERP export.

How it is built

The design choices that make the pattern hold up with real users.

visitor@azan-portfolio: ~

_ ___ ___ _____

/_\ ____ __ _ _ _ / __| _ \_ _|

/ _ \ |_ / / _` || ' \ | (_ | _/ | |

/_/ \_\/__| \__,_||_||_| \___|_| |_|

Hi, I am AzanGPT. Ask me about Azan's work, stack, services or how to reach him.

Type 'help' for commands, or ask a question. Tab completes, the arrow keys walk your history.

AzanGPT runs on an AI model that knows this site. It can get things wrong, so check anything important with Azan.