RAG System + Knowledge Graph, the system for finding the best answer in the tickets management system

Improving Customer Service Chatbot with Retrieval-Augmented Generation and Knowledge Graphs

This report explores a system that leverages Retrieval-Augmented Generation (RAG) with a Knowledge Graph (KG) to enhance customer service chatbot.

Traditional Approach

Traditional customer service chatbot rely on keyword matching to retrieve relevant information from a knowledge base. This approach can be ineffective for complex questions or implicit language.

The proposed system combines two techniques:

Knowledge Graph (KG): The system builds a network of interconnected information extracted from past customer service tickets. This network allows the system to identify relationships between different issues and concepts.

Retrieval-Augmented Generation (RAG):When a customer asks a question, the system first retrieves relevant information from the KG using techniques like vector similarity. Then, it uses this information to generate a response that addresses the customer’s query.

Benefits

Improved Retrieval: Using vector similarity allows the system to find relevant information even for implicit language questions.
Enhanced Answers: By leveraging the KG, the system can generate more comprehensive and informative responses to customer inquiries.
Overall Service Effectiveness: Improved retrieval and answering capabilities improve customer service experiences.

Combination RAG with Knowledge-based system

Better search for vector search part

https://www.youtube.com/watch?v=vMBL2nErmQ8
https://www.youtube.com/watch?v=vMBL2nErmQ8

sample of vector database

Retrieval-Augmented Generation with Knowledge Graphs for Customer Service Question Answering

This describes a system for automatically answering customer service questions. It combines two techniques:

  • Organizing knowledge: It builds a network (like a mind map) of customer service issues from past tickets. This network connects related issues and uses special codes to understand the meaning of each piece of information.
  • Understanding questions: When a customer asks a question, the system figures out what they are asking about (e.g., account balance, billing issue) and searches the network for relevant information to answer the question.
RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

For implicit connections, we leverage cosine similarity between the embedding vectors of ticket titles, a method adaptable to specific use cases.

The Neo4j GDS library provides a set of measures that can be used to calculate similarity between two arrays ps, pt of numbers.

The similarity functions can be classified into two groups. The first is categorical measures which treat the arrays as sets and calculate similarity based on the intersection between the two sets. The second is numerical measures which compute similarity based on how close the numbers at each position are to each other.

we generate embeddings for graph node values using
pre-trained text-embedding models like BERT [6] and E5 [ 17 ]

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

In conclusion, our research significantly advances automated ques-
tion answering systems for customer service. Integrating retrieval
augmented generation (RAG) with a knowledge graph (KG) has
improved retrieval and answering metrics, and overall service effec-
tiveness. Future work will focus on: developing an automated mech-
anism for extracting graph templates, enhancing system adaptabil-
ity; investigating dynamic updates to the knowledge graph based
on user queries to improve real-time responsiveness; and explor-
ing the system’s applicability in other contexts beyond customer
service.

Our system makes automated customer service chatbots better.
It combines two techniques (mentioned earlier) to find answers to customer questions more effectively.
This improves overall customer service. By answering questions faster and more accurately, customers get better help.
The researchers want to make the system even better in a few ways:

*They want the system to automatically learn how to organize the knowledge graph, instead of needing someone to set it up manually.
* They want the system to be adaptable to different situations (e.g., working for a bank vs. a tech company).
* They want the system to update its knowledge base as users ask questions, so it can learn and improve over time.
* They’re also interested in using this approach for other tasks beyond customer service.

Knowledge Graphs

Ontologies represent the backbone of the formal semantics of a knowledge graph. They can be seen as the data schema of the graph. They serve as a formal contract between the developers of the knowledge graph and its users regarding the meaning of the data in it. A user could be another human being or a software application that wants to interpret the data in a reliable and precise way. Ontologies ensure a shared understanding of the data and its meanings.

neo4j

What is a Knowledge Graph?

New course with Neo4J: Knowledge Graphs for RAG

RAG with a Neo4j Knowledge Graph: How it Works and How to Set It Up

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…
RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…
RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

Step-by-step Code for Knowledge Graph Construction

the disadvantage of traditional knowledge base methods

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

👑 GLiNER: Generalist and Lightweight Model for Named Entity Recognition

Named Entity Recognition (NER) is essential in various Natural Language Processing (NLP) applications. Traditional NER models are effective but limited to a set of predefined entity types. In contrast, Large Language Models (LLMs) can extract arbitrary entities through natural language instructions, offering greater flexibility. However, their size and cost, particularly for those accessed via APIs like ChatGPT, make them impractical in resource-limited scenarios. In this paper, we introduce a compact NER model trained to identify any type of entity. Leveraging a bidirectional transformer encoder, our model, GLiNER, facilitates parallel entity extraction, an advantage over the slow sequential token generation of LLMs. Through comprehensive testing, GLiNER demonstrate strong performance, outperforming both ChatGPT and fine-tuned LLMs in zero-shot evaluations on various NER benchmarks.

Chunck text only with \n\n or \n

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

Prompt engineer for extract relationship

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

Interactive network visualizations

RAG System + Knowledge Graph, the system for finding the best answer in the tickets management…

Stackademic 🎓

Thank you for reading until the end. Before you go: