scieee AI-readable full text Open interactive document viewer

A Chatbot for Bad Tölz: Leveraging Natural Language Processing Techniques and Artificial Intelligence to Enhance Information Access and Community Engagement

Allgaier, Leonhard Jakob

Abstract

The adoption of Artificial Intelligence (AI) in hospitality and tourism has increased due to its benefits in reducing labour costs and improving service efficiency. Chatbots, a notable AI technology, enhance trip planning by providing accurate and timely information on safe activities, tourist sites, entertainment, restaurants, and accommodations, significantly impacting tourist satisfaction. However, their adoption faces challenges such as lack of awareness, implementation costs, integration difficulties, and the need for effective customer service. Therefore, this work has multiple objectives. It first aims to provide an understanding of the background and historical context of Chatbots. Second, it conducts a comprehensive literature review, offering an overview of existing Chatbot approaches within the tourism domain, highlighting the novelty of the approach proposed here. Finally, it outlines a novel method that involves gathering data from multiple sources, such as the official Bad Tölz website and platforms like TripAdvisor. This data will be used to create a vector storage for a RetrievalAugmented Generation (RAG) pipeline that incorporates two Generative Pre-trained Transformer (GPT) models. The goal is to deliver relevant and accurate answers to questions without the need to fine-tune the models on this specific data. The anticipated outcome of this work is the development of an effective Chatbot solution for Bad Tölz. This solution aims to enhance user experience and community engagement by increasing information accessibility. It also seeks to provide valuable insights into the use of Natural Language Processing (NLP) and Machine Learning (ML) techniques for localized Chatbot development in the tourism sector.

Full text

