La strada verso il successo con i database a grafo, la Graph Data Science e l’AI generativa

Neo4j
Neo4jOpen Source NOSQL Graph Database
La strada verso il successo
con i database a grafo, la
Graph Data Science e l’AI
generativa
Marco Bessi, PreSale Engineer
Neo4j Inc. All rights reserved 2023
Your friendly instructor
Neo4j
Italy
PreSale
Engineer
PhD
@PoliMI
Neo4j Inc. All rights reserved 2023
Neo4j
Neo4j Inc. All rights reserved 2023
Pioneered the
graph database
in 2002
4 Neo4j Inc. All rights reserved 2023
Neo4j is a DB
Causal
clustering
ACID
transactions
High
availability
Binary
& HTTP
protocol
Official
drivers
5 Neo4j Inc. All rights reserved 2023
Neo4j is a GRAPH DB
Causal
clustering
ACID
transactions
High
availability
Binary
& HTTP
protocol
Official
drivers
Native
graph DB
Property
graph
model
Schema
free
Index-free
adjacency
Cypher
6 Neo4j Inc. All rights reserved 2023
Labeled property graph
model components
• Nodes
- Represent objects in the graph
• Relationships
- Relate nodes by type and direction
• Properties
- Name-value pairs that can go
on nodes and relationships
- Can have indexes and composite
indexes
• Labels
- Group nodes & shape the domain
7 Neo4j Inc. All rights reserved 2023
Hybrid workload duality
Intelligent
Operational
Systems
Graph Transactions,
Storage & Querying
Built for operational and analytical workloads
Better
Predictions
for Analytics
Graph Analytics, ML,
& Data Science
8 Neo4j Inc. All rights reserved 2023
Graph Data Science
Neo4j Inc. All rights reserved 2023
GDS evolution
Local
Matching
Use embeddings to learn
the features in your
graph that you don’t even
know are important yet.
Train in-graph supervise
ML models to predict
links, labels and missing
data.
Global
Patterns
Graph
Representations
Use unsupervised
machine learning
techniques to identify
associations, anomalies,
and trends.
Graph analytics
Graph feature
engineering
Find the patterns
you’re looking for in
connected data.
Knowledge graphs
10 Neo4j Inc. All rights reserved 2023
65+ Graph Data Science Techniques in Neo4j
Pathfinding &
Search
• Shortest Path
• Single-Source Shortest Path
• All Pairs Shortest Path
• A* Shortest Path
• Yen’s K Shortest Path
• Minimum Weight Spanning Tree
• K-Spanning Tree (MST)
• Random Walk
• Breadth & Depth First Search
Centrality &
Importance
• Degree Centrality
• Closeness Centrality
• Harmonic Centrality
• Betweenness Centrality & Approx.
• PageRank
• Personalized PageRank
• ArticleRank
• Eigenvector Centrality
• Hyperlink Induced Topic Search (HITS)
• Influence Maximization (Greedy, CELF)
Community
Detection
• Triangle Count
• Local Clustering Coefficient
• Connected Components (Union Find)
• Strongly Connected Components
• Label Propagation
• Louvain Modularity
• K-1 Coloring
• Modularity Optimization
• Speaker Listener Label Propagation
Supervised
Machine Learning
• Node Classification
• Link Prediction
… and more!
Heuristic Link
Prediction
• Adamic Adar
• Common Neighbors
• Preferential Attachment
• Resource Allocations
• Same Community
• Total Neighbors
Similarity
• Node Similarity
• K-Nearest Neighbors (KNN)
• Jaccard Similarity
• Cosine Similarity
• Pearson Similarity
• Euclidean Distance
• Approximate Nearest Neighbors (ANN)
Graph
Embeddings
• Node2Vec
• FastRP
• FastRPExtended
• GraphSAGE
• Synthetic Graph Generation
• Scale Properties
• Collapse Paths
• One Hot Encoding
• Split Relationships
• Graph Export
• Pregel API (write your own algos)
11 Neo4j Inc. All rights reserved 2023
Where is graph data science applied
Predictive
Maintenance
Churn
Prediction
Fraud
Detection
Life Sciences
Personalized
Recommendations
Cybersecurity
Disambiguation &
Segmentation
GenAI and KG
12 Neo4j Inc. All rights reserved 2023
Generative AI &
Knowledge Graphs
Neo4j Inc. All rights reserved 2023
In a world of infinite
content, knowledge
becomes valuable
Denny
Vrandečić
[WikiData]
[Semantic MediaWiki]
[Wikifunctions]
14 Neo4j Inc. All rights reserved 2023
$6.6 Trillion
In Economic Value
Generative AI is Predicted to Unlock
Up to 3.3% productivity improvement annually
15 Neo4j Inc. All rights reserved 2023
Generative AI
A branch of artificial intelligence that
focuses on creating models and
algorithms capable of generating new
and original content.
ChatGPT is a well known example of a
generative AI.
A type of Generative AI that is trained on
vast amounts of content.
Currently seen as the “GenAI for
language/text”.
ChatGPT is a Large Language Model.
Large Language Model
LLMs give us an amazing opportunity to:
Automate data
retrieval tasks 1
3
2
4
Expedite reading,
understanding, &
summarizing
Improve customer
service experiences
Generate content
& code
17 Neo4j Inc. All rights reserved 2023
Save time and money
Improve growth and retention:
Customer
Operations 1
3
2
4
Software Engineering
Marketing & Sales
R&D
75% of GenAI value will come from four areas
18 Neo4j Inc. All rights reserved 2023
But there are challenges:
1
3
2
4
5
Knowledge
cut-off
Can inherit bias
through training data
Reasonable answers,
not always accurate
Lack of enterprise
domain knowledge
Inability to verify or
attribute sources
19 Neo4j Inc. All rights reserved 2023
In summary
Learns random sentences from
random people
Talks like a person but doesn’t
really understand what it’s saying
Occasionally speaks absolute
non sense
Is a cute little bird
20 Neo4j Inc. All rights reserved 2023
How can you take advantage of
this massive opportunity while
overcoming these challenges?
21 Neo4j Inc. All rights reserved 2023
LLM + Graphs
I want to use
LLM’s in my
Graph for…
22 Neo4j Inc. All rights reserved 2023
LLM + Graphs
Front-end
Natural language
to cypher
I want to use
LLM’s in my
Graph for…
23 Neo4j Inc. All rights reserved 2023
LLM + Graphs
Back-end
KG-enhanced
LLMs
Front-end
Natural language
to cypher
I want to use
LLM’s in my
Graph for…
24 Neo4j Inc. All rights reserved 2023
How to help LLM do better?
Fine tuning
Few-shot
learning
Grounding
Provide additional
training data to better
tune GenAI to your
use case
Provide completed
examples “shots” to
the AI as context in
prompts. a.k.a
In-Context Learning
Provide AI with the
information to use for
generating responses
Neo4j as the data
source for Grounding
25 Neo4j Inc. All rights reserved 2023
Ground LLMs in Neo4j’s Knowledge Graph
26 Neo4j Inc. All rights reserved 2023
Retrieval Augmented
Generation (RAG):
retrieve data from outside a
foundation model and augment
your prompts by adding the
relevant retrieved data in
context
Neo4j’s Knowledge Graph
LLM + Neo4j’s
Knowledge
Graph
Improve
accuracy
Deploy with
confidence
Unlock
innovation
27 Neo4j Inc. All rights reserved 2023
Combine the power of LLM with the stored data of
your knowledge graph for more accurate responses
and to reduce hallucinations.
Improve Accuracy
Neo4j Inc. All rights reserved 2023
LLMs can help generate more accurate responses by considering the connections
and dependencies within the graph and mapping new links as new data is identified.
Flexible schema means it is
easy to grow your knowledge
base whenever new
information is available
Relationships are data that is
used to return explicit results
Accuracy
Vector search adds implicit
results showcasing similar
responses
29 Neo4j Inc. All rights reserved 2023
Knowledge retrieval with Neo4j
30 Neo4j Inc. All rights reserved 2023
CALL db.index.vector.queryNodes('products', 5, $embedding)
CALL apoc.ml.openai.embedding([$question], $apiKey)
CALL apoc.ml.openai.chat([{role:'system', content: $system},
{role:'user', content: $user}], $apiKey)
1
2
3
Add a layer of context
over your LLM for
accuracy and
specificity
Neo4j knowledge graphs supply the LLM with information about your company so answers
are specific to your business, giving more context for more accurate responses.
Specificity
31 Neo4j Inc. All rights reserved 2023
Ensure your grounding-partner meets security,
scalability, and regulatory requirements so you
can deploy enterprise-wide with confidence.
Deploy with Confidence
Neo4j Inc. All rights reserved 2023
Define policies by role or identity
Integrates with identity and access
management provider with SSO
LLM retrieves and returns information governed by your enterprise security and
access control policies-down to the node level.
Security & Privacy
Build constraints on nodes, labels,
relationships, properties, specific
parts of the graph, and even
traversal depth
33 Neo4j Inc. All rights reserved 2023
Easily scale with autonomous
clustering
Reliability
Neo4j knowledge graphs scale and are battle-tested to thousands of concurrent users,
get answers quickly with incredibly fast query speeds.
Incredibly fast traversals with index
free adjacency
34 Neo4j Inc. All rights reserved 2023
Add metadata or annotations
Map relationships between
search results and data source
nodes
Represent data sources as nodes
Verify the enriched responses from your LLM because each piece of information is
linked to its sources and origins.
Explainability
35 Neo4j Inc. All rights reserved 2023
Adopt innovation and iterate as your LLM
implementations evolve with full interoperability
across all cloud and data providers.
Unlock Innovation
Neo4j Inc. All rights reserved 2023
Any cloud, any data provider
Graph Data Science
BI & VISUALIZATIONS
INGEST
STORE
PROCESS
Apache
Kafka
MACHINE LEARNING
Cloud
Functions
Neo4j Bloom
PubSub
DataProc
Analytics
Feature
Engineering
Data
Exploration
Graph
Data
Science
Business
Applications &
Existing Systems
Files (unstructured,
structured)
TensorFlow
KNIME Python
Cloud Storage
AWS
Lambda
Graph Database
37 Neo4j Inc. All rights reserved 2023
Ground LLMs to improve accuracy and explainability with Neo4j’s
enterprise-ready knowledge graph built on a flexible schema that
integrates seamlessly with your GenAI tech platform.
Stay Grounded with Neo4j
Improve Accuracy Deploy with Confidence Unlock Innovation
Neo4j Inc. All rights reserved 2023
Nhow Milano
Via Tortona 35, Milano
Graph Talk Milano
Giovedi, 5 Ottobre 2023
9.00-13.30
Thank you
Marco Bessi, PreSale Engineer, marco.bessi@neo4j.com
Neo4j Inc. All rights reserved 2023
Support
41 Neo4j Inc. All rights reserved 2023
Better predictions with data you already have
● Traditional ML ignore network structure because it’s difficult to extract
● Add graphy data to existing ML pipelines to increase accuracy, or
● Graphs use relationships to unlock otherwise unattainable predictions
Machine Learning Pipeline
42 Neo4j Inc. All rights reserved 2023
Why do data science in Neo4j (VS Python/R )?
1
2
3
Performance: Specialized data structure; Good concurrency;
In-memory optimization & compression productions-ready.
Easy of use: Consistent syntax, including Cypher;
Comprehensive library (65+ vetted algorithms);
Persistence, every stage of the data science process
can be stored/not stored.
Product support: GDS / AuraDS is supported
by Neo4j, well documented, with a large
team of support engineers, and a sizeable
user community.
43 Neo4j Inc. All rights reserved 2023
Neo4j should be the database for Grounding
44 Neo4j Inc. All rights reserved 2023
Vector DB Limitations
Knowledge Graph
Strengths
Neo4j Differentiators
Similarity ≠ Relevance or
Accuracy
Black-Box (Sub-Symbolic)
Duplicate & incomplete
results
Missing reference information
Challenging to answer
multi-hop questions
Difficult for SME to correct
Relevancy beyond just
similarity
Transparent symbolic
representation
Condensed information
storage
References between
documents calculated before
query time
Enables human correction
LLMs understand Cypher
Vectors + Cypher
Index for many data types
(numeric, geopoints, dates)
Fine-grained security and
access control
ACID transactions,
high-availability, and scale
Ecosystem integration
Available on all clouds
Graph Data Science for
enhanced ML
New Neo4j features
From Neo4j v5.11
1
2
APOC OpenAI API:
CALL apoc.ml.openai.embedding(['Some Text'], $apiKey, {})
CALL apoc.ml.openai.completion('Question', $apiKey, {config}) yield
value;
CALL apoc.ml.query("Question") yield value, query
...
Vector index & search:
Index nodes on float or double array properties.
Based on Lucene which uses Hierarchical Navigable Small-World graphs (HNSW).
Created and queried using procedures.
Vector index
Leveraging Vector + KG
Creation
CALL db.index.vector.createNodeIndex(
)
indexName, // Name of the index to create (STRING)
label, // Label of nodes to index (STRING)
propertyKey, // Property key to index (STRING)
dimensions, // Dimensionality of vectors to index (INTEGER)
similarityFunction // “EUCLIDEAN” or “COSINE”
(case-insensitive STRING)
Querying
CALL db.index.vector.queryNodes(
)
indexName, // Name of the index to query (STRING)
k, // Number of neighbors to query for (INTEGER)
vector // Query vector whose neighbors we are searching for
(LIST<FLOAT>)
Writing vector efficiently
CALL db.create.setVectorProperty(
)
node, // Nodes to add the property to (NODE)
propertyKey, // Property key to write to (STRING)
vector, // Property value to write (LIST<FLOAT>)
1 de 50

