A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning
Abstract
:1. Introduction
2. Related Work
2.1. BotBuilders
2.2. Dialog Systems
2.3. Comparison
- Learning: how the conversational system learns and expands its scope;
- Control: the level of control over the solution;
- Reusable: how reusable some of the modules of the conversational system are;
- Availability: the language or platform in which the solution is available;
- Context: it is related to the possibility of the platform to either be able to automatically manage the context of a conversation or to allow for developing a code for this;
- All-in: indicates whether the platform offers multiple services related to the task of understanding natural language.
Category | Solution | Learning | Control | Reusable | Cloud | Context | Security | All-in |
---|---|---|---|---|---|---|---|---|
Botbuilders | DialogFlow | manual | low | no | dependant | yes | no | yes |
Watson | manual | low | no | dependent | yes | no | no | |
WitAI | manual | low | no | dependent | no | no | no | |
Dialog Systems | Pydial | iterative | medium | no | independent | yes | no | yes |
Rasa | iterative | high | no | independent | yes | no | yes | |
Snips | manual | medium | no | independent | yes | yes | no | |
Proposed | semi automatic | high | yes | independent | yes | yes | yes |
3. Architecture
3.1. Architecture Overview
- User Connection: this deals with all communication channel interfaces and converges all incoming messages to a specific format of InputMessage so that the system can process all kinds of messages in the same way;
- NLU: the Natural Language Understanding module has to interpret the user messages and extract helpful semantic information to assist the system in responding to the user, producing the Semantic Document with all the relevant semantic information;
- Belief Tracker: this updates the current dialog state with the new user message. This module keeps the short-term memory that contains information mentioned previously in this conversation;
- Policy: the dialog policy observes the current state and selects which action should be taken by the agent;
- NLG: the Natural Language Generation module transforms the action chosen by the policy into a natural language sentence to be sent to the user, delivered by the same channel through which the user sent the message;
- Knowledge Management: this has the role of managing the domain knowledge; it fetches external APIs, ontologies, or relational databases to provide domain information to the Belief Tracker and Policy modules;
- App Gate: this acts as a connector between the dialog system and the application. After a sufficient number of exchange messages between the user and the dialog system for a specific operation, the Policy module triggers the action for this module to request an operation. This operation is performed by the external application, and its result returns to the dialog system to be included in the response;
- User Authentication: when the user requests an operation, this module authenticates the user. Authentication is not required when the user only asks informational questions. These questions are the user’s doubts about the operations available or specific domain knowledge, whereas transactional messages aim to perform a task.
3.2. Scalable Architecture
- NLU: a microservice that mainly contains the existing NLU component;
- BeliefTracker, Policy, and KnowledgeManagement (KM): microservices that contain the aforementioned components. Note that KM is included not as a component but, rather, as a library;
- NLG: a microservice that mainly contains the NLG component and KnowledgeManagement (KM). Again, KM is included as a library;
- Conversational Agent: a microservice that contains the main code (orchestrator) of the conversational agent. In an orchestrated microservices architecture, this is the central microservice.
- Session: a microservice to simulate the opening of a user session with the system;
- RLog: a component for capturing performance metrics;
- Queues: Kafka technology for asynchronous communication;
- Containers: Docker technology to facilitate the deployment of each microservice with the management of its dependencies;
- Container manager: Kubernetes technology, which consists of an open source container management platform, is also an orchestrator of these containers, their resources, and their scale. After generating the Docker image for each microservice, by using Kubernetes, it is possible to manage the resources that each one will use and scale from, depending on the availability of resources and demand.
3.3. Natural Language Processing
3.4. Ontology
- Task ontology: this ontology contains the primary knowledge to perform the dialog system tasks, including supported operations, mandatory slots, and disambiguation options. It is designed in such a way that the ontology classes are the tasks that can be performed, and each ontology individual is the task that one does not need to disassemble. These ontology individuals are related to the data that need to be demanded to carry out the operation.
- Support ontology: this ontology supports the system with additional information that is required by the task ontology, and it can be fetched in this system. In other words, it is the ontology that contains the long-term data. Such an ontology has its structure assembled from the data that are defined as relevant in the task ontology.
- Domain ontology: the knowledge needed for solving questions about the domain is present in this ontology. This knowledge can be definitions, relations, or properties, describing the knowledge of subjects related to the tasks; it does not describe the steps for its accomplishment but describes the clear doubts inherent to the activities.
3.5. Never-Ending Learning
- Instance Populator: A neural network for named entity recognition that was trained to identify classes from the current ontology in the text. These entities will then be candidate instances of those classes to be added;
- Property Populator: A set of simple heuristic rules to identify common ontology properties such as label and description, as well as other custom properties based on the data properties available in the ontology; for example, matching dates in the text with ontology instances that can have a date property;
- Category Populator: Another neural network for named entity recognition, but this time, it is used to search for other entity types that are not currently in the ontology [16];
- OpenNRE: An open-source neural network for relation extraction [23], which is used to find new relations between instances of the current ontology;
- Relation Populator: A random forest classifier [24] trained to find new relations between instances of the current ontology;
- Knowledge Integrator: This is the same module as in NELL; it accesses confidence in new beliefs so as to only integrate high-confidence beliefs and perform consistency checks, for example, if the subject and object of relations are of the correct type.
4. Experimental Results
4.1. Specific Banking Domain for the Portuguese Language
4.2. Throughput Evaluation
- C-I (blue): The class of messages arriving from clients;
- C-NLU (red): The class of messages that go to the NLU queue;
- C-Belief (green): The class of messages that go to the Belief Tracker + Policy + KM queue;
- C-NLG (pink): The class of messages that go to the NLG + KM queue;
- C-S (orange): The class of messages that go to the Session queue.
- The number of containers in the PO_Km module = 5;
- The number of NLG module containers = 11;
- The execution time of the modules based on Table 1;
- The delay in generating a new message by the client after receiving a response from the previous message = 7 s;
- The boundary condition, where the use of modules is less than or equal to 0.7.
4.3. Never-Ending Language Learning
- Unary Relationship: isAnEvent(“*Event2*”);
- Unary Relationship: isATalker(“*Talker4*”);
- Unary Relationship: isATalker(“*Talker5*”);
- Binary Relationship: presents(“*Talker4*”, “*Event2*”), wherein the first attribute is the unary relationship isATalker(“*Talker4*”), and the second attribute is the relationship isAnEvent(“*Event2*”);
- Binary Relationship: presents(“*Talker5*”, “*Event2*”), wherein the first attribute is the unary relationship isATalker(“*Talker5*”), and the second attribute is the relationship isAnEvent(“*Event2*”).
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Yu, C.; Zhang, C.; Hu, Z.; Zhan, Z. Gate-Enhanced Multi-domain Dialog State Tracking for Task-Oriented Dialogue Systems. In Computational Intelligence for Engineering and Management Applications: Select Proceedings of CIEMA 2022; Springer: Berlin/Heidelberg, Germany, 2023; pp. 575–594. [Google Scholar]
- Khan, M.A.; Huang, Y.; Feng, J.; Prasad, B.K.; Ali, Z.; Ullah, I.; Kefalas, P. A Multi-Attention Approach Using BERT and Stacked Bidirectional LSTM for Improved Dialogue State Tracking. Appl. Sci. 2023, 13, 1775. [Google Scholar] [CrossRef]
- Ultes, S.; Rojas Barahona, L.M.; Su, P.H.; Vandyke, D.; Kim, D.; Casanueva, I.N.; Budzianowski, P.; Mrkšić, N.; Wen, T.H.; Gasic, M.; et al. PyDial: A Multi-domain Statistical Dialogue System Toolkit. In Proceedings of the ACL 2017, System Demonstrations, Vancouver, BC, Canada, 30 July–4 August 2017; pp. 73–78. [Google Scholar]
- Bocklisch, T.; Faulkner, J.; Pawlowski, N.; Nichol, A. Rasa: Open source language understanding and dialogue management. arXiv 2017, arXiv:1712.05181. [Google Scholar]
- Coucke, A.; Saade, A.; Ball, A.; Bluche, T.; Caulier, A.; Leroy, D.; Doumouro, C.; Gisselbrecht, T.; Caltagirone, F.; Lavril, T.; et al. Snips Voice Platform: An embedded Spoken Language Understanding system for private-by-design voice interfaces. arXiv 2018, arXiv:1805.10190. [Google Scholar]
- Bennett, M. The financial industry business ontology: Best practice for big data. J. Bank. Regul. 2013, 14, 255–268. [Google Scholar] [CrossRef]
- de Melo, G.; Imaizumi, V.; Cozman, F. Winograd schemas in portuguese. In Proceedings of the Anais do XVI Encontro Nacional de Inteligência Artificial e Computacional, Salvador, Brazil, 15–18 October 2019; SBC: Porto Alegre, Brazil, 2019; pp. 787–798. [Google Scholar]
- Dziri, N.; Rashkin, H.; Linzen, T.; Reitter, D. Evaluating Attribution in Dialogue Systems: The BEGIN Benchmark. Trans. Assoc. Comput. Linguist. 2022, 10, 1066–1083. [Google Scholar] [CrossRef]
- Dziri, N.; Kamalloo, E.; Milton, S.; Zaiane, O.; Yu, M.; Ponti, E.M.; Reddy, S. Faithdial: A faithful benchmark for information-seeking dialogue. Trans. Assoc. Comput. Linguist. 2022, 10, 1473–1490. [Google Scholar] [CrossRef]
- Dai, Y.; He, W.; Li, B.; Wu, Y.; Cao, Z.; An, Z.; Sun, J.; Li, Y. CGoDial: A Large-Scale Benchmark for Chinese Goal-oriented Dialog Evaluation. arXiv 2022, arXiv:2211.11617. [Google Scholar]
- Chevalier-Boisvert, M.; Bahdanau, D.; Lahlou, S.; Willems, L.; Saharia, C.; Nguyen, T.H.; Bengio, Y. Babyai: A platform to study the sample efficiency of grounded language learning. arXiv 2018, arXiv:1810.08272. [Google Scholar]
- Harrison, B.; Ehsan, U.; Riedl, M.O. Guiding Reinforcement Learning Exploration Using Natural Language. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, Stockholm, Sweden, 10–15 July 2018; pp. 1956–1958. [Google Scholar]
- Bayer, M.; Kaufhold, M.A.; Reuter, C. A survey on data augmentation for text classification. ACM Comput. Surv. 2022, 55, 1–39. [Google Scholar] [CrossRef]
- Rohaime, N.A.; Razak, N.I.A.; Thamrin, N.M.; Shyan, C.W. Integrated Invoicing Solution: A Robotic Process Automation with AI and OCR Approach. In Proceedings of the 2022 IEEE 20th Student Conference on Research and Development (SCOReD), Bangi, Malaysia, 8–9 November 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 30–33. [Google Scholar]
- Carvalho, M.; Hayashi, V.; Pinna, F.; Marquesone, R.; Néto, J.; Ruggiero, W. Towards Modeling Semi-automatic Ontology based on Natural Language Processing. In Proceedings of the 25th World Multi-Conference on Systemics, Cybernetics and Informatics: WMSCI 2021, Virtual, 18–21 July 2021; pp. 85–90. [Google Scholar]
- Schmitt, X.; Kubler, S.; Robert, J.; Papadakis, M.; LeTraon, Y. A replicable comparison study of NER software: StanfordNLP, NLTK, OpenNLP, SpaCy, Gate. In Proceedings of the 2019 Sixth International Conference on Social Networks Analysis, Management and Security (SNAMS), Granada, Spain, 22–25 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 338–343. [Google Scholar]
- Lamy, J.B. Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies. Artif. Intell. Med. 2017, 80, 11–28. [Google Scholar] [CrossRef] [PubMed]
- Dias-da Silva, B.C. Wordnet. br: An exercise of human language technology research. In Proceedings of the Gwc 2006: Third International Wordnet Conference, Jeju Island, Republic of Korea, 22–26 January 2005; Masaryk University: Brno, Czech Republic, 2005; pp. 301–303. [Google Scholar]
- Wang, Y.; Shen, Y.; Jin, H. A Bi-Model Based RNN Semantic Frame Parsing Model for Intent Detection and Slot Filling. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), New Orleans, LO, USA, 1–6 June 2018; pp. 309–314. [Google Scholar]
- Zhu, Y.; Wan, J.; Zhou, Z.; Chen, L.; Qiu, L.; Zhang, W.; Jiang, X.; Yu, Y. Triple-to-Text: Converting RDF Triples into High-Quality Natural Languages via Optimizing an Inverse KL Divergence. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2019, Paris, France, 21–25 July 2019; Piwowarski, B., Chevalier, M., Gaussier, É., Maarek, Y., Nie, J., Scholer, F., Eds.; ACM: New York, NY, USA, 2019; pp. 455–464. [Google Scholar] [CrossRef]
- Mitchell, T.; Cohen, W.; Hruschka, E.; Talukdar, P.; Yang, B.; Betteridge, J.; Carlson, A.; Dalvi, B.; Gardner, M.; Kisiel, B.; et al. Never-ending learning. Commun. ACM 2018, 61, 103–115. [Google Scholar] [CrossRef]
- Qi, G.J.; Luo, J. Small data challenges in big data era: A survey of recent progress on unsupervised and semi-supervised methods. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 44, 2168–2187. [Google Scholar] [CrossRef] [PubMed]
- Han, X.; Gao, T.; Yao, Y.; Ye, D.; Liu, Z.; Sun, M. OpenNRE: An Open and Extensible Toolkit for Neural Relation Extraction. In Proceedings of the EMNLP-IJCNLP: System Demonstrations, Hong Kong, China, 3–7 November 2019; pp. 169–174. [Google Scholar] [CrossRef]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Hruschka, E.R., Jr.; Duarte, M.C.; Nicoletti, M.C. Coupling as Strategy for Reducing Concept-Drift in Never-ending Learning Environments. Fundam. Informaticae 2013, 124, 47–61. [Google Scholar] [CrossRef]
- Serazzri, G.; Casale, G.; Bertoli, M. Java modelling tools: An open source suite for queueing network modelling andworkload analysis. In Proceedings of the Third International Conference on the Quantitative Evaluation of Systems-(QEST’06), Los Angeles, CA, USA, 11–14 September 2006; IEEE: Piscataway, NJ, USA,, 2006; pp. 119–120. [Google Scholar]
- Jain, R. The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling; Wiley: New York, NY, USA, 1991; Volume 1. [Google Scholar]
- Kim, S.Y.; Lee, J.; Kim, C.H.; Lee, W.J.; Kim, S.W. Extending the ONNX Runtime Framework for the Processing-in-Memory Execution. In Proceedings of the 2022 International Conference on Electronics, Information, and Communication (ICEIC), Granada, Spain, 22–25 October 2019; IEEE: Piscataway, NJ, USA, 2022; pp. 1–4. [Google Scholar]
- Følstad, A.; Skjuve, M. Chatbots for customer service: User experience and motivation. In Proceedings of the 1st International Conference on Conversational User Interfaces, Dublin, Ireland, 22–23 August 2019; pp. 1–9. [Google Scholar]
- Haugeland, I.K.F.; Følstad, A.; Taylor, C.; Bjørkli, C.A. Understanding the user experience of customer service chatbots: An experimental study of chatbot interaction design. Int. J. -Hum.-Comput. Stud. 2022, 161, 102788. [Google Scholar] [CrossRef]
- Følstad, A.; Taylor, C. Investigating the user experience of customer service chatbot interaction: A framework for qualitative analysis of chatbot dialogues. Qual. User Exp. 2021, 6, 6. [Google Scholar] [CrossRef]
- Bass, L.; Clements, P.; Kazman, R. Software Architecture in Practice; Addison-Wesley Professional: Boston, MA, USA, 2003. [Google Scholar]
- Tsinganos, N.; Fouliras, P.; Mavridis, I. Leveraging Dialogue State Tracking for Zero-Shot Chat-Based Social Engineering Attack Recognition. Appl. Sci. 2023, 13, 5110. [Google Scholar] [CrossRef]
- Zafar, M.H.; Bukhari, S.M.S.; Abou Houran, M.; Moosavi, S.K.R.; Mansoor, M.; Al-Tawalbeh, N.; Sanfilippo, F. Step towards secure and reliable smart grids in Industry 5.0: A federated learning assisted hybrid deep learning model for electricity theft detection using smart meters. Energy Rep. 2023, 10, 3001–3019. [Google Scholar] [CrossRef]
- Bukhari, S.M.S.; Zafar, M.H.; Abou Houran, M.; Moosavi, S.K.R.; Mansoor, M.; Muaaz, M.; Sanfilippo, F. Secure and privacy-preserving intrusion detection in wireless sensor networks: Federated learning with SCNN-Bi-LSTM for enhanced reliability. Ad Hoc Netw. 2024, 155, 103407. [Google Scholar] [CrossRef]
- Baevski, A.; Zhou, Y.; Mohamed, A.; Auli, M. wav2vec 2.0: A framework for self-supervised learning of speech representations. Adv. Neural Inf. Process. Syst. 2020, 33, 12449–12460. [Google Scholar]
Steps for Building an Ontology | Manual | Semi-Automatic with RPA |
---|---|---|
1. Domain Definition | 2 | 2 |
2. Existing Ontology Analysis | 2 | 2 |
3. Terms Definition | 5 | 0.5 |
4. Hierarchy Definition | 4 | 0 |
5. Property Definition | 6 | 0.5 |
6. Definition of Required Data and Relationships | 6 | 0.5 |
7. Rules and Restrictions Definition | 2 | 0.5 |
8. Validation | 5 | 2 |
9. Review | 5 | 5 |
Total | 37 | 9 |
Module | Average Execution Time (ms) |
---|---|
NLG | 659.69 |
PO_KM | 310.51 |
PO | 83.55 |
NLU | 44.80 |
PO_BT_KM | 16.68 |
ROUTER | 13.18 |
NLG_KM | 8.81 |
SESSION | 8.69 |
AC | 1.38 |
PO_BT | 0.04 |
BT | 0.03 |
BT_KM | 0.01 |
Before | Agreement Coupling | Variation | Agreement + Output Couplings | Variation | |
---|---|---|---|---|---|
Categories | 14 | 14 | 0% | 14 | 0% |
Instances | 114 | 260 | 128% | 298 | 161% |
Relationships | 52 | 52 | 0% | 52 | 0% |
Properties | 122 | 269 | 120% | 320 | 162% |
Iterations | 4 | 8 | 100% | 8 | 100% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Pinna, F.C.d.A.; Hayashi, V.T.; Néto, J.C.; Marquesone, R.d.F.P.; Duarte, M.C.; Okada, R.S.; Ruggiero, W.V. A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning. Appl. Sci. 2024, 14, 1585. https://doi.org/10.3390/app14041585
Pinna FCdA, Hayashi VT, Néto JC, Marquesone RdFP, Duarte MC, Okada RS, Ruggiero WV. A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning. Applied Sciences. 2024; 14(4):1585. https://doi.org/10.3390/app14041585
Chicago/Turabian StylePinna, Felipe Coelho de Abreu, Victor Takashi Hayashi, João Carlos Néto, Rosangela de Fátima Pereira Marquesone, Maísa Cristina Duarte, Rodrigo Suzuki Okada, and Wilson Vicente Ruggiero. 2024. "A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning" Applied Sciences 14, no. 4: 1585. https://doi.org/10.3390/app14041585
APA StylePinna, F. C. d. A., Hayashi, V. T., Néto, J. C., Marquesone, R. d. F. P., Duarte, M. C., Okada, R. S., & Ruggiero, W. V. (2024). A Modular Framework for Domain-Specific Conversational Systems Powered by Never-Ending Learning. Applied Sciences, 14(4), 1585. https://doi.org/10.3390/app14041585