## 2 Related Work  
In this section, we will provide a brief overview of the models proposed in recent years, including their respective strengths and limitations. Pattern matching and machine learning are two main approaches to developing a conversational model based on the applied techniques. [PERSON] from the Massachusetts Institute of Technology (MIT) developed ELIZA, one of the earliest rule-based chatbots [16]. ELIZA is a simple program that uses pre-defined rules to communicate with users in natural language. It searches for keywords in the user's input text and analyzes them using predefined rules to generate a response. PARRY is a chatbot extension of ELIZA, created by Stanford [17], and has many improvements over ELIZA. PARRY simulates a patient with schizophrenia and generates responses based on the user's emotional state and the previous response. From 1995 to 2000, the Artificial Intelligence Markup Language (AIML) was developed to build a knowledge base for chatbot systems using pattern-matching techniques. ALICE was the first chatbot to use the AIML language, and its knowledge base contains around 41,000 patterns, in contrast to ELIZA's 200 rules. However, even with this massive knowledge base, ALICE is still not intelligent enough to generate human-like responses. The weakness of pattern-matching methods is that they often produce robotic and repetitive responses, lacking the naturalness of actual human interactions. Therefore, this approach is better suited to a single-turn conversation where the response can be selected from a database, and the user is only interested in the final response. In practice, we need chatbots to generate appropriate and goal-oriented responses, ensuring the conversation remains coherent and meaningful within the given context. Unlike chatbot systems based on the pattern matching method, chatbots that use Machine Learning can extract information from user input using NLP techniques and learn from conversations. They are not limited to using pre-defined rules set by the user. The core idea of Machine Learning is to train a model with labeled question-answer pairs provided by humans, which maps the relationships between inputs and responses from the training data. One of the earliest generations of chatbots was developed using Statistical Machine Translation (SMT) by [18]. The SMT-based approach treats conversational responses as a language translation problem, where the mapping rules between input and output are learned from training data. Based on this idea, some previous studies proposed SMT models for building chatbots [18]. They utilized SMT models by taking the user's utterance \(X\) as input and generating the response \(Y\) using the translation method. The language model \(P(Y)\) was constructed by counting the frequency of n-grams in the training data. The probability of a response sentence given an input sentence denoted as \(P(Y|X)\) forms the basis for generating reasonable phrases in a conversation. A translation table was also created based on the training data during the training process. The Moses phrase-based decoder used the translation table to select the best response for the input sentence. In their experiments, the input and response were in the same language, and the data consisted of status updates on Twitter. However, the researchers found that mapping responses in a conversation was more complex than translating between two languages and unsuitable for multi-turn conversations. Recognizing user messages and generating appropriate responses can enrich communication in chatbot systems. Recently, text generation tasks based on the Seq2 Seq neural network model have attracted much attention in the field of neural dialogue generation [6]. Their models use two recurrent neural networks (RNNs). The first network encodes the input sentence to a context vector, and the second decodes the vector to generate the desired response.