1 of 19

Building a Chatbot for Students

Mentorship based on Extracted

Knowledge Graphs

David Samy Naeem

Dr. Mervat Mustafa Fahmy Abuelkheir

Eng. Mayar Osama Abdelstar

1

German University in Cairo

2 of 19

Outline

  • Thesis Motivation & Objective
  • Background
  • Related Work
  • Solution Approach
  • Technologies & Frameworks
  • Results & Analysis
  • Demo
  • Conclusion & Future Work

2

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

3 of 19

Thesis Motivation

Thesis Objective

  • Lack of personalized mentorship
  • Growing number of students
  • Countless inquiries need to be repeatedly answered
  • Creating a system that can understand and respond to student queries and concerns by leveraging knowledge graph extracted from GUC regulations.

3

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

4 of 19

Background

4

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Knowledge Graph Embeddings

02

Knowledge Graphs

01

  • Structured representation of knowledge where entities represented as nodes while relations as edges
  • Encode entities & relations to vectors for KG reasoning
  • Capture semantic meanings

ENG 800: <<Your Title here>>

German University in Cairo

5 of 19

Related Work

  • T2KG: An End-to-End System for Creating KG from Text

  • KBot: A KG based chatbot for NLU

5

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

1

Intent Classifier

2

Question to SPARQL

3

Information Retrieval

Entity Mapping

Coreference Resolution

Triple Extraction

ENG 800: <<Your Title here>>

German University in Cairo

6 of 19

Solution Approach

  • Knowledge Graph Extraction

6

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Dataset Pre-Processing

  • Txt Format
  • Stop Word Removal
  • Lowercasing
  • Lemmatization

Coreference Resolution

Linking pronouns that refer to same entity in text.

Relationship Extraction

(Subject-Relation-Object)

Saving KG

Triplets saved in CSV format.

ENG 800: <<Your Title here>>

German University in Cairo

7 of 19

Solution Approach

  • Knowledge Graph Embedding

7

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

KG Pre-Processing

Removing entities and relations that are not well-defined or contain errors.

KG Encoding

  • Vector Representation
  • Unique ID

KG Splitting

  • Train
  • Validation
  • Test

Model Training

  • Parameters tuning
  • Link Prediction
  • Discover new facts

ENG 800: <<Your Title here>>

German University in Cairo

8 of 19

Solution Approach

  • Chatbot Architecture

8

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

9 of 19

Solution Approach

  • Pre-Processing User Input Module

9

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Spell & Grammar Checking

Correcting spelling and grammar errors on:

  • Word level
  • Sentence level

Stop Word Removal

  • Do not provide much meaning.
  • Simpler Input.
  • Easier analysis.

Lowercasing

Reduce the complexity of the input.

Lemmatization

  • Root Form
  • Less Unique words.

ENG 800: <<Your Title here>>

German University in Cairo

10 of 19

Solution Approach

  • Input Comprehension Module

10

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Entity & Predicate Extraction

  1. Dependency parsing
  2. Subject & Root Verb

Entity Mapping

Associating extracted entities from user input with corresponding entities in the KG.

ENG 800: <<Your Title here>>

German University in Cairo

11 of 19

Solution Approach

  • Knowledge Graph Embedding Model

11

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Entity & Relation Encoding

Mapping entities and relations into their corresponding embedding representations.

Entity Prediction

Providing a known entity and relation to predict the missing head or tail.

ENG 800: <<Your Title here>>

German University in Cairo

12 of 19

Solution Approach

  • Response Generation Module

12

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Entity & Relation Decoding

Mapping the embedded representations of predicted entities and relations back to English words.

Tokenization & POS Tagging

Conjugating relation verb according to the subject entity & adding back missed prepositions due to stop word removal.

ENG 800: <<Your Title here>>

German University in Cairo

13 of 19

Solution Approach

13

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Overview

ENG 800: <<Your Title here>>

German University in Cairo

14 of 19

Technologies & Frameworks

14

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

15 of 19

Results

15

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

16 of 19

Analysis

16

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ComplEx Model

03

  • Captured Underlying Relations
  • Predicted Missing Facts

TransE Model

01

  • Couldn’t handle one to many and many to many relations

DistMult Model

02

  • Couldn't capture asymmetric relations

ENG 800: <<Your Title here>>

German University in Cairo

17 of 19

Demo

17

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

ENG 800: <<Your Title here>>

German University in Cairo

18 of 19

Conclusion & Future Work

18

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

User Feedback

03

  • Conducting surveys
  • Evaluate user experience

Multi-hop Reasoning

01

  • Connect multiple pieces of knowledge
  • Handle indirect queries

Integrating with University System

02

  • Provide access to real-time data
  • Personalized mentorship

ENG 800: <<Your Title here>>

German University in Cairo

19 of 19

Thank You

19

Building a Chatbot for Students Mentorship based on Extracted Knowledge Graphs

Questions?

ENG 800: <<Your Title here>>

German University in Cairo