## 2 Related Work  
### Chatbot Overview  
ELIZA [31] and PARRY [32] were among the first chatbots. These systems do not employ data-driven learning but rely on a combination of rules and patterns; they work exceptionally well when the scope of the discussion is defined, i.e., when the conversation is focused on a specific topic or task [4]. However, learning-based alternatives have been developed to circumvent some of the drawbacks of rule-based (handwritten rules) systems. These technologies enable chatbots to learn from massive volumes of available human-to-human conversations, for example, chat platforms, Twitter, or movie dialogues.  
Learning-based approaches can be broadly characterized as retrieval-based or generative-based approaches. Retrieval-based models collect candidate answers from a prebuilt index, rank the candidates, and select the answer from the top-ranked options [22; 33]. In contrast, generation-based approaches typically generate answers via deep learning (DL) techniques [17]. The basic premise of generative-based approaches is to create a new sentence word by word in response to a user's query [34].  
[PERSON] et al. [35] employed phrase-based statistical machine translation (SMT) to convert a user query into a system response. They showed that the SMT method was superior to retrieval-based models in generating responses to a Twitter dataset [35; 36]. Subsequently, it became apparent that the problem of generating responses differed from that of machine translation [37]. While words or phrases in the source and target sentences usually match well, a user's speech in a coherent response may not have any words or phrases in common with a coherent response [38].  
It was later shown that another machine translation technique, sequence-to-sequence (seq2 seq) learning, performed better at generating responses [38]. The seq2 seq architecture includes an encoder model that compresses user input (query) and represents it as a vector [24]. A decoder model decodes the vector (representing the encoded input) and generates sentences word by word [24]. Typically, the encoder and decoder models are based on RNNs. Attention-based methods have been developed to allow the encoder to concentrate on certain portions of the encoded input, which is crucial for forecasting specific segments of the output during the decoding phase [39]. Bidirectional RNN (BRNN) models have also been used to improve the encoding of the context of the output sentence.  
Figure 1: Interactions of different interface methods: (**a**) write-based; (**b**) menu-based and write-based; (**c**) menu-based.  
A new, simple network design based on the attention mechanism was later introduced, resulting in significantly improved response quality while requiring significantly less training time [24]. This type of design is called the transformer architecture [40]. The transformer model establishes global relationships between the input and output using only an attention mechanism [24]. This prevents recursion and allows for greater parallelization; however, the transformer model retains the encoder-decoder architecture. The development of transformer-based language models was a turning point in NLP [41]. These models, such as OpenAI GPT3, GPT4 [42], Bert [43], and T5 [44], have achieved state-of-the-art performance in a variety of NLP tasks [41].