FS Labs ERP AI Backend Architecture
System Overview
Two-step FAISS pipeline: generate a Unified Data Model from ERP schemas, then map UDM entities/columns back to each ERP.
Architecture Diagram
graph TB
ErpSchemaOne["ERP schema 1"]
ErpSchemaTwo["ERP schema 2"]
FaissImplementation["faiss_implementation.py<br/>UDM generator"]
UnifiedModelJson["unified_model_schemas.json"]
FaissMapping["faiss_mapping.py<br/>schema mapper"]
ErpOneMapping["erp1_mapping.json"]
ErpTwoMapping["erp2_mapping.json"]
ErpSchemaOne -->|"extract + vectorize schema"| FaissImplementation
ErpSchemaTwo -->|"extract + vectorize schema"| FaissImplementation
FaissImplementation -->|"writes unified model"| UnifiedModelJson
UnifiedModelJson -->|"loads UDM for matching"| FaissMapping
FaissMapping -->|"writes table/column map"| ErpOneMapping
FaissMapping -->|"writes table/column map"| ErpTwoMapping
How to read this diagram
Arrows mean flow / dependency / "talks to", not button clicks. Each arrow label says what happens on that step.
Core Components
faiss_implementation.py
Extract schemas, store vectorized representations, emit schema JSON + unified model.
faiss_mapping.py
Load UDM + FAISS indexes, nearest-schema matching, emit mapping JSON (table-mapping + column-mapping).
Technology Stack
| Layer | Technology |
|---|---|
| Language | Python 3.11 |
| Vector search | FAISS |
| Artifacts | JSON schema/mapping files |