SlideShare a Scribd company logo
1 of 71
Download to read offline
Knowledge Graphs and
Chatbots with Neo4j
GraphAware, world’s #1 Neo4j consultancy
graphaware.com
@graph_aware
● Christophe Willemsen
● From Belgium but living in Southern Italy
● Principal Consultant at GraphAware
● Expert in Graphs and Search
● Currently researching in Natural Language Understanding
and its implementation in chatbots
About me
@ikwattro
● How to represent Knowledge in a Graph
○ Text Processing
■ Processing Text
■ Information Extraction
■ Keywords Extraction
○ Enrichment
■ Concept Bases
■ Visual Content Metadata
■ External Knowledge Bases
● Knowledge Graphs to power advanced applications
○ Our demo : Brain Bro
○ Knowledge Graphs in the Real Life
○ Phonetic issues
○ Soft Cosine Measure (SCM)
○ Visual and Temporal Memory for Recall
Outline
● Original domain model,
for eg authors of news,
news, views, original
topics, etc.
● Standard text
processing features
● Information Extraction
● Enrichment
● Facts
● Knowledge Entities
and Semantic
relationships
● Built from aggregation
and validation of layer
1 and 2
● Offers Multi-View
(Perspectives)
DOMAIN MODEL
LAYER 1
TEXT UNDERSTANDING
LAYER 2
KNOWLEDGE GRAPH
LAYER 3
USER CONTEXT
LAYER 4
● Keeps track of the user
conversation
● Relates conversation
steps to entry points in
the Knowledge Graph
● Use distance to
determine out of
context situations
How to represent
Knowledge in a Graph?
● Original domain model,
for eg authors of news,
news, views, original
topics, etc.
● Standard text
processing features
● Information Extraction
● Enrichment
● Facts
● Knowledge Entities
and Semantic
relationships
● Built from aggregation
and validation of layer
1 and 2
● Offers Multi-View
(Perspectives)
DOMAIN MODEL
LAYER 1
TEXT UNDERSTANDING
LAYER 2
KNOWLEDGE GRAPH
LAYER 3
USER CONTEXT
LAYER 4
● Keeps track of the user
conversation
● Relates conversation
steps to entry points in
the Knowledge Graph
● Use distance to
determine out of
context situations
● Natural Language Processing
○ Sentence segmentation
○ Tokenization
○ Stopwords Removal
○ Part of Speech Tagging
○
Text Understanding
● Natural Language Processing
○ Sentence segmentation
○ Tokenization
○ Stopwords Removal
○ Part of Speech Tagging
○ Named Entity Recognition
Text Understanding
CALL ga.nlp.annotate({text: n.text, id: id(n)})
Text Understanding
NER
● Natural Language Processing
○ Sentence segmentation
○ Tokenization
○ Stopwords Removal
○ Part of Speech Tagging
○ Named Entity Recognition
○ Syntactic Dependencies Parsing
Text Understanding
● Facts
○ Using Semantic Parsers to extract facts from sentences in a
Subject-Root-Object form
Text Understanding
● Keywords Extraction
○ Unsupervised algorithm
○ Using TextRank wich under the hood uses PageRank
○ Performs better than most supervised algorithms
○ http://bit.ly/graphaware-textrank
Text Understanding
Enrichment
CALL ga.nlp.enrich.concept
({enricher:’conceptnet5’, node: n})
Enrichment
Concept Bases
Enrichment
Visual Metadata
Enrichment
External Knowledge Bases
Find articles mentioning companies being founded by
Elon Musk and in the car industry
● Original domain model,
for eg authors of news,
news, views, original
topics, etc.
● Standard text
processing features
● Information Extraction
● Enrichment
● Facts
● Knowledge Entities
and Semantic
relationships
● Built from aggregation
and validation of layer
1 and 2
● Offers Multi-View
(Perspectives)
DOMAIN MODEL
LAYER 1
TEXT UNDERSTANDING
LAYER 2
KNOWLEDGE GRAPH
LAYER 3
USER CONTEXT
LAYER 4
● Keeps track of the user
conversation
● Relates conversation
steps to entry points in
the Knowledge Graph
● Use distance to
determine out of
context situations
● How to build it ?
○ Aggregate all the information from the previous steps
○ Use external tools to validate some assumptions, e.g. :
Director of marketing -> corporate position
○ Create a new graph from those informations
The Knowledge Graph
Knowledge Graphs to power
Advanced Applications
BrainBro
● NER issues
Knowledge Graphs IRL
● NER issues
○ Default recognizers are trained on generic texts and will often
perform poorly when lot of indentation is used
○ Dropbox IPO, Forty Seven, Consumer Business Group, Melinda
Gates Foundation (without Bill), …
○ You can “easily” build your own models with external
knowledge bases like wikidata
Knowledge Graphs IRL
● Phonetic Matching
○ SOUNDEX, DOUBLE METAPHONE, FUZZY
○ ELASTIC PHONETIC ANALYSIS PLUGIN
Knowledge Graphs IRL
● Visual Metadata Validation
Knowledge Graphs IRL
● Visual Metadata Validation
○ Build a top-k vocabulary of the article, or the surrounding article parts of the
image
○ Use word2vec to compute relevancy of class labels returned by image
recognition services
○ Use SCM ( Soft Cosine Measure ) [1] [2]
Knowledge Graphs IRL
1. Grigori Sidorov et al. Soft Similarity and Soft Cosine Measure: Similarity of Features in
Vector Space Model, 2014. (link to PDF)
2. Delphine Charlet and Geraldine Damnati, SimBow at SemEval-2017 Task 3: Soft-Cosine
Semantic Similarity between Questions for Community Question Answering, 2017. (link to
PDF)
Visual and Temporal
Memory for Recall
● Original domain model,
for eg authors of news,
news, views, original
topics, etc.
● Standard text
processing features
● Information Extraction
● Enrichment
● Facts
● Knowledge Entities
and Semantic
relationships
● Built from aggregation
and validation of layer
1 and 2
● Offers Multi-View
(Perspectives)
DOMAIN MODEL
LAYER 1
TEXT UNDERSTANDING
LAYER 2
KNOWLEDGE GRAPH
LAYER 3
USER CONTEXT
LAYER 4
● Keeps track of the user
conversation
● Relates conversation
steps to entry points in
the Knowledge Graph
● Use distance to
determine out of
context situations
● Intent detection
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position think about
investment banks ?
Querying Knowledge
● Intent detection
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position think about
investment banks ?
Understand what we want out of the knowledge graph
Querying Knowledge
● Intent detection
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position thinks about
investment banks ?
Understand what we want out of the knowledge graph
Querying Knowledge
Looking for facts?
● Intent detection
○ What did say Ahmed Fathi about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position thinks about
investment banks ?
Understand what we want out of the knowledge graph
Querying Knowledge
Looking for a Location entity
● Intent detection
○ What did say Ahmed Fathi about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position think about
investment banks ?
Understand what we want out of the knowledge graph
Querying Knowledge
If you “say” something, do you
“think” it ?
● Entity Extraction
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position think about
investment banks ?
Querying Knowledge
● Entity Extraction
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position think about
investment banks ?
Determine Entry Points in the Knowledge Graph as well as
semantic constraints
Querying Knowledge
● Entity Extraction
○ What did Ahmed Fathi say about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position thinks about
investment banks ?
Determine Entry Points in the Knowledge Graph as well as
semantic constraints
Querying Knowledge
Person Entity : Ahmed Fathi
Semantic: SAY
Topic: blockchain
● Entity Extraction
○ What did say Ahmed Fathi about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position thinks about
investment banks ?
Determine Entry Points in the Knowledge Graph as well as
semantic constraints
Querying Knowledge
Company Entity : ABC Arabia Bank
● Entity Extraction
○ What did say Ahmed Fathi about blockchains ?
○ Where is ABC Arabia Bank located ?
○ What does a person with a leader position thinks about
investment banks ?
Determine Entry Points in the Knowledge Graph as well as
semantic constraints
Querying Knowledge
Company Position : Leader position
Person: related to position
Semantic: think
Topic: investment bank
● Query representation
○ Queries should be treated as original corpus and pass the same
set of processing
Querying Knowledge
Can this be used to match against a Person label in the
Knowledge Graph ?
How to match “do think about” with a “SAY” relationship in the Knowledge
Graph?
How to match “do think about” to a “SAY” relationship in the Knowledge
Graph?
Probabilistic Traversals
● Probabilistic Traversals
○ Use a probability based classifier like Naive Bayes for
determining the type of the relationship to traverse
○ Avoid to return non-relevant results in a “Always return
something architecture”
● Dynamic Query Stack
○ Depending on the intent, the graph should be queried
differently, there is no rocket science out of the box answer to
how, just knowing your domain and lot lot lot of failures and
tests
○ The Knowledge Graph is queried but not only that, you could
also query the NLP graph for tf-idf enforcement and score the
results with different weights at the end
● Queries made
○ EntityLinking()
○ EntitiesSimilarity()
○ SemanticSimilarity()
○ TraversalProbability()
○ KeywordSensitivePageRank()
○ TopicSensitivePageRank()
○ TF-IDF()
● Lot of techniques
○ Minimum subgraph matching
○ Sequence pattern recognition for SVO generation when queries
are not parsed fully
○ Voice adaptations aka soundex
○ Deep learning
○ ...
User Query and Context
● Conversation
○ After all, chatbots are considered as Conversational Interfaces, it
wouldn’t have this name if the end goal of such systems is
having a conversation with a machine
○ Keeping track of where the user is in the conversation can help
to add more constraints to the queries
User Context
● When to go out ?
○ A user can quickly go out of context during a conversation, for
example :
* How is the weather in San Francisco ?
-- it is 25 degrees
* what size?
-- ?? Are you really gonna try to find a response?
○ We use distance calculation in the graph based to trigger
Signals if the user is out of context
User Context
● Some more thoughts
○ Embrace failures
○ Monitor
○ Humans are still a thing
○ ..
world’s #1 Neo4j consultancy
www.graphaware.com @graph_aware
Thank you !
Christophe Willemsen
@ikwattro

