Key Technologies of Intelligent Question-Answering System for Power System Rules and Regulations Based on Improved BERTserini Algorithm
Abstract
:1. Introduction
2. Background of the Technology
2.1. FAQ
2.2. BM25 Algorithm
2.3. Anserini
2.4. BERT Model
2.5. BERTserini Algorithm
3. Improved BERTserini Algorithm
3.1. Algorithm Description
- (1)
- Phase 1: Text Segmentation Stage
- (2)
- Phase 2: answer generation and source retrieval stage
3.2. Main Innovations
- (1)
- Multi-document long text preprocessing method which can process rules and regulations text and support answer provenance retrieval.
- (2)
- Determination of optimal parameters of Anserini and improved BERTserini algorithm.
- (3)
- Fine-tuning of multi-data sets for Bert reading comprehension model.
- (4)
- Clever use of FAQ.
4. Results Analysis of the Experiment
4.1. Data Description
4.1.1. Document Description
4.1.2. Fine-Tuning Dataset Description
4.1.3. BERT Model Description
4.1.4. Parameter Tuning Explanation for Improved BERTserini Algorithm
4.2. Document Preprocessing Performance
4.3. Question-Answering Performance
4.4. Comparison of Different Algorithms
4.5. Engineering Application
5. Conclusions
- (1)
- The improved BERTserini algorithm supports multi-document long text preprocessing for rules and regulations. This algorithm is capable of answering documents containing 30+ rules and regulations with a length of 30M+ bytes. This addresses the issue in the original BERTserini algorithm where document titles of regulatory documents were erroneously output as answers. Furthermore, it accurately provides the document name and chapter/page number information for answers that the original BERTserini algorithm could not identify. These enhancements significantly enhance the quality of answers and user experience in the question-answering system.
- (2)
- The improved BERTserini algorithm proposed in this paper underwent two rounds of fine-tuning using the CMRC2018 and the specialized dataset SPTI. Algorithm parameters were also optimized. The intelligent question-answering system built upon it demonstrates a more precise answer generation capability compared to the original BERTserini algorithm when addressing domain-specific questions.
- (3)
- The improved BERTserini algorithm proposed in this paper significantly enhances the exact match rate for intelligent question-answering in the domain of regulatory texts. Experimental data indicate that, compared to the original BERTserini algorithm, the exact match rate has increased by 69.5%, the R-value has improved by 53.6%, and the F1-value has risen by 63.7%. The algorithm maintains an average question–answer response time of within 400 milliseconds, meeting the requirements for engineering applications.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Shum, H.Y.; He, X.; Li, D. From Eliza to XiaoIce: Challenges and Opportunities with Social Chatbots. Front. Inf. Technol. Electron. Eng. 2018, 19, 10–26. [Google Scholar] [CrossRef]
- Xavier, A. Intelligence artificielle et psychiatrie: Noces d’or entre Eliza et Parry. Linform. Psychiatr. 2017, 93, 51–56. [Google Scholar]
- Hb, B.G.; Kumar, M.A.; Kp, S. Vector Space Model as Cognitive Space for Text Classification. arXiv 2017, arXiv:1708.06068. [Google Scholar] [CrossRef]
- Ma, P.; Jiang, B.; Lu, Z.; Li, N.; Jiang, Z. Cybersecurity Named Entity Recognition Using Bidirectional Long Short-Term Memory with Conditional Random Fields. Tsinghua Sci. Technol. 2021, 26, 259–265. [Google Scholar] [CrossRef]
- Mittal, A.; Agrawal, A.; Chouksey, A.; Shriwas, R. A Comparative Study of Chatbots and Humans. Int. J. Adv. Res. Comput. Commun. Eng. 2016, 5, 1055–1057. [Google Scholar]
- Jabberwacky Website. Available online: http://www.jabberwacky.com (accessed on 30 August 2023).
- Bohouta, G.; Kpuska, V.Z. Next-Generation of Virtual Personal Assistants (Microsoft Cortana, Apple Siri, Amazon Alexa and Google Home). In Proceedings of the IEEE CCWC 2018, the 8th IEEE Annual Computing and Communication Workshop and Conference, Las Vegas, NV, USA, 8–10 January 2018. [Google Scholar]
- Poushneh, A. Impact of auditory sense on trust and brand affect through auditory social interaction and control. J. Retail. Consum. Serv. 2021, 58, 102281. [Google Scholar] [CrossRef]
- Lei, X.; Tu, G.H.; Liu, A.X.; Ali, K.; Li, C.Y.; Xie, T. The Insecurity of Home Digital Voice Assistants—Amazon Alexa as a Case Study. arXiv 2017, arXiv:1712.03327. [Google Scholar] [CrossRef]
- Straga, D. Facebook Messenger as a Tool for Building Relationships with Customers: Bachelor Thesis. Ph.D. Thesis, Univerza v Ljubljani, Fakulteta za Družbene Vede, Ljubljana, Slovenia, 2017. [Google Scholar]
- Berdasco, A.; López, G.; Diaz, I.; Quesada, L.; Guerrero, L.A. User Experience Comparison of Intelligent Personal Assistants: Alexa, Google Assistant, Siri and Cortana. Proceedings 2019, 31, 51. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Dehouche, N. Plagiarism in the age of massive Generative Pre-trained Transformers (GPT-3): “The best time to act was yesterday. The next best time is now”. Ethics Sci. Environ. Polit. 2021, 21, 17–23. [Google Scholar] [CrossRef]
- Jain, N.; Jain, P.; Kayal, P.; Sahit, J.; Pachpande, S.; Choudhari, J. AgriBot: Agriculture-specific question answer system. Preprint 2019. [Google Scholar] [CrossRef]
- Gao, Z.; Feng, A.; Song, X.; Wu, X. Target-dependent sentiment classification with BERT. IEEE Access 2019, 7, 154290–154299. [Google Scholar] [CrossRef]
- Yang, W.; Xie, Y.; Lin, A.; Li, X.; Tan, L.; Xiong, K.; Li, M.; Lin, J. End-to-End Open-Domain Question Answering with Bertserini. arXiv 2019, arXiv:1902.01718. [Google Scholar]
- Abo Khamis, M.; Ngo, H.Q.; Rudra, A. FAQ: Questions Asked Frequently. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, San Francisco, CA, USA, 26 June–1 July 2016. [Google Scholar] [CrossRef]
- Kadhim, A.I. Term Weighting for Feature Extraction on Twitter: A Comparison between BM25 and TF-IDF. In Proceedings of the 2019 International Conference on Advanced Science and Engineering (ICOASE), Zakho, Iraq, 2–4 April 2019; pp. 124–128. [Google Scholar] [CrossRef]
- Robertson, S.E.; Walker, S.; Jones, S.; Hancock-Beaulieu, M.M.; Gatford, M. Okapi at TREC-3. Nist Spec. Publ. SP 1995, 109, 109. [Google Scholar]
- Yang, P.; Fang, H.; Lin, J. Anserini: Reproducible Ranking Baselines Using Lucene. J. Data Inf. Qual. (JDIQ) 2018, 10, 1–20. [Google Scholar] [CrossRef]
- Cui, Y.; Che, W.; Liu, T.; Qin, B.; Yang, Z. Pre-Training with Whole Word Masking for Chinese Bert. IEEE/ACM Trans. Audio Speech Lang. Process. 2021, 29, 3504–3514. [Google Scholar] [CrossRef]
- Cui, Y.; Liu, T.; Che, W.; Xiao, L.; Chen, Z.; Ma, W.; Wang, S.; Hu, G. A span-extraction dataset for Chinese machine reading comprehension. arXiv 2018, arXiv:1810.07366. [Google Scholar]
- Shao, C.C.; Liu, T.; Lai, Y.; Tseng, Y.; Tsai, S. DRCD: A Chinese machine reading comprehension dataset. arXiv 2018, arXiv:1806.00920. [Google Scholar]
- Rajpurkar, P.; Zhang, J.; Lopyrev, K.; Liang, P. Squad: 100,000+ questions for machine comprehension of text. arXiv 2016, arXiv:1606.05250. [Google Scholar]
- Bert Website. Available online: https://github.com/google-research/bert (accessed on 11 March 2020).
Question | Standard Answer | Original BERTserini Algorithm | Improved BERTserini Algorithm | ||||
---|---|---|---|---|---|---|---|
Answer | Whether Exact Match | Trace the Source and Results of the Answers | Answer | Whether Exact Match | Trace the Source and Results of the Answers | ||
When should the audited units send the relevant documents and information to the professional audit teams? | The audited unit should send the relevant documents and information 5 working days before the audit. | The audited unit should send the relevant documents and information 5 working days before the audit. | Yes | No | 5 working days before the audit. | Yes | Yes (×× Power Grid Co., LTD. Safety Production Risk Management System Audit Business Guide 5.1.5) |
What is the key inspection content of quarterly safety production? | At the end of each quarter, the safety supervision department at all levels shall determine the key contents of supervision in the next quarter according to the annual work plan, seasonal characteristics, and key work arrangements. | Quarterly safety production focus supervision within. | No | No | At the end of each quarter, the safety supervision department at all levels shall determine the key contents of supervision in the next quarter according to the annual work plan, seasonal characteristics, and key work arrangements. | Yes | Yes (×× Power Grid Co., LTD. Safety Production Risk Management System Audit Business Guide 5.2.2) |
What does correction mean? | Measures taken to eliminate nonconformities that have been identified. | Correction means the elimination of discrepancies that have been found. | No | No | Measures taken to eliminate nonconformities that have been identified. | Yes | Yes (×× Power Grid Co., LTD. Safety Zone Representative Management Service Guide 4.5) |
What is the safety supervision department directly under the company responsible for? | To organize the preparation and issuance of the annual safety measure plan of the unit, supervise and evaluate the implementation of the safety measure plan of the unit and the power supply units at the county. | The safety supervision department of each unit directly under the company is responsible for organizing and compiling. | No | No | To organize the preparation and issuance of the annual safety measure plan of the unit, supervise and evaluate the implementation of the safety measure plan of the unit and the power supply units at the county. | Yes | Yes (×× Power Grid Co., LTD. Safety zone Representative Management Service Guide 5.1.2) |
What is an electric utility? | A general term for equipment related to generation, transformation, transmission, distribution and supply used in power systems. | Utility applied to electricity. | No | No | A general term for equipment related to generation, transformation, transmission, distribution and supply used in power systems. | Yes | Yes (×× Power Grid Co., LTD. Power Safety Working Regulations 3.3) |
Algorithm | Content | EM | R | F1 | |||
---|---|---|---|---|---|---|---|
Value | Percentage of Improvement | Value | Percentage of Improvement | Value | Percentage of Improvement | ||
Algorithm 1 | Original BERTserini | 0.261 | —— | 0.453 | —— | 0.331 | —— |
Algorithm 2 | Document preprocessing + Original BERTserini +Fine-Tuning (CMRC2018) + Parameter tuning | 0.502 | 48% | 0.783 | 42.1% | 0.615 | 46.1% |
Algorithm 3 | Document preprocessing + Original BERTserini + Fine-Tuning (CMRC2018) + Parameter tuning + Fine-Tuning (SPTI) | 0.702 | 62.8% | 0.919 | 50.7% | 0.796 | 58.4% |
Algorithm 4 | Document preprocessing + Original BERTserini + Fine-Tuning (CMRC2018) + Parameter tuning + Fine-Tuning (SPTI) + FAQ | 0.856 | 69.5% | 0.976 | 53.6% | 0.912 | 63.7% |
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. |
© 2023 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
Gao, M.; Li, M.; Ji, T.; Wang, N.; Lin, G.; Wu, Q. Key Technologies of Intelligent Question-Answering System for Power System Rules and Regulations Based on Improved BERTserini Algorithm. Processes 2024, 12, 58. https://doi.org/10.3390/pr12010058
Gao M, Li M, Ji T, Wang N, Lin G, Wu Q. Key Technologies of Intelligent Question-Answering System for Power System Rules and Regulations Based on Improved BERTserini Algorithm. Processes. 2024; 12(1):58. https://doi.org/10.3390/pr12010058
Chicago/Turabian StyleGao, Ming, Mengshi Li, Tianyao Ji, Nanfang Wang, Guowu Lin, and Qinghua Wu. 2024. "Key Technologies of Intelligent Question-Answering System for Power System Rules and Regulations Based on Improved BERTserini Algorithm" Processes 12, no. 1: 58. https://doi.org/10.3390/pr12010058
APA StyleGao, M., Li, M., Ji, T., Wang, N., Lin, G., & Wu, Q. (2024). Key Technologies of Intelligent Question-Answering System for Power System Rules and Regulations Based on Improved BERTserini Algorithm. Processes, 12(1), 58. https://doi.org/10.3390/pr12010058