Master’s Degree Program in Data Science and Advanced Analytics A Chatbot for Bad Tölz Leveraging Natural Language Processing Techniques and Artificial Intelligence to Enhance Information Access and Community Engagement Leonhard Jakob Allgaier Master Thesis presented as partial requirement for obtaining a Master’s Degree in Data Science and Advanced Analytics NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa MDSAA NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa A Chatbot for Bad Tölz Leveraging Natural Language Processing Techniques and Artificial Intelligence to Enhance Information Access and Community Engagement by Leonhard Jakob Allgaier Master Thesis presented as partial requirement for obtaining the Master’s degree in Data Science and Advanced Analytics, with a specialization in Data Science Supervised by Miguel de Castro Neto, PhD, NOVA Information Management School Co‐supervised by Bruno Jardim, PhD, NOVA Information Management School January, 2024 i STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Rules of Conduct and Code of Honor from the NOVA Information Management School. Lisboa, 06.03.2024 ii ABSTRACT The adoption of Artificial Intelligence (AI) in hospitality and tourism has increased due to its benefits in reducing labour costs and improving service efficiency. Chatbots, a notable AI technology, enhance trip planning by providing accurate and timely information on safe activities, tourist sites, entertainment, restaurants, and accommodations, significantly impacting tourist satisfaction. However, their adoption faces challenges such as lack of awareness, implementation costs, integration difficulties, and the need for effective customer service. Therefore, this work has multiple objectives. It first aims to provide an understanding of the background and historical context of Chatbots. Second, it conducts a comprehensive literature review, offering an overview of existing Chatbot approaches within the tourism domain, highlighting the novelty of the approach proposed here. Finally, it outlines a novel method that involves gathering data from multiple sources, such as the official Bad Tölz website and platforms like TripAdvisor. This data will be used to create a vector storage for a Retrieval- Augmented Generation (RAG) pipeline that incorporates two Generative Pre-trained Transformer (GPT) models. The goal is to deliver relevant and accurate answers to questions without the need to fine-tune the models on this specific data. The anticipated outcome of this work is the development of an effective Chatbot solution for Bad Tölz. This solution aims to enhance user experience and community engagement by increasing information accessibility. It also seeks to provide valuable insights into the use of Natural Language Processing (NLP) and Machine Learning (ML) techniques for localized Chatbot development in the tourism sector. KEYWORDS Artificial Intelligence; Natural Language Processing; Chatbot; ChatGPT; Retrieval-Augmented Generation; Tourism iii TABLE OF CONTENTS 1. Introduction .................................................................................................................. 1 2. Background ................................................................................................................... 3 2.1. Artificial Intelligence .............................................................................................. 3 2.2. Natural Language Processing ................................................................................ 3 2.3. Machine Learning .................................................................................................. 5 2.4. Chatbots................................................................................................................. 8 2.5. Generative Pre-trained Transformer................................................................... 13 2.6. Retrieval Augmented Generation ....................................................................... 14 3. Related Work .............................................................................................................. 16 3.1. Rule-based Chatbots............................................................................................ 16 3.2. AI-driven Chatbots............................................................................................... 17 4. Methodology .............................................................................................................. 25 4.1. Business Understanding ...................................................................................... 25 4.2. Data Understanding ............................................................................................ 26 4.2.1. Data Collection ............................................................................................. 26 4.2.2. Data Description........................................................................................... 27 4.2.3. Data Quality Assessment.............................................................................. 28 4.2.4. Data Exploration........................................................................................... 28 4.3. Data Preparation ................................................................................................. 35 4.4. Modeling.............................................................................................................. 37 4.5. Evaluation ............................................................................................................ 39 4.6. Deployment ......................................................................................................... 40 5. Results and Discussion................................................................................................ 41 5.1. Results ................................................................................................................. 41 5.2. Discussion ............................................................................................................ 43 6. Conclusions and future works .................................................................................... 44 6.1. Conclusion ........................................................................................................... 44 6.2. Future Work......................................................................................................... 44 Bibliographical References .............................................................................................. 46 Appendix A ...................................................................................................................... 56 iv LIST OF FIGURES Figure 1 – Distribution of document length in token............................................................... 29 Figure 2 – 10 most present Bigrams in documents ................................................................. 30 Figure 3 – Word clouds of most present words ....................................................................... 30 Figure 4 – Topic 1 as defined in topic modelling process ........................................................ 32 Figure 5 – Topic 2 as defined in topic modelling process ........................................................ 33 Figure 6 – Topic 3 as defined in topic modelling process ........................................................ 34 Figure 7 – Topic 4 as defined in topic modelling process ........................................................ 35 Figure 8 – Flowchart of extract, transform, load (ETL) process ............................................... 37 Figure 9 – Flowchart RAG pipeline ........................................................................................... 38 v LIST OF TABLES Table 1 – Data origin and statistics .......................................................................................... 29 Table 2 – Data statistics after consolidation ............................................................................ 29 Table 3 – Evaluation metrics baseline model........................................................................... 41 Table 4 – Evaluation metrics GPT-3.5-turbo ............................................................................ 42 Table 5 – Evaluation metrics GPT-3.5-turbo-16k ..................................................................... 42 vi LIST OF ABBREVIATIONS AND ACRONYMS ACM Association for Computing Machinery AI Artificial intelligence AIML Artificial Intelligence Markup Language ANN Artificial Neural Network API application programming interface AWS Amazon Web Services BERT Bidirectional Encoder Representations from Transformers CDT Context Dimension Tree CNN Convolutional Neural Network CRF Conditional Random Field CRISP Cross-Industry Standard Process (for Data Mining) CSS Cascading Style Sheets CSV Comma-Separated Values DB Database DM Data Mining DNN Deep Neural Network DST Dialogue state tracking EC2 Elastic Compute Cloud ETL Extract, Transform, Load FAISS Facebook AI Similarity Search FAQ Frequently Asked Questions GPT Generative Pre-trained Transformer GRU Gated Recurrent Unit mGT Mixed Graph of Terms GUI Graphical User Interface vii HTML HyperText Markup Language HTTP HyperText Transfer Protocol HTTPS HyperText Transfer Protocol Secure IBM International Business Machines Corporation IEEE Institute of Electrical and Electronics Engineers IOS iPhone Operating System JS JavaScript JSON JavaScript Object Notation JWT JSON Web Token LDA Latent Dirichlet Allocation LLM Large Language Model LSTM Long Short-Term Memory MIT Massachusetts Institute of Technology ML Machine Learning NER Named Entity Recognition NLP Natural Language Processing NLU Natural Language Understanding PARRY An early artificial intelligence program designed to simulate a person with paranoid schizophrenia. PAUN Parco Archeologico Urbano di Napoli PDF Portable Document Format QA Question answering RAG Retrieval-Augmented Generation RAKE Rapid Automatic Keyword Extraction REST Representational State Transfer RF Random Forest 6 this data by calculating the conditional probability of each label given the features in the document. These features are typically words or sentences, which are considered conditionally independent given the class (Webb, 2011). While often violated in practice, the assumption of conditional independence, simplifies the computation involved in training the model and making predictions, contributing to the popularity of Naive Bayes. Despite this, Naive Bayes often delivers competitive classification accuracy, especially in text classification problems where the number of features (words) is large compared to the number of documents (Webb, 2011). In the context of Chatbots, Naive Bayes can be used to classify user queries into one of several predefined categories, each corresponding to a different type of response. This allows the Chatbot to generate appropriate responses to a wide range of user queries quickly and accurately (Rajeshkumar et al., 2023). Decision Trees are predictive models in supervised learning, known for their utility in a wide range of applications, including NLP and Chatbot development. They are valued for their interpretability and robustness (Caldarini et al., 2022; Saha et al., 2022). In the context of NLP and Chatbots, Decision Trees can be used for tasks such as part-of-speech tagging, lemmatization, morphological attribute resolution, letter-to-sound conversion, and statistical parametric speech synthesis (Research Institute for Artificial Intelligence, Romanian Academy et al., 2017). They can also be employed in Chatbots to classify user queries into predefined categories, each corresponding to a different type of response (Castle-Green et al., 2020). A Decision Tree is a flowchart-like structure, with each internal node representing a logical split and each leaf representing a prediction. During inference, each observation starts at the root and ends in one of the leaves, following a path that is completely transparent to the user (Caldarini et al., 2022). Despite the simplicity of this approach, Decision Trees are known for their robustness and have stood the test of time since their original proposal in the 1960s. However, it’s important to note that the performance of Decision Trees can be influenced by the quality and diversity of the training data (Caldarini et al., 2022). Support Vector Machines (SVMs) are a class of supervised learning algorithms that have been widely applied in NLP and Chatbot development. SVMs are known for their robustness and their ability to handle high-dimensional data, making them particularly suited for text classification tasks in NLP (Cristianini & Ricci, 2008; Shmilovici, 2023). In the context of NLP, SVMs can be used for tasks such as sentiment analysis, topic classification, and spam detection. They work by mapping input vectors, in this case, text documents represented as vectors, into a high-dimensional feature space and identifying a 7 hyperplane in this space that separates the classes with the maximum margin (Cristianini & Ricci, 2008). In the context of Chatbots, SVMs can be used to classify user queries into one of several predefined categories, each corresponding to a different type of response. This allows the Chatbot to generate appropriate responses to a wide range of user queries quickly and accurately (Shmilovici, 2023). Despite the complexity of the optimization problem that SVMs solve, they have been shown to perform well in practice, often outperforming other methods on text classification tasks. It is also important to note that the performance of SVMs can be influenced by the choice of kernel function and the quality and diversity of the training data (Cristianini & Ricci, 2008). Another example of the advancement in NLP driven by Machine Learning are word embeddings. In the second half of the 2010s, Chatbots started integrating more sophisticated word embeddings, which enabled them to capture semantic relationships between words and phrases. An example of this is Bidirectional Encoder Representations from Transformers (BERT) that played a crucial role in enabling Chatbots to grasp the nuances of user queries and respond with increased relevance compared to previous approaches like Word2Vec (Luo et al., 2022). Later models like neural network-based models, particularly Recurrent Neural Networks. RNN’s enabled Chatbots to capture sequential dependencies in language and generate more contextually relevant responses. This is achieved by hidden states that keep the information of the previously seen data, making the inputs and outputs dependent of each other, so that the previous inputs can influence the current input and output. This is crucial when predicting text due to the need to capture context. It must be noted that the ability of RNNs to capture long-term relationships is also limited due to the vanishing gradient problem. Therefore, recurrent neural network architectures like the Long short-term memory networks or elements like the gated recurrent units (GRUs) were developed. These innovations help Chatbots to overcome the limitations posed by the vanishing gradient problem and capture more nuanced contextual information in conversations (Cho et al., 2014; Greff et al., 2017). Hochreiter & Schmidhuber (1997) LSTM attempted to address the issue by introducing a memory cell that can choose to add or forget information based on the inputs received. This would enable the model to priorize more important context while disregarding less important or irrelevant context. However, this is a very computationally expensive architecture that requires careful fine-tuning to achieve good performance for each task. More recently, Transformer models, a type of architecture initially introduced in the paper “Attention is All You Need” (Vaswani et al., 2017), have revolutionized the field of NLP. They leverage self-attention mechanisms, allowing them to weigh the relevance of words in the input sequence for generating each word in the output, thereby capturing the context more effectively. Transformer models, like the GPT series, have significantly improved the ability of 8 Chatbots to generate human-like responses. Therefore, the GPT series is going to be explained more detailed in Section 2.5. 2.4. CHATBOTS Chatbots are variously referred to as chatterbot, bot, conversational AI, conversational agent, amongst others. What these terms have in common, however, is they all describe the concept of “a computer program that can hold a conversation with a person, usually over the internet” (Oxford Learners Dictionary, 2024). Chatbots can engage in conversations via text or voice, enabling them to understand one or more natural language spoken or written by humans (Adamopoulou & Moussiades, 2020a). It should be acknowledged that this conversation in most of the cases has a higher purpose than just chatting. Consequently, researchers have identified several areas where Chatbots can be applied, including "education, information retrieval, business, and e-commerce" (Abu Shawar & Atwell, 2007). Chatbots have a variety of purposes and characteristics. They can be classified by several factors, including the input processing and response generation, the goals, the knowledge domain, the service provided, the human-aid, and the build method (Adamopoulou & Moussiades, 2020a). Regarding the classification of Chatbots based on input processing and response generation method, the classification proposed by Hien et al. (2018) has been applied. According to this classification, Chatbots can be divided into three categories: rulebased, retrieval-based, and generative Chatbots. The first group of Chatbots, rule based, were most common in early Chatbot architectures and in online Chatbots. They define their answers according to a set of predefined fixed rules. These rules are designed to recognize the lexical structure of the input text. The knowledge embedded in these Chatbots is manually encoded by humans and is structured and presented using conversational patterns. A more extensive rule database enhances the Chatbot's capability to respond to diverse types of user input. However, it cannot fully address the shortcomings of being prone to errors in spelling and grammar within the users input. Most research on rule-based Chatbots focuses on response selection for single-turn conversations, considering only the last input message. In contrast, more sophisticated Chatbots engaging in multi-turn conversations consider previous segments of the interaction to select a response that is relevant to the entire conversational context (Adamopoulou & Moussiades, 2020b). The first publicly known Chatbot, ELIZA, which was developed at the Massachusetts Institute of Technology (MIT) by Joseph Weizenbaum in 1966, belongs to this group of rule-based Chatbots. It mimicked the language of a psychotherapist by rephrasing the sentences it received. Essentially, the Chatbot employed active listening by emphasizing important words from the user's input. If it could not generate a relevant response, it would respond with a neutral acknowledgment like "I see" before steering the conversation toward a different subject (Weizenbaum, 1966). ELIZA marks the beginnings of rule-based Chatbots in the 1970s 9 and 1980s. Other rule-based Chatbots, such as PARRY in 1972 followed (Adamopoulou & Moussiades, 2020b). PARRY was developed by Kenneth Colby with the objective to simulate a person with paranoid schizophrenia. PARRY would respond differently based on the distribution between mood parameters for anger, fear and mistrust (Colby et al., 1971). In the 1990s, Chatbots became more sophisticated. The Artificial Linguistic Internet Computer Entity (A.L.I.C.E.), is an example of the development of this technology. A.L.I.C.E. also makes use of this stimulus-response architecture, where the system generates responses based on patterns or rules in the input it receives and offers predetermined responses. As part of the development of A.L.I.C.E, Artificial Intelligence Markup Language (AIML) was created. AIML is an Extensible Markup Language (XML) dialect structured in a way that each entry combines a question or pattern with an answer or template. With the help of AIML it was possible to incorporate over 40,000 categories of knowledge, a significant advancement over earlier Chatbots like ELIZA or PARRY in terms of complexity and knowledge base. A.L.I.C.E also features a form of supervised learning, allowing for continuous refinement and adaptation. This is achieved through a so-called botmaster, that analyses the interactions, identifies patterns, and creates new AIML content to enhance the bot's ability to generate appropriate and accurate responses. AIML stores these patterns in a tree structure managed by a graphmaster that facilitates efficient pattern matching during conversations (Wallace, 2009). Simultaneously with the development of A.L.I.C.E, Rollo Carpenter "takes a notably different approach to other Chatbots" and developed Jabberwacky (Fryer, 2006). Due to the growth of the Internet, Jabberwacky can access a dynamic database of thousands of online human interactions it had in the past from which it can process responses. While A.L.I.C.E was programmed with over 40,000 conversation patterns, Jabberwacky had learned more than 8 million independently by 2006 (Boiano et al., 2018; Fryer, 2006). The next generation of Jabberwacky that Carpenter released is called Cleverbot. It employs the same approacht of continuous refinement, automatically creating or updating rules based on former conversations (Gehl, 2014). Cleverbot maintains an extensive database of conversational interactions, with approximately 4 to 7 million new interactions are stored every day. The total number of recorded interactions exceeds 7 to 8 billion. Of the total number of interactions, about 1.4 billion are stored, and Cleverbot formulates responses based on a subset of 279 million interactions, which is about 3-4% of its total learning data (Cleverbot Data for Machine Learning – Existor, 2015). The era of rule-based Chatbots reached its peak with examples like Mitsuku and SmarterChild. Mitsuku, also based on AIML, continues to undergo continuous development and refinement, winning several prizes like the Loebner Prize in recent years. SmarterChild is recognized as a milestone and precursor to services like Siri, Cortana, and Alexa. Both Mitsuku and 10 SmarterChild were available on several messaging platforms (Adamopoulou & Moussiades, 2020b; Boiano et al., 2018). In summary, rule-based Chatbots rely on predefined fixed rules to generate responses. The first Chatbot to utilize this approach was ELIZA, which was developed in 1966. Other notable examples include PARRY, which was created in 1972, and A.L.I.C.E., which was introduced in 1995. Concepts like AIML and A.L.I.C.E’s continuous refinement or the learning approach of Jabberwacky, respectively Cleverbot, led to a peak in rule-based Chatbots with examples like Mitsuku and SmarterChild. The 2010s marked a significant era for the development of Chatbots, driven by advances in Machine Learning and Natural Language Processing. This period saw a transition in Chatbot technology from rule-based Chatbots to retrieval-based Chatbots utilizing various methods and algorithms from the domains of Natural Language Processing and Machine Learning to generate responses (Luo et al., 2022). These more sophisticated retrieval-based Chatbots are renowned for outperforming their predecessors, the rule-based Chatbots (Surendran et al., 2020). The reason for that is the fact that the programmer must specify all rules for a rule-based Chatbot, resulting in rigid and often limited conversational capabilities. In contrast to rule-based models, retrieval-based Chatbots offer flexibility by querying and analysing resources via application programming interfaces (APIs) or databases. The APIs or databases provide responses in the form of potential answer candidates. The model then selects the ultimate answer by employing various algorithms to evaluate the available options (Wu et al., 2016). More concretely, developers had the opportunity to analyse millions of conversations and archive them as documents containing pairs of 'statuses', representing the first speaker and 'responses'. The basic concept of retrieval-based systems is to match an input sentence with the collection of those pairs and select a suitable answer (Cahn, 2017). To enhance the accuracy of this matching process, data preprocessing is crucial. This process involves the use of techniques such as tokenization, stemming, and other normalization methods to ensure that the model effectively captures patterns within the input sentences and the corresponding responses (McTear et al., 2016). The primary challenge with retrieval-based models is to determine the approach for performing pattern matching. It is important to consider to what the input should be matched against, whether it is the status or the response. While identifying the most similar status may seem more intuitive, matching the input to the response in the data corpus is more commonly used in practice due to its effectiveness. Matching with responses has proven to be more effective because if there are words in common between the input sentence and a response, it is likely to be a matching response. In contrast, even if words in the input sentence and status match, it remains uncertain whether the response is appropriate. Furthermore, if the system performs pattern matching against responses rather than inputs, it can efficiently use 11 search engines to look for a set of answers that are similar to the input sentence, as search engines retrieve response sets (Yan et al., 2016). Regardless of whether pattern matching is performed against the status or the response, the selection of an algorithm for pattern matching is crucial. This can be a simple keyword approach that identifies keywords that occur together in the input sentence and the document or for example the average cosine distance between the word embeddings in the input sentence and word embeddings in the documents (Yan et al., 2016). Another approach for retrieval-based Chatbots could be to use an ensemble of scoring functions. These models calculate the overall rank of each document by calculating a weighted average of the scores and finally returning the document with the highest score (Yan et al., 2016). Notable examples of retrieval-based Chatbots developed during the 2010s include International Business Machines Corporation (IBM) Watson (2010), Siri (2011) and Alexa (2014). These Chatbots are making use of different combinations of Natural Language Processing and Machine Learning Techniques (Bohouta & Këpuska, 2018). As of today, retrieval-based Chatbots form a vital part of various applications, including customer support, virtual assistants, and information retrieval systems. The last group, generative models, estimate probability distributions to produce new datasets, displaying nondiscriminative and unsupervised characteristics, thus enabling the generation of new samples without the need for labelled data (Ewuzie et al., 2022). While the advantage of not requiring labelled data is notable, it presents a challenge in the construction and training of the model. This subsequently requires extensive training with a large data set to gain the ability to generate meaningful conversations (Hien et al., 2018). The breakthrough moment for generative Chatbots came with the introduction of neural network-based models, particularly RNN and LSTM networks (Greff et al., 2017). These architectures enabled Chatbots to capture sequential dependencies in language and generate more contextually relevant responses (Wu et al., 2016). It is important to note that the ability of RNNs to capture long-term relationships is also limited by the vanishing gradient problem. Therefore, recurrent neural network architectures like the long short-term memory networks and elements like the gated recurrent units were developed, these innovations enable generative Chatbots to overcome the limitations posed by the vanishing gradient problem and capture more nuanced contextual information in conversations (Cho et al., 2014; Greff et al., 2017). In recent years, the field of generative Chatbots has seen another remarkable advancement. The emergence of large-scale language models such as OpenAI's Generative Pre-trained Transformers series, starting with GPT-1 and later evolving into GPT-4, marked a paradigm shift (Patil et al., 2024). These models, pre-trained on vast amounts of text data, demonstrated unprecedented language understanding and generation capabilities. GPT-3, with its 175 billion 12 parameters, demonstrated the potential for generative Chatbots to handle diverse tasks, simulate various writing styles, and engage in nuanced conversations (Zhang & Li, 2021). Its release in 2020 prompted discussions about the ethical implications, biases, and potential applications of such powerful language models. Ongoing research focuses on addressing challenges such as explainability, ethical use, and fine-tuning models for specific domains. The integration of multimodal capabilities, combining text with images and audio, represents a frontier for enhancing user experiences (Ray, 2023). Generative Chatbots have come a long way from their early rule-based counterparts, evolving into sophisticated AI-driven conversational agents. The next possible classification is based on the goal of a Chatbot. These can be informative, chat-based or task-based. As the name suggests, a Chatbot is considered informative if designed to provide the user with information that is stored beforehand. A Chatbot that engages with users in a manner that mimics a human conversation, aiming to provide accurate responses to the given sentences is considered as chat-based Chatbots. Task-based Chatbots are designed to execute specific functions, such as booking flights or providing assistance. However, the goals of Chatbots can be combined, a frequently asked questions (FAQ) Chatbot for example, is considered as informative and task-based (Kucherbaev et al., 2018; Nimavat & Champaneria, 2017). The next classification for Chatbots is based on the knowledge domain and describes the amount and type of data it can access or it was trained on. Open-domain Chatbots can engage in conversations on a variety of topics and respond appropriately, while closed-domain Chatbots are specialized in a particular area of knowledge and may have difficulty answering queries that fall outside their area of expertise (Nimavat & Champaneria, 2017). The service-based classification of Chatbots considers their emotional proximity to user, the level of interaction and task specificity. This category of Chatbots can be divided into three types: interpersonal Chatbots, which perform tasks such as booking restaurants and flights, act more as information transmitters than companions for users. Intrapersonal Chatbots, which can be found in chat apps such as Messenger and WhatsApp, serve as companions with a deep understanding of the user. And lastly, inter-agent Chatbots, which are becoming increasingly popular, can be characterized by Chatbots communicating with other Chatbots to solve a task (Nimavat & Champaneria, 2017). Another classification for Chatbots is based on the level of human assistance embedded in their components. Human-assisted Chatbots involve human computation in at least one aspect of their functionality. This means that humans incorporate their intelligence into the Chatbot logic to fill gaps resulting from the limitations of fully automated systems. While human computation offers greater flexibility and robustness, its limitation in processing information at the speed of machines creates a challenge in scaling the Chatbot to handle higher demands (Kucherbaev et al., 2018). 13 When classifying Chatbots based on the built method, it is analysed if the Chatbot incorporates open-source options or proprietary code from large companies such as Google or IBM. Open-source platforms offer greater intervention options for Chatbot designers, while closed platforms can act as black boxes and have potential drawbacks depending on project requirements. Nevertheless, closed platforms from large companies offer immediate access to cutting-edge technologies and can benefit from the extensive data these companies are able to collect and store. Finally, although the previous Section has demonstrated how Chatbots can be classified into different categories based on their specific goals or other characteristics, it is worth noting that according to Adamopoulou & Moussiades (2020a), Chatbots do not exclusively fall into one specific category. Rather, these categories coexist within each Chatbot in different proportions. 2.5. GENERATIVE PRE-TRAINED TRANSFORMER As previously mentioned in Sections 2.3 and 2.4 Chatbots have seen another remarkable advancement with the emergence of large-scale language models. Namely OpenAI's GPT series, starting with GPT-1 and later evolving into GPT-4, has marked a paradigm shift (Patil et al., 2024). Built on the foundation of transformers, which is composed of an encoder and a decoder, each consisting of multiple layers of self-attention mechanisms and feedforward neural networks, the GPT-1 was described as “decoder-only transformer with masked self-attention heads” (Radford et al., 2018). The self-attention mechanism is a key component of transformer models. This mechanism allows the model to prioritize the importance of different words in the input sequence when making predictions. It enables the model to focus on relevant parts of the input, leading to more accurate and contextually appropriate outputs. The self-attention mechanism also allows the model to capture dependencies between words that are far apart in the input sequence. This capability improves the model’s performance in tasks requiring long-range context. However, GPT models do have a limitation in the form of a context window. The model is constrained to a fixed number of preceding words when generating text. This limitation can impact the model’s ability to maintain coherence and relevance in longer sequences of text (Radford et al., 2018). GPT models are pre-trained on large amounts of text data using unsupervised learning techniques. During this pre-training phase, the model learns to predict the next word in a sequence of text, given the preceding words. This process helps the model develop a deep understanding of language patterns and semantics (Zhang & Li, 2021). After pre-training, GPT models can be fine-tuned on specific tasks or datasets to adapt to more specialized domains or applications. Fine-tuning involves updating the model’s parameters on 14 a smaller dataset with labelled examples, allowing the model to learn task-specific patterns(Radford et al., 2018). A more time- and cost-effective strategy for integrating external database knowledge to enhance model performance on specific tasks is Retrieval-Augmented Generation. This approach significantly improves the accuracy and credibility of text generation, especially for tasks requiring extensive knowledge, while facilitating updates and integration of domainspecific information. Unlike traditional fine-tuning processes that update the model parameters, RAG operates by retrieving data directly from a database and constraining response generation to the retrieved information. Consequently, knowledge updates can be achieved by updating the retrieval database rather than modifying the model itself, resulting in a more efficient and economical approach(Gao et al., 2023). One of the most notable features of GPT models is, their generative capabilities. They can generate coherent and contextually relevant text based on a prompt provided by the user. This makes them useful for a variety of tasks including text generation, language translation, summarization, and dialogue systems (Radford et al., 2018). Their generative capabilities, combined with the characteristic of RAG, efficiently extend the knowledge base while mitigating downsides of Large Language models (LLMs) such as hallucination, making them particularly suitable for the application described in this paper. Thus, Section 2.6 is going to explain Retrieval-Augmented Generation more in detail. 2.6. RETRIEVAL AUGMENTED GENERATION Retrieval-Augmented Generation is another recent advancement in the field of AI Chatbots. This represents a novel approach that combines the strengths of both retrieval-based and generative models (Gao et al., 2023). As outlined in Section 2.5, Large Language Models like GPT face several challenges, including hallucination, outdated knowledge, and non-transparent reasoning processes. Hallucination refers to the generation of false content, while outdated knowledge limits the ability to provide current information. Non-transparent reasoning processes make it difficult to trace how the model arrived at a specific answer (Gao et al., 2023). Retrieval-Augmented Generation addresses these challenges by enhancing LLMs through the retrieval of relevant document chunks from external knowledge bases. By incorporating external knowledge, RAG reduces the risk of generating factually incorrect content. This integration improves the accuracy and credibility of the generated responses, especially for knowledge-intensive tasks. RAG allows for continuous knowledge updates and the integration of domain-specific information, making LLMs more suitable for real-world applications (Gao et al., 2023). RAG operates in several distinct phases to achieve this: 15 During the retrieval phase, the system selects document chunks from external knowledge bases that are semantically similar to the given query. These selected chunks are then utilized to expand the context for prompt generation. In the generation phase, the system synthesizes the query and selected documents into a coherent prompt. A large language model then generates a response based on this prompt, drawing from either its inherent parametric knowledge or restricting responses to the information contained within the provided documents. The augmentation phase of RAG focuses on improving retrieval quality through pre-retrieval and post-retrieval strategies. This involves optimizing the retrieval process, refining indexing techniques, and incorporating metadata to enhance retrieval quality. The retrieved information is seamlessly integrated with the task at hand to ensure that the generated responses are accurate, reliable, and contextually relevant (Gao et al., 2023). RAG evolves through different paradigms, including Naive RAG, Advanced RAG, and Modular RAG. Each paradigm addresses specific limitations and enhances the overall performance of the framework. Advanced RAG introduces improvements to overcome challenges faced by Naive RAG, while Modular RAG offers greater flexibility and modularity within the RAG framework (Gao et al., 2023). A fundamental prerequisite for any Retrieval-Augmented Generation architecture is the chunking and embedding of data, or indexing. This process involves breaking down documents or data into smaller, meaningful chunks and converting them into formats suitable for retrieving e.g. vector representations. These chunked and embedded data are then stored in a database, forming the foundation for the subsequent phases of RAG (Gao et al., 2023). 22 level information, undergoes NLP techniques including tokenization, stemming and lemmatization. Afterwards it is vectorized using the Bag of Words model. A Feed-Forward Deep Neural Network (DNN) with three fully connected layers is trained on the dataset. This enables HeriBot to comprehend user queries and provide effective answers. The evaluation shows HeriBot's ability to engage both non-expert and expert users, delivering information at varying levels of detail based on user expertise. The architecture seamlessly integrates purpose ontologies and NLP techniques as well as a Deep Neural Network for efficient communication and knowledge dissemination (Casillo et al., 2022). The scientific paper by Iraola et al. (2023) introduces a mobile app aimed at enhancing the tourist experience through the integration of Multilayer Perceptron Network and Collaborative Filtering. Utilizing different technologies, the app delivers real-time information and recommendations based on tourists' preferences and interests. It comprises distinct modules, including Android and iPhone Operating System (IOS) apps, Django Framework for web services, Machine Learning with Flask for Chatbot development, and SQL for information storage. The Chatbot architecture within the mobile app is neural network-based, featuring an entry layer of 138 neurons (mapped words) and an exit layer of 13 neurons (tags). This Chatbot processes information from the database to address tourist queries, including greetings, map locations, site details, and more. Integrated with the recommendation system and Representational State Transfer (REST) service, it provides diverse information about tourist places, including images, interesting facts, user comments, and security validation through JavaScript Object Notation Web Token (JWT). The Chatbot is intricately designed to furnish reliable and personalized real-time information, contributing to an enriched overall tourist experience. The paper offers a comprehensive analysis of the app's architecture, including its physical structure, model, and hypotheses. It demonstrates the app’s potential to significantly enhance the tourist experience through the integration of AI technology (Iraola et al., 2023). The Chatbot for Heritage system consists of two main components: the conversational interface, the Chatbot, and a back-end server utilizing a micro-services architecture. The conversational interface employs deep learning techniques, specifically a seq2seq model based on the Encoder-Decoder framework using an RNN. The encoder utilizes multilevel GRUs as proposed by Cho et al. (2014) to process user queries, while the decoder generates responses token by token through an attention mechanism. The micro-service architecture of the back-end supports various functionalities for users, including information about points of interest, events, business objects, and cultural heritage path suggestions. Each microservice specializes in providing relevant information based on user queries. The system employs name entity recognition to identify points of interest and offers personalized responses through a graphical user interface. Additionally, the microservices cover event suggestions, details about business objects, and cultural heritage path recommendations based on user preferences. Furthermore, the system includes a user profiling service, which analyses stored conversations to identify the main interests of users by comparing timestamps. This allows the system to 23 tailor recommendations and responses based on individual user preferences and engagement history with the Chatbot. In summary, the Chatbot for Heritage system combines a sophisticated conversational interface with a versatile micro services architecture to provide personalized and comprehensive assistance for tourists exploring cultural heritage sites (Sperlí, 2020, 2021). The by Godewithana & Kirindage (2021) proposed conversational Chatbot is designed to provide users with information on archaeological places in Sri Lanka, offering a convenient means of accessing relevant details within the system. The development methodology involves the use of a dataset, application workflow, and various components including the Natural Language Understanding (NLU) component, Dialog Management component, Restful API with Mongo DB, and the Web Client User Interface. The application workflow is as follows: the end user interacts with the user interface, implemented in JavaScript, which is capable of voice and text hybrid recognition. The NLU stack, including Rasa NLU, Core, and the Action Server, is implemented using Python. The back-end API is implemented using Node.js, and the client connects to the Rasa stack through the Rest Input channel using HTTP requests. The NLU component, based on Rasa NLU, performs intent classification and NER. It uses TensorFlow embedding for intent classification, with a customized pipeline architecture to adapt to the Chatbot domain. Named Entity Recognition is accomplished using a Conditional Random Field (CRF) entity extraction model, and the NLU module returns a structured format of the user's message. The Dialog Management component, represented by Rasa Core, involves four main components: Interpreter, Tracker, Action, and Policy. It manages the conversational flow, slots, and actions. The interpreter classifies incoming messages for intent and entity classification, the tracker keeps track of conversation states, and actions determine relevant responses. Slots act as a long-term memory for the Chatbot. The Restful API with Mongo DB connects the dialog management module with the back-end knowledgebase. It includes modules like Router, Controller, Data Model, and Mongo DB Database. The API interacts with the Mongo DB document database to retrieve relevant data for user queries. The Web Client User Interface, developed using React JavaScript (JS), offers a hybrid Chatbot where users can interact through both text and voice. The Web Speech SPI is employed for voice recognition and synthesis, enabling users to converse with the Chatbot and receive responses in both text and synthetic voice formats (Godewithana & Kirindage, 2021). The proposed Chatbot by Li et al. (2022) is a joint model that aims to accurately identify the user's requirements by resolving their utterances into intentions and semantic tag sequences. The Chatbot is designed to assist users in completing various tasks related to the tourism domain, including daily chatting, destination queries, travel reservations, and news queries. The Chatbot architecture consists of two main components: intent detection and slot filling. The intent detection component is responsible for identifying the user's intention or goal based on their input. The slot filling component is responsible for identifying the specific details or parameters related to the user's intention, such as the departure, destination, and date of travel. To achieve accurate intent detection and slot filling, the proposed Chatbot 24 architecture uses a Double Bi-LSTM-CRF model. This model is a joint model that considers the cross-impact between intent detection and slot filling and fits the dependency among hidden slot tags. The model uses two bidirectional LSTMs to predict intents and semantic slots. The top part of the network is used for intent detection, while the bottom part is used for slot filling (C. Li et al., 2022). The Chatbot architecture by Anand et al. (2023) comprises several key components designed to facilitate a seamless workflow. At its core is the Chatbot Engine, which employs advanced techniques such as NLP and a Convolutional Neural Network (CNN) approach. The engine begins by recognizing the language of user queries, followed by pattern analysis and tag identification. It then leverages information stored in the database to enhance responses through contextual understanding. The use of a sequential model enables flexibility and scalability. The database stores the latest information on tourist-related services, including local attractions, transportation, and more. The Stakeholder Community involves local authorities, service providers, and businesses, contributing real-time updates through web and mobile applications, ensuring dynamic data availability. These stakeholders, authorized through credentials, play a crucial role in providing authentic information to users. The workflow initiates with a user query, prompting the engine to analyse intent and context. For tourist-related queries, the engine retrieves the latest data from the database. Stakeholders update service availability in real time, contributing to the dynamic data exchange facilitated by web and mobile applications. The architecture's collaborative nature ensures accurate, up- to-date information is delivered to users in real time, enhancing the overall experience for tourists and stakeholders alike (Anand et al., 2023). Sai et al. (2023) conducted a comprehensive investigation, building on the groundwork laid by Anand et al. (2023), and innovatively explored the Chatbot architecture proposed by Anand et al. (2023). Their experiments introduced a noteworthy enhancement by substituting the convolutional neural network with both Artificial Neural Networks (ANN) and LSTM. Notably, the results revealed that the LSTM model surpassed other models, showcasing superior performance in terms of accuracy, precision, and recall (Sai et al., 2023). After presenting and analysing the Chatbot systems proposed in the tourism sector, it can be said that more sophisticated and recent approaches increasingly utilize neural network architectures such as RNNs, GRUs, and LSTMs. As discussed in Sections 2.2 and 2.3, these architectures are considered predecessors to cutting-edge technologies like Transformers, exemplified by GPT. Since no work in the tourism industry has proposed a Chatbot leveraging a Transformer architecture, this literature review underscores the novelty of the approach proposed in this work. 25 4. METHODOLOGY This Section of the work will first explain the methodology used, namely the Cross-Industry Standard Process for Data Mining. After explaining the methodology itself, Sections 4.1 - 4.6 going to elaborate what steps were performed in each phase concretely to develop the Chatbot system. The CRISP-DM defined by Wirth & Hipp (2000) offers several benefits for data mining projects, making it a valuable framework to extract insights from data and helping organizations translate business problems into actionable insights through data analysis. It provides a structured and systematic approach, consisting of six well-defined steps, namely: Business Understanding, Data Understanding, Data Preparation, Modelling, Evaluation and Deployment These six steps form a cyclical process, allowing for iterative refinement and improvement of the developed solution. This structured approach ensures that important aspects of the project are not overlooked and that the project progresses logically. Its independence from specific industry sectors or technologies makes it applicable across a wide range of domains. By following a standardized process model like CRISP-DM, practitioners can establish a common language and methodology for Data Mining projects, facilitating communication and collaboration among team members, stakeholders, and external partners. Moreover, the CRISP-DM methodology promotes reproducibility in Data Mining projects by providing a clear and documented process for project execution. Additionally, CRISP-DM helps streamline project workflows, reduce redundancies, and optimize resource allocation, leading to increased efficiency, cost savings, and faster project delivery (Wirth & Hipp, 2000). This comprehensive approach and mentioned benefits explain the widespread adoption of CRISP-DM as a preferred process model for data mining projects and the use of it as a methodology for this work. As previously mentioned, the Sections 4.1 - 4.6 will offer a detailed account of how the CRISP-DM methodology was applied while developing the Chatbot system. It will delineate the steps undertaken within each of the six recommended stages of the CRISPDM process. For improved coherence, the Sections will adhere to the segmentation as defined by the CRISP-DM methodology, presenting insights corresponding to each specific step. 4.1. BUSINESS UNDERSTANDING This Section defines the goals and requirements for the Chatbot as specified by the city of Bad Tölz. In order to define these goals and requirements, the CRISP-DM methodology points out that one must first understand the use case of the expected system. The use case from the perspective of the city of Bad Tölz is a Chatbot system that is embedded on the city's homepage and provides users, tourists and locals, with various information. This means that a potential tourist who wants to visit the town can call up information about possible tourist offers, events, etc. and is thus supported in planning their stay. A local resident, in turn, can 26 also access valuable information about life in the city, e.g. about local clubs and their programs or other community facilities. Thus, the goal is to develop an effective Chatbot solution for Bad Tölz that improves the user experience and community engagement by increasing the accessibility of information. Effective in this context means that the provided solution can answer questions in different languages with a certain accuracy and is available as a web service on the homepage without interruption, while being cost-effective and allowing easy adaptation of information to changes. The acceptance criteria require the Chatbot system to achieve a certain level of accuracy, measured by an expert questionnaire provided by the city of Bad Tölz. This questionnaire includes a set of 50 questions in German and another set of 50 questions in English. The detailed evaluation process will be provided in section 4.5 Evaluation. 4.2. DATA UNDERSTANDING The following Sections 4.2.1 - 4.2.4 will describe the steps undertaken within the Data Understanding phase as delineated by CRISP-DM. These steps are: 4.2.1 Data Collection, 4.2.2 Data Description, 4.2.3 Data Quality Assessment, and 4.2.4 Data Exploration. 4.2.1. Data Collection This Section is going to elaborate, the Data Collection process performed as a part of this project. The collected data came from one main and two complementary sources: The main source was the city of Bad Tölz itself which provided the content of their website, digitalized flyers, files regarding upcoming events, information about municipal facilities, hotels, etc. The first complementary source for the collection of the data was TripAdvisor.com, which is an online platform offering reviews and bookings for restaurants, hotels, and "things to do," encompassing places and activities. The collection process from TripAdvisor.com was performed through the utilization of the Python programming language, along with Python's regular expressions. Additionally, given the dynamic nature of the TripAdvisor.com website, the Selenium Python library played a crucial role. Dynamic websites typically involve server-side processing, where Hypertext Markup Language (HTML) content is generated dynamically based on various factors such as user input, database content, or external data sources. The Selenium library, particularly with its WebDriver functionality, provides the capability to interact with elements on a webpage programmatically, such as expanding the sites content or changing the page. Therefore, Selenium was crucial in accessing information on TripAdvisor that would be inaccessible without it, due to the need for user interactions to reveal certain content. 27 Subsequently, information from dynamically generated HTML documents was extracted by locating specific Cascading Style Sheets (CSS) selectors or XML Path Language (XPath) expressions associated with the desired data. Those CSS selectors and XPath expressions have been found during an analysis of the HTML documents beforehand. The second complementary source was bayregio-bad-toelz.de, since bayregio-bad-toelz.de is implemented with statical HTML’s the data can be collected without the use of Selenium. Thus, the collection of the data from this source was realized with the use of Python and the Python library BeautifulSoup4. The principal behind this process is the same, the retrieved HTML document is searched with the help of BeautifulSoup4 to access certain HTML elements and attributes. 4.2.2. Data Description In this Section the collected data from the different sources is going to be described in detail. As mentioned in Section 4.2.1 the main source was the city of Bad Tölz itself which provided the content of their website, digitalized flyers, files regarding upcoming events, information about municipal facilities, hotels, etc. Most of the City’s data was provided in form of Word Documents, structured that information belonging together is building a paragraph. The remaining data provided by the city of Bad Tölz were 10 pdf documents of digitalized flyers about different topics they hand out on different municipal facilities. In the case of the source TripAdvisor.com the data was not provided but had to be gathered from their website as pointed out in Section 4.2.1. With the help of the described data collection process, it was possible to gather information, like description, opening hours, prices, reviews, etc. about 45 hotels, 22 places and activities, and 63 restaurants. bayregio-bad-toelz.de offers a diverse array of data about Bad Tölz, supporting the understanding of the city's offerings and characteristics. This includes comprehensive information on upcoming events, festivals, concerts, workshops, and various cultural or recreational activities occurring in Bad Tölz. Additionally, the website provides detailed business listings encompassing restaurants, hotels, shops, and service providers, offering addresses, contact details, descriptions, and customer reviews for each establishment. Visitors can explore descriptions and details about local attractions such as tourist spots, landmarks, parks, museums, and other points of interest within Bad Tölz. Moreover, the platform serves as a source for news and announcements, providing updates on city developments, initiatives, and announcements from local authorities or organizations. It also offers valuable insights into community resources, including public services, transportation options, healthcare facilities, educational institutions, and other amenities available in Bad Tölz. Lastly, the website points out the city's rich culture and traditions, 28 featuring content related to its history, customs, lifestyle, and traditions through articles, photos, and videos, further enhancing the portrayal of Bad Tölz. 4.2.3. Data Quality Assessment The next step after the 4.2.1 Data Collection and the 4.2.2 Data Description as part of the 4.2 Data Understanding phase described by the CRISP-DM is the Data Quality Assessment, which is going to be explained in this Section. The completeness, consistency and accuracy of the data provided by the city are ensured through continuous curation by multiple employees responsible for tourism and the city's online presence. Additionally, data from the complementary source, bayregio-bad-toelz.de, undergoes similar curation processes. The completeness, consistency and accuracy of the data provided by TripAdvisor is partially assured through ongoing curation by the platform's administrators as well as contributions from establishment owners. That means, that property amenities, room features, room types and the “Good to know” section was available for 42 of the 45 hotels. In case of the restaurants all restaurants had the “Details” and the “Location and contact” present, it seems a listing can only be created if this information is provided. The “places and activities” section had for 12 out of the 22 gathered entries information regarding the “about” and the “opening hours”. On the other hand, information from users who share their experiences and reviews are not curated and it is not assured that each entry has a written review. Even without reviews, the data from TripAdvisor is diverse and rich, including details about property amenities, room features, room types, and other relevant information. Therefor only the information provided by establishment owners is going to be kept for the selecting, cleaning, and integration steps during the 4.3 Data Preparation phase, as these may be able to supplement information from the other sources or vice versa. 4.2.4. Data Exploration The Data Exploration Section offers a more detailed analysis of the dataset. The process begins with an in-depth exploration of the data and its origins, including various metrics, like the total number of documents from each source as well as the average, median, minimum, and maximum lengths of these documents, measured in tokens. This detailed information is presented in Table 1 below. 29 Table 1 – Data origin and statistics It shows that the documents received from the City of Bad Tölz are longer and more detailed than the documents received from the two complementary resources bayregio-bad-toelz.de and Tripadvisor.com. This is due to the fact, that both complementary sources hold a lot of business, restaurant and hotel listings which are overall shorter than the texts the City of Bad Tölz is providing. Table 2 presents the same analysis for the documents, after their consolidation phase. Table 2 – Data statistics after consolidation It shows that after the consolidation phase was performed, the database consisted of 513 different documents with an average document length of 212.85 token. Furthermore, the distribution of the text lengths in tokens is analysed, as shown in Figure 1. Figure 1 – Distribution of document length in token 30 The text length distribution in tokens shows a distribution with a single prominent peak around the 200 token mark. This suggests a unimodal distribution, indicating that the most common text length in the dataset is around 200 words. Further analysis reveals that longer documents tend to focus on historical narratives and cultural significance, while shorter documents provide practical tips and recommendations for tourists. Examination of longer documents also showed a more complex language structures, in contrast, shorter documents employ simpler language and are more straightforward, for example restaurant or hotel listings. Analysing the textual information itself with the help of bigrams, as shown in Figure 2, and word clouds, illustrated in Figure 3, reveals the most dominant topics in the documents. Figure 2 – 10 most present Bigrams in documents Figure 3 – Word clouds of most present words As the two figures above show, “Gabriel von Seidl” and “Thomas Mann” are the most frequently mentioned topics as these two figures are strongly associated with the history of Bad Tölz and used to advertise the city. In addition, numerous documents contain the word 31 “Nature” and refer to point of interests or events such as “Markstraße”, “Kurhaus”, “Isar”, “Stadtmuseum” or “Leonhardifahrt”. These points and events are mentioned repeatedly in the documents on various topics. In addition, bigrams and words referring to restaurants, hotels or business listings dominate, which is due to the amount of data on these topics, shown by the word “Uhr”, which can roughly be translated to “o’clock”, added in the end of the opening hours of establishments. The findings are also underscored by the topic modelling performed using a LDA model. As Figure 4 illustrates below, the first topic appears to be associated with nature, wellness, and local events or attractions. It encompasses words such as “Natur” (nature), “Blomberg” (a mountain in Bavaria), and “land” (country), which suggest a focus on natural landscapes or outdoor activities. Additionally, the presence of words like “Leistungen” (services), “Angebot” (offer), “Programmpreis” (program price), and “Kurbeitrag” (spa tax) indicate some kind of services or programs, related to tourism or wellness. The topic also includes terms such as “Gesundheit” (health), “Vegane” (vegan), “Körper” (body), and “Ernährung” (nutrition), pointing to an emphasis on health and wellness. Words like “genießen” (enjoy), “erleben” (experience), and “Auszeit” (time out) indicate leisure activities or relaxation. Furthermore, terms like “Marktstraße” (market street), “Christkindlmarkt” (Christmas market), and “Frühstück” (breakfast) could be related to local attractions or events. More general terms such as “mehr” (more), “inkl” (including), “unserer” (our), “rund” (around), “Richtung” (direction), “bietet” (offers), “dabei” (thereby), “gut” (good), “einfach” (simple), “lassen” (let), “Termine” (dates), “ganzjährig” (all year round), and “oben” (above) are also present. Based on these insights, this topic could be defined as “Nature and Wellness Offers” or “Local Attractions and Wellness Offers”. 38 The second step is to initialize the two needed Large Language Models, in this case two gpt- 35-turbo or two gpt-35-turbo-16k, depending on the setup. The first LLM is going to be set to have a temperature of 0 since the goal of it is to rephrase two given texts as unchanged as possible. The second one, that is used for the question answering is having the default settings. Additionally, the PromtTemplates need to be establish, which were defined using the ChatPromptTemplate Class from the langchain_core.prompts library. The prompt templates hold the instructions for the LLM for the given task as well as placeholder that are going to be filled with the respective information in the moment of response generation. Specifically, two templates serving different functions have been created: The first template is a detailed instruction for the LLM that contains placeholder for chat history and the original question to combine the original question with the chat history, if existing, and transforming them into a single standalone question. If the chat history is empty the original question is used unchanged as the standalone question. The second template is utilized for the subsequent call to the Large Language Model API responsible for generating the final answer. It includes placeholders for both the context and the question. In this case, the "context" refers to the documents retrieved by the retriever, which were consolidated into a docstring during an intermediary step. The “question” placeholder is going to be filled with the standalone question created by the first call to the LLM resource. After explaining the prerequisites necessary to put the RAG pipeline together, the pipeline itself is explained, as shown in Figure 9. A detailed written explanation of the pipeline follows the figure. Figure 9 – Flowchart RAG pipeline The first step is to prepare the standalone question. This means that the existing chat history is extracted and combined with the follow-up question. To achieve this, the extracted chat 39 history and the follow-up question are filled into the first PromptTemplate. As described above, this initial template is used to merge the chat history with the follow-up question into a single standalone question. This is done by forwarding the information, in the form of the filled template, to the first LLM to combine both parts into one standalone question. The next step is the context extraction with the retriever instance initialized beforehand. To do that, the retrieved standalone question is used to search for similar documents in the vector storage. The 10 retrieved documents are then getting put together into on docstring and assigned to the context variable that is used in the second API call to produce the final answer. The second described PromptTemplate with its previous defined instructions and placeholder is filled with the context variable and standalone question, invoking the chain as described will return a AIMessage object that contains the response. This response is extracted from the AIMessage and formatted, resulting in the final response of the system. 4.5. EVALUATION This Section will outline the evaluation process for the proposed Chatbot system. As mentioned in Section 4.1, the evaluation will be conducted using an expert questionnaire provided by the City of Bad Tölz. This questionnaire is a list of 100 potential questions a tourist or a local could potentially ask the Chatbot system to acquire information about the city and their expected answers. 50 of the 100 questions are in English and the other 50 questions are in German (Appendix A). The Chatbot system will generate answers to both sets of questions. These answers will then be reviewed by staff of the city of Bad Tölz, who normally handle such requests manually by phone, email or in person at city facilities. Each answer is checked to see whether it is sufficient. The ratio of sufficient to insufficient responses serves as an indicator for measuring the success of the project and for benchmarking different approaches. An answer is considered sufficient if it is correct, complete and relevant in relation to the original request. In addition, each answer is scored on a scale from 0 (completely incorrect) to 5 (completely correct) according to the same criteria. This scoring system makes it easier to rank the different approaches. The higher the average score, the better the performance of the Chatbot, measured by this combination of accuracy, completeness and relevance. Furthermore, the provided expected answers to each question and the answer provided by the different Chatbots tested are going to be transformed into their vector representation using the text-embedding-ada-002 resource and afterwards the cosines similarity is calculated for each set. The Cosine similarity is used to measure lexical similarity between the produced response and each expected response sentence, the scale ranges from 0 to 1 meaning that Chatbots producing a higher average score on the questionary can produce answers that are more similar to the expected answer then a Chatbot with a lower average score. 40 These mentioned metrics are then going to be compared with a GPT-3.5-turbo model without a RAG pipeline, which serves as baseline model. 4.6. DEPLOYMENT The deployment of the RAG pipeline, including the created database, can be achieved on a cloud-based virtual machine instance such as Amazon Web Services’ Elastic Compute Cloud 2 (EC2) or similar services from other providers. The deployment process involves several steps and considerations: API Endpoint Creation: The first step is to create an API endpoint that can be integrated into the city’s website, allowing users to interact with the RAG pipeline. This API endpoint can be created using a web framework like Flask or FastAPI and is used to pass the entered question on the cities website as well as to receive the produced response. Cloud-Based Virtual Machine Setup: An EC2 instance (or equivalent) needs to be set up to run the RAG pipeline, including the produced vector database. The small size and small resource requirements of the code and the small size vector database allows for direct upload to an instance, enabling the retriever object to access it without further changes. Any updates to the document are uploaded to the instance, replacing the old and outdated database. Security Considerations: To prevent attackers to exploit the system it is crucial to secure the API and the cloud instance. This can be achieved by using secure HTTP (HyperText Transfer Protocol Secure - HTTPS), implementing authentication, and setting up appropriate firewall rules. Scalability and Performance: The system should be designed to handle increased load. This can be achieved by setting up load balancing, using auto-scaling groups. Monitoring and Logging: System health and performance should be monitored regularly. This can be done directly on the providers website and logging should be set up to track any issues that arise. Cost Considerations: The proposed implementation can be done on for example a t3.medium instance costing around €27.94 to €36.40 per month or m5.large instance costing around €64.47 per month 41 5. RESULTS AND DISCUSSION In the following, Section 5.1 will present the outcomes of the research, followed by an indepth discussion of the findings and their implications in Section 5.2. 5.1. RESULTS This Section presents the results of this work. As outlined in the beginning, the goal is to leverage Natural Language Processing and Machine Learning technologies and methods, in the form of GPT and RAG, to create a performant Chatbot for the city of Bad Tölz. The ultimate objective is to reduce labour costs and enhance service efficiency, as well as promoting community engagement by increasing information accessibility. The criteria for the success of the Chatbot, as defined by the city of Bad Tölz, are accurate, complete, and relevant answers based on the questions asked. Therefore, as mentioned in Section 4.5, the city provided a set of test questions and expected answers in both English and German, the questions were passed into the Chatbot system to generate answers. Subsequently, the answers were evaluated by the tourism department of Bad Tölz, this evaluation was then used to calculate the scoring metrics. This process was performed with several combinations of text embeddings and models to determine if RAG is adding value to the Chatbot system and which combination to use for the deployment of the Chatbot system later. The tables below present the outcomes of these experiments: Table 3 shows the evaluation metrics for the baseline model, Table 4 displays the evaluation metrics for the GPT-3.5-turbo model, and Table 5 presents the evaluation metrics for the GPT-3.5-turbo-16k model. The models used were GPT-3.5-turbo and GPT-35-turbo-16k, those models were combined with the three different embeddings, namely text-embedding-3-small, text-embedding-3-large, and text-embedding-ada-002. Ratio_Y represents the number of adequately answered questions relative to the total number of questions asked. Avg_Score describes the sum of the scores divided by the number of questions, a higher score therefore indicates better performance of the model and text embedding combination. Similarity represents the in Section 4.5 mentioned average Cosine Similarity between the expected answers and the from the models produced answer. Table 3 – Evaluation metrics baseline model 42 The baseline model, a GPT-3.5-turbo without RAG, wasn’t able to provide answer to several of the questions, especially if they were time related, the answers it provided showed a lot of hallucination, a phenomenon typically for LLM like GPT. Table 4 – Evaluation metrics GPT-3.5-turbo Table 5 – Evaluation metrics GPT-3.5-turbo-16k As evidenced by the tables above, it's noticeable that the Chatbot system incorporating RAG outclass the baseline GPT model without RAG immensely. It also shows that both models generally perform better when presented with German questions, a comparison showed that the retrieved documents slightly differ when asked the same question in German and in English. It is suspected that this is related to the fact, that the used documents where solely in German and that the vector representations of the questions are not exactly matching for phrases in German and English. Moreover, for the combinations using text-embedding-ada-002, text-embedding-3-small, and text-embedding-3-large with GPT-3.5-turbo it was observed that all the combinations produced good answers. However, a recurring issue was that links provided in the answers were sometimes translated, which rendered them non-functional. For the combinations using the same text embeddings with GPT-3.5-turbo-16k, it could be observed that the model produced even better and more detailed answers, and unlike the GPT-3.5-turbo variants, the links were functional and not translated. Negatively to mention is that there were occasional instances where the model claimed it had no documents regarding the requested information, even though there would have been relevant documents in the vector storage. In summary, while the GPT-3.5-turbo model combinations consistently provided high-quality answers, they were often hindered by the issue of translated and non-functional links. On the other hand, the GPT-3.5-turbo-16k model combinations not only maintained the quality of 43 answers but also ensured that the links were functional and not translated, with the GPT-3.5- turbo-16k and text-embedding-3-large setup standing out for its detailed responses. Furthermore, it's important to note that the different embeddings not only affect the performance of the model itself but also result in variations in the size of the vector database after the embedding process. For instance, the vector database generated using the textembedding-3-large has a size of 9.3 megabytes, whereas the database created with the textembedding-3-small is approximately 5.14 megabytes in size. While assessing the systems performance, it was noted that there were no notable differences in processing time observed either during the embedding process or while generating an answer. Timing metrics, including processing time and response latency, were consistent across various experimental conditions. While minor variations in processing time were observed, they fell within acceptable ranges and did not significantly impact overall system performance. This suggests that the system maintains consistent efficiency regardless of the specific combination of models and embeddings used. 5.2. DISCUSSION The findings of this study have several implications for addressing the objectives outlined in the thesis. The research aimed to investigate the effectiveness of different models and embeddings in developing a performant Chatbot system for the city of Bad Tölz, with the goal of reducing labour costs and enhancing service efficiency. The results presented in Section 5.1 demonstrate that the models that incorporate RAG perform better than others in terms of accuracy, completeness, and relevance of answers. For instance, it was observed that the Chatbot systems performed better when presented with German questions, that the Chatbots faced challenges during the retrieval process or that links to websites or web resources got translated, which is highlighting the importance of optimizing the retrieval process even further. Additionally, the impact of different embeddings on factors such as answer length and hallucination frequency underscores the significance of selecting appropriate linguistic representations to improve the Chatbot's response quality. These findings are directly relevant to the objectives of the thesis, as they provide insights into the factors influencing the performance of the Chatbot system and offer recommendations for optimizing its deployment in real-world settings. By understanding which combinations of models and embeddings yield the most favourable outcomes, stakeholders in the city of Bad Tölz can make informed decisions regarding the implementation of the Chatbot to achieve cost savings and service efficiency improvements. 44 6. CONCLUSIONS AND FUTURE WORKS In the following, Section 6.1 will present the conclusions drawn from the research, followed by suggestions for future work in Section 6.2. 6.1. CONCLUSION This thesis set out to leverage Natural Language Processing and Machine Learning technologies, specifically GPT and Retrieval-Augmented Generation, to develop a performant Chatbot for the city of Bad Tölz. The primary objectives were to reduce labour costs, enhance service efficiency, and promote community engagement by increasing information accessibility. The results demonstrated that the integration of RAG significantly improved the Chatbot's performance in terms of delivering accurate, complete, and relevant answers. The GPT-3.5- turbo-16k model, particularly when combined with the text-embedding-3-large, stood out for its detailed and precise responses. Additionally, the system showed a better performance with German queries, likely due to the linguistic alignment of the documents used in the vector storage. Despite the improvements, the study also identified areas for further optimization, such as addressing the translation of links and enhancing the retrieval process to ensure the availability of relevant documents. The issue of occasional hallucinations and the model's occasional claims of lacking documents were noted as areas needing further attention. It is also important to acknowledge the limitations of this work, such as the relatively small sample size of test questions and the simplified experimental conditions. Future research could explore additional factors influencing Chatbot performance, such as user interaction patterns and post-retrieval optimization, to further enhance the effectiveness of the system in meeting the identified objectives. Overall, the findings confirm that incorporating RAG can significantly enhance the performance of a Chatbot system, which helps the system meeting the objectives of accuracy, completeness and relevance answers. 6.2. FUTURE WORK While this thesis has made significant strides in developing an effective Chatbot system, several avenues for future research and development could further enhance its capabilities and performance. One key improvement would be to leverage more advanced models, such as the newer ChatGPT-4, as experiments demonstrate substantial enhancements from using more sophisticated models. Additionally, future research should involve testing the system with a larger and more diverse set of questions to evaluate its performance across various 45 scenarios and use cases. This broader evaluation, encompassing questions from diverse domains and varying complexity levels, would provide a more comprehensive assessment of the Chatbot’s effectiveness. Furthermore, implementing techniques for post-retrieval optimization could refine the Chatbot's answers. This could involve re-ranking retrieved documents, context-aware filtering, and integrating user feedback to continually improve response quality. Another area of focus should be analysing user interaction patterns to understand how users engage with the Chatbot. This analysis can yield insights into common user needs and behaviours, enabling further customization and enhancement of response accuracy. Strategies to mitigate response hallucinations should also be explored. This might entail refining the data and deploying more robust validation mechanisms. Moreover, exploring integration opportunities with additional city services and databases, such as public transportation schedules and event calendars, would expand the Chatbot's utility. This integration could enhance its ability to provide relevant and timely information to users. Establishing a feedback loop with the community is essential to continuously gather input on the Chatbot’s performance and areas for improvement. Methods like surveys, user testing sessions, and accessible feedback portals within the Chatbot interface can facilitate ongoing refinement. Longitudinal studies are recommended to assess the Chatbot’s long-term impact on labour costs, service efficiency, and community engagement. This empirical data can provide insights into the sustainability and enduring benefits of the system. Lastly, exploring customization options to tailor the Chatbot experience for different user groups—such as residents, tourists, and business owners—could enhance user satisfaction and engagement with the system. By addressing these areas in future work, the Chatbot system can be further refined to deliver more accurate, efficient, and user-friendly service to the citizens of Bad Tölz. This progression would realize its potential as a valuable tool for enhancing municipal service delivery and community engagement. 46 BIBLIOGRAPHICAL REFERENCES Abu Shawar, B., & Atwell, E. (2007). Chatbots: Are they Really Useful? Journal for Language Technology and Computational Linguistics, 22(1), 29–49. https://doi.org/10.21248/jlcl.22.2007.88 Adamopoulou, E., & Moussiades, L. (2020a). An Overview of Chatbot Technology. In I. Maglogiannis, L. Iliadis, & E. Pimenidis (Eds.), Artificial Intelligence Applications and Innovations (Vol. 584, pp. 373–383). Springer International Publishing. https://doi.org/10.1007/978-3-030-49186-4_31 Adamopoulou, E., & Moussiades, L. (2020b). Chatbots: History, technology, and applications. Machine Learning with Applications, 2, 100006. https://doi.org/10.1016/j.mlwa.2020.100006 AlHumoud, S., Diab, A., AlDukhai, D., AlShalhoub, A., AlAbdullatif, R., AlQahtany, D., AlAlyani, M., & Bin-Aqeel, F. (2022). Rahhal: A Tourist Arabic Chatbot. 2022 2nd International Conference of Smart Systems and Emerging Technologies (SMARTTECH), 66–73. https://doi.org/10.1109/SMARTTECH54121.2022.00028 Anand, S., Abhishek Sai, A. M., & Karthikeya, M. (2023). Chatbot Enabled Smart Tourism Service for Indian Cities: An AI Approach. 2023 11th International Conference on Internet of Everything, Microwave Engineering, Communication and Networks (IEMECON), 1–7. https://doi.org/10.1109/IEMECON56962.2023.10092286 Arteaga, D., Arenas, J., Paz, F., Tupia, M., & Bruzza, M. (2019). Design of information system architecture for the recommendation of tourist sites in the city of Manta, Ecuador through a Chatbot. 2019 14th Iberian Conference on Information Systems and Technologies (CISTI), 1–6. https://doi.org/10.23919/CISTI.2019.8760669 Bishop, C. M. (2006). Pattern recognition and machine learning. Springer. 47 Bohouta, G., & Këpuska, V. (2018). Next-Generation of Virtual Personal Assistants (Microsoft Cortana, Apple Siri, Amazon Alexa and Google Home). Boiano, S., Borda, A., Gaia, G., Rossi, S., & Cuomo, P. (2018). Chatbots and New Audience Opportunities for Museums and Heritage Organisations. Electronic Visualisation and the Arts. https://doi.org/10.14236/ewic/EVA2018.33 Brandtzaeg, P., & Følstad, A. (2017). Why People Use Chatbots. https://doi.org/10.1007/978- 3-319-70284-1_30 Cahn, J. (2017). CHATBOT: Architecture, design, & development. University of Pennsylvania School of Engineering and Applied Science Department of Computer and Information Science. Caldarini, G., Jaf, S., & McGarry, K. (2022). A Literature Survey of Recent Advances in Chatbots. Information, 13(1), 41. https://doi.org/10.3390/info13010041 Casillo, M., Clarizia, F., D’Aniello, G., De Santo, M., Lombardi, M., & Santaniello, D. (2020). CHAT-Bot: A cultural heritage aware teller-bot for supporting touristic experiences. Pattern Recognition Letters, 131, 234–243. https://doi.org/10.1016/j.patrec.2020.01.003 Casillo, M., De Santo, M., Mosca, R., & Santaniello, D. (2022). An Ontology-Based Chatbot to Enhance Experiential Learning in a Cultural Heritage Scenario. Frontiers in Artificial Intelligence, 5, 808281. https://doi.org/10.3389/frai.2022.808281 Castle-Green, T., Reeves, S., Fischer, J. E., & Koleva, B. (2020). Decision Trees as Sociotechnical Objects in Chatbot Design. Proceedings of the 2nd Conference on Conversational User Interfaces, 1–3. https://doi.org/10.1145/3405755.3406133 54 Sperlí, G. (2021). A cultural heritage framework using a Deep Learning based Chatbot for supporting tourist journey. Expert Systems with Applications, 183, 115277. https://doi.org/10.1016/j.eswa.2021.115277 Surendran, A., Murali, R., & Babu, R. K. R. (2020). Conversational AI - A Retrieval Based Chatbot. Sutton, R. S., & Barto, A. G. (2018). Reinforcement learning: An introduction, 2nd ed. (pp. xxii, 526). The MIT Press. Suzuki, D., Nunotani, K., Fukusato, K., & Tanaka, M. S. (2020). A Study of Tourism Proposal System Using AI. 2020 IEEE 9th Global Conference on Consumer Electronics (GCCE), 634–635. https://doi.org/10.1109/GCCE50665.2020.9292070 Szeliski, R. (2022). Computer Vision: Algorithms and Applications. Springer International Publishing. https://doi.org/10.1007/978-3-030-34372-9 Ukpabi, D., & Karjaluoto, H. (2019). Chatbot Adoption in Tourism Services: A Conceptual Exploration (pp. 105–121). https://doi.org/10.1108/978-1-78756-687-320191006 Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention Is All You Need. https://doi.org/10.48550/ARXIV.1706.03762 Wallace, R. S. (2009). The Anatomy of A.L.I.C.E. In R. Epstein, G. Roberts, & G. Beber (Eds.), Parsing the Turing Test (pp. 181–210). Springer Netherlands. https://doi.org/10.1007/978-1-4020-6710-5_13 Webb, G. I. (2011). Naïve Bayes. In C. Sammut & G. I. Webb (Eds.), Encyclopedia of Machine Learning (pp. 713–714). Springer US. https://doi.org/10.1007/978-0-387-30164-8_576 55 Weizenbaum, J. (1966). ELIZA—a computer program for the study of natural language communication between man and machine. Communications of the ACM, 9(1), 36–45. https://doi.org/10.1145/365153.365168 Wickramasinghe, I., & Kalutarage, H. (2021). Naive Bayes: Applications, variations and vulnerabilities: a review of literature with code snippets for implementation. Soft Computing, 25(3), 2277–2293. https://doi.org/10.1007/s00500-020-05297-6 Wirth, R., & Hipp, J. (2000). CRISP-DM: Towards a standard process model for data mining. Proceedings of the 4th International Conference on the Practical Applications of Knowledge Discovery and Data Mining, 1, 29–39. Wu, Y., Wu, W., Xing, C., Zhou, M., & Li, Z. (2016). Sequential Matching Network: A New Architecture for Multi-turn Response Selection in Retrieval-based Chatbots. https://doi.org/10.48550/ARXIV.1612.01627 Yan, Z., Duan, N., Bao, J., Chen, P., Zhou, M., Li, Z., & Zhou, J. (2016). DocChat: An Information Retrieval Approach for Chatbot Engines Using Unstructured Documents. In K. Erk & N. A. Smith (Eds.), Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) (pp. 516–525). Association for Computational Linguistics. https://doi.org/10.18653/v1/P16-1049 Zhang, M., & Li, J. (2021). A commentary of GPT-3 in MIT Technology Review 2021. Fundamental Research, 1(6), 831–833. 56 APPENDIX A 57 Question: Expected Answers as provided by the City of Bad Tölz 1. What is there to tell about the history of Bad Tölz? The town was founded on the banks of the Isar as the mill settlement of Reginried and developed strategically at the intersection of two trade routes. The name “Tölz” was first mentioned in a document in 1180, when Henry the Tölzer, representing the Bavarian duke, resided in his castle between the mills on the Mühlfeld and a small settlement on the Isar. He gave his name to the up-and-coming town, and crafts and rafting developed under his protection. Bad Tölz experienced ups and downs, including Swedish plundering, a plague epidemic and the Oberland peasants' revolt. From 1845, Bad Tölz became known as a health resort when the farmhand Caspar Riesch discovered an iodine spring and spas and health resorts were established. Bad Tölz attracted celebrities such as Princess Bismarck, Thomas Mann and Mark Twain as guests. Today, Bad Tölz is an attractive town with a combination of urban infrastructure and unspoiled nature as well as its proximity to the metropolis of Munich. All the local sights can be easily explored on foot, from the historic market street through the Gries, across the Isar to the park and spa district and up to the Calvary. There is also a city tour where you can learn all about the history and sights of the city. (Link to the flyer of the historical city tour: https://www.badtoelz.de/_Resources/Persistent/2/b/6/5/2b6546302e9718d2497e8782d885474c9d23bf1c/BT- Historischer%20Stadtrundgang_deu_140514_screen.pdf) 2. Can you tell me something about the cultural life in Bad Tölz? 'Bad Tölz offers a variety of cultural events and festivals, including concerts, theater, cabaret and traditional festivals. Many of the events take place in the Kurhaus, a historic Gabriel-von-Seidl building. The town is famous for the Tölz Leonhardi Ride, the largest horse pilgrimage in southern Germany. In 2016, the Leonhardifahrt was added to both the Bavarian Intangible Cultural Heritage List and the national register. The Easter market and the Christmas market, both of which take place in the historic Marktstraße, are very popular. The towns most famous artistic representative is the Tölz Boys' Choir, which was founded here in 1956. The Tölz town band has a long tradition since it was founded in 1924 and has performed far beyond the town's borders. It has received numerous awards. There has also been a very popular puppet theater with a varied repertoire for over 100 years. 3. What are some famous points of interests in Bad Tölz? - Historische Marktstraße: This street with gabled houses and many decorated with Lüftlmalereien was significantly influenced by the Munich architect Gabriel von Seidl. Today it is a pedestrian zone with a wide range of stores and restaurants. - The Kurhaus, designed by Gabriel von Seidl, was inaugurated in 1914 and is still an atmospheric setting for culture, conferences, festivals and much more. - Bad Tölz has many churches, e.g. the late Gothic parish church near Marktstraße or the baroque Mühlfeldkirche. The Calvary Church on the Kalvarienberg and the associated Leonhardi Chapel are the destination of the famous Leonhardi pilgrimage in Tölz every year. The location also offers a wonderful view over the city and the Isar valley. - The magnificent Thomas Mann Villa, which the writer owned from 1909-1917, is located on the northern outskirts of the city and is not open to the public. During the summer months that Mann spent here, he wrote some of his famous works. 4. What are some traditional dishes in Bad Tölz? Roast pork and dumplings or “a g'scheide Brotzeit” with Obazda, pretzels and beer are traditional dishes for Bad Tölz and the region. 5. What is the best time of year to visit Bad Tölz? Bad Tölz is a year-round destination, depending on the activities you are planning. Every season has its own special charm. Spring, when everything is in bloom in the valley and the mountain peaks are still covered in 58 snow, summer, when the numerous lakes in the surrounding area entice you to swim, and fall, the best time for hiking. But winter also offers a wide range of leisure activities. 6. What are some popular events or festivals in Bad Tölz? The highlights every year are the traditional Easter market, the Leonhardifahrt in November and the Tölz Christmas market. In addition, there is a varied program of events throughout the year, which can always be found in the events calendar. 7. What are some outdoor activities to do in Bad Tölz? There are a variety of outdoor activities in Bad Tölz, depending on the season. From spring to fall you can go hiking, cycling, swimming or golfing, while in winter you can go winter hiking, snowshoeing, cross-country skiing, curling and tobogganing. You can find more information about the activities here: https://www.badtoelz.de/de/erleben.html 8. What public transportation is available in Bad Tölz? There is a large MVV route network (buses) and a station of the Bayerische Regiobahn in Bad Tölz. Guest cards allow free use of many connections. Information and tickets are available on the respective websites of the establishments. 9. What are some familyfriendly activities in Bad Tölz? There are many activities in Bad Tölz and the surrounding area that are suitable for families. The local mountain Blomberg offers the opportunity to hike on a discovery trail, you can go tobogganing there in summer and winter and there is a high ropes course. In summer, there are many lakes in the region for swimming. There is even an offer called "Familiengaudi", which is specially tailored for parents with children and can be booked all year round. You can find more information at: https://www.bad-toelz.de/de/uebernachten- 2/unsere-urlaubsangebote/naturerlebnis/familiengaudi.html 10. What does Bad Tölz offer? Bad Tölz, a romantic small town on the Isar, awaits visitors with tranquil peace and lively diversity, fascinating customs and relaxed cosmopolitanism. The spa town in the healing climate offers many opportunities for nature lovers and hiking enthusiasts, as well as a wide range of health services. There are also a number of cultural attractions, including the Tölz Easter and Christmas markets, the Leonhardifahrt festival and the boys' choir festival. More information can be found at https://www.bad-toelz.de/de/. 11. What are some local markets or shopping areas in Bad Tölz? Bad Tölz offers a weekly market (Wednesdays) and a farmers' market (Fridays), where regional vendors sell their products. There is also the two-week Easter market and the Christmas market over four weeks in the Advent season. There is also a fall market in October. https://www.bad-toelz.de/de/veranstaltungen-and-kultur/maerkte.html There are many shopping opportunities in the city center with a wide range of products. https://stadt.bad-toelz.de/wirtschaft-mobilitaet-umwelt/standort-infos/einkaufsstadt-bad- toelz/einkaufsstadt. 12. Are there special events for children in Bad Tölz? Yes, there are special events for children in Bad Tölz, e.g. during the Easter and Christmas markets. There are also child-friendly cultural events such as the wonderful performances at the Tölz puppet theater, reading sessions in the town library or performances of children's musicals and puppet theaters. There are also a total of 13 playgrounds in the town, the Blomberg with its wide range of family activities and the Märchenwald Isartal leisure park in nearby Wolfratshausen with over 20 different fairy tales and 260 moving figures. 13. What types of accommodation are available in Bad Tölz? There is a wide range of accommodation in Bad Tölz, including 4-star hotels with personal service and detailed interiors, rustic hotels in the 2 to 3-star segment and family guest houses. There is also a camper van site and camping facilities near Bad Tölz. You can find more information at https://www.badtoelz.de/de/uebernachten-2/unterkuenfte.html. 59 14. Which restaurants in Bad Tölz would you recommend? Bad Tölz has many recommendable restaurants, inns and bars with typical Tölz charm. You can find an overview on the town's website at https://www.bad-toelz.de/de/entdecken/test-gewerbedatenbank- neu.html 15. What does the “Bad” in the place name stand for? Bad Tölz has a long tradition as a spa and health resort. With its three natural remedies, Jood, Moor and Heilkima, the town has stood for vitality and well-being for around 120 years and offers treatments and courses of all kinds. 16. How is the weather in Bad Tölz? Current weather data can always be found at https://www.bad-toelz.de/de/entdecken/webcams-wetter- 1.html. In addition, the images from the webcams always give a good impression of the current weather situation. 17. Is there a museum in Bad Tölz and when is it open? Bad Tölz has a town museum with an outstanding, nationally relevant collection. On over 800 square meters there are around 2000 objects on 45 topics in 38 exhibition areas. The museum is located in the former town hall in Marktstraße and is open from Tuesday to Sunday from 10:00 to 17:00. 18. Is there nightlife in Bad Tölz? There are several restaurants, bistros and pubs in Bad Tölz that stay open late. However, there are no real nightclubs or pubs. 19. Can I take a health cure in Bad Tölz? Bad Tölz is a state-recognized spa with the title of climatic health resort (https://www.bad-toelz.de/de/aktiv- and-gesund/unser-kurort-gesundheit-aus-der-natur/heilklima.html) and mud spa (https://www.badtoelz.de/de/gesundheit-1/kraft-aus-der-natur/moor.html). Bad Tölz is recognized by all statutory cost bearers as well as by state aid. For individual questions, please contact the Tourist Information Office on 0 80 41 / 78 67-0 or send an e-mail to [email protected] 20. Are there public WiFi access points in Bad Tölz? In Bad Tölz, Internet coverage is very good. There are several freely accessible HotSpots throughout the town that anyone can use. 21. Are there green spaces in Bad Tölz? There are many green spaces in Bad Tölz. In addition to the larger parks (Rosengarten, Franziskanergarten, Gabriel-von-Seidl-Kurpark), there is plenty of space along the Isar with paths, benches and playgrounds. The Kalvarienberg is also a green oasis in the city. 22. Is there a bike rental service in Bad Tölz? Yes, there is a bike rental service in the “Bike Boutique”. https://www.bikeboutique-toelz.de/ Bikes can also be hired on the Blomberg. You can find more information about bike tours and cycling vacations in Bad Tölz here: https://www.bad-toelz.de/de/erleben/sommererlebnisse/radeln.html 23. What historical points are there in Bad Tölz? Bad Tölz has many historical sites such as the Marktstraße, the Gries, the park and spa district and the Calvary. There is a flyer where you can find out everything you need to know about the history and sights of the town and explore the town on your own. https://www.badtoelz.de/_Resources/Persistent/0/8/1/0/08103e38ab60401b3f3edf903e0cab1461b08318/BT- Stadtrundgang_deu51.pdf There is also a wide range of city and themed tours. You can find more information about the city tours here: https://www.bad-toelz.de/de/entdecken/stadtspaziergang-1/fuehrungen.html 24. Are there any special cultural events in Bad Tölz? In Bad Tölz there are numerous large and small festivals, markets and events throughout the year. Highlights include the traditional Easter market, the Leonhardifahrt in November and the Tölz Christmas market. There are cultural spectacles of all kinds, from classical to traditional to rock sounds, as well as puppet shows, 60 theater and comedy. You can find an overview of all events in Bad Tölz and the Tölzer Land region in the events calendar. https://www.bad-toelz.de/de/veranstaltungen-and-kultur/veranstaltungskalender.html 25. What sports options are there in Bad Tölz? Bad Tölz offers a wide range of sporting activities at any time of year. In summer you can go hiking, cycling, swimming, golfing and much more. In winter, there are long walks in the winter sun on cleared paths, snowshoe hikes, cross-country skiing on perfectly groomed trails, curling and tobogganing. There is something for everyone, both for sporting and relaxing activities in the beautiful natural surroundings of the Tölzer Land. You can find more information about the activities on offer here: https://www.bad-toelz.de/de/erleben.html 26. Are there any special traditions in Bad Tölz that I should know about? In Bad Tölz, great importance is attached to tradition and customs, which is reflected in various festivals and celebrations. The most famous traditional event is the Tölzer Leonhardifahrt. But Bad Tölz also demonstrates its living customs on public holidays, such as Corpus Christi, or on the traditional costume and marksmen's anniversaries. In addition to the marksmen, the town has three traditional costume associations. 27. Where exactly is Bad Tölz? Bad Tölz is located on the Isar river in southern Upper Bavaria. The town lies on the foothills of the Alps and around 50 km south of Munich near the Austrian border. Idyllically situated in the countryside, Bad Tölz is an ideal starting point for many activities. 28. Are there any special churches in Bad Tölz? Bad Tölz has five Catholic and one Protestant church. Particularly noteworthy are the town parish church, the Franciscan church and the Calvary church with the nearby Leonhardi chapel. 29. What medical facilities are there in Bad Tölz? Bad Tölz has four sanatoriums and health resorts, seven spa and bathing doctors, as well as many general practitioners, specialists, physiotherapists and alternative practitioners. There are also rehabilitation clinics and various sports facilities for carrying out rehabilitation measures. Furthermore, the Asklepios Stadtklinik is an academic teaching hospital providing excellent primary care. Bad Tölz is the first choice when it comes to diagnosis and treatment options for many illnesses and complaints. Further information on doctors and therapists, alternative practitioners and clinics specializing in this field can be found by entering the keyword on the website. https://www.bad-toelz.de/de/aktiv-and-gesund/vitalzentrum.html 30. Are there any special culinary experiences in Bad Tölz? In Bad Tölz there are various culinary experiences, such as Bavarian delicacies like roast pork and dumplings or “a g'scheide” snack with Obazda, pretzels and beer. There are also cozy cafés, quaint taverns and numerous restaurants that invite you to linger and enjoy. The town also offers healthy and balanced dietary options such as herbalism, vegan and vegetarian specialties and fasting. A special offer is the “Tölzer Schmankerl-Tage” https://www.bad-toelz.de/de/uebernachten-2/unsereurlaubsangebote/freizeitangebote/schmankerltage.html or the “Vegane Auszeit” https://www.badtoelz.de/de/uebernachten-2/unsere-urlaubsangebote/ernaehrung/vegane-auszeit.html 31. Who does the monument in the upper Marktstraße show? The monument in the upper Marktstraße shows Kaspar III Vinzerer, a ducal Bavarian general and diplomat, caretaker and feudal lord of Tölz. 32. Are there any special art galleries or exhibitions in Bad Tölz? Bad Tölz is home to the Angela Sommerhoff studio, which exhibits contemporary art, and the Art4nature gallery, which presents paintings by artists from various regions of Germany, Europe and the world. There is also the Kunstverein Tölzer Land e.V., which offers a varied annual program with individual and thematic member exhibitions. The Bad Tölz town museum also has an extensive collection on the history of Bad Tölz and the Isarwinkel region, as well as a gallery that hosts changing exhibitions. 33. Does Bad Tölz have a swimming pool? Bad Tölz has an indoor pool with a sauna area and a natural swimming pool, the Eichmühle. In nearby Kochel am See there is the Kristall Therme, to which the Tölz guest card entitles you to a discount on the admission price. 61 34. Are there any special music events in Bad Tölz? In Bad Tölz, there is a concert series called “Stadt mit der besonderen Note”, which is organized exclusively by local musicians. These concerts take place from April to October and offer a program worth listening to at the highest artistic level. You can find an overview of all events in Bad Tölz in our events calendar. https://www.bad-toelz.de/de/veranstaltungen-and-kultur/veranstaltungskalender.html 35. What souvenirs should I bring back from Bad Tölz? There is no classic souvenir from Bad Tölz, but there is a wide range of nice souvenirs, such as the “Tölzer Prügeln”, a chocolate specialty or the “Tölzer Leonhardischnaps”, which is produced in a local distillery. The town museum houses the Heimatwerk, a store offering a wide range of products made by local artisans. 36. Are there any special customs or festivals in Bad Tölz? The Marionettentheater in Bad Tölz is a renowned figure theatre that has been around for over 110 years and is one of the leading figure theatres in Germany. It offers performances for both children and adults. Additionally, the Kurhaus in Bad Tölz hosts concerts, theater performances, and cabaret shows. The Gabrielvon-Seidl-Konzertsaal is also located in the Kurhaus and hosts the quartettissimo! International String Quartet Series, which brings chamber music of regional and international significance to Bad Tölz. Tickets for performances can be purchased at the Tourist-Information Bad Tölz or online at MünchenTicket. 37. Which famous personalities are from Bad Tölz? Many well-known ice hockey players from the past and present come from Bad Tölz, as it is the home of the EC Bad Tölz ice hockey club, e.g. Lorenz Funk, Hans Zach, Yasin Ehliz, Leonhard Pföderl. Twice German champions in the 1960s, the club now plays in the Oberliga Süd. The two well-known actors Stefan Murr and Klaus Steinbacher also come from Bad Tölz. 38. Are there any special architectural sights in Bad Tölz? The Munich architect Gabriel von Seidl had a significant influence on the current appearance of Marktstraße, and before his death he also contributed the designs for the Kurhaus, which opened in 1914. Bad Tölz is also home to the largest Wandelhalle in Europe, although it is no longer in use. 39. What day trips can I do from Bad Tölz? Bad Tölz is centrally located, so you can reach numerous excursion destinations within an hour's drive, e.g. Munich, Lake Chiemsee, Lake Starnberg, Garmisch, Mittenwald and much more. But the nearby towns such as Lenggries, Tegernsee, Kochel and Walchensee are also attractive destinations. If you don't have your own car, you can use more than 50 MVV bus routes and the Bavarian regional railroad and travel almost anywhere in the Oberland free of charge with the guest card. Further information on excursions and bus connections can be found at https://www.bad-toelz.de/de/entdecken/ausfluege.html 40. Can I park my motorhome overnight in Bad Tölz? There is one pitch, located directly on the Isar, which can be used for a maximum stay of 48 hours. It is equipped with a disposal and supply system, a holiday-clean facility and a fresh water station, and the price for 24 hours is 16 euros and includes the Tölz spa and guest card. 41. Which regional products are known in Bad Tölz? In Bad Tölz, seasonal products from the region are well-known and popular. For example, the Tölzer Kasladen sells artisan cheese from carefully selected farm and village cheese dairies without chemical additives or genetic modification. At the weekly market, the farmers' market on Jungmayrplatz in Bad Tölz or in the farm stores in the surrounding area, the producers themselves are usually still at the stall and can tell you all about the origin and production methods of their products. 42. Are there brewery tours in Bad Tölz? There are two small breweries in Bad Tölz, the Binderbräu and the Mühlfeldbräu, but they do not offer their own guided tours. However, the tourist information office offers special tours that also include the topic of beer. There is a flyer with all the guided tours. https://www.badtoelz.de/_Resources/Persistent/6/8/c/2/68c29b3977b80923acb8acadfaa550162202f14d/BTR2_2022-006- 62 Flyer_Stadtfuehrer_220322_SCREEN.pdf Further information and bookings can be made by email at [email protected] or by phone on 08041/7867-17. The Hoppebräu brewery in Waakirchen, 10 km away, also offers guided tours. 43. Which local newspapers or magazines are available in Bad Tölz? The local editorial office of the Münchner Merkur, the Tölzer Kurier, is based in Bad Tölz. The Süddeutsche Zeitung also reports from Bad Tölz and the surrounding area. There is also a free weekly newspaper for the region, the Gelbe Blatt. Magazines such as “dahoam” or “d'Isarwinkler” are published several times a year, reporting on the region. 44. Is there any special craftsmanship in Bad Tölz? There are numerous artisans in the region who offer many different things. These range from wood carvings to dirndl tailors and the production of filigree jewelry that is worn in the hair or on the dirndl for festive occasions. The town museum houses the Heimatwerk, a store offering a wide range of products made by local artisans. 45. Are there any films that were shot in Bad Tölz? In Bad Tölz wurden verschiedene Filme und Fernsehserien gedreht, darunter "Der Bulle von Tölz", "Tonio und Julia", "Zwei am großen See", "Forsthaus Falkenau" und "Um Himmels Willen". Es gibt auch eine Führung zu den Drehorten berühmter Filme und Fernsehserien in Bad Tölz. Informationen dazu finden Sie unter https://www.bad-toelz.de/de/uebernachten-2/unsere-urlaubsangebote/freizeitangebote/hollywood-auf- oberbayerisch.html. 46. Are there any special dance events or courses in Bad Tölz? The Kurhaus in Tölz regularly hosts a dance café with live music on Sundays. The exact dates can be found in the calendar of events. https://www.bad-toelz.de/de/veranstaltungen-and- kultur/veranstaltungskalender.html There is also the Tanzsportclub Tölzer Land e. V. which offers regular events and workshops as well as training sessions. https://www.tanzsportclub-toelzerland.de/ 47. Are there any interesting sporting events in Bad Tölz? Bad Tölz has a large number of sports clubs that offer a wide range of sports. These include all ball sports, athletics, gymnastics, tennis, golf, weight training, water sports, mountain sports, football and many more, whose teams are also in the league. One of the traditional clubs is the Bad Tölz ice club, whose professional team, the Tölzer Löwen, plays for points in the Oberliga Süd. In the Hacker-Pschorr-Arena with over 4,000 seats, you can attend the home games every week during the season. 48. Is there a hostel in Bad Tölz? Bad Tölz has a youth hostel with almost 200 beds, group rooms and conference facilities. The hostel is located in the middle of the Tölz sports park with its many sports facilities and also offers additional facilities such as a speed soccer facility, an activity trail and bike hire. https://www.jugendherberge.de/jugendherbergen/bad-toelz/ 49. What is special about the Bad Tölz mountain rescue center? The world's only simulation facility for air rescue procedures is located here. Many rescue workers from the mountain rescue service, police, fire department and other specialists from national and international units train in this hall for emergencies. https://bw-zsa.org/ 50. Are there any special photo motifs or locations in Bad Tölz? Bad Tölz offers a wide variety of photo opportunities. A photo from the Kalvarienberg overlooking the town and the Isar towards the mountains is certainly a must for every visitor. Just like a picture of the Tölz market street. Anyone strolling through the streets of the town will definitely find plenty of worthwhile motifs. 63 51. Was gibt es zu Bad Tölz geschichtlich zu erzählen? Die Stadt entstand am Ufer der Isar als Mühlensiedlung Reginried und entwickelte sich strategisch günstig an der Kreuzung zweier Handelswege. Der Name "Tölz" wurde erstmals 1180 urkundlich erwähnt, als Heinrich der Tölzer als Vertreter des bayerischen Herzogs zwischen den Mühlen auf dem Mühlfeld und einer kleinen Siedlung an der Isar auf seiner Burg residierte. Er ist Namensgeber des aufstrebenden Ortes, unter seinem Schutz entwickelten sich Handwerk und Flößerei. Bad Tölz erlebte Höhen und Tiefen, darunter schwedische Plünderungen, eine Pestepidemie und den Aufstand der Oberländer Bauern. Ab 1845 wurde Bad Tölz als Kurort bekannt, als der Bauernknecht Caspar Riesch eine Jodquelle entdeckte und Bäder und Kurbetriebe entstanden. Bad Tölz zog Berühmtheiten wie die Fürstin Bismarck, Thomas Mann oder Mark Twain als Gäste an. Heute ist Bad Tölz eine attraktive Stadt mit einer Verbindung von urbaner Infrastruktur und intakter Natur sowie der Nähe zur Metropole München. Alle Sehenswürdigkeiten vor Ort können bequem zu Fuß erkundet werden, von der historischen Marktstraße durch das Gries, über die Isar ins Park- und Bäderviertel bis hinauf zum Kalvarienberg. Es gibt auch eine Stadtführung, bei der man alles Wissenswerte über die Geschichte und die Sehenswürdigkeiten der Stadt erfährt. (Link zum Flyer des Historischen Stadtrundgangs: https://www.badtoelz.de/_Resources/Persistent /2/b/6/5/2b6546302e9718d2497e8782d885474c9d23bf1c/BT-Historischer Stadtrundgang_deu_140514_screen.pdf) 52. Können Sie mir etwas über das Kulturleben in Bad Tölz erzählen? Bad Tölz bietet eine Vielzahl von kulturellen Veranstaltungen und Festen, darunter Konzerte, Theater, Kabarett und traditionelle Feste. Viele der Veranstaltungen finden im Kurhaus statt, einem historischen Gabriel-von-Seidl-Bau. Die Stadt ist bekannt für die Tölzer Leonhardifahrt, die größte Pferdewallfahrt Süddeutschlands. 2016 wurde die Leonhardifahrt sowohl in die Liste des Immateriellen Kulturerbes Bayern als auch in das bundesweite Verzeichnis aufgenommen. Beliebt sind der Ostermarkt und der Christkindlmarkt, die beide in der historischen Marktstraße stattfinden. Berühmter künstlerischer Vertreter der Stadt ist der Tölzer Knabenchor, der hier 1956 gegründet wurde. Die Tölzer Stadtkapelle blickt seit ihrer Gründung 1924 auf eine lange Tradition zurück und hatte schon große Auftritte auch über die Stadtgrenzen hinaus. Sie erhielt schon zahlreiche Auszeichnungen. Seit über 100 Jahren gibt es zudem ein sehr beliebtes Marionettentheater mit einem vielfältigen Spielplan. 53. Welche Sehenswürdigkeiten gibt es in Bad Tölz? - Historische Marktstraße: Dieser Straßenzug mit Giebelhäusern und vielfach verziert mit Lüftlmalereien wurde maßgeblich durch den Münchner Architekten Gabriel von Seidl beeinnflusst. Heute ist es eine Fußgängerzone mit einem breiten Angebot an Geschäften Gastronomie. - Das Kurhaus, nach Plänen von Gabriel von Seidl, wurde 1914 eingeweiht und ist damals wie heute ein stimmungsvoller Rahmen für die Kultur, Tagungen, Feste und vieles mehr. - Bad Tölz hat viele Kirchen, z. B. die spätgotische Stadtpfarrkirche nahe der Marktstraße oder die barocke Mühlfeldkirche. Die auf dem Kalvarienberg gelegene Kalvarienbergkirche und die dazu gehörige Leonhardikapelle ist jedes Jahr Ziel der berühmten Tözer Leonhardifahrt. Außerdem bietet der Standort einen wunderbaren Blick über die Stadt und das Isartal. - Die prachtvolle Thomas-Mann-Villa, die der Schriftsteller von 1909-1917 besaß, steht am nördlichen Stadtrand und ist nicht öffentlich zugänglich. Während der Sommermonate, die Mann hier verbrachte, entstanden einige seiner berühmten Werke. 54. Welche traditionellen Gerichte gibt es in Bad Tölz? Schweinebraten und Knödel oder "a g´scheide" Brotzeit mit Obazda, Brezen und Bier sind traditionelle Gerichte für Bad Tölz und die Region. 55. Wann ist die beste Zeit, um Bad Tölz zu besuchen? Bad Tölz ist ein Ganzjahresziel, auch je nach den Aktivitäten, die man plant. Jede Jahreszeit hat ihren ganz besonderen Reiz. Der Frühling, wenn im Tal alles blüht und die Berggipfel noch schneebedeckt sind, der Sommer, wenn 70