Recomendados

La strada verso il successo con i database a grafo, la Graph Data Science e l... por
La strada verso il successo con i database a grafo, la Graph Data Science e l...La strada verso il successo con i database a grafo, la Graph Data Science e l...
La strada verso il successo con i database a grafo, la Graph Data Science e l...Neo4j
9 vistas39 diapositivas
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato... por
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...
El camino hacia el éxito con las bases de datos de grafos, la ciencia de dato...Neo4j
62 vistas49 diapositivas
Neo4j – The Fastest Path to Scalable Real-Time Analytics por
Neo4j – The Fastest Path to Scalable Real-Time AnalyticsNeo4j – The Fastest Path to Scalable Real-Time Analytics
Neo4j – The Fastest Path to Scalable Real-Time AnalyticsNeo4j
456 vistas37 diapositivas
Graph Data Science with Neo4j: Nordics Webinar por
Graph Data Science with Neo4j: Nordics WebinarGraph Data Science with Neo4j: Nordics Webinar
Graph Data Science with Neo4j: Nordics WebinarNeo4j
321 vistas22 diapositivas
Einstieg in Neo4j Graph Data Science por
Einstieg in Neo4j Graph Data ScienceEinstieg in Neo4j Graph Data Science
Einstieg in Neo4j Graph Data ScienceNeo4j
249 vistas26 diapositivas
Introducción a Neo4j por
Introducción a Neo4jIntroducción a Neo4j
Introducción a Neo4jNeo4j
32 vistas27 diapositivas

