1 of 59

Building a Hybrid �Knowledge Graph System

Giuseppe Futia �CSI Piemonte - Consortium for Information Systems (Italy)

Integrating LPG, RDF, and LLMs for Advanced Analytics

2 of 59

AnalysisRules generation, validation reporting, contextual explainability

Our journey

Application

Regulatory compliance, conflict of interest, �360-degree view

Building

From business understanding to knowledge graph generation

https://github.com/giuseppefutia/klab?tab=readme-ov-file#-building-a-hybrid-knowledge-graph-system

3 of 59

4 of 59

5 of 59

6 of 59

7 of 59

8 of 59

“Don’t fall in love with the idea [or the technology],

Fall in love with the problem.”

9 of 59

Public

Procurement

Officer/Manager

10 of 59

Public

Procurement

Officer/Manager

Regulatory Compliance�Detect invalid contracts due to licensing issues.

11 of 59

Public

Procurement

Officer/Manager

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Regulatory Compliance�Detect invalid contracts due to licensing issues.

12 of 59

Public

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

13 of 59

14 of 59

  • This presentation is intended for demonstration and educational purposes only. It is not legal advice, an audit report, or an investigative finding.�
  • All data used is sourced from the publicly available Chicago Open Data Portal.�
  • The data may be incomplete, outdated, or contain inaccuracies; no guarantees are made regarding its quality or correctness.�
  • Any reference to specific individuals, entities, or organizations is based solely on public data and does not imply misconduct, liability, or legal conclusions.�
  • Anomalies or connections highlighted are used to showcase the potential of graph technologies.�
  • Some insights in this analysis were generated using LLMs, fuzzy matching, and probabilistic algorithms, which can introduce false positives or misinterpretations. These results are exploratory in nature and should not be treated as definitive findings.�
  • All outputs should be critically evaluated and not considered authoritative or final.

⚠️

15 of 59

  1. Building Phase

From Business Understanding to�Knowledge Graph Generation (LPG)

16 of 59

16

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Graph Model Definition

Knowledge Graph Generation

Mapping Data to Nodes, Relationships and Properties

Integrating information from different sources into the KG unified representation

The resulting KG can support for starting specific investigations

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Knowledge Graph Generation

17 of 59

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Building Understanding

18 of 59

18

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Data Understanding

19 of 59

19

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Connections Between the Datasets

No shared ids between owners and employees

20 of 59

20

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Connections Between the Datasets

No shared ids between owners and employees

No shared ids between ORGs in licenses and contracts

21 of 59

21

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Connections Between the Datasets

No shared ids between owners and employees

No shared ids between ORGs in licenses and contracts

No shared ids between departments connected to employees and contracts

22 of 59

22

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Connections Between the Datasets

No shared ids between owners and employees

No shared ids between ORGs in licenses and contracts

No shared ids between departments connected to employees and contracts

Shared ORG ids in owners and licenses

23 of 59

23

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Graph Model Definition

Mapping Data to Nodes, Relationships and Properties

Integrating information from different sources into the KG unified representation

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Graph Model Definition

24 of 59

Licenses

Contracts

Owners

Employees

25 of 59

Licenses

Contracts

License Record

License Type

Contract Record

Contract

Procur�Type

Contract�Type

HAS_LICENSE_TYPE

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

Owners

Employees

26 of 59

Person Record

Licenses

Contracts

Owners

Person

License Record

License Type

Contract Record

Contract

Procur�Type

Contract�Type

Dept

IS_SIMILAR_TO

RECORD_�RESOLVED_TO

HAS_LICENSE_TYPE

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

ASSIGNS_�CONTRACT

IS_SIMILAR_TO

WORKS_FOR_�DEPARTMENT

Employees

27 of 59

Person Record

Licenses

Contracts

Owners

Person

License Record

License Type

Address

Contract Record

Org

Contract

Procur�Type

Contract�Type

Dept

IS_SIMILAR_TO

RECORD_�RESOLVED_TO

Org�Group

WORKS_FOR_�ORG

HAS_LICENSE_TYPE

HAS_�ADDRESS

ORG_HAS_�LICENSE

IS_SIMILAR_TO

BELONGS_TO_ORG_GROUP

HAS_VENDOR

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

ASSIGNS_�CONTRACT

IS_SIMILAR_TO

WORKS_FOR_�DEPARTMENT

Employees

28 of 59

Person Record

Licenses

Contracts

Owners

Person

License Record

License Type

Address

Contract Record

Org

Contract

Procur�Type

Contract�Type

