Method of Text Generation Based on the BERT LLM
Keywords
Abstract
The application of the BERT language model for tasks of term search and generation in terminological knowledge bases (TKB) with optimization for intelligent chatbots is proposed. The architecture of the BERT model, its bidirectional attention mechanism, text processing algorithms, and the main stages of model training are described. The use of BERT for semantic search of terms and methods for adapting the model for text generation, considering the semantic value of each term, are considered. A comparative analysis of the BERT language model with models from the GPT series is carried out, highlighting the strengths and weaknesses of BERT in the context of search and generative tasks. The paper also thoroughly examines metrics for evaluating the quality of term search, such as Precision, Recall, F1-score, Mean Reciprocal Rank (MRR), Normalized Discounted Cumulative Gain (nDCG), and others, which allow for a comprehensive assessment of the effectiveness of term search and generation. Practical aspects of integrating BERT into knowledge management systems are discussed, and recommendations are provided for fine-tuning the model for specialized TKBs. Additionally, the ethical aspects of using language models are emphasized, particularly the risks of bias in term search and generation, as well as the importance of ensuring accuracy and objectivity in the generated results. The responsible use of BERT is discussed to avoid incorrect or harmful conclusions during the automatic processing of knowledge. Software was developed for testing the BERT language model, and training of the language model was tested on various datasets. The testing results demonstrated the high efficiency of using the BERT language model, considering optimizations for text generation tasks. Potential improvements to BERT for working with TKBs are discussed, including methods for fine-tuning the model on domain-specific data, using the multilingual version of BERT for processing multilingual knowledge bases, as well as optimization techniques for improving performance in resource-constrained environments. Approaches for testing and evaluating search effectiveness are proposed, including the use of expert evaluations and automatic metrics. The final part of the article outlines future research directions, including the integration of BERT with neural search systems, automatic generation of new terms, and the expansion of knowledge management systems’ functionality based on deep learning.
