VIETNAM NATIONAL UNIVERSITY, HA NOI INTERNATIONAL SCHOOL ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG QUỐC TẾ VNU-INTERNATIONAL SCHOOL GRADUATION PROJECT CHATBOT IN ADMISSION CONSULTANT IN INTERNATIONAL SCHOOL — VNU USING RASA FRAMEWORK Bùi Tuấn Anh Hanoi — The year 2022 VIETNAM NATIONAL UNIVERSITY, HA NOI INTERNATIONAL SCHOOL ĐẠI HỌC QUỐC GIA HÀ NỘI TRUONG QUOC TE VNU-INTERNATIONAL SCHOOL GRADUATION PROJECT CHATBOT IN ADMISSIONS CONSULTANT IN INTERNATIONAL SCHOOL — VIETNAM NATIONAL UNIVERSITY USING RASA FRAMEWORK STUDENT: Bui Tuan Anh STUDENT ID: 17071375 COHORT: K16 MAJOR: Informatics and Computer Engineering SUPERVISOR: Nguyễn Doãn Đông Hanoi — Year: 2022 THE COMMITMENT My name is Bui Tuan Anh, a student in the class ICE2017A, majoring in Informatics and Computer Engineering at International School — Vietnam National University. I promise that this project is my research, study, and construction.The project's content has references and uses information and documents from different sources books, journals, and articles listed in the list of references are legal citations. Article BUI TUAN ANH ACKNOWLEDGEMENT First, I would like to express my deep gratitude to Mr. Nguyen Doan Dong for wholeheartedly guiding, helping, and motivating me to complete the project on chatbots applied in international school enrollment.
I would like to thank the teachers at the Faculty of Sciences and Applications, for helping me gain more useful knowledge and opportunities to develop more in this field of artificial intelligence. Because I just switched to this Artificial Intelligence major, my knowledge is still limited, the project will inevitably have certain shortcomings. I respectfully accept the comments of teachers and teachers to improve the project better. I would also like to thank my family, relatives, and friends who have supported, cared for, and encouraged me throughout the process of doing this project.
-- -- - - Ăn Họ HH Họ nọ HH tu gà 4 LIST OF SIGNS AND ARRIVALS. -G Gv 8 LIST OF FIGURES AND GRAPHS. 8 LIST OF TABLES 2. 14 IS Con cac na ố.
GOal OŸ the DTOJ€C.--- L3 HT TH Hà TH Tà HT TH 18 3. 19 CHAPTER 1: CHATBƠOT SYSTEM OVERVIEW. 20 LoL: Introduction nh.2: Related work in chatbot hisfOFV.-- - HH HH nh nơ 22 1.3: Structure of Chatbot COmpOn€TIFS.-- - 2 2 223k TH TH TH HT HH ưy 24 1.- - -- 2 cành vn HT ky kưy 25 IS 2u án nh.6: Dialogue Manaø€Im€fI.-- --- HH HHnh nh nưg 30 1.1: Finite state machine model FŠA.- - 1n n nh 1H HT TH KH HH nà rớt 31 1.2: Erame-based model .- +: + + 1 E1 E3 v1 TH TH ke 32 1.-- --- 2+2 nh kTnHkTnHkHn ky ri 33 II. nà HH HH HH nh HE 34 l 9.
35 CHAPTER 2: DEEP LEARNING APPLTIED TO CHATBOT.2: Recurrenf neural ñ€fWOFK. LH HH HH HH 4 2.3: Long-Short i2v 8c ynn ố .1: The problem of long-term depencl€nnC1€S.-- sàn HH nh, 44 P208) 0.4: LSTM worling process sfep Dy Sf€P.- HH HT TH HH TH Hư 49 PP .À ca on cố ố ố. LH HH HH HT HH HT 51 °,_.5: Apply RNN to Dialogue ManageIm€TIL.2: Global-Locally Self-Attentive DST (GLAID). LH «SH khe, 56 CHAPTER 3: LEARN ABOUT RASA FRAMEWORK.1: Introduction nh cố .3: Install and initialize RASA 00.1: Program structure of RASA 6n ốc cố ố ố .4: SHOES na cece.
71 BUILD A CHATBOT IN THE FIELD OF ADMISSION CONSULTANT .1: Problem sfaf€Imen[.- 1à HH HH HH HH 7I 4.3: Applied RASA to build chatbot 4.1: Install RASA nh .2: Comfi guration oo.4: System on hố ố ố .5: Template for clatoOI.-- 2 1131133 vn nh nh HH Ha 77 AS.4: Script ÍframeworkK and TUÏÌ€§. - s3 *TxkT Tk TH krkp S0 4.6: Using PhoBERT to improve intent and proper name reCOgnifIOn. 2 011 vn HH nhe 82 X2 19( oi. 88 (HP \aớổaa cVddANo(dl(OloPPiđiiiiii't-A.2: Participant’s rating ốc ốc ố ố ố .1: Run chatbof on ferTmITiA]L.-- - 2 2 s33 x3 E3 TT TH TT net 90 4.2: Connect chatbot to EacebOOK.-- ---- + + + 3 HT TH KH HT TH 94 ®9)i90013/90) 0.
ÔỒÔỒÔÒ 109 LIST OF SIGNS AND ARRIVALS Acronyms Full words Description in Vietnamese AI Artificial Intelligent Trituénhantao NLU Natural Language Understanding Hiểungônngữtựnhiên NLP Natural Language Processing Xửlýngônngữtựnhiên DM Dialogue Management Quanlycudchéithoai NLG Natural Language Generation Sinhngônngữtgnhiên API Application Programming Interface Giao diénlaptrinhtn gdung SDK Software development kit Bộcôngcuhỗtrợgpháttriển LIST OF FIGURES AND GRAPHS Figure Page Figure 1.1: Chatbot classification 20 Figure 1.2: Chatbot’s Structure 24 Figure 1.3: Chatbot architecture 25 Figure 1.4: NLU process 26 Figure 1.5: Data processing 26 Figure 1.6: Determination of user’s intent 29 Figure 1.7: Dialogue handling 30 Figure 1.8: FSA model 31 Figure 1.9: Plan-based example 32 Figure 1.10: Class-based 34 Figure 2.1: Structure of ANN 39 Figure 2.2: Algorithm of ANN 40 Figure 2.3: RNN model 43 Figure 2.4: Short-term dependent RNN 44 Figure 2.5: Long-term dependent RNN 45 Figure 2.6: The iterative modules of an RNN 46 contain a layer Figure 2.7: The iterative modules of an RNN 46 contain four layers Figure 2.8: The LSTM state cell is like a 47 conveyor belt Figure 2.9: LSTM state gate 48 Figure 2.10: LSTM focus f 48 Figure 2.11: LSTM focus i 49 Figure 2.12: LSTM focus C 50 Figure 2.13: LSTM focus O 50 Figure 2.14: Embedded word model 51 Figure 2.15: CBOW and Skip-Ngram 52 Figure 2.16: Word-based DST model with RNN 55 Figure 2.17: GLAD processing 56 Figure 2.18: GLAD model template 56 Figure 3.1: Architecture of RASA 59 Figure 3.2: Responding messages of RASA 60 Figure 3.3: Structure of the bot functions at the 61 backend Figure 3.4: Createan environment 62 Figure 3.5: Active the virtual 62 environment Figure 3.6: Installing rasa 62 Figure 3.7: Initialize rasa 63 Figure 3.8: Rasa folders 63 Figure 4.1: Structure of rasa processing in 71 chatbot Figure 4.2: System design analysis 74 Figure 4.3: Sequence diagram for asking about 75 majors Figure 4.4: PhoBERT Illustration 80 Figure 4.5: Describe how the metrics evaluate 82 the training model Figure 4.6: Intent confusion matrix of BERT 84 Figure 4.7: Intent confusion matrix of 85 whitespace tokenizer Figure 4.8: Intent confusion matrix of Roberta 86 Figure 4.9: Intent prediction confidence 87 histogram Figure 4.10: Create an environment in a chatbot 89 Figure 4.11: RASA train command line 89 Figure 4.12: Training rasa 90 Figure 4.13: NLU training completed 90 Figure 4.14: Start the duckling server 91 Figure 4.15: Rasa run actions command 91 line Figure 4.16: RASA run actions completed 92 Figure 4.17: RASA shell 92 Figure 4.18: Bot loaded 93 Figure 4.19: Register for Facebook development 93 Figure 4.20: Accept to be a Facebook 94 developer Figure 4.21: Facebook developer user manual 94 interface Figure 4.22: Create a Fan page on Facebook 95 Figure 4.23: Complete creating fan page 95 Figure 4.24: Create an App interface 95 Figure 4.25: Filling the information for the app 96 Figure 4.26: Complete creating the app 96 Figure 4.27: Messenger section 97 Figure 4.28: Access Tokens 97 Figure 4.29: Choose the app 98 Figure 4.30: Complete linking app to Facebook 98 Figure 4.31: Token generated 99 Figure 4.32: Get the App secret 99 Figure 4.33: Rasa runsthe server 100 Figure 4.34: Complete convert http:// to https:// 101 on Ngrok Figure 4.35: Converted server link HTTP:// 101 Figure 4.36: Mapping successful 101 Figure 4.37: Add Callback URL 102 Figure 4.38: Verify and save the app 102 Figure 4.39: Done editing the webhooks 103 Figure 4.40: Edit page subscriptions 103 LIST OF TABLES Table 1.0: Frame-based model example Page 32 Table 2.0: Template-based example Page 34 Table 3.0: Symbols used in the LSTM Page 47 network Table 4.0: Ashort description of rasa Page 63 - 64 files Table 5.0: Experiment result of three Page 83 models INTRODUCTORY Artificial intelligence (AID) has influenced the way we participate in our daily activities by designing and evaluating advanced applications and devices, known as intelligent agents, that can perform different functions. Along with the development of science and technology, Chatbot is being widely and strongly applied in many fields and is expected to develop even more in the future. “Chatbot will fundamentally revolutionize how computing is experienced by everybody” Satya Nadella, CEO of Microsoft “Now, to order from 1-800 flowers, you never have to “dial” 1800 again “ Mark Zuckerberg, CEO of Facebook “ Artificial Intelligence would be the ultimate version of google “ Larry Page Chatbots or virtual assistants, in general, are getting smarter and more complete. It helps us have better interactions and experiences with the software.
Here are some achievements that chatbot has reached (Jagan Jami, “infographic: The Future of Chatbots Statistics & Trends,2017) O Currently, more than 100,000 chatbots are being used on Facebook O 63 percent of individuals would think about contacting an online chatbot to get in touch with a company or brand. O 60 percent of Gen Xers and 59 percent of millennials have used chatbots on a messaging app. O In the USA, chatbots have a greater retention rate than the best apps. More than half of customers like companies that utilize chat applications.
Oo O By 2020, 80% of organizations plan to use chatbots. O By 2020, the average individual will converse with chatbots more frequently than with their spouse. O From 2017 to 2021, the global chatbot market is projected to expand at a CAGR of 37,11%. O By 2018, 62 percent of businesses will have used AI technology, up from the current 38%.
O By 2022, it is anticipated that chatbots would save organizations $8 billion. O Chatbots may save service providers an average of a little over 4 minutes for every inquiry. O Over 75% and 90%, respectively, of bot interactions in the banking and healthcare industries, will be successful.0 technological revolution has had a huge impact on many facets of life, notably in the domain of natural language processing and comprehension, where it has led to substantial advancements (NLU and NLP). Since 2013, several algorithms have been used to make chatbots even smarter and more precise.
Even though the age of chatbots is just getting started, we have already reaped several rewards from employing them. We may foresee a future in which chatbots can not only assist people in solving all aspects of problems, but also make decisions for them as technology continues to grow, particularly with the developments in artificial intelligence over the past few years. Research Motivation Online messages are a common way to respond to customer service inquiries in Vietnam. However, this is also done manually and has several issues, including the fact that it takes a lot of time and money to pay personnel to perform the same basic and comparable tasks.
As a result, the need for an intelligent and autonomous control system to increase productivity is critical, and chatbots are the ideal solution. Currently, the widely utilized online chat tools are starting to take over as people's preferred channels for getting in touch with businesses and resolving consumer issues. It's hardly surprising that chatbots are growing in popularity because instant messaging applications have established themselves as the primary channel for all companies to communicate with customers. We must deal with a lot of inquiries every day, including those from clients who inquire about goods and services, staff members who inquire about rules at work, and kids who have queries.
Thus, chatbots are used in a variety of industries, including: O Media Publishing Application The content delivery sector is one of the industries where chatbots are used most frequently. Chatbots are seen by media publishers as a potential method for interacting with the audience and keeping track of that involvement. Chatbots can therefore assist media publishers in getting reliable and beneficial insights about audience interests. On platforms like Facebook Messenger, users may immediately communicate with a brand's chatbot, improving the convenience and responsiveness of communications.