Más contenido relacionado

Similar a La strada verso il successo con i database a grafo, la Graph Data Science e l’AI generativa

The perfect couple: Uniting Large Language Models and Knowledge Graphs for En... por
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...Neo4j
250 vistas57 diapositivas
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S... por
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...Neo4j
129 vistas42 diapositivas
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da... por
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j
39 vistas30 diapositivas
Graphs for Data Science and Machine Learning por
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningNeo4j
794 vistas40 diapositivas
Government GraphSummit: Leveraging Graphs for AI and ML por
Government GraphSummit: Leveraging Graphs for AI and MLGovernment GraphSummit: Leveraging Graphs for AI and ML
Government GraphSummit: Leveraging Graphs for AI and MLNeo4j
92 vistas24 diapositivas
The Path To Success With Graph Database and Analytics por
The Path To Success With Graph Database and AnalyticsThe Path To Success With Graph Database and Analytics
The Path To Success With Graph Database and AnalyticsNeo4j
41 vistas39 diapositivas

Similar a La strada verso il successo con i database a grafo, la Graph Data Science e l’AI generativa(20)

The perfect couple: Uniting Large Language Models and Knowledge Graphs for En... por Neo4j
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
The perfect couple: Uniting Large Language Models and Knowledge Graphs for En...
Neo4j250 vistas
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S... por Neo4j
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S...
Neo4j129 vistas
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da... por Neo4j
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j39 vistas
Graphs for Data Science and Machine Learning por Neo4j
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine Learning
Neo4j794 vistas
Government GraphSummit: Leveraging Graphs for AI and ML por Neo4j
Government GraphSummit: Leveraging Graphs for AI and MLGovernment GraphSummit: Leveraging Graphs for AI and ML
Government GraphSummit: Leveraging Graphs for AI and ML
Neo4j92 vistas
The Path To Success With Graph Database and Analytics por Neo4j
The Path To Success With Graph Database and AnalyticsThe Path To Success With Graph Database and Analytics
The Path To Success With Graph Database and Analytics
Neo4j41 vistas
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx por Neo4j
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptxKnowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx
Neo4j242 vistas
Neo4j GraphDay Seattle- Sept19- Connected data imperative por Neo4j
Neo4j GraphDay Seattle- Sept19- Connected data imperativeNeo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j529 vistas
Optimizing Your Supply Chain with Neo4j por Neo4j
Optimizing Your Supply Chain with Neo4jOptimizing Your Supply Chain with Neo4j
Optimizing Your Supply Chain with Neo4j
Neo4j46 vistas
Neo4j y GenAI por Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j56 vistas
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov... por Neo4j
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov...
Neo4j77 vistas
ntroducing to the Power of Graph Technology por Neo4j
ntroducing to the Power of Graph Technologyntroducing to the Power of Graph Technology
ntroducing to the Power of Graph Technology
Neo4j335 vistas
Using Connected Data and Graph Technology to Enhance Machine Learning and Art... por Neo4j
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Neo4j50 vistas
The path to success with Graph Database and Graph Data Science por Neo4j
The path to success with Graph Database and Graph Data ScienceThe path to success with Graph Database and Graph Data Science
The path to success with Graph Database and Graph Data Science
Neo4j107 vistas
GraphSummit Toronto: Leveraging Graphs for AI and ML por Neo4j
GraphSummit Toronto: Leveraging Graphs for AI and MLGraphSummit Toronto: Leveraging Graphs for AI and ML
GraphSummit Toronto: Leveraging Graphs for AI and ML
Neo4j66 vistas
Workshop - Build a Graph Solution por Neo4j
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph Solution
Neo4j94 vistas
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf por Neo4j
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdfNeo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j59 vistas
GraphTour 2020 - Neo4j: What's New? por Neo4j
GraphTour 2020 - Neo4j: What's New?GraphTour 2020 - Neo4j: What's New?
GraphTour 2020 - Neo4j: What's New?
Neo4j511 vistas
The Neo4j Data Platform for Today & Tomorrow.pdf por Neo4j
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j157 vistas
The Art of the Possible with Graph Technology por Neo4j
The Art of the Possible with Graph TechnologyThe Art of the Possible with Graph Technology
The Art of the Possible with Graph Technology
Neo4j29 vistas