More Related Content

What's hot

MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
Databricks
 
Knowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based SearchKnowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based Search
Neo4j
 

What's hot (20)

MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 
Databricks Overview for MLOps
Databricks Overview for MLOpsDatabricks Overview for MLOps
Databricks Overview for MLOps
 
Advanced Natural Language Processing with Apache Spark NLP
Advanced Natural Language Processing with Apache Spark NLPAdvanced Natural Language Processing with Apache Spark NLP
Advanced Natural Language Processing with Apache Spark NLP
 
Apache Atlasの現状とデータガバナンス事例 #hadoopreading
Apache Atlasの現状とデータガバナンス事例 #hadoopreadingApache Atlasの現状とデータガバナンス事例 #hadoopreading
Apache Atlasの現状とデータガバナンス事例 #hadoopreading
 
Knowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based SearchKnowledge Graphs - The Power of Graph-Based Search
Knowledge Graphs - The Power of Graph-Based Search
 
Neo4j Graph Data Science Training - June 9 & 10 - Slides #6 Graph Algorithms
Neo4j Graph Data Science Training - June 9 & 10 - Slides #6 Graph AlgorithmsNeo4j Graph Data Science Training - June 9 & 10 - Slides #6 Graph Algorithms
Neo4j Graph Data Science Training - June 9 & 10 - Slides #6 Graph Algorithms
 
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptxEncrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
 
