Enterprise AI · Document Automation · May 2026 to present
Intelligent Document Processing Platform
Enterprise document automation at Staples: LangGraph classify, extract, validate, escalate pipeline with confidence-scored routing into ERP and finance systems.
- Routing
- confidence-scored, human-in-the-loop
- Validation
- vendor master + 2/3-way PO matching
- Release gates
- accuracy, STP rate, drift (CI-enforced)
Problem
Enterprise document automation lives or dies on trust: a wrong invoice line item posted to finance is worse than a document that waits in a review queue. The platform automates ingestion, classification, extraction, validation, and routing of high-volume business documents (vendor invoices, purchase orders, bills of lading, contracts, vendor onboarding packets, and customer quotes and RFPs) into ERP, procurement, and analytics systems, replacing manual data entry with LLM-based extraction and confidence-scored routing.
Approach
- Agentic pipeline with confidence gates. LangGraph orchestration with classifier, extractor, validator, and escalation nodes. Confidence thresholds route low-certainty fields to human-in-the-loop exception queues; clean documents post straight through.
- OCR feeds typed extraction. Azure AI Document Intelligence OCR output feeds GPT-4o (Azure OpenAI) structured field and line-item extraction against Pydantic-typed schemas, with per-field confidence scoring and deterministic fallback rules.
- Validate before finance. Every extraction is checked against vendor master data, two-way and three-way PO matching, and pricing rules before it reaches finance systems.
- RAG-grounded extraction. Azure AI Search vector retrieval over vendor-specific templates and historical documents grounds the extractor; PyTorch document-type classifiers handle routing.
- Eval as a release gate. Harnesses on Databricks with MLflow experiment tracking and model versioning measure field-level precision and recall, straight-through-processing rate, extraction cost per document, and model drift on every release. A regression fails CI.
- Operations. Docker-containerized microservices on Kubernetes, Azure DevOps CI/CD, Application Insights observability dashboards. Document taxonomies, field-level acceptance criteria, and exception-handling service levels defined with finance, procurement, and supply chain stakeholders.
Stack
- Orchestration: LangGraph and LangChain over Python 3.11 and FastAPI microservices.
- Models: GPT-4o on Azure OpenAI for extraction, PyTorch classifiers for document-type routing.
- OCR: Azure AI Document Intelligence.
- Retrieval: Azure AI Search vector retrieval over vendor templates and historical documents.
- Data and eval: Databricks with MLflow tracking, Snowflake, Kafka for the event-driven document flow.
- Frontend: React and TypeScript exception-review UI for human-in-the-loop approval.
- Operations: Docker on Kubernetes, Azure DevOps CI/CD, Application Insights.
Outcomes
- Agentic classify, extract, validate, escalate pipeline in production, replacing manual data entry with confidence-scored routing.
- Human-in-the-loop exception queues for low-certainty fields; straight-through posting for clean documents.
- CI-enforced release gates on field-level accuracy, straight-through-processing rate, and model drift.
Stack
Highlights
- Architected the LangGraph agentic orchestration layer (classifier, extractor, validator, and escalation nodes) over a Python/FastAPI microservices backend: Azure AI Document Intelligence OCR output feeds GPT-4o structured field and line-item extraction against Pydantic-typed schemas, with per-field confidence scoring and deterministic fallback rules.
- Built multi-source ingestion pipelines (email, SFTP, scan/OCR feeds, supplier portals) normalizing PDFs, images, and scanned documents into an event-driven Kafka flow; every extraction is validated against vendor master data, two-way and three-way PO matching, and pricing rules before reaching finance systems.
- Developed RAG-grounded extraction using Azure AI Search vector retrieval over vendor-specific templates and historical documents, plus PyTorch document-type classifiers for routing.
- Stood up evaluation harnesses on Databricks with MLflow experiment tracking, measuring field-level precision and recall, straight-through-processing rate, extraction cost per document, and model drift as CI-enforced release gates.