Más de Neo4j

FIMA 2023 Neo4j & FS - Entity Resolution.pptx por
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptxNeo4j
17 vistas26 diapositivas
Operations & Data Graph por
Operations & Data GraphOperations & Data Graph
Operations & Data GraphNeo4j
47 vistas25 diapositivas
TAGTTOO: La nova xarxa social por
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa socialNeo4j
27 vistas19 diapositivas
El Arte de lo Possible por
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo PossibleNeo4j
52 vistas35 diapositivas
Roadmap y Novedades de producto por
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
63 vistas33 diapositivas
Neo4j : Graphes de Connaissance, IA et LLMs por
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j
59 vistas20 diapositivas

Más de Neo4j(20)

FIMA 2023 Neo4j & FS - Entity Resolution.pptx por Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j17 vistas
Operations & Data Graph por Neo4j
Operations & Data GraphOperations & Data Graph
Operations & Data Graph
Neo4j47 vistas
TAGTTOO: La nova xarxa social por Neo4j
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa social
Neo4j27 vistas
El Arte de lo Possible por Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j52 vistas
Roadmap y Novedades de producto por Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j63 vistas
Neo4j : Graphes de Connaissance, IA et LLMs por Neo4j
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMs
Neo4j59 vistas
Les nouveautés produit Neo4j por Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j32 vistas
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu... por Neo4j
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu...
Neo4j27 vistas
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com... por Neo4j
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com...
Neo4j54 vistas
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx por Neo4j
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j55 vistas
Neo4j workshop at GraphSummit London 14 Nov 2023.pdf por Neo4j
Neo4j workshop at GraphSummit London 14 Nov 2023.pdfNeo4j workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j workshop at GraphSummit London 14 Nov 2023.pdf
Neo4j54 vistas
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx por Neo4j
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptxNeo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx
Neo4j66 vistas
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx por Neo4j
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptxAstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
Neo4j52 vistas
Google Cloud at GraphSummit London 14 Nov 2023.pptx por Neo4j
Google Cloud at GraphSummit London 14 Nov 2023.pptxGoogle Cloud at GraphSummit London 14 Nov 2023.pptx
Google Cloud at GraphSummit London 14 Nov 2023.pptx
Neo4j27 vistas
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx por Neo4j
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptxNorthern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx
Neo4j49 vistas
Peek into Neo4j Product Strategy and Roadmap por Neo4j
Peek into Neo4j Product Strategy and RoadmapPeek into Neo4j Product Strategy and Roadmap
Peek into Neo4j Product Strategy and Roadmap
Neo4j87 vistas
Transforming Intelligence Analysis with Knowledge Graphs por Neo4j
Transforming Intelligence Analysis with Knowledge GraphsTransforming Intelligence Analysis with Knowledge Graphs
Transforming Intelligence Analysis with Knowledge Graphs
Neo4j62 vistas
Knowledge Graphs and Generative AI por Neo4j
Knowledge Graphs and Generative AIKnowledge Graphs and Generative AI
Knowledge Graphs and Generative AI
Neo4j158 vistas
Ontology Driven Data for Fleet Management por Neo4j
Ontology Driven Data for Fleet ManagementOntology Driven Data for Fleet Management
Ontology Driven Data for Fleet Management
Neo4j56 vistas
Unleash the Power of Neo4j with GPT and Large Language Models: Harmonizing Co... por Neo4j
Unleash the Power of Neo4j with GPT and Large Language Models: Harmonizing Co...Unleash the Power of Neo4j with GPT and Large Language Models: Harmonizing Co...
Unleash the Power of Neo4j with GPT and Large Language Models: Harmonizing Co...
Neo4j78 vistas