Applying Network Analytics in KYC
Applying Network Analytics in KYCApplying Network Analytics in KYC
Applying Network Analytics in KYC
 
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...
Volvo Cars - Retrieving Safety Insights using Graphs (GraphSummit Stockholm 2...
 
How Dell Used Neo4j Graph Database to Redesign Their Pricing-as-a-Service Pla...
How Dell Used Neo4j Graph Database to Redesign Their Pricing-as-a-Service Pla...How Dell Used Neo4j Graph Database to Redesign Their Pricing-as-a-Service Pla...
How Dell Used Neo4j Graph Database to Redesign Their Pricing-as-a-Service Pla...
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
 
Easily Identify Sources of Supply Chain Gridlock
Easily Identify Sources of Supply Chain GridlockEasily Identify Sources of Supply Chain Gridlock
Easily Identify Sources of Supply Chain Gridlock
 
Integrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache AirflowIntegrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache Airflow
 
Navigating the ML Pipeline Jungle with MLflow: Notes from the Field with Thun...
Navigating the ML Pipeline Jungle with MLflow: Notes from the Field with Thun...Navigating the ML Pipeline Jungle with MLflow: Notes from the Field with Thun...
Navigating the ML Pipeline Jungle with MLflow: Notes from the Field with Thun...
 
Neo4j: The path to success with Graph Database and Graph Data Science
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
 
ナレッジグラフとオントロジー
ナレッジグラフとオントロジーナレッジグラフとオントロジー
ナレッジグラフとオントロジー
 
Introduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AIIntroduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AI
 
Natural Language Processing with Graph Databases and Neo4j
Natural Language Processing with Graph Databases and Neo4jNatural Language Processing with Graph Databases and Neo4j
Natural Language Processing with Graph Databases and Neo4j
 
Open Connect Appliances - Jocelyn Ooi
Open Connect Appliances - Jocelyn OoiOpen Connect Appliances - Jocelyn Ooi
Open Connect Appliances - Jocelyn Ooi
 
DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 

Similar to Knowledge graphs + Chatbots with Neo4j

Andrii Belas "Modern approaches to working with categorical data in machine l...
Andrii Belas "Modern approaches to working with categorical data in machine l...Andrii Belas "Modern approaches to working with categorical data in machine l...
Andrii Belas "Modern approaches to working with categorical data in machine l...
Lviv Startup Club
 

Similar to Knowledge graphs + Chatbots with Neo4j (20)

Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe WillemsenKnowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
 
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
 
Illustrating Graphs Visually through Neo4j Bloom
Illustrating Graphs Visually through Neo4j BloomIllustrating Graphs Visually through Neo4j Bloom
Illustrating Graphs Visually through Neo4j Bloom
 
Getting a Data Science Job
Getting a Data Science JobGetting a Data Science Job
Getting a Data Science Job
 
Neo4j Generative AI workshop at GraphSummit London 14 Nov 2023.pdf
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
 
GDSC-UB_Google_interview_process_final.pdf
GDSC-UB_Google_interview_process_final.pdfGDSC-UB_Google_interview_process_final.pdf
GDSC-UB_Google_interview_process_final.pdf
 
How to become a data scientist
How to become a data scientist How to become a data scientist
How to become a data scientist
 
2016 XUG Conference Big Data: Big Deal for Personalized Communications or Meh?
2016 XUG Conference   Big Data: Big Deal for Personalized Communications or Meh?2016 XUG Conference   Big Data: Big Deal for Personalized Communications or Meh?
2016 XUG Conference Big Data: Big Deal for Personalized Communications or Meh?
 
Agile Mumbai 2022 - Rohit Handa | Combining Human and Artificial Intelligence...
Agile Mumbai 2022 - Rohit Handa | Combining Human and Artificial Intelligence...Agile Mumbai 2022 - Rohit Handa | Combining Human and Artificial Intelligence...
Agile Mumbai 2022 - Rohit Handa | Combining Human and Artificial Intelligence...
 
Andrii Belas "Modern approaches to working with categorical data in machine l...
Andrii Belas "Modern approaches to working with categorical data in machine l...Andrii Belas "Modern approaches to working with categorical data in machine l...
Andrii Belas "Modern approaches to working with categorical data in machine l...
 
Tackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa ShepardTackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa Shepard
 
Create Knowledge with Users at Agile Korea 2013
Create Knowledge with Users at Agile Korea 2013Create Knowledge with Users at Agile Korea 2013
Create Knowledge with Users at Agile Korea 2013
 
Maryna Sokyrko & Oleksandr Chugui: Building Product Passion: Developing AI ch...
Maryna Sokyrko & Oleksandr Chugui: Building Product Passion: Developing AI ch...Maryna Sokyrko & Oleksandr Chugui: Building Product Passion: Developing AI ch...
Maryna Sokyrko & Oleksandr Chugui: Building Product Passion: Developing AI ch...
 
Big data101kagglepresentation
Big data101kagglepresentationBig data101kagglepresentation
Big data101kagglepresentation
 
L15.pptx
L15.pptxL15.pptx
L15.pptx
 
Developing Information Architecture with Non-Technical Stakeholders
Developing Information Architecture with Non-Technical StakeholdersDeveloping Information Architecture with Non-Technical Stakeholders
Developing Information Architecture with Non-Technical Stakeholders
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DS
 
Neo4j Product Update and Bloom Demo
Neo4j Product Update and Bloom DemoNeo4j Product Update and Bloom Demo
Neo4j Product Update and Bloom Demo
 
National Wildlife Federation- OMS- Dreamcore 2011
National Wildlife Federation- OMS- Dreamcore 2011National Wildlife Federation- OMS- Dreamcore 2011
National Wildlife Federation- OMS- Dreamcore 2011
 
Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler
 

More from Christophe Willemsen

Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16
Christophe Willemsen
 

More from Christophe Willemsen (12)

Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
 
Management des issues Github avec Neo4j et NLP
Management des issues Github avec Neo4j et NLPManagement des issues Github avec Neo4j et NLP
Management des issues Github avec Neo4j et NLP
 
Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16Your own recommendation engine with neo4j and reco4php - DPC16
Your own recommendation engine with neo4j and reco4php - DPC16
 
Recommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHPRecommendation Engines with Neo4j, Symfony and Reco4PHP
Recommendation Engines with Neo4j, Symfony and Reco4PHP
 
Moteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareRecoMoteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareReco
 
Recommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation EngineRecommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation Engine
 
Neo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected ThingsNeo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected Things
 
Graph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with GraphgenGraph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with Graphgen
 
Graphgen - le générateur de graphes
Graphgen - le générateur de graphesGraphgen - le générateur de graphes
Graphgen - le générateur de graphes
 
Analysing Github events with Neo4j
Analysing Github events with Neo4jAnalysing Github events with Neo4j
Analysing Github events with Neo4j
 
Présentation symfony drupal
Présentation symfony drupalPrésentation symfony drupal
Présentation symfony drupal
 
GMDSS - Practice1
GMDSS - Practice1GMDSS - Practice1
GMDSS - Practice1
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Knowledge graphs + Chatbots with Neo4j

  • 1. Knowledge Graphs and Chatbots with Neo4j GraphAware, world’s #1 Neo4j consultancy graphaware.com @graph_aware
  • 2. ● Christophe Willemsen ● From Belgium but living in Southern Italy ● Principal Consultant at GraphAware ● Expert in Graphs and Search ● Currently researching in Natural Language Understanding and its implementation in chatbots About me @ikwattro
  • 3. ● How to represent Knowledge in a Graph ○ Text Processing ■ Processing Text ■ Information Extraction ■ Keywords Extraction ○ Enrichment ■ Concept Bases ■ Visual Content Metadata ■ External Knowledge Bases ● Knowledge Graphs to power advanced applications ○ Our demo : Brain Bro ○ Knowledge Graphs in the Real Life ○ Phonetic issues ○ Soft Cosine Measure (SCM) ○ Visual and Temporal Memory for Recall Outline
  • 4. ● Original domain model, for eg authors of news, news, views, original topics, etc. ● Standard text processing features ● Information Extraction ● Enrichment ● Facts ● Knowledge Entities and Semantic relationships ● Built from aggregation and validation of layer 1 and 2 ● Offers Multi-View (Perspectives) DOMAIN MODEL LAYER 1 TEXT UNDERSTANDING LAYER 2 KNOWLEDGE GRAPH LAYER 3 USER CONTEXT LAYER 4 ● Keeps track of the user conversation ● Relates conversation steps to entry points in the Knowledge Graph ● Use distance to determine out of context situations
  • 6.
  • 7. ● Original domain model, for eg authors of news, news, views, original topics, etc. ● Standard text processing features ● Information Extraction ● Enrichment ● Facts ● Knowledge Entities and Semantic relationships ● Built from aggregation and validation of layer 1 and 2 ● Offers Multi-View (Perspectives) DOMAIN MODEL LAYER 1 TEXT UNDERSTANDING LAYER 2 KNOWLEDGE GRAPH LAYER 3 USER CONTEXT LAYER 4 ● Keeps track of the user conversation ● Relates conversation steps to entry points in the Knowledge Graph ● Use distance to determine out of context situations
  • 8. ● Natural Language Processing ○ Sentence segmentation ○ Tokenization ○ Stopwords Removal ○ Part of Speech Tagging ○ Text Understanding
  • 9. ● Natural Language Processing ○ Sentence segmentation ○ Tokenization ○ Stopwords Removal ○ Part of Speech Tagging ○ Named Entity Recognition Text Understanding
  • 10. CALL ga.nlp.annotate({text: n.text, id: id(n)}) Text Understanding
  • 11.
  • 12.
  • 13. NER
  • 14. ● Natural Language Processing ○ Sentence segmentation ○ Tokenization ○ Stopwords Removal ○ Part of Speech Tagging ○ Named Entity Recognition ○ Syntactic Dependencies Parsing Text Understanding
  • 15.
  • 16.
  • 17.
  • 18. ● Facts ○ Using Semantic Parsers to extract facts from sentences in a Subject-Root-Object form Text Understanding
  • 19.
  • 20.
  • 21. ● Keywords Extraction ○ Unsupervised algorithm ○ Using TextRank wich under the hood uses PageRank ○ Performs better than most supervised algorithms ○ http://bit.ly/graphaware-textrank Text Understanding
  • 23.
  • 24.
  • 26.
  • 28.
  • 30.
  • 31. Find articles mentioning companies being founded by Elon Musk and in the car industry
  • 32. ● Original domain model, for eg authors of news, news, views, original topics, etc. ● Standard text processing features ● Information Extraction ● Enrichment ● Facts ● Knowledge Entities and Semantic relationships ● Built from aggregation and validation of layer 1 and 2 ● Offers Multi-View (Perspectives) DOMAIN MODEL LAYER 1 TEXT UNDERSTANDING LAYER 2 KNOWLEDGE GRAPH LAYER 3 USER CONTEXT LAYER 4 ● Keeps track of the user conversation ● Relates conversation steps to entry points in the Knowledge Graph ● Use distance to determine out of context situations
  • 33. ● How to build it ? ○ Aggregate all the information from the previous steps ○ Use external tools to validate some assumptions, e.g. : Director of marketing -> corporate position ○ Create a new graph from those informations The Knowledge Graph
  • 34.
  • 35. Knowledge Graphs to power Advanced Applications
  • 38. ● NER issues ○ Default recognizers are trained on generic texts and will often perform poorly when lot of indentation is used ○ Dropbox IPO, Forty Seven, Consumer Business Group, Melinda Gates Foundation (without Bill), … ○ You can “easily” build your own models with external knowledge bases like wikidata Knowledge Graphs IRL
  • 39. ● Phonetic Matching ○ SOUNDEX, DOUBLE METAPHONE, FUZZY ○ ELASTIC PHONETIC ANALYSIS PLUGIN Knowledge Graphs IRL
  • 40. ● Visual Metadata Validation Knowledge Graphs IRL
  • 41.
  • 42. ● Visual Metadata Validation ○ Build a top-k vocabulary of the article, or the surrounding article parts of the image ○ Use word2vec to compute relevancy of class labels returned by image recognition services ○ Use SCM ( Soft Cosine Measure ) [1] [2] Knowledge Graphs IRL 1. Grigori Sidorov et al. Soft Similarity and Soft Cosine Measure: Similarity of Features in Vector Space Model, 2014. (link to PDF) 2. Delphine Charlet and Geraldine Damnati, SimBow at SemEval-2017 Task 3: Soft-Cosine Semantic Similarity between Questions for Community Question Answering, 2017. (link to PDF)
  • 44. ● Original domain model, for eg authors of news, news, views, original topics, etc. ● Standard text processing features ● Information Extraction ● Enrichment ● Facts ● Knowledge Entities and Semantic relationships ● Built from aggregation and validation of layer 1 and 2 ● Offers Multi-View (Perspectives) DOMAIN MODEL LAYER 1 TEXT UNDERSTANDING LAYER 2 KNOWLEDGE GRAPH LAYER 3 USER CONTEXT LAYER 4 ● Keeps track of the user conversation ● Relates conversation steps to entry points in the Knowledge Graph ● Use distance to determine out of context situations
  • 45. ● Intent detection ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position think about investment banks ? Querying Knowledge
  • 46. ● Intent detection ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position think about investment banks ? Understand what we want out of the knowledge graph Querying Knowledge
  • 47. ● Intent detection ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position thinks about investment banks ? Understand what we want out of the knowledge graph Querying Knowledge Looking for facts?
  • 48. ● Intent detection ○ What did say Ahmed Fathi about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position thinks about investment banks ? Understand what we want out of the knowledge graph Querying Knowledge Looking for a Location entity
  • 49. ● Intent detection ○ What did say Ahmed Fathi about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position think about investment banks ? Understand what we want out of the knowledge graph Querying Knowledge If you “say” something, do you “think” it ?
  • 50. ● Entity Extraction ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position think about investment banks ? Querying Knowledge
  • 51. ● Entity Extraction ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position think about investment banks ? Determine Entry Points in the Knowledge Graph as well as semantic constraints Querying Knowledge
  • 52. ● Entity Extraction ○ What did Ahmed Fathi say about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position thinks about investment banks ? Determine Entry Points in the Knowledge Graph as well as semantic constraints Querying Knowledge Person Entity : Ahmed Fathi Semantic: SAY Topic: blockchain
  • 53. ● Entity Extraction ○ What did say Ahmed Fathi about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position thinks about investment banks ? Determine Entry Points in the Knowledge Graph as well as semantic constraints Querying Knowledge Company Entity : ABC Arabia Bank
  • 54. ● Entity Extraction ○ What did say Ahmed Fathi about blockchains ? ○ Where is ABC Arabia Bank located ? ○ What does a person with a leader position thinks about investment banks ? Determine Entry Points in the Knowledge Graph as well as semantic constraints Querying Knowledge Company Position : Leader position Person: related to position Semantic: think Topic: investment bank
  • 55. ● Query representation ○ Queries should be treated as original corpus and pass the same set of processing Querying Knowledge
  • 56.
  • 57. Can this be used to match against a Person label in the Knowledge Graph ?
  • 58. How to match “do think about” with a “SAY” relationship in the Knowledge Graph?
  • 59. How to match “do think about” to a “SAY” relationship in the Knowledge Graph?
  • 61. ● Probabilistic Traversals ○ Use a probability based classifier like Naive Bayes for determining the type of the relationship to traverse ○ Avoid to return non-relevant results in a “Always return something architecture”
  • 62. ● Dynamic Query Stack ○ Depending on the intent, the graph should be queried differently, there is no rocket science out of the box answer to how, just knowing your domain and lot lot lot of failures and tests ○ The Knowledge Graph is queried but not only that, you could also query the NLP graph for tf-idf enforcement and score the results with different weights at the end
  • 63. ● Queries made ○ EntityLinking() ○ EntitiesSimilarity() ○ SemanticSimilarity() ○ TraversalProbability() ○ KeywordSensitivePageRank() ○ TopicSensitivePageRank() ○ TF-IDF()
  • 64. ● Lot of techniques ○ Minimum subgraph matching ○ Sequence pattern recognition for SVO generation when queries are not parsed fully ○ Voice adaptations aka soundex ○ Deep learning ○ ...
  • 65.
  • 66. User Query and Context
  • 67. ● Conversation ○ After all, chatbots are considered as Conversational Interfaces, it wouldn’t have this name if the end goal of such systems is having a conversation with a machine ○ Keeping track of where the user is in the conversation can help to add more constraints to the queries User Context
  • 68.
  • 69. ● When to go out ? ○ A user can quickly go out of context during a conversation, for example : * How is the weather in San Francisco ? -- it is 25 degrees * what size? -- ?? Are you really gonna try to find a response? ○ We use distance calculation in the graph based to trigger Signals if the user is out of context User Context
  • 70. ● Some more thoughts ○ Embrace failures ○ Monitor ○ Humans are still a thing ○ ..
  • 71. world’s #1 Neo4j consultancy www.graphaware.com @graph_aware Thank you ! Christophe Willemsen @ikwattro