Dept

IS_SIMILAR_TO

RECORD_�RESOLVED_TO

Org�Group

WORKS_FOR_�ORG

HAS_LICENSE_TYPE

HAS_�ADDRESS

ORG_HAS_�LICENSE

IS_SIMILAR_TO

BELONGS_TO_ORG_GROUP

HAS_VENDOR

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

ASSIGNS_�CONTRACT

IS_SIMILAR_TO

WORKS_FOR_�DEPARTMENT

Employees

29 of 59

29

Procurement

Officer/Manager

Contracts

360-Degree View �Track all activities tied to a business owner.

CSV files released by the City of Chicago

Business Understanding

Data Understanding

Graph Model Definition

Knowledge Graph Generation

Mapping Data to Nodes, Relationships and Properties

Integrating information from different sources into the KG unified representation

The resulting KG can support for starting specific investigations

Licenses

Owners

Employees

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

Knowledge Graph Generation

30 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

WCC �(Weakly Connected Component)

Louvain

Node Entity Generation

Similarity Rules → Fuzzy Matching

Full Ingestion

31 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

WCC �(Weakly Connected Component)

Louvain

Node Entity Generation

Similarity Rules → Fuzzy Matching

Neo4j Full-text Search

Sørensen–Dice

similarity

Similarity Rules

32 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

WCC �(Weakly Connected Component)

Louvain

Node Entity Generation

Similarity Rules → Fuzzy Matching

Neo4j Full-text Search

Sørensen–Dice

similarity

75% importing time

Ingestion Bottleneck

33 of 59

Person Record

Licenses

Contracts

Owners

Person

License Record

License Type

Address

Contract Record

Org

Contract

Procur�Type

Contract�Type

Dept

IS_SIMILAR_TO

RECORD_�RESOLVED_TO

Org�Group

WORKS_FOR_�ORG

HAS_LICENSE_TYPE

HAS_�ADDRESS

ORG_HAS_�LICENSE

IS_SIMILAR_TO

BELONGS_TO_ORG_GROUP

HAS_VENDOR

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

ASSIGNS_�CONTRACT

IS_SIMILAR_TO

WORKS_FOR_�DEPARTMENT

Employees

34 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

Similarity Rules → Fuzzy Matching

IS_SIMILAR_TO

Org

Person Record

IS_SIMILAR_TO

Property-based

Property-based

Similarity Rules

Relation-based

35 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

WCC �(Weakly Connected Component)

Louvain

Node Entity Generation

Similarity Rules → Fuzzy Matching

Person Record

Person

RECORD_�RESOLVED_TO

Community Detection Algorithms

Person Nodes

IS_SIMILAR_TO

36 of 59

Neo4j

Set-up / Initialization

Record Ingestion and Cleaning

Similarity Rules → Exact Matching

WCC �(Weakly Connected Component)

Louvain

Node Entity Generation

Similarity Rules → Fuzzy Matching

Org

Org�Group

IS_SIMILAR_TO

BELONGS_TO_ORG_GROUP

Community Detection Algorithms

Organization Group Nodes

37 of 59

Person Record

Licenses

Contracts

Owners

Person

License Record

License Type

Address

Contract Record

Org

Contract

Procur�Type

Contract�Type

Dept

IS_SIMILAR_TO

RECORD_�RESOLVED_TO

Org�Group

WORKS_FOR_�ORG

HAS_LICENSE_TYPE

HAS_�ADDRESS

ORG_HAS_�LICENSE

IS_SIMILAR_TO

BELONGS_TO_ORG_GROUP

HAS_VENDOR

INCLUDED_IN_�CONTRACT

HAS_PROCUR_TYPE

HAS_CONTR_ TYPE

ASSIGNS_�CONTRACT

IS_SIMILAR_TO

WORKS_FOR_�DEPARTMENT

Employees

38 of 59

38

Initialize an empty stack of WCCs

Perform a graph traversal and detect weakly connected group of nodes

Construct a new graph (each component is a node) and restore original connections

Initialize a new community for each single node

Evaluate modularity gain, merge communities, apply recursive optimization

Assign communities that maximize the modularity measure

Weakly Connected Component

Louvain

Input Graph

Communities

39 of 59

2. Analysis Phase

From Business Understanding to�Insights Extraction (RDF)

40 of 59

40

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

SHACL Rules

Analysis Phase

LangGraph�React�Agent

Rules Generation

Validation Reporting

Contextual Explainability

41 of 59

41

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

Full Graph Understanding

42 of 59

42

Procurement

