Module 09 · cognitive feature

Semantic ontology mapping

Legacy enterprise databases are chaotic, undocumented and cryptically named. The cognitive pipeline samples the schema, infers an entity mapping with a confidence score, and flags what a human still has to decide — which is what lets the agent answer 'what is our exposure to NMC Health?' against a 20-year-old Oracle instance.

$ python -m fde_toolkit ontology

Legacy schema

what the FDE finds on day one

TBL_CUST_99X_REV → Customer

no table comment in the source system

auto-accepted

A legal entity or individual the bank has onboarded.

Legacy columnSemantic attributeInferred meaningConf.
CUST_ID_NOcustomerIdentifierNumbercustomer identifier number (VARCHAR2(18)), e.g. CUST-99210.99
CUST_NM_FULLcustomerNameFullpiicustomer name full (VARCHAR2(120)), e.g. NMC Health PLC0.99
DOM_CTRY_CDdomicileCountryCodedomicile country code (CHAR(2)), e.g. AE0.99
KYC_STS_FLGknowYourCustomerStatusFlagpiiknow your customer status flag (CHAR(1)), e.g. V0.99
PEP_INDpoliticallyExposedPersonIndicatorpiipolitically exposed person indicator (CHAR(1)), e.g. N0.99
REV_DTreviewedDatereviewed date (DATE), e.g. 2024-11-020.99

Enterprise knowledge graph

CustomerHOLDSAccount
AccountSENTTransaction
TransactionRECEIVED_BYAccount
CustomerHAS_EXPOSURECreditExposure
CustomerSUBJECT_TOKycStatus

Natural language → Cypher

what the mapping buys you

MATCH (c:Customer {name: $name})-[:HAS_EXPOSURE]->(e:CreditExposure)
RETURN c.name, e.limitAmount, e.utilisedAmount,
       e.utilisedAmount / e.limitAmount AS utilisation

Without the ontology this question is unanswerable — no model knows thatEXP_LMT_TB.UTIL_AMT means utilised credit exposure. The mapping, not the model, is the deliverable.