Último

Airline Booking Software por
Airline Booking SoftwareAirline Booking Software
Airline Booking SoftwareSharmiMehta
9 vistas26 diapositivas
The Path to DevOps por
The Path to DevOpsThe Path to DevOps
The Path to DevOpsJohn Valentino
5 vistas6 diapositivas
Playwright Retries por
Playwright RetriesPlaywright Retries
Playwright Retriesartembondar5
5 vistas1 diapositiva
AI and Ml presentation .pptx por
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptxFayazAli87
14 vistas15 diapositivas
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... por
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...sparkfabrik
8 vistas46 diapositivas
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... por
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Lisi Hocke
35 vistas124 diapositivas

Último(20)

Airline Booking Software por SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta9 vistas
AI and Ml presentation .pptx por FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8714 vistas
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... por sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik8 vistas
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... por Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 vistas
Introduction to Git Source Control por John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino7 vistas
Understanding HTML terminology por artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar57 vistas
tecnologia18.docx por nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 vistas
Electronic AWB - Electronic Air Waybill por Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 5 vistas
Generic or specific? Making sensible software design decisions por Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
ADDO_2022_CICID_Tom_Halpin.pdf por TomHalpin9
ADDO_2022_CICID_Tom_Halpin.pdfADDO_2022_CICID_Tom_Halpin.pdf
ADDO_2022_CICID_Tom_Halpin.pdf
TomHalpin95 vistas
The Era of Large Language Models.pptx por AbdulVahedShaik
The Era of Large Language Models.pptxThe Era of Large Language Models.pptx
The Era of Large Language Models.pptx
AbdulVahedShaik7 vistas
predicting-m3-devopsconMunich-2023-v2.pptx por Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app11 vistas
Dapr Unleashed: Accelerating Microservice Development por Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski13 vistas
Top-5-production-devconMunich-2023.pptx por Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app9 vistas

