- Professional work
- Deployed internally
Supply Chain Knowledge Graph & Intelligence Platform
LLM agents read thousands of unstructured manufacturing documents and build a knowledge graph of suppliers, customers, materials and capabilities. The graph powers supplier matching, supply-chain risk detection and cross-business-unit discovery.
- My role
- End-to-end owner (architected and built).
- Key result
- Supplier matching time cut by 85%, from about 2 days to under 4 hours, compared with the manual process.
- Technologies
- Python
- PydanticAI
- Pydantic
- GPT-4o
- Sentence-Transformers
- Tesseract
- AWS Textract
- MinHash LSH
- Neo4j (Aura)
- NetworkX
- PyVis
- FastAPI
- Docker
- AWS (S3, ECS)
What I owned
- Problem framing
- Data preparation
- Modeling
- Evaluation
- Application/API
- Deployment
Built at Zetwerk for internal use. Described in simplified form; no customer or supplier names, data, code or internal links are shown.
In [1]:Problem and constraints
Zetwerk connects 10,000+ suppliers with enterprise customers across business units (automotive, aerospace, electronics, construction, energy). Who can make what, for whom, with which materials and at what quality was scattered across catalogs, RFQ PDFs, ERP records and audit reports. That caused three problems:
- Finding suppliers for each new RFQ took about 2 days of manual search, across hundreds of RFQs a month.
- Shared supplier dependencies stayed invisible until a supplier failed.
- Business units re-qualified the same suppliers and negotiated with them separately.
In [2]:Data and preparation
5,000+ documents: PDFs (with OCR for scanned ones), Word files, spreadsheets and ERP exports. They became a graph of about 15,000 nodes and 60,000 edges.
In [3]:Baseline and evaluation design
- Matching was compared with shortlists from procurement experts: 82% overlap, and 12% of suggested suppliers were ones the experts had missed.
- A validation agent checks every extracted fact (ontology, business rules, hallucination check against the source text). Uncertain facts go to a human review queue.
In [4]:Architecture and modeling decisions
Agents turn documents into typed, evidence-linked facts, and the graph makes relationships queryable and explainable. Queries are graph traversals and pre-computed analytics, with no LLM at query time, so answers come back in under a second.
In [5]:Implementation and integration
- Ingestion: OCR fallback, semantic chunking with sentence-transformer embeddings, a link from every fact to the exact page of its source, and MinHash LSH deduplication.
- Three PydanticAI agents: extraction (constrained enums, a confidence score and evidence on every relationship); enrichment (name normalization, linking to existing graph nodes, inferred relationships with capped confidence); validation (auto-approve, flag for review, or reject with reasons).
- Neo4j and NetworkX: Neo4j for storage, NetworkX for analytics. Writes are idempotent batched MERGE/UNWIND, with merge strategies and schema enforcement.
- Supplier–RFQ matching: hard filters (capability, material, certification), then six weighted factors: capability match 25%, customer history 20%, geography 15%, capacity 15%, risk 15%, cross-unit validation 10%. Each result has an explanation traced to graph edges and source documents. If nothing matches, the system relaxes one requirement at a time.
- Risk detection: single-source dependencies, betweenness centrality, geographic concentration, capacity strain and customer concentration, combined into a risk score per supplier.
- Cross-unit discovery: Louvain communities and gap analysis.
- Dashboard: FastAPI with PyVis, in four views (search and matching, graph explorer, risk monitor, cross-unit intelligence).
In [6]:Deployment and operation
Status: Deployed internally
Internal at Zetwerk: Docker on AWS ECS, Neo4j Aura, S3.
Out[6]:Results and evidence
- Supplier matching time cut by 85%, from about 2 days to under 4 hours, compared with the manual process.
- 82% agreement with expert shortlists; 12% of suggestions were suppliers the experts had missed.
- 30+ single-source dependency risks surfaced before anything failed, 3 of them critical.
- 15 suppliers shared across business units discovered, leading to about 15% procurement cost savings across 3 business units through volume consolidation.
- 5,000+ documents turned into about 15,000 nodes and 60,000 edges.
In [7]:Limitations, failures, and lessons
- The graph is only as complete and current as the documents fed into it.
- Inferred relationships need review.
- The matching weights are fixed; next, I'd tune them from which suppliers actually won the work.