A Novel Approach for Building Domain-Specific Chatbots by Exploring Sentence Transformers-based Encoding

Syed Muhammad Muneel Raza Naqvi, Shamsa Batool, Muzamil Ahmed, Hikmat Ullah Khan, Malik Ali Shahid · 2023

Chatbots have gained significant attention in recent years due to their potential to automate various conversational tasks. In this research paper, we explore the effectiveness of two different models, the Term Frequency-Inverse Document Frequency (TF-IDF), and the Sentence Transformers model for developing a restricted domain chatbot. TF-IDF captures the importance of words within a domain-specific knowledge base, aiding in query understanding and information extraction. However, sentence transformers encode sentence meaning and semantic similarity, enabling the generation of contextually coherent and relevant responses. The primary objective of this research study is to develop a chatbot architecture that can deliver accurate and pertinent answers to users’ queries in a conversational manner. To evaluate the effectiveness of our approach, we conducted experiments on a domain-specific dataset containing question-answer pairs. The results demonstrate that the sentence transformer model outperforms the traditional TF-IDF model in terms of different evaluation measures. The sentence transformer encoding exhibits superior capability in capturing semantic context and generating contextually relevant responses, leading to a more natural and engaging conversational experience.

Read the paper · More papers on PaperTik