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

Neo4j
Neo4jOpen Source NOSQL Graph Database
© 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 de 57

Recomendados

The Knowledge Graph Explosion por
The Knowledge Graph ExplosionThe Knowledge Graph Explosion
The Knowledge Graph ExplosionNeo4j
184 vistas16 diapositivas
Workshop - Build a Graph Solution por
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph SolutionNeo4j
94 vistas61 diapositivas
Försäkringskassan: Neo4j as an Information Hub (GraphSummit Stockholm 2023) por
Försäkringskassan: Neo4j as an Information Hub (GraphSummit Stockholm 2023)Försäkringskassan: Neo4j as an Information Hub (GraphSummit Stockholm 2023)
Försäkringskassan: Neo4j as an Information Hub (GraphSummit Stockholm 2023)Neo4j
107 vistas21 diapositivas
The art of the possible with graph technology_Neo4j GraphSummit Dublin 2023.pptx por
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.pptxNeo4j
187 vistas29 diapositivas
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx por
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
222 vistas31 diapositivas
Elsevier: Empowering Knowledge Discovery in Research with Graphs por
Elsevier: Empowering Knowledge Discovery in Research with GraphsElsevier: Empowering Knowledge Discovery in Research with Graphs
Elsevier: Empowering Knowledge Discovery in Research with GraphsNeo4j
334 vistas30 diapositivas

Más contenido relacionado

La actualidad más candente

Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group... por
Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...
Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...Neo4j
103 vistas35 diapositivas
Neo4j GraphTalk Helsinki - Introduction and Graph Use Cases por
Neo4j GraphTalk Helsinki - Introduction and Graph Use CasesNeo4j GraphTalk Helsinki - Introduction and Graph Use Cases
Neo4j GraphTalk Helsinki - Introduction and Graph Use CasesNeo4j
545 vistas100 diapositivas
How Graph Algorithms Answer your Business Questions in Banking and Beyond por
How Graph Algorithms Answer your Business Questions in Banking and BeyondHow Graph Algorithms Answer your Business Questions in Banking and Beyond
How Graph Algorithms Answer your Business Questions in Banking and BeyondNeo4j
1K vistas33 diapositivas
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne... por
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...Neo4j
192 vistas17 diapositivas
How Graph Data Science can turbocharge your Knowledge Graph por
How Graph Data Science can turbocharge your Knowledge GraphHow Graph Data Science can turbocharge your Knowledge Graph
How Graph Data Science can turbocharge your Knowledge GraphNeo4j
159 vistas39 diapositivas
Introduction to Knowledge Graphs por
Introduction to Knowledge GraphsIntroduction to Knowledge Graphs
Introduction to Knowledge Graphsmukuljoshi
132 vistas74 diapositivas

La actualidad más candente(20)

Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group... por Neo4j
Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...
Kerry Group: How Neo4j graph technology is delivering benefits to Kerry Group...
Neo4j103 vistas
Neo4j GraphTalk Helsinki - Introduction and Graph Use Cases por Neo4j
Neo4j GraphTalk Helsinki - Introduction and Graph Use CasesNeo4j GraphTalk Helsinki - Introduction and Graph Use Cases
Neo4j GraphTalk Helsinki - Introduction and Graph Use Cases
Neo4j545 vistas
How Graph Algorithms Answer your Business Questions in Banking and Beyond por Neo4j
How Graph Algorithms Answer your Business Questions in Banking and BeyondHow Graph Algorithms Answer your Business Questions in Banking and Beyond
How Graph Algorithms Answer your Business Questions in Banking and Beyond
Neo4j1K vistas
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne... por Neo4j
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...
Knowledge Graphs and Graph Data Science: More Context, Better Predictions (Ne...
Neo4j192 vistas
How Graph Data Science can turbocharge your Knowledge Graph por Neo4j
How Graph Data Science can turbocharge your Knowledge GraphHow Graph Data Science can turbocharge your Knowledge Graph
How Graph Data Science can turbocharge your Knowledge Graph
Neo4j159 vistas
Introduction to Knowledge Graphs por mukuljoshi
Introduction to Knowledge GraphsIntroduction to Knowledge Graphs
Introduction to Knowledge Graphs
mukuljoshi132 vistas
GPT and Graph Data Science to power your Knowledge Graph por Neo4j
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 Graph
Neo4j268 vistas
Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow por Neo4j
Amsterdam - The Neo4j Graph Data Platform Today & TomorrowAmsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Amsterdam - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j69 vistas
GraphAware: Insights Discovery with KGs: Bringing Archives to Life (GraphSumm... por Neo4j
GraphAware: Insights Discovery with KGs: Bringing Archives to Life (GraphSumm...GraphAware: Insights Discovery with KGs: Bringing Archives to Life (GraphSumm...
GraphAware: Insights Discovery with KGs: Bringing Archives to Life (GraphSumm...
Neo4j91 vistas
Optimizing Your Supply Chain with the Neo4j Graph por Neo4j
Optimizing Your Supply Chain with the Neo4j GraphOptimizing Your Supply Chain with the Neo4j Graph
Optimizing Your Supply Chain with the Neo4j Graph
Neo4j193 vistas
The path to success with graph database and graph data science_ Neo4j GraphSu... por 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 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
Neo4j334 vistas
World Health Organisation - Knowledge Representation and Reasoning for Public... por Neo4j
World Health Organisation - Knowledge Representation and Reasoning for Public...World Health Organisation - Knowledge Representation and Reasoning for Public...
World Health Organisation - Knowledge Representation and Reasoning for Public...
Neo4j135 vistas
Neo4j Webinar: Graphs in banking por Neo4j
Neo4j Webinar:  Graphs in banking Neo4j Webinar:  Graphs in banking
Neo4j Webinar: Graphs in banking
Neo4j1.1K vistas
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor... por Neo4j
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...
Neo4j347 vistas
Volvo Cars - Retrieving Safety Insights using Graphs (GraphSummit Stockholm 2... por Neo4j
Volvo Cars - Retrieving Safety Insights using Graphs (GraphSummit Stockholm 2...Volvo Cars - Retrieving Safety Insights using Graphs (GraphSummit Stockholm 2...
Volvo Cars - Retrieving Safety Insights using Graphs (GraphSummit Stockholm 2...
Neo4j174 vistas
Neo4j: The path to success with Graph Database and Graph Data Science por 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
Neo4j82 vistas
Training Week: Introduction to Neo4j 2022 por Neo4j
Training Week: Introduction to Neo4j 2022Training Week: Introduction to Neo4j 2022
Training Week: Introduction to Neo4j 2022
Neo4j433 vistas
Building a Knowledge Graph using NLP and Ontologies por Neo4j
Building a Knowledge Graph using NLP and OntologiesBuilding a Knowledge Graph using NLP and Ontologies
Building a Knowledge Graph using NLP and Ontologies
Neo4j861 vistas
Workshop - Neo4j Graph Data Science por Neo4j
Workshop - Neo4j Graph Data ScienceWorkshop - Neo4j Graph Data Science
Workshop - Neo4j Graph Data Science
Neo4j392 vistas

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 por
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
53 vistas57 diapositivas
The Art of the Possible with Graph Technology por
The Art of the Possible with Graph TechnologyThe Art of the Possible with Graph Technology
The Art of the Possible with Graph TechnologyNeo4j
28 vistas28 diapositivas
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
50 vistas50 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
38 vistas39 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
The path to success with Graph Database and Graph Data Science por
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 ScienceNeo4j
106 vistas31 diapositivas

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 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
Neo4j53 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
Neo4j28 vistas
La strada verso il successo con i database a grafo, la Graph Data Science e l... por 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 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
Neo4j38 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
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
Neo4j106 vistas
Knowledge Graphs and Generative AI por Neo4j
Knowledge Graphs and Generative AIKnowledge Graphs and Generative AI
Knowledge Graphs and Generative AI
Neo4j136 vistas
Deeper Insights with Graph Data Science por Neo4j
Deeper Insights with Graph Data ScienceDeeper Insights with Graph Data Science
Deeper Insights with Graph Data Science
Neo4j47 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
Neo4j156 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...
Neo4j75 vistas
Neo4j GraphSummit Copenhagen - The Art Of The Possible With Graph Technology ... por 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 ...
Neo4j53 vistas
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da... por 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 vistas
The Data Platform for Today's Intelligent Applications.pdf por 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
Neo4j96 vistas
Modeling Cybersecurity with Neo4j, Based on Real-Life Data Insights por 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 vistas
Demystifying Graph Neural Networks por Neo4j
Demystifying Graph Neural NetworksDemystifying Graph Neural Networks
Demystifying Graph Neural Networks
Neo4j340 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
Neo4j15 vistas
La strada verso il successo con i database a grafo, la Graph Data Science e l... por 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...
Neo4j8 vistas
Knowledge and Scalability Through Graph Composition por Neo4j
Knowledge and Scalability Through Graph CompositionKnowledge and Scalability Through Graph Composition
Knowledge and Scalability Through Graph Composition
Neo4j291 vistas
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow por Neo4j
Nordics Edition - The Neo4j Graph Data Platform Today & TomorrowNordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j44 vistas
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx por 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
Neo4j126 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
2 vistas26 diapositivas
Operations & Data Graph por
Operations & Data GraphOperations & Data Graph
Operations & Data GraphNeo4j
24 vistas25 diapositivas
TAGTTOO: La nova xarxa social por
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa socialNeo4j
20 vistas19 diapositivas
El Arte de lo Possible por
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo PossibleNeo4j
34 vistas35 diapositivas
Neo4j y GenAI por
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI Neo4j
35 vistas41 diapositivas
Roadmap y Novedades de producto por
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
43 vistas33 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
Neo4j2 vistas
Operations & Data Graph por Neo4j
Operations & Data GraphOperations & Data Graph
Operations & Data Graph
Neo4j24 vistas
TAGTTOO: La nova xarxa social por Neo4j
TAGTTOO: La nova xarxa socialTAGTTOO: La nova xarxa social
TAGTTOO: La nova xarxa social
Neo4j20 vistas
El Arte de lo Possible por Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j34 vistas
Neo4j y GenAI por Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j35 vistas
Roadmap y Novedades de producto por Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j43 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
Neo4j46 vistas
Les nouveautés produit Neo4j por Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j27 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...
Neo4j25 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...
Neo4j45 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
Neo4j49 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
Neo4j44 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
Neo4j60 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
Neo4j40 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
Neo4j21 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
Neo4j45 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
Neo4j86 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
Neo4j60 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
Neo4j44 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
Neo4j50 vistas

Último

RIO GRANDE SUPPLY COMPANY INC, JAYSON.docx por
RIO GRANDE SUPPLY COMPANY INC, JAYSON.docxRIO GRANDE SUPPLY COMPANY INC, JAYSON.docx
RIO GRANDE SUPPLY COMPANY INC, JAYSON.docxJaysonGarabilesEspej
6 vistas3 diapositivas
Journey of Generative AI por
Journey of Generative AIJourney of Generative AI
Journey of Generative AIthomasjvarghese49
30 vistas37 diapositivas
PROGRAMME.pdf por
PROGRAMME.pdfPROGRAMME.pdf
PROGRAMME.pdfHiNedHaJar
17 vistas13 diapositivas
UNEP FI CRS Climate Risk Results.pptx por
UNEP FI CRS Climate Risk Results.pptxUNEP FI CRS Climate Risk Results.pptx
UNEP FI CRS Climate Risk Results.pptxpekka28
11 vistas51 diapositivas
MOSORE_BRESCIA por
MOSORE_BRESCIAMOSORE_BRESCIA
MOSORE_BRESCIAFederico Karagulian
5 vistas8 diapositivas
JConWorld_ Continuous SQL with Kafka and Flink por
JConWorld_ Continuous SQL with Kafka and FlinkJConWorld_ Continuous SQL with Kafka and Flink
JConWorld_ Continuous SQL with Kafka and FlinkTimothy Spann
100 vistas36 diapositivas

Último(20)

UNEP FI CRS Climate Risk Results.pptx por pekka28
UNEP FI CRS Climate Risk Results.pptxUNEP FI CRS Climate Risk Results.pptx
UNEP FI CRS Climate Risk Results.pptx
pekka2811 vistas
JConWorld_ Continuous SQL with Kafka and Flink por Timothy Spann
JConWorld_ Continuous SQL with Kafka and FlinkJConWorld_ Continuous SQL with Kafka and Flink
JConWorld_ Continuous SQL with Kafka and Flink
Timothy Spann100 vistas
Advanced_Recommendation_Systems_Presentation.pptx por neeharikasingh29
Advanced_Recommendation_Systems_Presentation.pptxAdvanced_Recommendation_Systems_Presentation.pptx
Advanced_Recommendation_Systems_Presentation.pptx
neeharikasingh295 vistas
Cross-network in Google Analytics 4.pdf por GA4 Tutorials
Cross-network in Google Analytics 4.pdfCross-network in Google Analytics 4.pdf
Cross-network in Google Analytics 4.pdf
GA4 Tutorials6 vistas
Building Real-Time Travel Alerts por Timothy Spann
Building Real-Time Travel AlertsBuilding Real-Time Travel Alerts
Building Real-Time Travel Alerts
Timothy Spann109 vistas
Supercharging your Data with Azure AI Search and Azure OpenAI por Peter Gallagher
Supercharging your Data with Azure AI Search and Azure OpenAISupercharging your Data with Azure AI Search and Azure OpenAI
Supercharging your Data with Azure AI Search and Azure OpenAI
Peter Gallagher37 vistas
Short Story Assignment by Kelly Nguyen por kellynguyen01
Short Story Assignment by Kelly NguyenShort Story Assignment by Kelly Nguyen
Short Story Assignment by Kelly Nguyen
kellynguyen0118 vistas
Understanding Hallucinations in LLMs - 2023 09 29.pptx por Greg Makowski
Understanding Hallucinations in LLMs - 2023 09 29.pptxUnderstanding Hallucinations in LLMs - 2023 09 29.pptx
Understanding Hallucinations in LLMs - 2023 09 29.pptx
Greg Makowski13 vistas
Chapter 3b- Process Communication (1) (1)(1) (1).pptx por ayeshabaig2004
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
ayeshabaig20045 vistas
Introduction to Microsoft Fabric.pdf por ishaniuudeshika
Introduction to Microsoft Fabric.pdfIntroduction to Microsoft Fabric.pdf
Introduction to Microsoft Fabric.pdf
ishaniuudeshika24 vistas
Data structure and algorithm. por Abdul salam
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
Abdul salam 18 vistas
Launch of the Knowledge Exchange Platform - Romina Boarini - 21 November 2023 por StatsCommunications
Launch of the Knowledge Exchange Platform - Romina Boarini - 21 November 2023Launch of the Knowledge Exchange Platform - Romina Boarini - 21 November 2023
Launch of the Knowledge Exchange Platform - Romina Boarini - 21 November 2023
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf por vikas12611618
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfVikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
vikas126116188 vistas
Organic Shopping in Google Analytics 4.pdf por GA4 Tutorials
Organic Shopping in Google Analytics 4.pdfOrganic Shopping in Google Analytics 4.pdf
Organic Shopping in Google Analytics 4.pdf
GA4 Tutorials10 vistas
Survey on Factuality in LLM's.pptx por NeethaSherra1
Survey on Factuality in LLM's.pptxSurvey on Factuality in LLM's.pptx
Survey on Factuality in LLM's.pptx
NeethaSherra15 vistas

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