La strada verso il successo con i database a grafo, la Graph Data Science e l’AI generativa

  • 1. La strada verso il successo con i database a grafo, la Graph Data Science e l’AI generativa Marco Bessi, PreSale Engineer Neo4j Inc. All rights reserved 2023
  • 3. Neo4j Neo4j Inc. All rights reserved 2023
  • 4. Pioneered the graph database in 2002 4 Neo4j Inc. All rights reserved 2023
  • 5. Neo4j is a DB Causal clustering ACID transactions High availability Binary & HTTP protocol Official drivers 5 Neo4j Inc. All rights reserved 2023
  • 6. Neo4j is a GRAPH DB Causal clustering ACID transactions High availability Binary & HTTP protocol Official drivers Native graph DB Property graph model Schema free Index-free adjacency Cypher 6 Neo4j Inc. All rights reserved 2023
  • 7. Labeled property graph model components • Nodes - Represent objects in the graph • Relationships - Relate nodes by type and direction • Properties - Name-value pairs that can go on nodes and relationships - Can have indexes and composite indexes • Labels - Group nodes & shape the domain 7 Neo4j Inc. All rights reserved 2023
  • 8. Hybrid workload duality Intelligent Operational Systems Graph Transactions, Storage & Querying Built for operational and analytical workloads Better Predictions for Analytics Graph Analytics, ML, & Data Science 8 Neo4j Inc. All rights reserved 2023
  • 9. Graph Data Science Neo4j Inc. All rights reserved 2023
  • 10. GDS evolution Local Matching Use embeddings to learn the features in your graph that you don’t even know are important yet. Train in-graph supervise ML models to predict links, labels and missing data. Global Patterns Graph Representations Use unsupervised machine learning techniques to identify associations, anomalies, and trends. Graph analytics Graph feature engineering Find the patterns you’re looking for in connected data. Knowledge graphs 10 Neo4j Inc. All rights reserved 2023
  • 11. 65+ Graph Data Science Techniques in Neo4j Pathfinding & Search • Shortest Path • Single-Source Shortest Path • All Pairs Shortest Path • A* Shortest Path • Yen’s K Shortest Path • Minimum Weight Spanning Tree • K-Spanning Tree (MST) • Random Walk • Breadth & Depth First Search Centrality & Importance • Degree Centrality • Closeness Centrality • Harmonic Centrality • Betweenness Centrality & Approx. • PageRank • Personalized PageRank • ArticleRank • Eigenvector Centrality • Hyperlink Induced Topic Search (HITS) • Influence Maximization (Greedy, CELF) Community Detection • Triangle Count • Local Clustering Coefficient • Connected Components (Union Find) • Strongly Connected Components • Label Propagation • Louvain Modularity • K-1 Coloring • Modularity Optimization • Speaker Listener Label Propagation Supervised Machine Learning • Node Classification • Link Prediction … and more! Heuristic Link Prediction • Adamic Adar • Common Neighbors • Preferential Attachment • Resource Allocations • Same Community • Total Neighbors Similarity • Node Similarity • K-Nearest Neighbors (KNN) • Jaccard Similarity • Cosine Similarity • Pearson Similarity • Euclidean Distance • Approximate Nearest Neighbors (ANN) Graph Embeddings • Node2Vec • FastRP • FastRPExtended • GraphSAGE • Synthetic Graph Generation • Scale Properties • Collapse Paths • One Hot Encoding • Split Relationships • Graph Export • Pregel API (write your own algos) 11 Neo4j Inc. All rights reserved 2023
  • 12. Where is graph data science applied Predictive Maintenance Churn Prediction Fraud Detection Life Sciences Personalized Recommendations Cybersecurity Disambiguation & Segmentation GenAI and KG 12 Neo4j Inc. All rights reserved 2023
  • 13. Generative AI & Knowledge Graphs Neo4j Inc. All rights reserved 2023
  • 14. In a world of infinite content, knowledge becomes valuable Denny Vrandečić [WikiData] [Semantic MediaWiki] [Wikifunctions] 14 Neo4j Inc. All rights reserved 2023
  • 15. $6.6 Trillion In Economic Value Generative AI is Predicted to Unlock Up to 3.3% productivity improvement annually 15 Neo4j Inc. All rights reserved 2023
  • 16. Generative AI A branch of artificial intelligence that focuses on creating models and algorithms capable of generating new and original content. ChatGPT is a well known example of a generative AI. A type of Generative AI that is trained on vast amounts of content. Currently seen as the “GenAI for language/text”. ChatGPT is a Large Language Model. Large Language Model
  • 17. LLMs give us an amazing opportunity to: Automate data retrieval tasks 1 3 2 4 Expedite reading, understanding, & summarizing Improve customer service experiences Generate content & code 17 Neo4j Inc. All rights reserved 2023
  • 18. Save time and money Improve growth and retention: Customer Operations 1 3 2 4 Software Engineering Marketing & Sales R&D 75% of GenAI value will come from four areas 18 Neo4j Inc. All rights reserved 2023
  • 19. But there are challenges: 1 3 2 4 5 Knowledge cut-off Can inherit bias through training data Reasonable answers, not always accurate Lack of enterprise domain knowledge Inability to verify or attribute sources 19 Neo4j Inc. All rights reserved 2023
  • 20. In summary Learns random sentences from random people Talks like a person but doesn’t really understand what it’s saying Occasionally speaks absolute non sense Is a cute little bird 20 Neo4j Inc. All rights reserved 2023
  • 21. How can you take advantage of this massive opportunity while overcoming these challenges? 21 Neo4j Inc. All rights reserved 2023
  • 22. LLM + Graphs I want to use LLM’s in my Graph for… 22 Neo4j Inc. All rights reserved 2023
  • 23. LLM + Graphs Front-end Natural language to cypher I want to use LLM’s in my Graph for… 23 Neo4j Inc. All rights reserved 2023
  • 24. LLM + Graphs Back-end KG-enhanced LLMs Front-end Natural language to cypher I want to use LLM’s in my Graph for… 24 Neo4j Inc. All rights reserved 2023
  • 25. How to help LLM do better? Fine tuning Few-shot learning Grounding Provide additional training data to better tune GenAI to your use case Provide completed examples “shots” to the AI as context in prompts. a.k.a In-Context Learning Provide AI with the information to use for generating responses Neo4j as the data source for Grounding 25 Neo4j Inc. All rights reserved 2023
  • 26. Ground LLMs in Neo4j’s Knowledge Graph 26 Neo4j Inc. All rights reserved 2023 Retrieval Augmented Generation (RAG): retrieve data from outside a foundation model and augment your prompts by adding the relevant retrieved data in context
  • 27. Neo4j’s Knowledge Graph LLM + Neo4j’s Knowledge Graph Improve accuracy Deploy with confidence Unlock innovation 27 Neo4j Inc. All rights reserved 2023
  • 28. Combine the power of LLM with the stored data of your knowledge graph for more accurate responses and to reduce hallucinations. Improve Accuracy Neo4j Inc. All rights reserved 2023
  • 29. LLMs can help generate more accurate responses by considering the connections and dependencies within the graph and mapping new links as new data is identified. Flexible schema means it is easy to grow your knowledge base whenever new information is available Relationships are data that is used to return explicit results Accuracy Vector search adds implicit results showcasing similar responses 29 Neo4j Inc. All rights reserved 2023
  • 30. Knowledge retrieval with Neo4j 30 Neo4j Inc. All rights reserved 2023 CALL db.index.vector.queryNodes('products', 5, $embedding) CALL apoc.ml.openai.embedding([$question], $apiKey) CALL apoc.ml.openai.chat([{role:'system', content: $system}, {role:'user', content: $user}], $apiKey) 1 2 3
  • 31. Add a layer of context over your LLM for accuracy and specificity Neo4j knowledge graphs supply the LLM with information about your company so answers are specific to your business, giving more context for more accurate responses. Specificity 31 Neo4j Inc. All rights reserved 2023
  • 32. Ensure your grounding-partner meets security, scalability, and regulatory requirements so you can deploy enterprise-wide with confidence. Deploy with Confidence Neo4j Inc. All rights reserved 2023
  • 33. Define policies by role or identity Integrates with identity and access management provider with SSO LLM retrieves and returns information governed by your enterprise security and access control policies-down to the node level. Security & Privacy Build constraints on nodes, labels, relationships, properties, specific parts of the graph, and even traversal depth 33 Neo4j Inc. All rights reserved 2023
  • 34. Easily scale with autonomous clustering Reliability Neo4j knowledge graphs scale and are battle-tested to thousands of concurrent users, get answers quickly with incredibly fast query speeds. Incredibly fast traversals with index free adjacency 34 Neo4j Inc. All rights reserved 2023
  • 35. Add metadata or annotations Map relationships between search results and data source nodes Represent data sources as nodes Verify the enriched responses from your LLM because each piece of information is linked to its sources and origins. Explainability 35 Neo4j Inc. All rights reserved 2023
  • 36. Adopt innovation and iterate as your LLM implementations evolve with full interoperability across all cloud and data providers. Unlock Innovation Neo4j Inc. All rights reserved 2023
  • 37. Any cloud, any data provider Graph Data Science BI & VISUALIZATIONS INGEST STORE PROCESS Apache Kafka MACHINE LEARNING Cloud Functions Neo4j Bloom PubSub DataProc Analytics Feature Engineering Data Exploration Graph Data Science Business Applications & Existing Systems Files (unstructured, structured) TensorFlow KNIME Python Cloud Storage AWS Lambda Graph Database 37 Neo4j Inc. All rights reserved 2023
  • 38. Ground LLMs to improve accuracy and explainability with Neo4j’s enterprise-ready knowledge graph built on a flexible schema that integrates seamlessly with your GenAI tech platform. Stay Grounded with Neo4j Improve Accuracy Deploy with Confidence Unlock Innovation Neo4j Inc. All rights reserved 2023
  • 39. Nhow Milano Via Tortona 35, Milano Graph Talk Milano Giovedi, 5 Ottobre 2023 9.00-13.30
  • 40. Thank you Marco Bessi, PreSale Engineer, marco.bessi@neo4j.com Neo4j Inc. All rights reserved 2023
  • 41. Support 41 Neo4j Inc. All rights reserved 2023
  • 42. Better predictions with data you already have ● Traditional ML ignore network structure because it’s difficult to extract ● Add graphy data to existing ML pipelines to increase accuracy, or ● Graphs use relationships to unlock otherwise unattainable predictions Machine Learning Pipeline 42 Neo4j Inc. All rights reserved 2023
  • 43. Why do data science in Neo4j (VS Python/R )? 1 2 3 Performance: Specialized data structure; Good concurrency; In-memory optimization & compression productions-ready. Easy of use: Consistent syntax, including Cypher; Comprehensive library (65+ vetted algorithms); Persistence, every stage of the data science process can be stored/not stored. Product support: GDS / AuraDS is supported by Neo4j, well documented, with a large team of support engineers, and a sizeable user community. 43 Neo4j Inc. All rights reserved 2023
  • 44. Neo4j should be the database for Grounding 44 Neo4j Inc. All rights reserved 2023 Vector DB Limitations Knowledge Graph Strengths Neo4j Differentiators Similarity ≠ Relevance or Accuracy Black-Box (Sub-Symbolic) Duplicate & incomplete results Missing reference information Challenging to answer multi-hop questions Difficult for SME to correct Relevancy beyond just similarity Transparent symbolic representation Condensed information storage References between documents calculated before query time Enables human correction LLMs understand Cypher Vectors + Cypher Index for many data types (numeric, geopoints, dates) Fine-grained security and access control ACID transactions, high-availability, and scale Ecosystem integration Available on all clouds Graph Data Science for enhanced ML
  • 45. New Neo4j features From Neo4j v5.11 1 2 APOC OpenAI API: CALL apoc.ml.openai.embedding(['Some Text'], $apiKey, {}) CALL apoc.ml.openai.completion('Question', $apiKey, {config}) yield value; CALL apoc.ml.query("Question") yield value, query ... Vector index & search: Index nodes on float or double array properties. Based on Lucene which uses Hierarchical Navigable Small-World graphs (HNSW). Created and queried using procedures.
  • 48. Creation CALL db.index.vector.createNodeIndex( ) indexName, // Name of the index to create (STRING) label, // Label of nodes to index (STRING) propertyKey, // Property key to index (STRING) dimensions, // Dimensionality of vectors to index (INTEGER) similarityFunction // “EUCLIDEAN” or “COSINE” (case-insensitive STRING)
  • 49. Querying CALL db.index.vector.queryNodes( ) indexName, // Name of the index to query (STRING) k, // Number of neighbors to query for (INTEGER) vector // Query vector whose neighbors we are searching for (LIST<FLOAT>)
  • 50. Writing vector efficiently CALL db.create.setVectorProperty( ) node, // Nodes to add the property to (NODE) propertyKey, // Property key to write to (STRING) vector, // Property value to write (LIST<FLOAT>)