Officer/Manager

360-Degree Owner View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

Full Graph Understanding

MATCH (c:Contract)<-[:INCLUDED_IN_CONTRACT]-(:ContractRecord)-[:HAS_VENDOR]->(:Organization)

-[:BELONGS_TO_ORG_GROUP]->(o:OrganizationGroup)

RETURN DISTINCT elementId(c) as src_id, elementId(o) as dst_id

MATCH (l:LicenseRecord)<-[:ORG_HAS_LICENSE]-(:Organization)

-[:BELONGS_TO_ORG_GROUP]->(o:OrganizationGroup)

RETURN DISTINCT elementId(o) as src_id, elementId(l) as dst_id

43 of 59

43

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

Full Graph Understanding

44 of 59

44

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

Subgraph Extraction

45 of 59

45

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

Subgraph Extraction

object_property_mappings = {

"HAS_VENDOR": {

"src_uri": "http://purl.org/procurement/public-contracts#Contract",

"rel_uri": "http://purl.org/procurement/public-contracts#bidder",

"dst_uri": "http://purl.org/goodrelations/v1#BusinessEntity",

"query": """

MATCH (c:Contract)<-[:INCLUDED_IN_CONTRACT]-(:ContractRecord)� -[:HAS_VENDOR]->(:Organization)� -[:BELONGS_TO_ORG_GROUP]->(o:OrganizationGroup)

RETURN DISTINCT elementId(c) as src_id, elementId(o) as dst_id

"""

}

46 of 59

46

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

Subgraph Extraction

47 of 59

47

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

SHACL Rules

Validation Rule Setting

48 of 59

48

Procurement

Officer/Manager

360-Degree Owner View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflicts of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

SHACL Rules

Validation Rule Setting

<#BusinessLicenseContractShape> a sh:NodeShape ;

sh:targetClass gr:BusinessEntity ;

sh:sparql [

a sh:SPARQLConstraint ;

sh:message "The newest license end date must not be before the oldest contract start date." ;

sh:select """ SELECT ?this WHERE {

{

SELECT ?this (MAX(?licenseEndDate) AS ?maxLicenseEndDate) WHERE {

?this a gr:BusinessEntity .

?this gr:hasLicense ?license .

?license pco:actualEndDate ?licenseEndDate .

} GROUP BY ?this

}

{

SELECT ?this (MIN(?contractStartDate) AS ?minContractStartDate) WHERE {

?contract pco:bidder ?this .

?contract pco:startDate ?contractStartDate .

} GROUP BY ?this

}

FILTER(?maxLicenseEndDate < ?minContractStartDate)

}""" ;

] .

49 of 59

49

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

SHACL Rules

Validation Rule Setting

50 of 59

50

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

SHACL Rules

Rules

LangGraph�React�Agent

Rules Generation

LPG

Graph

RDF

Graph

51 of 59

51

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

RDF

Graph

SHACL Rules

Reporting

LangGraph�React�Agent

Rules Generation

Validation Reporting

LPG

Graph

RDF

Graph

52 of 59

52

Procurement

Officer/Manager

360-Degree View �Track all activities tied to a business owner.

Business Understanding

Full Graph

Understanding

Subgraph Extraction

Validation Rules

Setting

Regulatory Compliance�Detect invalid contracts due to licensing issues.

Conflict of Interest�Uncover links between people, contracts, licenses, and departments.

LPG

Graph

RDF

Graph

SHACL Rules

Explainability

LangGraph�React�Agent

Rules Generation

Validation Reporting

Contextual Explainability

53 of 59

3. Use Cases

Regulatory Compliance, Conflicts of Interest,�360-Degree View

54 of 59

Demo

55 of 59

Regulatory Compliance

Detect invalid contracts due to licensing issues�

https://github.com/giuseppefutia/klab/blob/master/analysis/chicago/01_regulatory_compliance.ipynb

56 of 59

Conflict of Interest

Uncover links between people, contracts, licenses, �and departments.

https://github.com/giuseppefutia/klab/blob/master/analysis/chicago/02_conflict_of_interest.ipynb

57 of 59

360-Degree View

Track all activities tied to a business owner.

https://github.com/giuseppefutia/klab/blob/master/analysis/chicago/03_three_sixty_degree_view.ipynb

58 of 59

We performed multiple analysis combining LPG, RDF, and LLMs

Conclusions

We identified some strategies that are applicable to multiple domains

We built the Chicago KG by integrating multiple data Sources

59 of 59

kgconf25 (45% off all Manning products; expiration May 25)