The perfect couple: Uniting Large Language Models and Knowledge Graphs for Enhanced Knowledge Representation

Neo4j
Neo4jOpen Source NOSQL Graph Database um Neo4j
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
LLM 💕 KG: The Perfect Couple
Uniting Large Language Models and Knowledge
Graphs for Enhanced Knowledge Representation
Kristof Neys
Director Graph Data Science Technology
© 2023 Neo4j, Inc. All rights reserved.
7/10
20/25
7/10
Top Retail Firms
Top Financial Firms
Top Software Vendors
Anyway You Like It
2
Creator of the Property
Graph and Cypher language
at the core of the GQL ISO
project. Fully integrated Data
Science Library
Thousands of Customers
World-Wide
250,000 developers
worldwide
Industry Leaders use Neo4j
On-Prem
DB-as-a-Service
In the Cloud
© 2022 Neo4j, Inc. All rights reserved.
3
Topics
We will cover:
1) Knowledge Graphs
2) Knowledge Graphs + LLMs ~ As a Front end
3) Knowledge Graphs + LLMs ~ As a Back end
4) How to get started on your graph journey
© 2023 Neo4j, Inc. All rights reserved.
4
“In a world of infinite content, knowledge
becomes [very] valuable”
Denny Vrandečić, Wikidata
© 2023 Neo4j, Inc. All rights reserved.
5
The Core Graph Object:
A Knowledge Graph
© 2023 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
© 2023 Neo4j, Inc. All rights reserved.
7
From Data points to a Knowledge Graph
Car
DRIVES
name: “Dan”
born: May 29, 1978
twitter: “@dan”
name: “Ann”
born: Dec 5, 1979
brand: “Volvo”
model: “V90”
description:
since:
Jan 10, 2021
LOVES
LOVES
LIVES_WITH
O
W
N
S
Person Person
© 2023 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 allows you to make implicit
relationships….
….explicit
Graphs….Grow!
© 2023 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!
© 2023 Neo4j, Inc. All rights reserved.
Come and see us for the book on Knowledge Graphs
© 2023 Neo4j, Inc. All rights reserved.
11
Knowledge Graph + LLM
A marriage made in heaven
© 2023 Neo4j, Inc. All rights reserved.
12
Setting the context - From a user point of view
© 2023 Neo4j, Inc. All rights reserved.
13
As a front-end…
© 2023 Neo4j, Inc. All rights reserved.
14
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.
15
Writing Code is soo last year….
© 2023 Neo4j, Inc. All rights reserved.
16
As a back-end…
© 2023 Neo4j, Inc. All rights reserved.
17
We are not making this up…
© 2023 Neo4j, Inc. All rights reserved.
18
Three main ways to let LLM’s work with your Graph
© 2023 Neo4j, Inc. All rights reserved.
19
Knowledge Graphs that enhance LLMs
© 2023 Neo4j, Inc. All rights reserved.
LLMs Core function…To manipulate strings…
• GPT training focuses primarily on predicting the probability of text sequences and
specifically for predicting which words come next in a sequence
“When you play the
game of thrones….
Input
LLM
…you win or you die.
There is no middle
ground.”
Output
© 2023 Neo4j, Inc. All rights reserved.
21
Nothing is perfect…
but don’t push it!
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
There is no need for this…!
© 2023 Neo4j, Inc. All rights reserved.
Whereas we all know what The Truth is…
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
It’s all about Knowledge and Accuracy
• Training data can be false
• LLMs: training is focused on self-supervised learning
• Cut-off date: i.e ChatGPT is only trained on pre Sep 2021 data
• Inability to verify sources for answers
• Sensitive to prompt (input) phrasing
• Lack of explainability
© 2023 Neo4j, Inc. All rights reserved.
Making stuff up…
© 2023 Neo4j, Inc. All rights reserved.
In Summary…
© 2023 Neo4j, Inc. All rights reserved.
29
So…, let’s solve this problem!
© 2023 Neo4j, Inc. All rights reserved.
How to Help LLMs Do Better?
Few-Shot Learning
Fine-Tuning Grounding
Provide completed
examples “shots” to the AI
as context in prompts.
a.k.a In-Context Learning
Provide additional training
data to better tune GenAI
to your use case
Provide AI with the
information to use for
generating responses
© 2023 Neo4j, Inc. All rights reserved.
Grounding
Provide AI with the information to use for generating responses
Best of Both Worlds
Use the language understanding skills of LLMs but control the knowledge/sources it uses
● Improve accuracy & tailor to enterprise and use case
● Reduce hallucinations and other inconsistencies
● Control provenance
Methods
● Internet search, plugins, agents
● Query generation
● Retrieval Augmented Generation (RAG)
Image by GenAI (DALL-E)
© 2023 Neo4j, Inc. All rights reserved.
32
Grounding with Retrieval Augmented Generation (RAG)
Neo4j, Inc. All rights reserved 2021
33
What’s in it for me…?
© 2023 Neo4j, Inc. All rights reserved.
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 semantic
search
© 2023 Neo4j, Inc. All rights reserved.
Knowledge graphs supply the LLM with information about your
company so answers are specific to your business, giving more
context for more accurate responses.
Add a layer of context over
your LLM for accuracy and
specificity
Specificity
© 2023 Neo4j, Inc. All rights reserved.
Map relationships between search
results and data source nodes
Represent data sources as nodes
Add metadata or annotations
Verify the enriched responses from your LLM because each piece of
information is linked to its sources and origins.
Explainability
© 2023 Neo4j, Inc. All rights reserved.
LLM retrieves and returns information governed by your enterprise security
and access control policies-down to the node level.
Define policies by role or
identity
Integrates with identity and
access management provider
with SSO
Security & Privacy
Build constraints on nodes,
labels, relationships, properties,
specific parts of the graph, and
even traversal depth
© 2023 Neo4j, Inc. All rights reserved.
Easily scale with autonomous
clustering
Reliability & Low-latency
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
© 2023 Neo4j, Inc. All rights reserved.
39
Use LLM to augment Knowledge Graphs
● Named Entity Recognition
● Knowledge Compression
© 2023 Neo4j, Inc. All rights reserved.
40
Use LLM to augment Knowledge Graphs:
Named Entity Recognition
© 2023 Neo4j, Inc. All rights reserved.
Creating a Knowledge Graph From Unstructured Text is
Difficult
Traditional entity extraction pipelines can be
• resource intensive
• difficult to transfer/generalize:
◦ specialized NLP libraries/tools
◦ domain specific
◦ require subject matter expertise
◦ lots of trial & error
◦ Mix of business rules, machine learning,
and custom hand-rolled logic
© 2023 Neo4j, Inc. All rights reserved.
LLMs can Jumpstart Knowledge Graph Creation
LLMs can be prompted to:
1. Extract data from unstructured text
• Entity extraction, including pronouns and
partial references
• Entity disambiguation
• Extraction of semantic relationships
2. Aide or directly perform graph ingestion
• Determine desired output (Pandas DataFrame
etc)
• Structure extracted data (triples, json, csv) to
work with Cypher insert templates
Input Data
LLM
User
Neo4j
© 2023 Neo4j, Inc. All rights reserved.
43
Use LLM to augment Knowledge Graphs:
Knowledge Compression
© 2023 Neo4j, Inc. All rights reserved.
Text Embeddings are a Key Concept for Knowledge Compression
Consider the question: What is text embedding?
It can be represented / translated as a vector using the OpenAI Embedding API:
[-0.03156438, 0.0013196499, -0.01716885, -0.0008197554, 0.011872382, 0.0036221128,
-0.022915626, -0.005925469, … (1528 more items to go here …]
• This translation process is called Embedding. It is a machine learning process to
convert complex, high-dimensional data e.g. text, image etc. into lower-dimensional
representations(vectors) while preserving essential relationships and structure.
• Embedding is the knowledge for AI as it is produced, understood and used by
various algorithms and AI systems.
© 2023 Neo4j, Inc. All rights reserved.
Text Embedding Vectors for Semantic Search
Given a question, find the most relevant documents based on a similarity metric (such as
Cosine Similarity) between vector of the question and vectors of contents.
Moving from keyword search to similarity (semantic) search.
Q: what is text
embedding?
abstractId similarity
456 0.923445
22 0.892114
… ...
Top K by similarity
Use LLMs for Graph Enrichment
Neo4j Inc. All rights reserved 2023
46
[0.2322,0.3321,….,0.0021]
[0.3233,0.3543,….,0.0047]
[0.5674,0.2134,….,0.0054]
[0.4565,0.2345,….,0.0342]
[0.8743,0.4343,….,0.0234]
LLM APIs
(OpenAI/ VertexAI/
AWS Bedrock etc.)
Text
Embeddings
Article PDFs
(Unstructured Data)
© 2023 Neo4j, Inc. All rights reserved.
47
One last thing…
© 2023 Neo4j, Inc. All rights reserved.
48
https://neo4j.com/blog/vector-search-deeper-insights/
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
50
How to get started on your Graph Journey?
Neo4j, Inc. All rights reserved 2021
Neo4j, Inc. All rights reserved 2021
© 2023 Neo4j, Inc. All rights reserved.
53
And now in APOC too…
© 2023 Neo4j, Inc. All rights reserved.
54
Some examples…
© 2023 Neo4j, Inc. All rights reserved.
55
© 2023 Neo4j, Inc. All rights reserved.
56
© 2023 Neo4j, Inc. All rights reserved.
© 2023 Neo4j, Inc. All rights reserved.
Thank you!
Contact us at
sales@neo4j.com
1 von 57

Recomendados

The Data Platform for Today’s Intelligent Applications von
The Data Platform for Today’s Intelligent ApplicationsThe Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent ApplicationsNeo4j
215 views22 Folien
Landscape of AI/ML in 2023 von
Landscape of AI/ML in 2023Landscape of AI/ML in 2023
Landscape of AI/ML in 2023HyunJoon Jung
2.4K views67 Folien
The Future of AI is Generative not Discriminative 5/26/2021 von
The Future of AI is Generative not Discriminative 5/26/2021The Future of AI is Generative not Discriminative 5/26/2021
The Future of AI is Generative not Discriminative 5/26/2021Steve Omohundro
976 views24 Folien
GPT and Graph Data Science to power your Knowledge Graph von
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphNeo4j
269 views49 Folien
Unlocking the Power of Generative AI An Executive's Guide.pdf von
Unlocking the Power of Generative AI An Executive's Guide.pdfUnlocking the Power of Generative AI An Executive's Guide.pdf
Unlocking the Power of Generative AI An Executive's Guide.pdfPremNaraindas1
2.2K views29 Folien
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx von
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.pptxNeo4j
238 views31 Folien

Más contenido relacionado

Was ist angesagt?

Leveraging Generative AI & Best practices von
Leveraging Generative AI & Best practicesLeveraging Generative AI & Best practices
Leveraging Generative AI & Best practicesDianaGray10
1.7K views21 Folien
GENERATIVE AI, THE FUTURE OF PRODUCTIVITY von
GENERATIVE AI, THE FUTURE OF PRODUCTIVITYGENERATIVE AI, THE FUTURE OF PRODUCTIVITY
GENERATIVE AI, THE FUTURE OF PRODUCTIVITYAndre Muscat
6.6K views19 Folien
Generative-AI-in-enterprise-20230615.pdf von
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfLiming Zhu
843 views7 Folien
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data Science von
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data ScienceGet Started with the Most Advanced Edition Yet of Neo4j Graph Data Science
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data ScienceNeo4j
167 views43 Folien
The Knowledge Graph Explosion von
The Knowledge Graph ExplosionThe Knowledge Graph Explosion
The Knowledge Graph ExplosionNeo4j
185 views16 Folien
An Introduction to Generative AI von
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AICori Faklaris
11.4K views28 Folien

Was ist angesagt?(20)

Leveraging Generative AI & Best practices von DianaGray10
Leveraging Generative AI & Best practicesLeveraging Generative AI & Best practices
Leveraging Generative AI & Best practices
DianaGray101.7K views
GENERATIVE AI, THE FUTURE OF PRODUCTIVITY von Andre Muscat
GENERATIVE AI, THE FUTURE OF PRODUCTIVITYGENERATIVE AI, THE FUTURE OF PRODUCTIVITY
GENERATIVE AI, THE FUTURE OF PRODUCTIVITY
Andre Muscat6.6K views
Generative-AI-in-enterprise-20230615.pdf von Liming Zhu
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdf
Liming Zhu843 views
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data Science von Neo4j
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data ScienceGet Started with the Most Advanced Edition Yet of Neo4j Graph Data Science
Get Started with the Most Advanced Edition Yet of Neo4j Graph Data Science
Neo4j167 views
The Knowledge Graph Explosion von Neo4j
The Knowledge Graph ExplosionThe Knowledge Graph Explosion
The Knowledge Graph Explosion
Neo4j185 views
An Introduction to Generative AI von Cori Faklaris
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AI
Cori Faklaris11.4K views
Weaviate Air #3 - New in AI segment.pdf von ConnorShorten2
Weaviate Air #3 - New in AI segment.pdfWeaviate Air #3 - New in AI segment.pdf
Weaviate Air #3 - New in AI segment.pdf
ConnorShorten280 views
The three layers of a knowledge graph and what it means for authoring, storag... von Neo4j
The three layers of a knowledge graph and what it means for authoring, storag...The three layers of a knowledge graph and what it means for authoring, storag...
The three layers of a knowledge graph and what it means for authoring, storag...
Neo4j138 views
Deep dive into LangChain integration with Neo4j.pptx von TomazBratanic1
Deep dive into LangChain integration with Neo4j.pptxDeep dive into LangChain integration with Neo4j.pptx
Deep dive into LangChain integration with Neo4j.pptx
TomazBratanic1876 views
Modeling Cybersecurity with Neo4j, Based on Real-Life Data Insights von Neo4j
Modeling Cybersecurity with Neo4j, Based on Real-Life Data InsightsModeling Cybersecurity with Neo4j, Based on Real-Life Data Insights
Modeling Cybersecurity with Neo4j, Based on Real-Life Data Insights
Neo4j66 views
Neo4j GraphSummit London - The Path To Success With Graph Database and Data S... von 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 views
An Introduction to Generative AI - May 18, 2023 von CoriFaklaris1
An Introduction  to Generative AI - May 18, 2023An Introduction  to Generative AI - May 18, 2023
An Introduction to Generative AI - May 18, 2023
CoriFaklaris1939 views
Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc... von Neo4j
Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc...Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc...
Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc...
Neo4j82 views
Responsible AI von Neo4j
Responsible AIResponsible AI
Responsible AI
Neo4j1.5K views
A Knowledge Graph for Reaction & Synthesis Prediction (AstraZeneca) von Neo4j
A Knowledge Graph for Reaction & Synthesis Prediction (AstraZeneca)A Knowledge Graph for Reaction & Synthesis Prediction (AstraZeneca)
A Knowledge Graph for Reaction & Synthesis Prediction (AstraZeneca)
Neo4j219 views
Workshop Introduction to Neo4j von Neo4j
Workshop Introduction to Neo4jWorkshop Introduction to Neo4j
Workshop Introduction to Neo4j
Neo4j127 views
Knowledge Graphs are Worthless, Knowledge Graph Use Cases are Priceless von Enterprise Knowledge
Knowledge Graphs are Worthless, Knowledge Graph Use Cases are PricelessKnowledge Graphs are Worthless, Knowledge Graph Use Cases are Priceless
Knowledge Graphs are Worthless, Knowledge Graph Use Cases are Priceless
Exploring Opportunities in the Generative AI Value Chain.pdf von Dung Hoang
Exploring Opportunities in the Generative AI Value Chain.pdfExploring Opportunities in the Generative AI Value Chain.pdf
Exploring Opportunities in the Generative AI Value Chain.pdf
Dung Hoang271 views
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx von Neo4j
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptxNeo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j127 views

Similar a The perfect couple: Uniting Large Language Models and Knowledge Graphs for Enhanced Knowledge Representation

Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf von
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.pdfNeo4j
59 views57 Folien
The Art of the Possible with Graph Technology von
The Art of the Possible with Graph TechnologyThe Art of the Possible with Graph Technology
The Art of the Possible with Graph TechnologyNeo4j
29 views28 Folien
La strada verso il successo con i database a grafo, la Graph Data Science e l... von
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
50 views50 Folien
The Path To Success With Graph Database and Analytics von
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 views39 Folien
Neo4j: The path to success with Graph Database and Graph Data Science von
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j: The path to success with Graph Database and Graph Data Science
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j
83 views44 Folien
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da... von
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 views30 Folien

Similar a The perfect couple: Uniting Large Language Models and Knowledge Graphs for Enhanced Knowledge Representation(20)

Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf von 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 views
The Art of the Possible with Graph Technology von 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 views
La strada verso il successo con i database a grafo, la Graph Data Science e l... von Neo4j
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...
Neo4j50 views
The Path To Success With Graph Database and Analytics von 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 views
Neo4j: The path to success with Graph Database and Graph Data Science von Neo4j
Neo4j: The path to success with Graph Database and Graph Data ScienceNeo4j: The path to success with Graph Database and Graph Data Science
Neo4j: The path to success with Graph Database and Graph Data Science
Neo4j83 views
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da... von 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 views
The path to success with Graph Database and Graph Data Science von 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
Neo4j106 views
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx von Neo4j
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptxThe art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx
Neo4j188 views
Knowledge Graphs and Generative AI von Neo4j
Knowledge Graphs and Generative AIKnowledge Graphs and Generative AI
Knowledge Graphs and Generative AI
Neo4j150 views
Deeper Insights with Graph Data Science von Neo4j
Deeper Insights with Graph Data ScienceDeeper Insights with Graph Data Science
Deeper Insights with Graph Data Science
Neo4j51 views
The path to success with graph database and graph data science_ Neo4j GraphSu... von Neo4j
The path to success with graph database and graph data science_ Neo4j GraphSu...The path to success with graph database and graph data science_ Neo4j GraphSu...
The path to success with graph database and graph data science_ Neo4j GraphSu...
Neo4j91 views
The Neo4j Data Platform for Today & Tomorrow.pdf von 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 views
The Art of the Possible with Graph - Sudhir Hasbe - GraphSummit London 14 Nov... von 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 views
Neo4j GraphSummit Copenhagen - The Art Of The Possible With Graph Technology ... von Neo4j
Neo4j GraphSummit Copenhagen - The Art Of The Possible With Graph Technology ...Neo4j GraphSummit Copenhagen - The Art Of The Possible With Graph Technology ...
Neo4j GraphSummit Copenhagen - The Art Of The Possible With Graph Technology ...
Neo4j54 views
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da... von Neo4j
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Neo4j41 views
The Data Platform for Today's Intelligent Applications.pdf von Neo4j
The Data Platform for Today's Intelligent Applications.pdfThe Data Platform for Today's Intelligent Applications.pdf
The Data Platform for Today's Intelligent Applications.pdf
Neo4j98 views
Demystifying Graph Neural Networks von Neo4j
Demystifying Graph Neural NetworksDemystifying Graph Neural Networks
Demystifying Graph Neural Networks
Neo4j343 views
The Art of the Possible with Graph Technology von Neo4j
The Art of the Possible with Graph TechnologyThe Art of the Possible with Graph Technology
The Art of the Possible with Graph Technology
Neo4j15 views
La strada verso il successo con i database a grafo, la Graph Data Science e l... von Neo4j
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...
Neo4j9 views
Knowledge and Scalability Through Graph Composition von Neo4j
Knowledge and Scalability Through Graph CompositionKnowledge and Scalability Through Graph Composition
Knowledge and Scalability Through Graph Composition
Neo4j291 views

Más de Neo4j

FIMA 2023 Neo4j & FS - Entity Resolution.pptx von
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptxNeo4j
12 views26 Folien
Operations & Data Graph von
Operations & Data GraphOperations & Data Graph
Operations & Data GraphNeo4j
43 views25 Folien
TAGTTOO: La nova xarxa social von
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa socialNeo4j
26 views19 Folien
El Arte de lo Possible von
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo PossibleNeo4j
50 views35 Folien
Neo4j y GenAI von
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI Neo4j
54 views41 Folien
Roadmap y Novedades de producto von
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
58 views33 Folien

Más de Neo4j(20)

FIMA 2023 Neo4j & FS - Entity Resolution.pptx von Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j12 views
Operations & Data Graph von Neo4j
Operations & Data GraphOperations & Data Graph
Operations & Data Graph
Neo4j43 views
TAGTTOO: La nova xarxa social von Neo4j
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa social
Neo4j26 views
El Arte de lo Possible von Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j50 views
Neo4j y GenAI von Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j54 views
Roadmap y Novedades de producto von Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j58 views
Neo4j : Graphes de Connaissance, IA et LLMs von Neo4j
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMs
Neo4j54 views
Les nouveautés produit Neo4j von Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j31 views
Sopra Steria : Analyse intelligente des réseaux dans le domaine des télécommu... von 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 views
Generali : SPIDER, notre produit au cœur des enjeux Generali en termes de Com... von 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 views
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx von 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 views
Neo4j workshop at GraphSummit London 14 Nov 2023.pdf von 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
Neo4j53 views
Neo4j Product Updates & Knowledge Graphs at GraphSummit London 14 Nov 2023.pptx von 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 views
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx von Neo4j
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptxAstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
AstraZeneca at Neo4j GraphSummit London 14Nov23.pptx
Neo4j47 views
Google Cloud at GraphSummit London 14 Nov 2023.pptx von 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 views
Northern Gas Networks and CKDelta at Neo4j GraphSummit London 14Nov23.pptx von 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
Neo4j46 views
Peek into Neo4j Product Strategy and Roadmap von Neo4j
Peek into Neo4j Product Strategy and RoadmapPeek into Neo4j Product Strategy and Roadmap
Peek into Neo4j Product Strategy and Roadmap
Neo4j87 views
Transforming Intelligence Analysis with Knowledge Graphs von Neo4j
Transforming Intelligence Analysis with Knowledge GraphsTransforming Intelligence Analysis with Knowledge Graphs
Transforming Intelligence Analysis with Knowledge Graphs
Neo4j62 views
Optimizing Your Supply Chain with Neo4j von Neo4j
Optimizing Your Supply Chain with Neo4jOptimizing Your Supply Chain with Neo4j
Optimizing Your Supply Chain with Neo4j
Neo4j46 views
Ontology Driven Data for Fleet Management von Neo4j
Ontology Driven Data for Fleet ManagementOntology Driven Data for Fleet Management
Ontology Driven Data for Fleet Management
Neo4j54 views

Último

OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an... von
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...StatsCommunications
7 views26 Folien
META.pptx von
META.pptxMETA.pptx
META.pptxvasanthan19012003
6 views10 Folien
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... von
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...DataScienceConferenc1
6 views77 Folien
Advanced_Recommendation_Systems_Presentation.pptx von
Advanced_Recommendation_Systems_Presentation.pptxAdvanced_Recommendation_Systems_Presentation.pptx
Advanced_Recommendation_Systems_Presentation.pptxneeharikasingh29
5 views9 Folien
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M... von
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...DataScienceConferenc1
7 views11 Folien
Cross-network in Google Analytics 4.pdf von
Cross-network in Google Analytics 4.pdfCross-network in Google Analytics 4.pdf
Cross-network in Google Analytics 4.pdfGA4 Tutorials
6 views7 Folien

Último(20)

OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an... von StatsCommunications
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... von DataScienceConferenc1
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
Advanced_Recommendation_Systems_Presentation.pptx von neeharikasingh29
Advanced_Recommendation_Systems_Presentation.pptxAdvanced_Recommendation_Systems_Presentation.pptx
Advanced_Recommendation_Systems_Presentation.pptx
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M... von DataScienceConferenc1
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
Cross-network in Google Analytics 4.pdf von GA4 Tutorials
Cross-network in Google Analytics 4.pdfCross-network in Google Analytics 4.pdf
Cross-network in Google Analytics 4.pdf
GA4 Tutorials6 views
4_4_WP_4_06_ND_Model.pptx von d6fmc6kwd4
4_4_WP_4_06_ND_Model.pptx4_4_WP_4_06_ND_Model.pptx
4_4_WP_4_06_ND_Model.pptx
d6fmc6kwd47 views
Dr. Ousmane Badiane-2023 ReSAKSS Conference von AKADEMIYA2063
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceDr. Ousmane Badiane-2023 ReSAKSS Conference
Dr. Ousmane Badiane-2023 ReSAKSS Conference
AKADEMIYA20635 views
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx von DataScienceConferenc1
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx
[DSC Europe 23] Stefan Mrsic_Goran Savic - Evolving Technology Excellence.pptx
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ... von DataScienceConferenc1
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines von DataScienceConferenc1
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines
[DSC Europe 23] Luca Morena - From Psychohistory to Curious Machines
PRIVACY AWRE PERSONAL DATA STORAGE von antony420421
PRIVACY AWRE PERSONAL DATA STORAGEPRIVACY AWRE PERSONAL DATA STORAGE
PRIVACY AWRE PERSONAL DATA STORAGE
antony4204217 views
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init... von DataScienceConferenc1
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23][Cryptica] Martin_Summer_Digital_central_bank_money_Ideas_init...
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx von DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
Data Journeys Hard Talk workshop final.pptx von info828217
Data Journeys Hard Talk workshop final.pptxData Journeys Hard Talk workshop final.pptx
Data Journeys Hard Talk workshop final.pptx
info82821710 views
Data about the sector workshop von info828217
Data about the sector workshopData about the sector workshop
Data about the sector workshop
info82821716 views
CRM stick or twist workshop von info828217
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshop
info82821712 views

The perfect couple: Uniting Large Language Models and Knowledge Graphs for Enhanced Knowledge Representation

  • 1. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. LLM 💕 KG: The Perfect Couple Uniting Large Language Models and Knowledge Graphs for Enhanced Knowledge Representation Kristof Neys Director Graph Data Science Technology
  • 2. © 2023 Neo4j, Inc. All rights reserved. 7/10 20/25 7/10 Top Retail Firms Top Financial Firms Top Software Vendors Anyway You Like It 2 Creator of the Property Graph and Cypher language at the core of the GQL ISO project. Fully integrated Data Science Library Thousands of Customers World-Wide 250,000 developers worldwide Industry Leaders use Neo4j On-Prem DB-as-a-Service In the Cloud
  • 3. © 2022 Neo4j, Inc. All rights reserved. 3 Topics We will cover: 1) Knowledge Graphs 2) Knowledge Graphs + LLMs ~ As a Front end 3) Knowledge Graphs + LLMs ~ As a Back end 4) How to get started on your graph journey
  • 4. © 2023 Neo4j, Inc. All rights reserved. 4 “In a world of infinite content, knowledge becomes [very] valuable” Denny Vrandečić, Wikidata
  • 5. © 2023 Neo4j, Inc. All rights reserved. 5 The Core Graph Object: A Knowledge Graph
  • 6. © 2023 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
  • 7. © 2023 Neo4j, Inc. All rights reserved. 7 From Data points to a Knowledge Graph Car DRIVES name: “Dan” born: May 29, 1978 twitter: “@dan” name: “Ann” born: Dec 5, 1979 brand: “Volvo” model: “V90” description: since: Jan 10, 2021 LOVES LOVES LIVES_WITH O W N S Person Person
  • 8. © 2023 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 allows you to make implicit relationships…. ….explicit Graphs….Grow!
  • 9. © 2023 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!
  • 10. © 2023 Neo4j, Inc. All rights reserved. Come and see us for the book on Knowledge Graphs
  • 11. © 2023 Neo4j, Inc. All rights reserved. 11 Knowledge Graph + LLM A marriage made in heaven
  • 12. © 2023 Neo4j, Inc. All rights reserved. 12 Setting the context - From a user point of view
  • 13. © 2023 Neo4j, Inc. All rights reserved. 13 As a front-end…
  • 14. © 2023 Neo4j, Inc. All rights reserved. 14 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.
  • 15. © 2023 Neo4j, Inc. All rights reserved. 15 Writing Code is soo last year….
  • 16. © 2023 Neo4j, Inc. All rights reserved. 16 As a back-end…
  • 17. © 2023 Neo4j, Inc. All rights reserved. 17 We are not making this up…
  • 18. © 2023 Neo4j, Inc. All rights reserved. 18 Three main ways to let LLM’s work with your Graph
  • 19. © 2023 Neo4j, Inc. All rights reserved. 19 Knowledge Graphs that enhance LLMs
  • 20. © 2023 Neo4j, Inc. All rights reserved. LLMs Core function…To manipulate strings… • GPT training focuses primarily on predicting the probability of text sequences and specifically for predicting which words come next in a sequence “When you play the game of thrones…. Input LLM …you win or you die. There is no middle ground.” Output
  • 21. © 2023 Neo4j, Inc. All rights reserved. 21 Nothing is perfect… but don’t push it!
  • 22. © 2023 Neo4j, Inc. All rights reserved.
  • 23. © 2023 Neo4j, Inc. All rights reserved. There is no need for this…!
  • 24. © 2023 Neo4j, Inc. All rights reserved. Whereas we all know what The Truth is…
  • 25. © 2023 Neo4j, Inc. All rights reserved.
  • 26. © 2023 Neo4j, Inc. All rights reserved. It’s all about Knowledge and Accuracy • Training data can be false • LLMs: training is focused on self-supervised learning • Cut-off date: i.e ChatGPT is only trained on pre Sep 2021 data • Inability to verify sources for answers • Sensitive to prompt (input) phrasing • Lack of explainability
  • 27. © 2023 Neo4j, Inc. All rights reserved. Making stuff up…
  • 28. © 2023 Neo4j, Inc. All rights reserved. In Summary…
  • 29. © 2023 Neo4j, Inc. All rights reserved. 29 So…, let’s solve this problem!
  • 30. © 2023 Neo4j, Inc. All rights reserved. How to Help LLMs Do Better? Few-Shot Learning Fine-Tuning Grounding Provide completed examples “shots” to the AI as context in prompts. a.k.a In-Context Learning Provide additional training data to better tune GenAI to your use case Provide AI with the information to use for generating responses
  • 31. © 2023 Neo4j, Inc. All rights reserved. Grounding Provide AI with the information to use for generating responses Best of Both Worlds Use the language understanding skills of LLMs but control the knowledge/sources it uses ● Improve accuracy & tailor to enterprise and use case ● Reduce hallucinations and other inconsistencies ● Control provenance Methods ● Internet search, plugins, agents ● Query generation ● Retrieval Augmented Generation (RAG) Image by GenAI (DALL-E)
  • 32. © 2023 Neo4j, Inc. All rights reserved. 32 Grounding with Retrieval Augmented Generation (RAG)
  • 33. Neo4j, Inc. All rights reserved 2021 33 What’s in it for me…?
  • 34. © 2023 Neo4j, Inc. All rights reserved. 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 semantic search
  • 35. © 2023 Neo4j, Inc. All rights reserved. Knowledge graphs supply the LLM with information about your company so answers are specific to your business, giving more context for more accurate responses. Add a layer of context over your LLM for accuracy and specificity Specificity
  • 36. © 2023 Neo4j, Inc. All rights reserved. Map relationships between search results and data source nodes Represent data sources as nodes Add metadata or annotations Verify the enriched responses from your LLM because each piece of information is linked to its sources and origins. Explainability
  • 37. © 2023 Neo4j, Inc. All rights reserved. LLM retrieves and returns information governed by your enterprise security and access control policies-down to the node level. Define policies by role or identity Integrates with identity and access management provider with SSO Security & Privacy Build constraints on nodes, labels, relationships, properties, specific parts of the graph, and even traversal depth
  • 38. © 2023 Neo4j, Inc. All rights reserved. Easily scale with autonomous clustering Reliability & Low-latency 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
  • 39. © 2023 Neo4j, Inc. All rights reserved. 39 Use LLM to augment Knowledge Graphs ● Named Entity Recognition ● Knowledge Compression
  • 40. © 2023 Neo4j, Inc. All rights reserved. 40 Use LLM to augment Knowledge Graphs: Named Entity Recognition
  • 41. © 2023 Neo4j, Inc. All rights reserved. Creating a Knowledge Graph From Unstructured Text is Difficult Traditional entity extraction pipelines can be • resource intensive • difficult to transfer/generalize: ◦ specialized NLP libraries/tools ◦ domain specific ◦ require subject matter expertise ◦ lots of trial & error ◦ Mix of business rules, machine learning, and custom hand-rolled logic
  • 42. © 2023 Neo4j, Inc. All rights reserved. LLMs can Jumpstart Knowledge Graph Creation LLMs can be prompted to: 1. Extract data from unstructured text • Entity extraction, including pronouns and partial references • Entity disambiguation • Extraction of semantic relationships 2. Aide or directly perform graph ingestion • Determine desired output (Pandas DataFrame etc) • Structure extracted data (triples, json, csv) to work with Cypher insert templates Input Data LLM User Neo4j
  • 43. © 2023 Neo4j, Inc. All rights reserved. 43 Use LLM to augment Knowledge Graphs: Knowledge Compression
  • 44. © 2023 Neo4j, Inc. All rights reserved. Text Embeddings are a Key Concept for Knowledge Compression Consider the question: What is text embedding? It can be represented / translated as a vector using the OpenAI Embedding API: [-0.03156438, 0.0013196499, -0.01716885, -0.0008197554, 0.011872382, 0.0036221128, -0.022915626, -0.005925469, … (1528 more items to go here …] • This translation process is called Embedding. It is a machine learning process to convert complex, high-dimensional data e.g. text, image etc. into lower-dimensional representations(vectors) while preserving essential relationships and structure. • Embedding is the knowledge for AI as it is produced, understood and used by various algorithms and AI systems.
  • 45. © 2023 Neo4j, Inc. All rights reserved. Text Embedding Vectors for Semantic Search Given a question, find the most relevant documents based on a similarity metric (such as Cosine Similarity) between vector of the question and vectors of contents. Moving from keyword search to similarity (semantic) search. Q: what is text embedding? abstractId similarity 456 0.923445 22 0.892114 … ... Top K by similarity
  • 46. Use LLMs for Graph Enrichment Neo4j Inc. All rights reserved 2023 46 [0.2322,0.3321,….,0.0021] [0.3233,0.3543,….,0.0047] [0.5674,0.2134,….,0.0054] [0.4565,0.2345,….,0.0342] [0.8743,0.4343,….,0.0234] LLM APIs (OpenAI/ VertexAI/ AWS Bedrock etc.) Text Embeddings Article PDFs (Unstructured Data)
  • 47. © 2023 Neo4j, Inc. All rights reserved. 47 One last thing…
  • 48. © 2023 Neo4j, Inc. All rights reserved. 48 https://neo4j.com/blog/vector-search-deeper-insights/
  • 49. © 2023 Neo4j, Inc. All rights reserved.
  • 50. © 2023 Neo4j, Inc. All rights reserved. 50 How to get started on your Graph Journey?
  • 51. Neo4j, Inc. All rights reserved 2021
  • 52. Neo4j, Inc. All rights reserved 2021
  • 53. © 2023 Neo4j, Inc. All rights reserved. 53 And now in APOC too…
  • 54. © 2023 Neo4j, Inc. All rights reserved. 54 Some examples…
  • 55. © 2023 Neo4j, Inc. All rights reserved. 55
  • 56. © 2023 Neo4j, Inc. All rights reserved. 56
  • 57. © 2023 Neo4j, Inc. All rights reserved. © 2023 Neo4j, Inc. All rights reserved. Thank you! Contact us at sales@neo4j.com