Neo4j, Inc. All rights reserved 2021
1
Workshop
● Get your Neo4j Engine up & running and register at:
https://neo4j.com/sandbox/
● Get the script to code (copy) along:
https://github.com/Kristof-Neys/Neo4j_demos
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
Kristof Neys
Jonas El Reweny
Neo4j Field Engineering
May 2023
Leveraging your Graph with AI
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
TOPICS WE WILL COVER
1. Why Graph Technology?
2. Why a Graph Database?
3. Think Knowledge Graphs!
4. Leverage your Graph with AI
5. Why a LLM is like Glue…
6. Let us show you… Demo time!
© 2023 Neo4j, Inc. All rights reserved.
4
Why Graph Technology?
© 2023 Neo4j, Inc. All rights reserved.
WHY GRAPHS?
“Graphs are the main modality
of data we receive from nature”
Google DeepMind
© 2023 Neo4j, Inc. All rights reserved.
6
Neo4j - what can we do for your business?
We are the Graph Technology company that helps organizations find
hidden relationships and patterns across billions of data connections
deeply, easily and quickly. Our platform offers an integrated Graph
database, Graph Data Science and a visualization engine for your
connected data.
Powering applications that are
impossible with other technologies
7
20 / 20
Top US banks
3 / 5
Top Aircraft Manufacturers
7 / 10
Top Telcos
3 / 5
Top Hotel Groups
8 / 10
Top Insurance Companies
10 /10
Top Automakers
7 / 10
Top Retailers
5 / 5
Top Pharmaceuticals
Trusted by
75 of the
© 2023 Neo4j, Inc. All rights reserved.
8
The first-ever graph database
Creator of the market category
Continued market leader
300
1B+ Enterprise
customers
$500M
in funding
170+
Global partner
ecosystem
250K
Community of developers
and data pros
100M+
Downloads
© 2023 Neo4j, Inc. All rights reserved.
FLEXIBLE CLOUD DEPLOYMENT MODELS
9
Graph-as-a-Service Cloud Managed Services Self-hosted
Fully-managed SaaS
Consumption-based pricing
Cloud-native
Self-service deployment
No access to underlying
infrastructure and systems
White-glove managed service
by Neo4j experts
Fully customizable deployment
model and service levels
Operate In own data centers
or Virtual Private Cloud
For private and hybrid
cloud, or on-prem
Bring your own license
Full control of your environment
Run in any cloud, in your account
© 2023 Neo4j, Inc. All rights reserved.
10
Why a Graph Database?
© 2022 Neo4j, Inc. All rights reserved.
Neo4j, Inc. All rights reserved 2022
Index Free Adjacency…
11
Why take the long route…?
© 2022 Neo4j, Inc. All rights reserved.
Connectedness and Size of Data Set
Response
Time
Relational and
Other NoSQL
Databases
0 to 2 hops
0 to 3 degrees of separation
Thousands of connections
Tens to hundreds of hops
Thousands of degrees
Billions of connections
1000x Advantage
at scale
“Minutes to milliseconds”
1000x Performance @Unlimited Scale
“we found [graph technology] to be literally
thousands of times faster than our prior MySQL
solution, with queries that require 10-100 times less
code. Graph provides eBay with functionality that
was previously impossible.” Volker Pacher - eBay
© 2023 Neo4j, Inc. All rights reserved.
13
Think Knowledge Graphs!
© 2022 Neo4j, Inc. All rights reserved.
What are Knowledge Graphs?
● Entities can be real-world objects and abstract concepts
● Relationships represent the connections between entities
● Semantic description of the entities and relationships
A knowledge graph is a structured representation of
facts, consisting of entities, relationships and semantic
descriptions
© 2022 Neo4j, Inc. All rights reserved.
15
Show me…! From Data points to Knowledge Graph
Car
DRIVES
name: “Dan”
born: May 29, 1978
twitter: “@dan”
name: “Ann”
born: Dec 5, 1979
since:
Jan 10, 2021
brand: “Volvo”
model: “V90”
LOVES
LOVES
LIVES_WITH
O
W
N
S
Person Person
description:
© 2022 Neo4j, Inc. All rights reserved.
User
:VISITED
Website
User
IPLocation
Website
IPLocation
Website
Website
Website
:VISITED
:VISITED
:VISITED
:USED
:USED
:
U
S
E
D
:
V
I
S
I
T
E
D
:
V
I
S
I
T
E
D
:VISITED
:SAME_AS
Graphs allow you to make implicit
relationships….
….explicit
And they grow too…?!
© 2022 Neo4j, Inc. All rights reserved.
:SAME_AS
User
:VISITED
Website
User
IPLocation
Website
IPLocation
Website
Website
Website
:VISITED
:VISITED
:VISITED
:USED
:USED
:
U
S
E
D
:
V
I
S
I
T
E
D
:
V
I
S
I
T
E
D
:VISITED
User
:SAM
E_AS
:USED
:VISITED
PersonId: 1
PersonId: 1 PersonId: 1
User
PersonId: 2
:VISITED
…and can then group similar nodes…and
create a new graph from the explicit
relationships…
A graph grows organically - gaining
insights and enriching your data
Graphs Grow….!
© 2022 Neo4j, Inc. All rights reserved.
18
Knowledge graphs in Credit risk analysis
© 2023 Neo4j, Inc. All rights reserved.
19
LEVERAGE YOUR GRAPH WITH AI
© 2023 Neo4j, Inc. All rights reserved.
HUGE INTEREST IN GRAPH FUELED BY AI & ML
20
“50% of Gartner
inquiries on the topic
of AI involve discussion
of the use of graph
technology.”
35x increase in AI research papers
featuring Graph over the past decade
Source: Dimensions Knowledge System
365
13,040
© 2023 Neo4j, Inc. All rights reserved.
21
PATH TO SUCCESS
Knowledge Graphs
Graph Algorithms
Graph Native ML
Find the patterns you’re
looking for in connected data
Identify associations,
anomalies, and trends using
unsupervised machine learning
Learn features in your graph
that you don’t even know
are important yet
→
→
Neo4j, Inc. All rights reserved 2021
22
65+ Graph Algorithms - Out of the Box
Pathfinding & Search Centrality Community Detection
❏ Delta-Stepping Single-Source
❏ Dijkstra’s Single-Source
❏ Dijkstra Source-Target
❏ All Pairs Shortest Path
❏ A* Shortest Path
❏ Yen’s K Shortest Path
❏ Minimum Weight Spanning Tree
❏ Random Walk
❏ Breadth & Depth First Search
❏ Degree Centrality
❏ Closeness Centrality
❏ Harmonic Centrality
❏ Betweenness Centrality & Approx.
❏ PageRank
❏ Personalized PageRank
❏ ArticleRank
❏ Eigenvector Centrality
❏ Hyperlink Induced Topic Search (HITS)
❏ Influence Maximization (Greedy, CELF)
❏ Weakly Connected Components
❏ Strongly Connected Components
❏ Label Propagation
❏ Leiden
❏ Louvain
❏ K-Means Clustering
❏ K-1 Coloring
❏ Modularity Optimization
❏ Speaker Listener Label Propagation
❏ Approximate Max K-Cut
❏ Triangle Count
❏ Local Clustering Coefficient
❏ Conductance Metric
Heuristic LP Similarity Graph Embeddings
❏ Adamic Adar
❏ Common Neighbors
❏ Preferential Attachment
❏ Resource Allocations
❏ Same Community
❏ Total Neighbors
❏ K-Nearest Neighbors (KNN)
❏ Filtered K-Nearest Neighbors (KNN)
❏ Node Similarity
❏ Filtered Node Similarity
❏ Similarity Functions
❏ Fast Random Projection (FastRP)
❏ Node2Vec
❏ GraphSAGE
❏ HasGNN
© 2022 Neo4j, Inc. All rights reserved.
23
Before we go any further…let’s
Quiz!
© 2022 Neo4j, Inc. All rights reserved.
24
Which of the colored nodes would be considered the most
‘important'?
© 2022 Neo4j, Inc. All rights reserved.
25
Which of the colored nodes would be considered the most
‘important'?
© 2023 Neo4j, Inc. All rights reserved.
The Power of Graph Embeddings
The ‘bridge’ to traditional Machine Learning/AI
26
© 2023 Neo4j, Inc. All rights reserved.
What are node embeddings?
The representation of nodes as low-dimensional vectors that
summarize their graph position, the structure of their local graph
neighborhood as well as any possible node features
NODE EMBEDDING
© 2023 Neo4j, Inc. All rights reserved.
NODE EMBEDDING
© 2023 Neo4j, Inc. All rights reserved.
Graph Data Science Embeddings
4 algorithms…and counting
• FastRP (Fast Random Projection) - Calculates embeddings extremely fast using probabilistic
sampling and linear algebra.
• GraphSAGE (Graph SAmple and aggreGatE) - Trains a Graph Neural Network (GNN) to
generate embeddings on old and new graph data. Uses batch sampling procedures for
scalability.
• Node2Vec - Creates embeddings that represent nodes in similar neighborhoods and/or
structural “roles” in the graph using adjustable random walks.
• HashGNN - Quickly generates embeddings on heterogeneous graphs. Like a GNN but much
faster and simpler with comparable benchmarked performance. Leverages a clever application
of hashing functions rather than training a model.
New
© 2023 Neo4j, Inc. All rights reserved.
VALIDATED FOR RECOMMENDATIONS…
© 2022 Neo4j, Inc. All rights reserved.
31
OK - we have vectors…
Now what?
Graph Machine Learning
© 2022 Neo4j, Inc. All rights reserved.
Use your vectors in traditional ML models
Node classification:
Classify entities based on their attributes & relationships
Link prediction:
Predict missing relationships or hidden links
Features: Pre-existing
attributes, algorithm
results, embeddings
Node property regression:
Predict facts about entities based on their attributes &
relationships
And We discover the best model for you - you just supply the data!
32
Persist and Publish for Production
© 2022 Neo4j, Inc. All rights reserved.
33
Machine Learning Pipelines
AutoML for in-graph machine learning:
● Node Classification
● Node Regression
● Link Prediction
ML pipelines support:
● Data splitting & rebalancing
● Feature engineering
● Model evaluation and selection
● Automated hyperparameter tuning
Trained models in the catalog
● Persistable
● Publishable
● Automatically applies pipelines
to new data for predictions
© 2022 Neo4j, Inc. All rights reserved.
The Graph Catalog – from Data Model to Predictive Model
• Neo4j automates data
transformations
• Experiment with different data
sets, data models
• Fast iterations & layering
• Production ready features,
parallelization & enterprise
support
• Ability to persist and version
data
A graph-specific analytics workspace that’s mutable – integrated with a
native-graph database
Mutable In-Memory Workspace
Computational Graph
Native Graph Store
© 2022 Neo4j, Inc. All rights reserved.
35
Our Implementations are Fast - and Getting Faster
LDBC100
(LDBC Social Network Scale Factor 100)
300M+ nodes
2B+ relationships
LDBC100PKP
(LDBC Social Network Scale Factor 100)
500k nodes
46M+ relationships
Logical Cores: 64
Memory: 512GB
Storage: 600GB
NVMe-SSD
AWS EC2 R5D16XLarge
Intel Xeon Platinum 8000
(Skylake-SP or Cascade Lake)
Node Similarity
20min
Betweenness Centrality
10min
Node2Vec
2.8min
Label Propagation
46sec
Weakly Connected
Components
36sec
Local Clustering
Coefficient
4.76min
FastRP
1.33min
PageRank
53sec
Louvain
14.66min
© 2023 Neo4j, Inc. All rights reserved.
36
Why a LLM is like glue…
© 2023 Neo4j, Inc. All rights reserved.
SETTING THE CONTEXT
Apps
Structured
Data
Unstructured
Data
Intranet
Internet
Social Media
Other online
contents
Knowledge
Extraction
Knowledge
Compression
Open Domain
Knowledge
Graph
Closed Domain
Knowledge
Graph
Knowledge
Lake
Knowledge
Enrichment
Augmented
Generation
Knowledge
Discovery
Experimentation
& Discovery
Education &
Enablement
Regulatory
Compliance
Sustainability Business
Insights
Cyber
Observability
And More!
Automation
Layer
Knowledge
Layer
Data Augmented
Generation Layer
Outcomes
LEVERAGING LLMs TO AUGMENT KNOWLEDGE &
INSIGHTS
LEVERAGING LLMs TO DEPLOY FRONT-END APPS
© 2023 Neo4j, Inc. All rights reserved.
40
Architecture
NeoDash
Dashboard UI
Neo4j
Free text input
APOC call Graph representations
Embeddings
Graph visualization of results
NeoDash
Dashboard UI
Persist results
Conceptual flow for a
text-to-graph or graph-to-text
application based on Neo4j +
OpenAI.
© 2023 Neo4j, Inc. All rights reserved.
41
Some examples…
© 2023 Neo4j, Inc. All rights reserved.
42
© 2023 Neo4j, Inc. All rights reserved.
43
© 2023 Neo4j, Inc. All rights reserved.
44
Links
https://medium.com/neo4j/generating-cypher-queries-with-chatgpt-4-on-any-gr
aph-schema-a57d7082a7e7
https://medium.com/towards-data-science/fine-tuning-an-llm-model-with-h2o-ll
m-studio-to-generate-cypher-statements-3f34822ad5
https://medium.com/neo4j/context-aware-knowledge-graph-chatbot-with-gpt-4-
and-neo4j-d3a99e8ae21e
Neo4j, Inc. All rights reserved 2021
45
Demo Time…! (but first some
Cypher…)
Neo4j, Inc. All rights reserved 2021
Neo4j, Inc. All rights reserved 2021
Cypher: first we CREATE
46
MATCH (:Person { name:“Dan”} ) -[:LOVES]-> (:Person { name:“Ann”} )
Person
NODE NODE
LABEL PROPERTY
LABEL PROPERTY
CREATE
RELATIONSHIP
name: ‘Ann’
LOVES
Person
name: ‘Dan’
Neo4j, Inc. All rights reserved 2021
Neo4j, Inc. All rights reserved 2021
Cypher: and then we MATCH a pattern in the Graph
47
MARRIED_TO
Person
name: ‘Dan’
MATCH (p:Person { name:“Dan”} ) -[:MARRIED_TO]-> (spouse)
NODE RELATIONSHIP TYPE
LABEL PROPERTY VARIABLE
spouse
NODE
RETURN p, spouse
VARIABLE
Neo4j, Inc. All rights reserved 2021
48
In Cypher you MATCH a pattern and then RETURN a result
MATCH (c:Country {name: "Finland"})
RETURN c;
001
Filtering is done with WHERE (this statement does exactly the same)
MATCH (c:Country)
WHERE c.name = "Finland"
RETURN c;
002
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
Thank you!

