In this project, I implemented a chatbot using the encoder-decoder algorithm as part of my exploration into the field of deep learning. The encoder-decoder architecture has gained widespread attention in the field of natural language processing for tasks such as machine translation and text summarization. Furthermore, I aim to demonstrate the effectiveness of the encoder-decoder algorithm for the development of chatbots.
For training my Q&A chatbot a dataset of human-human question-answer examples was used. The chatbot is capable of answering questions from distinctive domains, such as: AI, history, politics, sports, … (The complete dataset was uploaded in ConvDataset directory).
The use of a deep learning encoder-decoder algorithm will enable our chatbot to understand and generate human-like responses to user queries, making it a more effective and engaging tool for providing information and assistance in day-to-day life.
Encoder: Input Layer, Embedding Layer, LSTM
Decoder: Input Layer, Embedding Layer, LSTM + encoder states
Output: Dense Layer
Word embeddings can be thought of as an alternate to one-hot encoding along with dimensionality reduction. It can understand the context of a word so that similar words have similar embeddings. In this project I used Keras embedding layer and GloVe (a pre-trained word embedding). The GloVe file utilized can be downloaded from: https://www.kaggle.com/datasets/watts2/glove6b50dtxt.
In this particular model, the accuracy and loss metrics prove that modifying the type of the embedding layer doesn't have a prodigious impact on the chatbot's functionality.