GPT and Graph Data Science to power your Knowledge Graph

  • 1.
    Neo4j, Inc. Allrights reserved 2021 1 Workshop ● Get your Neo4j Engine up & running and register at: https://neo4j.com/sandbox/ ● Get the script to code (copy) along: https://github.com/Kristof-Neys/Neo4j_demos
  • 2.
    © 2023 Neo4j,Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. Kristof Neys Jonas El Reweny Neo4j Field Engineering May 2023 Leveraging your Graph with AI
  • 3.
    © 2023 Neo4j,Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. TOPICS WE WILL COVER 1. Why Graph Technology? 2. Why a Graph Database? 3. Think Knowledge Graphs! 4. Leverage your Graph with AI 5. Why a LLM is like Glue… 6. Let us show you… Demo time!
  • 4.
    © 2023 Neo4j,Inc. All rights reserved. 4 Why Graph Technology?
  • 5.
    © 2023 Neo4j,Inc. All rights reserved. WHY GRAPHS? “Graphs are the main modality of data we receive from nature” Google DeepMind
  • 6.
    © 2023 Neo4j,Inc. All rights reserved. 6 Neo4j - what can we do for your business? We are the Graph Technology company that helps organizations find hidden relationships and patterns across billions of data connections deeply, easily and quickly. Our platform offers an integrated Graph database, Graph Data Science and a visualization engine for your connected data. Powering applications that are impossible with other technologies
  • 7.
    7 20 / 20 TopUS banks 3 / 5 Top Aircraft Manufacturers 7 / 10 Top Telcos 3 / 5 Top Hotel Groups 8 / 10 Top Insurance Companies 10 /10 Top Automakers 7 / 10 Top Retailers 5 / 5 Top Pharmaceuticals Trusted by 75 of the
  • 8.
    © 2023 Neo4j,Inc. All rights reserved. 8 The first-ever graph database Creator of the market category Continued market leader 300 1B+ Enterprise customers $500M in funding 170+ Global partner ecosystem 250K Community of developers and data pros 100M+ Downloads
  • 9.
    © 2023 Neo4j,Inc. All rights reserved. FLEXIBLE CLOUD DEPLOYMENT MODELS 9 Graph-as-a-Service Cloud Managed Services Self-hosted Fully-managed SaaS Consumption-based pricing Cloud-native Self-service deployment No access to underlying infrastructure and systems White-glove managed service by Neo4j experts Fully customizable deployment model and service levels Operate In own data centers or Virtual Private Cloud For private and hybrid cloud, or on-prem Bring your own license Full control of your environment Run in any cloud, in your account
  • 10.
    © 2023 Neo4j,Inc. All rights reserved. 10 Why a Graph Database?
  • 11.
    © 2022 Neo4j,Inc. All rights reserved. Neo4j, Inc. All rights reserved 2022 Index Free Adjacency… 11 Why take the long route…?
  • 12.
    © 2022 Neo4j,Inc. All rights reserved. Connectedness and Size of Data Set Response Time Relational and Other NoSQL Databases 0 to 2 hops 0 to 3 degrees of separation Thousands of connections Tens to hundreds of hops Thousands of degrees Billions of connections 1000x Advantage at scale “Minutes to milliseconds” 1000x Performance @Unlimited Scale “we found [graph technology] to be literally thousands of times faster than our prior MySQL solution, with queries that require 10-100 times less code. Graph provides eBay with functionality that was previously impossible.” Volker Pacher - eBay
  • 13.
    © 2023 Neo4j,Inc. All rights reserved. 13 Think Knowledge Graphs!
  • 14.
    © 2022 Neo4j,Inc. All rights reserved. What are Knowledge Graphs? ● Entities can be real-world objects and abstract concepts ● Relationships represent the connections between entities ● Semantic description of the entities and relationships A knowledge graph is a structured representation of facts, consisting of entities, relationships and semantic descriptions
  • 15.
    © 2022 Neo4j,Inc. All rights reserved. 15 Show me…! From Data points to Knowledge Graph Car DRIVES name: “Dan” born: May 29, 1978 twitter: “@dan” name: “Ann” born: Dec 5, 1979 since: Jan 10, 2021 brand: “Volvo” model: “V90” LOVES LOVES LIVES_WITH O W N S Person Person description:
  • 16.
    © 2022 Neo4j,Inc. All rights reserved. User :VISITED Website User IPLocation Website IPLocation Website Website Website :VISITED :VISITED :VISITED :USED :USED : U S E D : V I S I T E D : V I S I T E D :VISITED :SAME_AS Graphs allow you to make implicit relationships…. ….explicit And they grow too…?!
  • 17.
    © 2022 Neo4j,Inc. All rights reserved. :SAME_AS User :VISITED Website User IPLocation Website IPLocation Website Website Website :VISITED :VISITED :VISITED :USED :USED : U S E D : V I S I T E D : V I S I T E D :VISITED User :SAM E_AS :USED :VISITED PersonId: 1 PersonId: 1 PersonId: 1 User PersonId: 2 :VISITED …and can then group similar nodes…and create a new graph from the explicit relationships… A graph grows organically - gaining insights and enriching your data Graphs Grow….!
  • 18.
    © 2022 Neo4j,Inc. All rights reserved. 18 Knowledge graphs in Credit risk analysis
  • 19.
    © 2023 Neo4j,Inc. All rights reserved. 19 LEVERAGE YOUR GRAPH WITH AI
  • 20.
    © 2023 Neo4j,Inc. All rights reserved. HUGE INTEREST IN GRAPH FUELED BY AI & ML 20 “50% of Gartner inquiries on the topic of AI involve discussion of the use of graph technology.” 35x increase in AI research papers featuring Graph over the past decade Source: Dimensions Knowledge System 365 13,040
  • 21.
    © 2023 Neo4j,Inc. All rights reserved. 21 PATH TO SUCCESS Knowledge Graphs Graph Algorithms Graph Native ML Find the patterns you’re looking for in connected data Identify associations, anomalies, and trends using unsupervised machine learning Learn features in your graph that you don’t even know are important yet → →
  • 22.
    Neo4j, Inc. Allrights reserved 2021 22 65+ Graph Algorithms - Out of the Box Pathfinding & Search Centrality Community Detection ❏ Delta-Stepping Single-Source ❏ Dijkstra’s Single-Source ❏ Dijkstra Source-Target ❏ All Pairs Shortest Path ❏ A* Shortest Path ❏ Yen’s K Shortest Path ❏ Minimum Weight Spanning Tree ❏ Random Walk ❏ Breadth & Depth First Search ❏ Degree Centrality ❏ Closeness Centrality ❏ Harmonic Centrality ❏ Betweenness Centrality & Approx. ❏ PageRank ❏ Personalized PageRank ❏ ArticleRank ❏ Eigenvector Centrality ❏ Hyperlink Induced Topic Search (HITS) ❏ Influence Maximization (Greedy, CELF) ❏ Weakly Connected Components ❏ Strongly Connected Components ❏ Label Propagation ❏ Leiden ❏ Louvain ❏ K-Means Clustering ❏ K-1 Coloring ❏ Modularity Optimization ❏ Speaker Listener Label Propagation ❏ Approximate Max K-Cut ❏ Triangle Count ❏ Local Clustering Coefficient ❏ Conductance Metric Heuristic LP Similarity Graph Embeddings ❏ Adamic Adar ❏ Common Neighbors ❏ Preferential Attachment ❏ Resource Allocations ❏ Same Community ❏ Total Neighbors ❏ K-Nearest Neighbors (KNN) ❏ Filtered K-Nearest Neighbors (KNN) ❏ Node Similarity ❏ Filtered Node Similarity ❏ Similarity Functions ❏ Fast Random Projection (FastRP) ❏ Node2Vec ❏ GraphSAGE ❏ HasGNN
  • 23.
    © 2022 Neo4j,Inc. All rights reserved. 23 Before we go any further…let’s Quiz!
  • 24.
    © 2022 Neo4j,Inc. All rights reserved. 24 Which of the colored nodes would be considered the most ‘important'?
  • 25.
    © 2022 Neo4j,Inc. All rights reserved. 25 Which of the colored nodes would be considered the most ‘important'?
  • 26.
    © 2023 Neo4j,Inc. All rights reserved. The Power of Graph Embeddings The ‘bridge’ to traditional Machine Learning/AI 26
  • 27.
    © 2023 Neo4j,Inc. All rights reserved. What are node embeddings? The representation of nodes as low-dimensional vectors that summarize their graph position, the structure of their local graph neighborhood as well as any possible node features NODE EMBEDDING
  • 28.
    © 2023 Neo4j,Inc. All rights reserved. NODE EMBEDDING
  • 29.
    © 2023 Neo4j,Inc. All rights reserved. Graph Data Science Embeddings 4 algorithms…and counting • FastRP (Fast Random Projection) - Calculates embeddings extremely fast using probabilistic sampling and linear algebra. • GraphSAGE (Graph SAmple and aggreGatE) - Trains a Graph Neural Network (GNN) to generate embeddings on old and new graph data. Uses batch sampling procedures for scalability. • Node2Vec - Creates embeddings that represent nodes in similar neighborhoods and/or structural “roles” in the graph using adjustable random walks. • HashGNN - Quickly generates embeddings on heterogeneous graphs. Like a GNN but much faster and simpler with comparable benchmarked performance. Leverages a clever application of hashing functions rather than training a model. New
  • 30.
    © 2023 Neo4j,Inc. All rights reserved. VALIDATED FOR RECOMMENDATIONS…
  • 31.
    © 2022 Neo4j,Inc. All rights reserved. 31 OK - we have vectors… Now what? Graph Machine Learning
  • 32.
    © 2022 Neo4j,Inc. All rights reserved. Use your vectors in traditional ML models Node classification: Classify entities based on their attributes & relationships Link prediction: Predict missing relationships or hidden links Features: Pre-existing attributes, algorithm results, embeddings Node property regression: Predict facts about entities based on their attributes & relationships And We discover the best model for you - you just supply the data! 32 Persist and Publish for Production
  • 33.
    © 2022 Neo4j,Inc. All rights reserved. 33 Machine Learning Pipelines AutoML for in-graph machine learning: ● Node Classification ● Node Regression ● Link Prediction ML pipelines support: ● Data splitting & rebalancing ● Feature engineering ● Model evaluation and selection ● Automated hyperparameter tuning Trained models in the catalog ● Persistable ● Publishable ● Automatically applies pipelines to new data for predictions
  • 34.
    © 2022 Neo4j,Inc. All rights reserved. The Graph Catalog – from Data Model to Predictive Model • Neo4j automates data transformations • Experiment with different data sets, data models • Fast iterations & layering • Production ready features, parallelization & enterprise support • Ability to persist and version data A graph-specific analytics workspace that’s mutable – integrated with a native-graph database Mutable In-Memory Workspace Computational Graph Native Graph Store
  • 35.
    © 2022 Neo4j,Inc. All rights reserved. 35 Our Implementations are Fast - and Getting Faster LDBC100 (LDBC Social Network Scale Factor 100) 300M+ nodes 2B+ relationships LDBC100PKP (LDBC Social Network Scale Factor 100) 500k nodes 46M+ relationships Logical Cores: 64 Memory: 512GB Storage: 600GB NVMe-SSD AWS EC2 R5D16XLarge Intel Xeon Platinum 8000 (Skylake-SP or Cascade Lake) Node Similarity 20min Betweenness Centrality 10min Node2Vec 2.8min Label Propagation 46sec Weakly Connected Components 36sec Local Clustering Coefficient 4.76min FastRP 1.33min PageRank 53sec Louvain 14.66min
  • 36.
    © 2023 Neo4j,Inc. All rights reserved. 36 Why a LLM is like glue…
  • 37.
    © 2023 Neo4j,Inc. All rights reserved. SETTING THE CONTEXT
  • 38.
    Apps Structured Data Unstructured Data Intranet Internet Social Media Other online contents Knowledge Extraction Knowledge Compression OpenDomain Knowledge Graph Closed Domain Knowledge Graph Knowledge Lake Knowledge Enrichment Augmented Generation Knowledge Discovery Experimentation & Discovery Education & Enablement Regulatory Compliance Sustainability Business Insights Cyber Observability And More! Automation Layer Knowledge Layer Data Augmented Generation Layer Outcomes LEVERAGING LLMs TO AUGMENT KNOWLEDGE & INSIGHTS
  • 39.
    LEVERAGING LLMs TODEPLOY FRONT-END APPS
  • 40.
    © 2023 Neo4j,Inc. All rights reserved. 40 Architecture NeoDash Dashboard UI Neo4j Free text input APOC call Graph representations Embeddings Graph visualization of results NeoDash Dashboard UI Persist results Conceptual flow for a text-to-graph or graph-to-text application based on Neo4j + OpenAI.
  • 41.
    © 2023 Neo4j,Inc. All rights reserved. 41 Some examples…
  • 42.
    © 2023 Neo4j,Inc. All rights reserved. 42
  • 43.
    © 2023 Neo4j,Inc. All rights reserved. 43
  • 44.
    © 2023 Neo4j,Inc. All rights reserved. 44 Links https://medium.com/neo4j/generating-cypher-queries-with-chatgpt-4-on-any-gr aph-schema-a57d7082a7e7 https://medium.com/towards-data-science/fine-tuning-an-llm-model-with-h2o-ll m-studio-to-generate-cypher-statements-3f34822ad5 https://medium.com/neo4j/context-aware-knowledge-graph-chatbot-with-gpt-4- and-neo4j-d3a99e8ae21e
  • 45.
    Neo4j, Inc. Allrights reserved 2021 45 Demo Time…! (but first some Cypher…)
  • 46.
    Neo4j, Inc. Allrights reserved 2021 Neo4j, Inc. All rights reserved 2021 Cypher: first we CREATE 46 MATCH (:Person { name:“Dan”} ) -[:LOVES]-> (:Person { name:“Ann”} ) Person NODE NODE LABEL PROPERTY LABEL PROPERTY CREATE RELATIONSHIP name: ‘Ann’ LOVES Person name: ‘Dan’
  • 47.
    Neo4j, Inc. Allrights reserved 2021 Neo4j, Inc. All rights reserved 2021 Cypher: and then we MATCH a pattern in the Graph 47 MARRIED_TO Person name: ‘Dan’ MATCH (p:Person { name:“Dan”} ) -[:MARRIED_TO]-> (spouse) NODE RELATIONSHIP TYPE LABEL PROPERTY VARIABLE spouse NODE RETURN p, spouse VARIABLE
  • 48.
    Neo4j, Inc. Allrights reserved 2021 48 In Cypher you MATCH a pattern and then RETURN a result MATCH (c:Country {name: "Finland"}) RETURN c; 001 Filtering is done with WHERE (this statement does exactly the same) MATCH (c:Country) WHERE c.name = "Finland" RETURN c; 002
  • 49.
    © 2023 Neo4j,Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. Thank you!