Intelligent question answering system construction method and system based on LLM large language model

Through the intelligent question-answer system construction method based on the LLM large language model, the problem that existing systems cannot effectively understand user intentions and meet diversified needs is solved, and a high accuracy and correlation question-and-answer system is realized, which promotes the development of intelligent question-and-answer technology.

CN119691140AInactive Publication Date: 2025-03-25HANGZHOU BYTE ARK TECH CO LTD

Patent Information

Application Number
CN202510213588.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing intelligent question-answer system cannot effectively understand the user's question intentions and the deep meaning of the text, resulting in the limitation of the accuracy and relevance of the answers, and the single question-and-answer model cannot meet the diverse needs of users in different fields, especially in professional fields and complex questions.

Method used

The intelligent question-and-answer system construction method based on the LLM large language model is adopted. By aggregating corpus from multiple heterogeneous data sources, dynamically grabbing text data related to the target field, performing preliminary screening and diversity analysis, generating diversified text data, and performing multi-level semantic annotation, the training samples are finally converted into standard format samples for training the LLM large language model.

Benefits of technology

It has effectively improved the intelligence level of the intelligent question-and-answer system in various application scenarios, met the diverse needs of users, improved the accuracy and relevance of answers, and promoted the further development of intelligent question-and-answer technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691140A_ABST
    Figure CN119691140A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question answering system construction method and system based on an LLM large language model, and the method comprises the steps: carrying out the corpus aggregation from a plurality of heterogeneous data sources, and dynamically capturing the text data related to a target domain; preliminarily screening the text data, and based on semantic similarity and a text quality scoring rule, removing redundant and low-quality text data or text data irrelevant to a target field; performing diversity analysis on the text data, and generating diversified text data with high similarity with real data through an adversarial generation technology; performing multi-level semantic annotation on the text data, and generating a training sample by analyzing context information in the annotated corpus; and converting the training sample into a standard format sample, and training an LLM large language model by using the standard format sample to serve as an intelligent question-answering system of a target domain. By utilizing the embodiment of the invention, the intelligent level of the intelligent question-answering system in various application scenes can be effectively improved, and further development of the intelligent question-answering technology is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular to a method and system for constructing an intelligent question-answering system based on an LLM large language model. Background Art

[0002] With the rapid development of information technology and the popularization of the Internet, massive amounts of text data are continuously generated in various fields. These data contain rich knowledge and information, providing valuable resources for various applications. In this context, intelligent question-answering systems, as an emerging artificial intelligence application, have attracted more and more attention. Intelligent question-answering systems can quickly obtain relevant information from multiple data sources based on the questions raised by users, and answer them in the form of natural language, greatly improving the efficiency of information acquisition.

[0003] Traditional question-answering systems mostly rely on rule bases or keyword retrieval, which cannot effectively understand the user's question intent and the deep meaning of the text, resulting in limited accuracy and relevance of the answers. In addition, with the diversification of user needs, a single question-answering model cannot meet the needs of users in different fields, especially in professional fields and complex problems, where its limitations are more obvious. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for constructing an intelligent question-answering system based on the LLM large language model, so as to solve the deficiencies in the prior art, effectively improve the intelligence level of the intelligent question-answering system in various application scenarios, meet the diverse needs of users, and promote the further development of intelligent question-answering technology.

[0005] An embodiment of the present application provides a method for constructing an intelligent question answering system based on an LLM large language model, the method comprising: Aggregate corpora from multiple heterogeneous data sources and dynamically capture text data related to the target domain; Perform a preliminary screening of the captured text data, and remove redundant, low-quality, or text data irrelevant to the LLM large language model training in the target field based on semantic similarity and text quality scoring rules; Conduct diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and generate diverse text data with high similarity to real data through adversarial generation technology; Perform multi-level semantic annotation on the generated text data, and generate training samples by analyzing the contextual information in the annotated corpus; The generated training samples are converted into standard format samples for training the LLM large language model in the target domain, and the LLM large language model is trained using the standard format samples to obtain a trained LLM large language model as the intelligent question-answering system in the target domain.

[0006] Optionally, the captured text data is preliminarily screened to remove redundant, low-quality or irrelevant text data based on the LLM large language model training in the target domain based on semantic similarity and text quality scoring rules, including: Using the Flesch-Kincaid readability test to evaluate the readability of the text data, obtaining first text data having a readability higher than a first preset threshold; In combination with natural language processing technology, the first text data is checked for grammatical and spelling errors, and the text with errors is removed to obtain second text data; The similarity between the second text data and the keyword library related to the target field is calculated using semantic matching technology to evaluate the semantic similarity, and obtain third text data whose similarity is higher than a second preset threshold.

[0007] Optionally, the screened text data is subjected to diversity analysis to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and adversarial generation technology is used to generate diversified text data with high similarity to real data, including: Extracting multiple features from the screened text data, the features including context features, writing style features, and domain knowledge features; Perform cluster analysis on the extracted features and calculate the similarity between the feature categories after clustering to evaluate the diversity of text data; Generate new text data that is semantically similar to existing text data using a generative adversarial network model; The discriminant model of the adversarial generative network is used to evaluate whether the generated new text data is authentic and meets the expected diversity standards. The discriminant model will perform adversarial training with the generative model to continuously optimize the generated new text data to make it as authentic and diverse as possible, and ultimately obtain diversified text data with a high degree of similarity to the real text data.

[0008] Optionally, the generated text data is subjected to multi-level semantic annotation, and training samples are generated by analyzing context information in the annotated corpus, including: The generated text data is annotated with entities, relationships, sentiments, and topics, and the annotation results of entities, relationships, sentiments, and topics are merged into a comprehensive annotation information table to ensure that the annotations at each level of each text can correspond one to one; Perform sentence-level and paragraph-level analysis of contextual information on the annotated text data. Analyze each sentence and paragraph of the annotated text data, identify key sentences and important information points through context association, and generate training samples containing multiple sentences with semantic coherence to improve the comprehension ability of the LLM large language model to be trained.

[0009] Another embodiment of the present application provides a system for constructing an intelligent question answering system based on an LLM large language model, the system comprising: The crawling module is used to aggregate corpora from multiple heterogeneous data sources and dynamically crawl text data related to the target field; The screening module is used to perform preliminary screening on the captured text data, and remove redundant, low-quality or text data irrelevant to the LLM large language model training in the target field based on semantic similarity and text quality scoring rules; The analysis module is used to perform diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and to generate diversified text data with high similarity to real data through adversarial generation technology; The generation module is used to perform multi-level semantic annotation on the generated text data and generate training samples by analyzing the context information in the annotated corpus; The training module is used to convert the generated training samples into standard format samples for LLM large language model training in the target domain, and use the standard format samples to train the LLM large language model to obtain the trained LLM large language model as the intelligent question-answering system in the target domain.

[0010] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0011] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0012] Compared with the prior art, the present invention provides a method for constructing an intelligent question-answering system based on an LLM large language model, which aggregates corpora from a variety of heterogeneous data sources and dynamically captures text data related to a target field; preliminarily screens text data and removes redundant, low-quality or text data irrelevant to the target field based on semantic similarity and text quality scoring rules; analyzes the diversity of text data and generates diversified text data with high similarity to real data through adversarial generation technology; annotates text data with multi-level semantics and generates training samples by analyzing contextual information in the annotated corpus; converts the training samples into standard format samples and uses the standard format samples to train the LLM large language model as an intelligent question-answering system in the target field, thereby effectively improving the intelligence level of the intelligent question-answering system in various application scenarios, meeting the diverse needs of users, and promoting the further development of intelligent question-answering technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A hardware structure block diagram of a computer terminal for a method for constructing an intelligent question-answering system based on an LLM large language model provided by an embodiment of the present invention; Figure 2 A flowchart of a method for constructing an intelligent question-answering system based on an LLM large language model provided by an embodiment of the present invention; Figure 3 A structural diagram of a system for building an intelligent question-answering system based on an LLM large language model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0015] The embodiment of the present invention first provides a method for constructing an intelligent question-answering system based on an LLM large language model. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, etc.

[0016] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for constructing an intelligent question-answering system based on the LLM large language model provided by an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0017] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any method for constructing an intelligent question-answering system based on the LLM large language model.

[0018] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0019] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for constructing an intelligent question-answering system based on the LLM large language model.

[0020] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0021] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0022] See also Figure 2 The embodiment of the present invention provides a method for constructing an intelligent question answering system based on an LLM large language model, which may include the following steps: S201, aggregate corpora from multiple heterogeneous data sources and dynamically capture text data related to the target domain; This step involves dynamically crawling text data related to the target domain. These data sources can include web content, databases, social media, document libraries, etc. Through automated crawling technology, the system can obtain the latest information and knowledge in real time, ensuring that the collected text data not only covers a wide range of topics and fields, but also maintains timeliness and relevance. The process of aggregating heterogeneous data sources needs to consider the diversity and multi-dimensional characteristics of the data in order to form a comprehensive knowledge base and provide solid support for subsequent text processing and model training.

[0023] In the process of building an intelligent question-answering system based on the LLM large language model, the first step involves aggregating corpora from multiple heterogeneous data sources and dynamically crawling text data related to the target field. The specific implementation method can be to extract text information from different types of data sources (such as news websites, social media, academic paper databases, industry forums, etc.) by using web crawler technology. The key to this stage is to design an efficient crawling strategy to ensure the diversity of data sources and the richness of information. With the development of deep learning technology, the crawling rules for different websites can be adjusted in time, so that the system can cope with the structure and format of different websites, extract valuable content by parsing HTML documents, remove advertisements, comments and non-critical information, and obtain more accurate corpus.

[0024] During the crawling process, it is also necessary to combine API interfaces to crawl structured data, such as obtaining user-generated content on social media platforms or using open academic search engines to obtain the latest research results in related fields. In this process, natural language processing technology can be introduced to pre-screen the crawled data using strategies such as keywords and subject terms to ensure that the collected text data is closely related to the target field. In addition, the dynamic crawling mechanism should update the data regularly to timely reflect new developments and trends in the target field, thereby maintaining the timeliness and relevance of the text information. These steps will lay a solid foundation for subsequent data cleaning and analysis.

[0025] Finally, in order to ensure the quality and integrity of the captured data, a preliminary quality check can be performed on the text after data collection. For example, some basic conditions can be set to filter the data, such as text length, language quality, information integrity, etc., to eliminate text data that obviously does not meet the standards. At this point, machine learning algorithms can be used to automatically annotate and classify the captured text so that high-quality training samples can be provided for subsequent machine learning model training. Through the above steps, corpora from multiple heterogeneous data sources can be effectively aggregated, thereby providing rich and targeted text input for the core modules of building intelligent question-answering systems.

[0026] Taking the construction of an intelligent question-answering system for the medical and health field as an example, first of all, in terms of the selection of data sources, relevant text data can be obtained from multiple heterogeneous channels. These channels can include medical professional websites, scientific research paper databases (such as PubMed), online medical forums, social media platforms (such as Twitter, WeChat public accounts), and reports and guidelines issued by governments and public health organizations. The diversity of these data sources not only ensures a wide coverage of information, but also provides the system with reference materials from different perspectives. In order to achieve dynamic crawling, it is first necessary to establish a list of data sources and use crawler technology to regularly visit these websites to obtain the latest updated content. This process can be achieved by setting a scheduling strategy for the crawler, such as regular crawling updates every day or every week to ensure the freshness and relevance of the data.

[0027] Secondly, in the captured text data, the content needs to be initially screened and classified. This can be done with the help of natural language processing technology to extract keywords and identify topics from the acquired information. For example, in the field of medical health, a set of keyword libraries can be developed to cover important terms such as disease names, symptoms, and treatment methods, and keyword matching can be performed on the text when crawling data. At the same time, the relevance of each text to the target field is evaluated through a machine learning model, and those with low relevance or completely irrelevant content are excluded. At this point, some indicators such as tf-idf (term frequency inverse document frequency) and cosine similarity can be used to quantify the relevance of the text, thereby ensuring that the screened text can effectively reflect the knowledge system of the target field.

[0028] Finally, in order to enhance the intelligence of the system and its ability to respond to diverse user questions, the aggregated text data should be representative and diverse. This can be achieved by semantically analyzing and grouping the captured text. For example, clustering algorithms can be used to group texts to identify different writing styles, subject categories, or contextual backgrounds. This process not only ensures that the system has a broad information base when answering questions, but also can handle different types of questions from users, such as common questions, specific case analysis, or the latest research trends. Ultimately, after this series of steps, a set of high-quality and highly relevant text corpora will lay a solid foundation for subsequent LLM model training, thereby improving the overall performance and user experience of the intelligent question-answering system.

[0029] S202, preliminarily screening the captured text data, and removing redundant, low-quality, or text data irrelevant to the LLM large language model training in the target domain based on semantic similarity and text quality scoring rules; Preliminary screening of captured text data is an important part of building an intelligent question-answering system. It aims to eliminate redundant, low-quality, or text data that is irrelevant to the LLM model training in the target field through semantic similarity and text quality scoring rules. In this process, the text data will first be evaluated for its readability, grammatical correctness, and emotional tendency to ensure that the acquired text not only meets the basic norms of the language, but also provides an accurate information basis for subsequent model training. Through this systematic screening, noise data can be effectively removed, ensuring that the text processed later has a high quality and retaining valuable information to the maximum extent.

[0030] The role of preliminary screening is to improve data processing efficiency and the effectiveness of model training. Strictly screened text data ensures language fluency and logical coherence, thereby improving the accuracy and answer quality of the model in question-answering tasks. In addition, by eliminating redundant and low-quality data, it can not only reduce labor costs and resource waste, but also avoid misleading the model during training, thereby promoting the intelligent response ability of the question-answering system in complex contexts. Ultimately, the screened high-quality text data lays a solid foundation for subsequent training and application, and enhances the reliability of the system and user experience.

[0031] In the judgment of semantic similarity and text quality scoring rules, the system will use a variety of natural language processing technologies. This process mainly includes two key aspects: first, the evaluation of semantic similarity, and second, the quantification of text quality scores. In order to judge the relevance of the text to the target field, the system will build a domain keyword library. For example, in the field of science and technology, this library may include keywords such as "artificial intelligence", "machine learning", and "deep learning". The system will use word embedding technology (such as Word2Vec or BERT) to convert text data and words in the keyword library into vector representations. Next, the similarity between the text vector and the keyword vector is calculated, and cosine similarity is usually used as a measurement indicator. Suppose an article involves "machine learning applied to medicine", and its similarity with the keyword "machine learning" is 0.85. If the threshold is set to 0.7, the article is considered to be related to the target field.

[0032] On the other hand, text quality scoring rules can be based on multi-dimensional indicators such as the Flesch-Kincaid readability test, grammar checking, and spelling verification. The readability test generates a score by analyzing sentence length and the number of syllables in a word. A score above 60 usually indicates that the text is easy to understand. At the same time, the system uses spelling checkers to identify spelling errors in the text and uses grammatical analysis techniques to detect grammatical structure problems in the text. All these indicators are summarized into a comprehensive quality score. When an article has a low readability score or contains a large number of spelling and grammatical errors, it is marked as low-quality text and will be removed. In this way, the system can ensure that the retained text is both highly relevant to the target field and has good language quality, laying the foundation for subsequent model training.

[0033] For example, the system first extracts keywords from the captured text data, and uses natural language processing technology to segment words, remove stop words, and perform part-of-speech tagging. In this process, assuming that an article about "the application of artificial intelligence in health monitoring" is captured, the system will identify core words such as "artificial intelligence" and "health monitoring". Based on the created keyword library, the system will use word embedding technology to convert the article and the words in the keyword library into vectors. By calculating the cosine similarity between these vectors, if the similarity between the article and the keyword "artificial intelligence" is 0.82, and the similarity with "health monitoring" is 0.76, and the similarity threshold is set to 0.75, then the article will be considered semantically related to the target field.

[0034] In terms of text quality scoring, the system will first conduct a Flesch-Kincaid readability test on the same article. Assuming the score is 58, this means that the readability of the text is slightly low. In addition, the system will perform a grammar check and find that there are two spelling errors and one tense error in the text. Combining the readability score with the number of grammatical and spelling errors can generate a comprehensive quality score. For example, if the minimum acceptable readability score is set to 60 and there are no more than two grammatical errors, the article will eventually be marked as low quality due to insufficient readability and grammatical errors and will be removed from the data set. Through this comprehensive evaluation mechanism, the system ensures that the retained text data not only meets the domain requirements in terms of semantics, but also meets the corresponding standards in terms of language quality, thereby providing high-quality input for subsequent training models.

[0035] Specifically, in one implementation, the readability of the text data may be evaluated using the Flesch-Kincaid readability test to obtain first text data having a readability higher than a first preset threshold; The Flesch-Kincaid readability test is an important tool for evaluating text readability. It calculates the sentence length and vocabulary difficulty of the text and outputs a readability score. This step uses this test to make a preliminary assessment of the captured text data and screen out texts with readability higher than the first preset threshold. In this way, it can ensure that the selected text has a certain degree of fluency and clarity in language, laying a good foundation for subsequent processing.

[0036] By using the Flesch-Kincaid readability test, the intelligent question-answering system can effectively filter out texts that are difficult to understand or have unclear language, thereby improving the readability and quality of the selected text. This provides users with more understandable information, while improving the adaptability of language use during model training, thereby improving the quality and accuracy of the question-answering system's response to user queries.

[0037] Before conducting the Flesch-Kincaid readability test, the system will first preprocess the initially captured text data. This process includes removing HTML tags, special characters, and extra spaces to ensure the neatness of the text content. After preprocessing, the system will segment the sentences of each text and divide them into paragraphs to prepare for the subsequent readability analysis. The core of the Flesch-Kincaid test is to calculate the sentence length and the number of syllables in the text, and the system generates a readability score based on these indicators.

[0038] Next, the system will set a first preset threshold, such as 60, indicating that texts above this value will be considered easy to understand. After calculating the readability score of each text, the system will compare the score with the preset threshold one by one to filter out the texts that meet the conditions. The qualified texts will be marked as "highly readable" texts to form a preliminary data set. Otherwise, the system will record these texts as "low readability" and mark them for subsequent processing. This process not only improves the overall quality of the text, but also paves the way for subsequent data analysis.

[0039] Finally, after the readability test, the system will generate a readability analysis report, which contains the original score of each text, the analysis results, and a label indicating whether it passes the readability threshold. This report is not only used to evaluate the quality of the captured data, but also provides a reference for subsequent text screening and processing steps. Through this series of operations, the first text dataset finally obtained by the system will be high-quality, easy-to-understand text, laying a solid foundation for subsequent semantic analysis and model training.

[0040] In combination with natural language processing technology, the first text data is checked for grammatical and spelling errors, and the text with errors is removed to obtain second text data; In this phase, we use natural language processing technology to detect grammar and spelling errors in the first text data, and use various grammar detection tools and language models to comprehensively scan the language errors that may exist in the text. This process not only covers the detection of basic language rules such as spelling and grammar, but also can identify logical inconsistencies in the context, thereby ensuring that the selected text has high accuracy and expressiveness at the language level.

[0041] By strictly checking the grammar and spelling of text data, the error rate in the model training process can be effectively reduced, and the overall language quality of the question-answering system can be improved. Excluding text with language errors ensures that the training data that the model relies on has clear and accurate information, so that the system can provide more professional and reliable answers when answering user questions, enhancing the user experience.

[0042] After completing the screening of the first text data set, the system will enter the stage of grammar and spelling detection of the text. First, the system will use spelling check tools, usually based on dictionary algorithms, to automatically identify spelling errors in the text. This process involves matching each word in the text, and if a word that is not in the dictionary is found, it will be marked as a potential spelling error. In addition, the system provides users with some spelling suggestions so that users can choose to replace or modify the wrong word, thereby improving the accuracy and readability of the text.

[0043] Next, the system will further use natural language processing technology to perform grammatical analysis. By parsing the syntactic structure of each sentence, the system will identify possible grammatical errors, such as subject-verb inconsistency, tense errors, and improper usage. This process can rely on a pre-trained language model. The system can judge the rationality of the grammar based on the context and generate an error report for each text. The system will list all errors found in the text to facilitate subsequent corrections and reviews. If multiple errors are found in a text and the number of errors exceeds the set threshold (for example, five), the system will decide to remove the entire text to ensure the overall quality of the final output data set.

[0044] Finally, after spelling and grammar checking, the system will generate a second-screened data set, called the second text data set. This data set contains only high-quality text that has been corrected, laying the foundation for subsequent semantic matching and text analysis. At this stage, the system will provide a comparison between the incorrectly marked text and the correct version for subsequent review and improvement of text quality. In this way, after two rounds of screening, the system ensures that the stored text is grammatically accurate and spelled correctly, effectively reducing the negative impact of low-quality text on subsequent model training.

[0045] The similarity between the second text data and the keyword library related to the target field is calculated using semantic matching technology to evaluate the semantic similarity, and obtain third text data whose similarity is higher than a second preset threshold.

[0046] This step uses semantic matching technology to calculate the similarity between the second text data and the preset target domain keyword library, uses a vector space model or other semantic representation methods to represent the text data and keywords as vectors, and compares the cosine similarity. This method can evaluate the degree of relevance between the selected text and the domain at each step, ensuring that the question-answering system fundamentally maintains a high degree of relevance to the target domain information.

[0047] The main significance of this step is to ensure that the selected text is not only linguistically understandable, but also highly consistent with the target domain in terms of content. By filtering out text that is not relevant to the target domain, the intelligent question-answering system can process user queries more specifically, improve the accuracy and professionalism of the answers, and make the system more valuable in practical applications.

[0048] After obtaining the second text dataset, the system will build a keyword library closely related to the target field. This keyword library will include core concepts, terms, and important topics. For example, in the field of healthcare, the keyword library may include various disease names, symptom descriptions, treatment methods, and related medical terms. The system can also use existing medical literature, databases, and the opinions of industry experts to enrich this keyword library to ensure that it covers a wide range of knowledge in the target field. The construction of the keyword library will provide a basis for subsequent semantic matching.

[0049] The system will then perform semantic matching on the second text data and the keywords in the keyword library. Specifically, the system will use word embedding technology to convert text data and keywords into vector representations. This process usually uses a pre-trained language model, such as Word2Vec or BERT, to map each word to a high-dimensional space to capture the semantic information of the word. The system calculates the similarity between each text and the keyword, and the common method is cosine similarity. Through this mathematical calculation, the system is able to identify the relevance of the text to the target field, allowing for deeper analysis.

[0050] Finally, the system sets a second preset threshold, such as 0.75, as a screening criterion for text similarity.

[0051] Based on the calculated similarity, the system will filter out all texts above the threshold to form a third text dataset. This dataset will be highly relevant and practical texts, and its content can play an important role in subsequent model training. Through this process, the system effectively gathers high-quality texts that are closely related to the target field, ensuring that the trained model can acquire rich domain knowledge and provide effective information support in the intelligent question-answering system.

[0052] S203, performing diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and generating diversified text data with high similarity to real data through adversarial generation technology; This process mainly involves extracting information of multiple dimensions such as context features, writing style features, and domain knowledge features from the screened text data. Afterwards, the similarity between different feature categories is calculated through cluster analysis and other techniques to evaluate the diversity of text data. Through this analysis, it can be determined whether the text data covers a wide range of expressions and styles, which ensures that the system can respond to the query needs of different users and generate rich and diverse answers. On this basis, adversarial generation technology is used to generate diversified text data that is highly semantically similar to real data to enhance the expressiveness and robustness of the model.

[0053] The main purpose of diversity analysis of the filtered text data is to ensure that the intelligent question-answering system can cover a variety of contexts, writing styles, and domain knowledge to adapt to the needs and questioning methods of different users. By generating diverse text data, the system can not only improve its ability to respond to complex queries, but also enhance the richness of generated answers and avoid user fatigue caused by a single answer. At the same time, diverse training data helps to improve the generalization ability of the model, so that it can still make accurate and natural responses when faced with different scenarios or new questions. Therefore, this process is of great significance to improving the user experience and practicality of the intelligent question-answering system.

[0054] Specifically, multiple features can be extracted from the filtered text data, including context features, writing style features, and domain knowledge features; In this step, the filtered text data is first analyzed to extract a variety of features. These features can help the system understand the diversity of the data. For example, contextual features involve the background and context of the text, writing style features focus on the language style of the text, such as formal or informal expressions, and domain knowledge features focus on the expertise and terminology involved in the text. The extraction of these features provides a rich information foundation for the subsequent diversity assessment and generation stages, enabling the system to fully grasp the diverse nature of the data.

[0055] Extracting multiple features can provide the intelligent question-answering system with more detailed understanding and analysis capabilities, allowing the model to adapt to different user needs. For example, by identifying context and writing style features, the system can better understand the user's intention to ask questions and choose the appropriate answer. The extraction of domain knowledge features ensures that the system can provide accurate and in-depth answers in professional fields. Overall, the extraction of these features not only optimizes the performance of the model, but also improves the intelligence of the question-answering system.

[0056] In this step, we first systematically analyze the filtered text data through natural language processing (NLP) technology. For each text, we use word frequency analysis tools to extract high-frequency words and record their context. At the same time, we combine text classification and topic modeling methods (such as latent Dirichlet allocation LDA) to identify the main topics and potential contextual features in the text. This process will help confirm the theme of the text, thereby providing basic data for subsequent clustering analysis. Through such analysis, we can better understand the use of text in different scenarios and the meaning it conveys.

[0057] Secondly, for the extraction of writing style features, syntactic analysis tools can be used to conduct in-depth analysis of the sentence structure of the text. For example, syntactic tree analysis can be used to determine the components of a sentence, extract the length, complexity, and rhetoric used in the sentence (such as metaphor, parallelism, etc.). In addition, emotional tendencies can be evaluated, and the emotional color of the text can be determined by combining the sentiment analysis model. Through the extraction of these features, the style and tone of the text can be fully captured, making the extracted features have a higher dimension and fully reflecting the diversity of the text.

[0058] Finally, in the process of extracting domain knowledge features, we can combine external knowledge graphs and professional terminology libraries to identify important proper nouns and terms involved in the text. By identifying industry-specific vocabulary, we can ensure that the text covers the required domain-specific knowledge. This process can also supplement and optimize the extraction of domain features by mining relevant literature and input from domain experts, ensuring that the generated features can truly reflect the domain involved in the text and its related knowledge.

[0059] Perform cluster analysis on the extracted features and calculate the similarity between the feature categories after clustering to evaluate the diversity of text data; In this step, the system clusters the extracted features to identify the similarity relationships between different feature categories. The clustering algorithm groups text data by similarity to form different feature categories. This analysis not only helps the system identify the diversity within the text data, but also provides a reference and basis for generating new text data. By calculating the similarity of the features after clustering, the system can evaluate the differences between texts, thereby guiding the direction of subsequent generation of diversified texts.

[0060] The implementation of cluster analysis can help the intelligent question-answering system better organize and process data. By evaluating the diversity of text data, the system can ensure that the generated text can cover a wider range of fields and expressions in terms of semantics and style, which is particularly important for improving the adaptability of the model. Ultimately, based on this understanding of diversity, the system can more effectively meet the questions of different users in practical applications and provide rich and personalized answers.

[0061] In the clustering analysis stage, the first thing to do is to convert the extracted features into a vector form suitable for clustering. Word embedding technology (such as Word2Vec or GloVe) can be used to vectorize the features of the text, which can better reflect its semantic hierarchy. Then, select a suitable clustering algorithm (such as K-means or DBSCAN) to classify these feature vectors. The goal of clustering is to classify similar features into one category while maintaining the distinction between different features to ensure the diversity of the text in terms of features.

[0062] By analyzing the clustering results and using evaluation indicators such as the silhouette coefficient, we can quantify the internal consistency of each feature category and the degree of separation between different categories. If the silhouette coefficient of a feature category is too low, it means that the texts of this feature category have a high degree of similarity and may lack the necessary diversity. In this case, we can further explore the structure of the data set, consider re-dividing the clustering parameters, or introduce more diverse text samples to improve the clustering effect.

[0063] In addition, when analyzing clustering results, you can use visualization tools (such as t-SNE or PCA) to reduce the dimensionality of high-dimensional features in order to intuitively display the similarities between different categories. This visualization method not only helps to understand the distribution of features, but also facilitates further tuning and analysis. If you find that the distance between some categories is too close, you can readjust the text collection by selecting different features or increasing diversity to ensure that the final constructed text collection has rich diversity coverage.

[0064] Generate new text data that is semantically similar to existing text data using a generative adversarial network model; This step creates new text data that is semantically similar to existing text data through the generative adversarial network (GAN) generative model. To this end, the system uses the trained generative model to accept the feature input obtained from the previous stage and generates new text based on these features. This process emphasizes semantic similarity, making the generated data consistent with the real data in content, while also being diverse and innovative, providing richer material for subsequent model training.

[0065] By generating new text data with similar semantics, the intelligent question-answering system can effectively expand its training data set and improve the generalization and diversity of the model. This process not only increases the amount of data, but also ensures that the generated data is relevant and practical in the industry. Ultimately, the system can better respond to complex user inquiries, improve the quality of answers, and enhance the user experience.

[0066] In this step, we first build a Generative Adversarial Network (GAN), which consists of two parts: the generator and the discriminator. The generator is responsible for generating new text data based on the features extracted in the previous step, while the discriminator is responsible for judging the degree of similarity between the generated text data and the real text data. In order to improve the accuracy of the generative model, the generator will combine contextual information when generating text to ensure that the generated text is not only semantically logical, but also maintains domain-related characteristics.

[0067] The training process of the generative model is an iterative optimization process. In each round of training, the generator generates a batch of new texts, which are then input into the discriminator for evaluation. The discriminator outputs a similarity score between the real text and the generated text, and generates the parameters of the model based on the score feedback. The generative model uses this feedback to continuously adjust its generation strategy so that the generated text is semantically closer to the real text. In order to increase the diversity of the generated text, randomness can be introduced in the generation process, for example, by adjusting the sampling method of the generative model or introducing noise to generate texts of different styles and structures.

[0068] Finally, through multiple rounds of iterative training, the generative model will gradually improve the quality and diversity of the text it generates. In the training preparation stage, ensure that sufficiently diverse real text data is used to enrich the text library of the generative model. The generated text must not only be semantically similar to the real text, but also reflect the diversity and richness of the content. Finally, by evaluating and screening the generated text, confirm that it meets the expected diversity standards, and provide a high-quality text foundation for subsequent training sample generation.

[0069] The discriminant model of the adversarial generative network is used to evaluate whether the generated new text data is authentic and meets the expected diversity standards. The discriminant model will perform adversarial training with the generative model to continuously optimize the generated new text data to make it as authentic and diverse as possible, and ultimately obtain diversified text data with a high degree of similarity to the real text data.

[0070] In this step, the discriminant model of the adversarial generative network is used to evaluate the generated new text data to determine its authenticity and diversity. The job of the discriminant model is to analyze the generated data and compare it with the real data to evaluate the similarity of the generated text in terms of semantics, style, and content. Through continuous adversarial training, the generative model and the discriminant model compete with each other, driving the gradual improvement of the performance of both, thereby ensuring the quality and diversity of the generated results.

[0071] The core role of this step is to enhance the authenticity and diversity of the text generated by the generative model through adversarial training, so that it can better integrate into the actual intelligent question-answering scenario. The discriminant model can not only effectively filter out invalid or low-quality texts, but also improve the adaptability of new texts in various complex scenarios. Ultimately, the diverse text data generated by the system can significantly improve the performance of the intelligent question-answering system and better meet user needs.

[0072] In this step, the discriminant model will receive generated text data and real text data to evaluate the authenticity and diversity of the generated text. The construction of the discriminant model needs to be trained on the basis of a large number of real text samples to learn the characteristic distribution of real text. During the evaluation process, the discriminant model will classify the input text to determine whether it is generated (forged) text or from a real dataset. In this way, the discriminant model continuously improves its identification ability, thereby feeding back more relevant information to the generative model.

[0073] In order to optimize the generated new text data, the output score of the discriminant model will directly affect the training direction of the generator. If the discriminant model believes that the generated text is of low quality, the generator will receive feedback and adjust its parameters to generate new text that is more in line with the characteristics of real text. In addition, the discriminant model will also be evaluated based on diversity criteria, such as detecting the vocabulary diversity and sentence structure complexity of the generated text, to ensure that the generated text is also improved in this regard. This multi-level evaluation mechanism can help the generation model continuously improve its quality, and the text generated will eventually have a high degree of authenticity and diversity.

[0074] After repeated training iterations, the adversarial process between the generator and the discriminator can promote each other, so that the generated text can be as close to the characteristics of real data as possible in terms of style, content and semantics. At the same time, by constantly adjusting and optimizing the training strategy, it is ensured that the text generated by the generative model meets the expected standards in terms of diversity. The final text will be used as a training sample to help improve the intelligent question-answering capabilities of the target LLM large language model in specific fields. The feedback link and dynamic adjustment mechanism in this process ensure that the generated text always maintains a high degree of similarity with the real text, thereby realizing a more effective intelligent question-answering system.

[0075] S204, performing multi-level semantic annotation on the generated text data, and generating training samples by analyzing context information in the annotated corpus; The process includes entity annotation, relationship annotation, sentiment annotation and topic annotation of text data to form a comprehensive annotation information table. These annotations not only provide rich semantic information for each text, but also clearly identify the key elements in the text and the relationship between them. By analyzing the context information, the core ideas and important information points of the text can be further refined to create semantic coherence for the generated training samples, ensuring that the model can grasp its internal logical structure when understanding the text.

[0076] The implementation of multi-level semantic annotation has greatly enhanced the intelligent question-answering system's ability to understand and process text. By carefully annotating the text, the training samples received by the model not only have rich contextual information, but also can perform deeper learning and reasoning at the potential semantic level. This deep understanding ability lays the foundation for the system to generate high-quality answers and improves the user experience. At the same time, the annotation results can guide the model to identify key entities and relationships when answering questions, thereby optimizing the accuracy and relevance of its responses.

[0077] Specifically, the generated text data can be annotated with entities, relationships, sentiments, and topics, and the annotation results of entities, relationships, sentiments, and topics can be merged into a comprehensive annotation information table to ensure that the annotations at each level of each text can correspond one to one; In this process, the generated text data is first annotated in a variety of ways, involving multiple levels such as entities, relationships, emotions, and themes. Entity annotation aims to identify specific objects such as names, places, and organizations in the text; relationship annotation is used to identify the relationship between these entities; emotion annotation evaluates the emotional tendency conveyed by the text; and topic annotation summarizes the main topics of the text. Finally, the annotation results at all levels are integrated to form a comprehensive set of annotation information tables to ensure that different types of annotations can correspond one to one, which is convenient for subsequent analysis.

[0078] Through this annotation step, the text data can be fully interpreted, which promotes the structuring of information and enables the intelligent question-answering system to extract key information more intuitively. Such annotation not only provides rich feature input for subsequent model training, but also improves the system's ability to respond to different types of inquiries. For example, when answering user questions, the system can quickly identify relevant entities and topics based on the annotation information, improving the accuracy and corresponding professionalism of the answer.

[0079] In this step, the generated text data needs to be annotated at multiple levels to extract the key information content in the text. The whole process can be divided into several key links, the first of which is entity annotation. This step uses named entity recognition (NER) technology to identify specific entities from the text, such as names, places, organizations, and other important nouns. You can use a pre-trained NER model, which can efficiently identify and annotate relevant entities in the text in practical applications.

[0080] Next, we will do the work of relation annotation, which aims to identify the relationship between different entities in the text. For example, in a description like "Alice works at a technology company in Beijing", we can use relation annotation technology to identify the action of "work" that connects the two entities "Alice" and "technology company". To this end, we can use technologies such as dependency parsing to analyze sentence structure and identify the logical relationship between entities, thus providing a clear relational framework for subsequent analysis.

[0081] Sentiment annotation uses sentiment analysis technology to evaluate the emotions in the text and annotate the text's sentiment tendency, such as positive, negative, or neutral. This process can be combined with sentiment dictionaries or pre-trained sentiment analysis models to perform detailed sentiment classification for each sentence to ensure that the expression of different emotions in the text is clearly identified. Finally, all annotation results are summarized to form a comprehensive annotation information table, which includes annotations at all levels (entities, relationships, emotions, and topics), ensuring that the annotation information of each text can correspond one to one, providing basic data for subsequent analysis and processing of the text.

[0082] Perform sentence-level and paragraph-level analysis of contextual information on the annotated text data. Analyze each sentence and paragraph of the annotated text data, identify key sentences and important information points through context association, and generate training samples containing multiple sentences with semantic coherence to improve the comprehension ability of the LLM large language model to be trained.

[0083] In this step, the system conducts a detailed contextual analysis of the annotated text data, using sentence-level and paragraph-level analysis to identify key sentences and important information points. This process not only focuses on the content of a single sentence, but also considers the logical relationship and information flow between sentences and paragraphs, with the aim of capturing the semantic coherence of the text. Through such analysis, the system can construct training samples that contain multiple sentences and are semantically related to each other, thus providing a good data foundation for subsequent model training.

[0084] The results of context analysis greatly enrich the semantic level of the training samples, making the LLM large language model to be trained more capable in semantic understanding. By generating training samples with semantic coherence, the model can better learn the inherent logic and structural relationships of the text, and improve its ability to understand and generate complex texts. This not only makes the system more flexible in responding to user questions in actual applications, but also improves the accuracy and naturalness of the answers, and improves the overall user experience.

[0085] In this step, the annotated text data is first analyzed at the sentence and paragraph levels to extract contextual information and key content. Sentence-level analysis is first performed. For each annotated sentence, context-related techniques such as coreference resolution and scenario modeling are used to identify the logical relationships and information links between sentences. This process helps to clarify the main arguments and supporting details in the text, thereby facilitating the subsequent generation of training samples.

[0086] Next, we move on to paragraph-level analysis, focusing on the sentence structure and logical connections within each paragraph. Semantic role labeling or topic modeling methods can be used to help identify the core arguments and supporting information in a paragraph. In this process, contextual embeddings are used to capture the semantic connections between sentences to ensure that the training samples generated in the end have stronger semantic coherence and logical consistency. Through paragraph analysis, the most representative sentences in a paragraph can be extracted and their importance in the entire text can be measured.

[0087] Finally, the identified key sentences and important information points are integrated to generate training samples containing multiple sentences. These training samples should be coherent and logical in structure, and can effectively enhance the understanding ability of the LLM large language model to be trained. Through this detailed sentence-level and paragraph-level analysis, it is ensured that the generated training samples not only reflect the semantic connotation of the original text, but also facilitate the model to perform in-depth contextual reasoning, thereby improving its performance in practical applications.

[0088] S205, converting the generated training samples into standard format samples for training the LLM large language model in the target domain, and using the standard format samples to train the LLM large language model to obtain a trained LLM large language model as the intelligent question-answering system in the target domain.

[0089] This process involves formatting the training samples to meet specific input and output requirements, so that the model can effectively identify and learn the language habits, contextual associations, and knowledge structures of the target domain during training. In a standard format, the samples usually contain input information (such as questions or context) and its corresponding output information (such as answers or supplementary explanations), which makes it easier for the model to optimize its parameters during learning and improve its mastery of specific knowledge in the target domain.

[0090] When converting the generated training samples into standard format samples for LLM large language model training in the target domain, it is first necessary to clarify the specific requirements of the target domain. This process usually involves structuring the generated training samples to ensure that the data can be effectively used by LLM in the training process. For example, for each training sample, we need to define a unified labeling system, which includes the input and output format of the sample, the organization of contextual information, and the extraction of key features. Taking the intelligent question-answering system as an example, the samples involved in the training usually need to include user questions, system answers, and related contextual information, which can help the model learn how to respond appropriately to similar questions. Therefore, first, we segment the generated text data, organize it according to the correspondence between questions and answers, and add corresponding labels to each piece of data for subsequent training and evaluation.

[0091] After completing the initial labeling of the data, the data cleaning and standardization process will be further covered. This step aims to ensure the consistency of the training samples in form and content, and avoid interference with model learning due to formatting issues. During the cleaning process, we will filter out redundant information, unify the encoding format of the data (such as UTF-8), and correct potential spelling and grammatical errors. At the same time, for data samples from different sources, we will also ensure that they use consistent terms and expressions in their descriptions as much as possible. This not only helps to improve the quality of training samples, but also builds a more solid foundation for subsequent model training. For intelligent question-answering systems, the quality of training data directly affects the model's depth of understanding and accuracy of responses, so this step is crucial.

[0092] Finally, the processed standard format samples are used to train the LLM large language model. At this stage, we will use modern training frameworks, such as deep learning-based optimization algorithms, to batch process samples and continuously adjust the model parameters to achieve the best learning effect. The training process will include multiple iterative steps, and each step will evaluate the model to identify its effectiveness in understanding and answering. We will introduce techniques such as cross-validation to ensure that the model has strong generalization capabilities when facing unknown problems and avoid overfitting. At the same time, combined with actual application scenarios, we will also introduce some real user feedback to further adjust and optimize the model's answering mechanism. Finally, through this series of training, the obtained LLM large language model will have efficient and accurate question-answering capabilities, and can better serve the intelligent question-answering system in the target field.

[0093] For example, in an intelligent question-answering system based on the LLM large language model, the specific implementation of converting the generated training samples into standard format samples and using these samples to train the LLM model can be divided into the following steps: 1. Generate a standard format for training samples First, we need to clarify the standard sample format for the target domain to ensure that the model can effectively understand and use the data. Assuming that our target domain is healthcare, we can define the standard format as containing fields such as "question", "answer", "context" and "label". For example, after text aggregation and filtering, the training samples we generate are as follows: Question: What are the common symptoms of diabetes? Answer: Common symptoms of diabetes include extreme thirst, frequent urination, increased appetite, weight loss, and fatigue.

[0094] Context: Diabetes is a long-term metabolic disease that affects how the body uses blood sugar.

[0095] Tags: ["diabetes", "health", "disease"] This standardized format ensures the consistency and ease of processing of the data, making subsequent model training more efficient.

[0096] 2. Data cleaning and formatting After collecting a large number of training samples, the process of data cleaning and formatting is also crucial. This step includes removing redundant samples, unifying text formats, and correcting spelling and grammatical errors. For example, if the answer of a sample has grammatical errors or inappropriate words, it needs to be modified to ensure that the content is accurate and fluent.

[0097] For example, the answer to the original sample is: "Patients often feel extremely thirsty, urinate frequently, lose weight rapidly, and feel tired frequently." The modified answer should be: "Common symptoms of diabetes include extreme thirst, frequent urination, lose weight rapidly, and feel tired frequently." After cleaning, all samples are organized into JSON format for subsequent processing.

[0098] 3. Preparation and division of training samples After data cleaning, the next step is to divide these samples into training set, validation set and test set. Assuming we have 1,000 training samples, we can use 80% (800) of them for model training, 10% (100) for model verification, and the remaining 10% (100) for testing the accuracy and generalization ability of the model. This division not only allows the model to obtain sufficient data during training, but also effectively evaluates the performance of the model during the verification and testing stages.

[0099] 4. Use standard format samples for model training Next, start training the LLM large language model using the prepared standard format samples. In this step, we will load the pre-selected model architecture, usually a large-scale pre-trained model such as GPT, BERT, etc. Then, use the prepared training set to fine-tune the model and optimize the model parameters to perform better on the given task. For example, when the model receives an input question, it should be able to generate accurate answers based on contextual information. Through repeated training and verification, the model gradually learns how to match input user questions with relevant answers.

[0100] 5. Model evaluation and application After the model training is completed, it needs to be evaluated through the test set to verify whether the model has good question-answering capabilities. At this stage, we may use indicators such as accuracy and recall to measure the performance of the model to ensure its accuracy and effectiveness in processing actual user inquiries. Finally, after confirming that the model performance is good, the trained LLM large language model will be deployed to the intelligent question-answering system to provide users with real-time answering services.

[0101] For example, when a user asks the system "What are the common symptoms of diabetes?", the model can quickly analyze the question and give an accurate answer, thereby improving user satisfaction and system credibility. Through this series of steps, the generated training samples are not only successfully converted into standard format samples, but also used to effectively train an LLM model for an intelligent question-answering system in the medical and health field.

[0102] The process of converting training samples into standard format samples significantly improves the learning adaptability and generalization ability of the LLM large language model in the target domain. This conversion not only provides the model with a unified and clear data structure, which is convenient for data batch processing and model training, thereby accelerating the training process, but also enhances the accuracy and relevance of the model when answering user queries. Through high-quality standard format samples, the model can better grasp the professional terms and specific contexts in the field, ultimately improving the overall performance and user experience of the intelligent question-answering system.

[0103] It can be seen that corpus aggregation is performed from a variety of heterogeneous data sources to dynamically capture text data related to the target field; the text data is preliminarily screened, and redundant, low-quality or text data irrelevant to the target field is eliminated based on semantic similarity and text quality scoring rules; the diversity of text data is analyzed, and diversified text data with high similarity to real data is generated through adversarial generation technology; the text data is semantically annotated at multiple levels, and training samples are generated by analyzing the contextual information in the annotated corpus; the training samples are converted into standard format samples, and the standard format samples are used to train the LLM large language model as the intelligent question and answer system in the target field, thereby effectively improving the intelligence level of the intelligent question and answer system in various application scenarios, meeting the diverse needs of users, and promoting the further development of intelligent question and answer technology.

[0104] Another embodiment of the present invention provides a system for constructing an intelligent question answering system based on the LLM large language model. Figure 3 , the system may include: The crawling module 301 is used to aggregate corpora from multiple heterogeneous data sources and dynamically crawl text data related to the target field; A screening module 302 is used to perform preliminary screening on the captured text data, and remove redundant, low-quality or text data irrelevant to the LLM large language model training in the target field based on semantic similarity and text quality scoring rules; The analysis module 303 is used to perform diversity analysis on the filtered text data to ensure that the text content covers a variety of contexts, writing styles and domain knowledge, and to generate diversified text data with high similarity to real data through adversarial generation technology; A generation module 304 is used to perform multi-level semantic annotation on the generated text data and generate training samples by analyzing the context information in the annotated corpus; The training module 305 is used to convert the generated training samples into standard format samples for training the LLM large language model in the target domain, and use the standard format samples to train the LLM large language model to obtain the trained LLM large language model as the intelligent question-answering system in the target domain.

[0105] It can be seen that corpus aggregation is performed from a variety of heterogeneous data sources to dynamically capture text data related to the target field; the text data is preliminarily screened, and redundant, low-quality or text data irrelevant to the target field is eliminated based on semantic similarity and text quality scoring rules; the diversity of text data is analyzed, and diversified text data with high similarity to real data is generated through adversarial generation technology; the text data is semantically annotated at multiple levels, and training samples are generated by analyzing the contextual information in the annotated corpus; the training samples are converted into standard format samples, and the standard format samples are used to train the LLM large language model as the intelligent question and answer system in the target field, thereby effectively improving the intelligence level of the intelligent question and answer system in various application scenarios, meeting the diverse needs of users, and promoting the further development of intelligent question and answer technology.

[0106] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0107] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps: S201, aggregate corpora from multiple heterogeneous data sources and dynamically capture text data related to the target domain; S202, preliminarily screening the captured text data, and removing redundant, low-quality, or text data irrelevant to the LLM large language model training in the target domain based on semantic similarity and text quality scoring rules; S203, performing diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and generating diversified text data with high similarity to real data through adversarial generation technology; S204, performing multi-level semantic annotation on the generated text data, and generating training samples by analyzing context information in the annotated corpus; S205, converting the generated training samples into standard format samples for training the LLM large language model in the target domain, and using the standard format samples to train the LLM large language model to obtain a trained LLM large language model as the intelligent question-answering system in the target domain.

[0108] It can be seen that corpus aggregation is performed from a variety of heterogeneous data sources to dynamically capture text data related to the target field; the text data is preliminarily screened, and redundant, low-quality or text data irrelevant to the target field is eliminated based on semantic similarity and text quality scoring rules; the diversity of text data is analyzed, and diversified text data with high similarity to real data is generated through adversarial generation technology; the text data is semantically annotated at multiple levels, and training samples are generated by analyzing the contextual information in the annotated corpus; the training samples are converted into standard format samples, and the standard format samples are used to train the LLM large language model as the intelligent question and answer system in the target field, thereby effectively improving the intelligence level of the intelligent question and answer system in various application scenarios, meeting the diverse needs of users, and promoting the further development of intelligent question and answer technology.

[0109] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0110] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0111] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program: S201, aggregate corpora from multiple heterogeneous data sources and dynamically capture text data related to the target domain; S202, preliminarily screening the captured text data, and removing redundant, low-quality, or text data irrelevant to the LLM large language model training in the target domain based on semantic similarity and text quality scoring rules; S203, performing diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and generating diversified text data with high similarity to real data through adversarial generation technology; S204, performing multi-level semantic annotation on the generated text data, and generating training samples by analyzing context information in the annotated corpus; S205, converting the generated training samples into standard format samples for training the LLM large language model in the target domain, and using the standard format samples to train the LLM large language model to obtain a trained LLM large language model as the intelligent question-answering system in the target domain.

[0112] It can be seen that corpus aggregation is performed from a variety of heterogeneous data sources to dynamically capture text data related to the target field; the text data is preliminarily screened, and redundant, low-quality or text data irrelevant to the target field is eliminated based on semantic similarity and text quality scoring rules; the diversity of text data is analyzed, and diversified text data with high similarity to real data is generated through adversarial generation technology; the text data is semantically annotated at multiple levels, and training samples are generated by analyzing the contextual information in the annotated corpus; the training samples are converted into standard format samples, and the standard format samples are used to train the LLM large language model as the intelligent question and answer system in the target field, thereby effectively improving the intelligence level of the intelligent question and answer system in various application scenarios, meeting the diverse needs of users, and promoting the further development of intelligent question and answer technology.

[0113] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.

Claims

1. A method for constructing an intelligent question answering system based on the LLM large language model, characterized in that: The method comprises: Aggregate corpora from multiple heterogeneous data sources and dynamically capture text data related to the target domain; Perform a preliminary screening of the captured text data, and remove redundant, low-quality, or text data irrelevant to the LLM large language model training in the target field based on semantic similarity and text quality scoring rules; Conduct diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and generate diverse text data with high similarity to real data through adversarial generation technology; Perform multi-level semantic annotation on the generated text data, and generate training samples by analyzing the contextual information in the annotated corpus; The generated training samples are converted into standard format samples for training the LLM large language model in the target domain, and the LLM large language model is trained using the standard format samples to obtain a trained LLM large language model as the intelligent question-answering system in the target domain.

2. The method according to claim 1, characterized in that The captured text data is initially screened to remove redundant, low-quality or irrelevant text data based on the LLM large language model training in the target field based on semantic similarity and text quality scoring rules, including: Using the Flesch-Kincaid readability test to evaluate the readability of the text data, obtaining first text data having a readability higher than a first preset threshold; In combination with natural language processing technology, the first text data is checked for grammatical and spelling errors, and the text with errors is removed to obtain second text data; The similarity between the second text data and the keyword library related to the target field is calculated using semantic matching technology to evaluate the semantic similarity, and obtain third text data whose similarity is higher than a second preset threshold.

3. The method according to claim 2, characterized in that The diversity analysis is performed on the screened text data to ensure that the text content covers a variety of contexts, writing styles and domain knowledge, and the adversarial generation technology is used to generate diversified text data with high similarity to the real data, including: Extracting multiple features from the screened text data, the features including context features, writing style features, and domain knowledge features; Perform cluster analysis on the extracted features and calculate the similarity between the feature categories after clustering to evaluate the diversity of text data; Generate new text data that is semantically similar to existing text data using a generative adversarial network model; The discriminant model of the generative adversarial network is used to evaluate whether the generated new text data is authentic and meets the expected diversity standards. The discriminant model will perform adversarial training with the generative model to continuously optimize the generated new text data to make it as authentic and diverse as possible, and ultimately obtain diversified text data with a high degree of similarity to the real text data.

4. The method according to claim 3, characterized in that The generated text data is subjected to multi-level semantic annotation, and training samples are generated by analyzing context information in the annotated corpus, including: The generated text data is annotated with entities, relationships, sentiments, and topics, and the annotation results of entities, relationships, sentiments, and topics are merged into a comprehensive annotation information table to ensure that the annotations at each level of each text can correspond one to one; Perform sentence-level and paragraph-level analysis of contextual information on the annotated text data. Analyze each sentence and paragraph of the annotated text data, identify key sentences and important information points through context association, and generate training samples containing multiple sentences with semantic coherence to improve the comprehension ability of the LLM large language model to be trained.

5. A system for constructing an intelligent question-answering system based on the LLM large language model, characterized in that: The system comprises: The crawling module is used to aggregate corpora from multiple heterogeneous data sources and dynamically crawl text data related to the target field; The screening module is used to perform preliminary screening on the captured text data, and remove redundant, low-quality or text data irrelevant to the LLM large language model training in the target field based on semantic similarity and text quality scoring rules; The analysis module is used to perform diversity analysis on the screened text data to ensure that the text content covers a variety of contexts, writing styles, and domain knowledge, and to generate diversified text data with high similarity to real data through adversarial generation technology; The generation module is used to perform multi-level semantic annotation on the generated text data and generate training samples by analyzing the context information in the annotated corpus; The training module is used to convert the generated training samples into standard format samples for LLM large language model training in the target domain, and use the standard format samples to train the LLM large language model to obtain the trained LLM large language model as the intelligent question-answering system in the target domain.

6. The system according to claim 5, characterized in that The screening module is specifically used for: Using the Flesch-Kincaid readability test to evaluate the readability of the text data, obtaining first text data having a readability higher than a first preset threshold; In combination with natural language processing technology, the first text data is checked for grammatical and spelling errors, and the text with errors is removed to obtain second text data; The similarity between the second text data and the keyword library related to the target field is calculated using semantic matching technology to evaluate the semantic similarity, and obtain third text data whose similarity is higher than a second preset threshold.

7. The system according to claim 6, characterized in that The analysis module is specifically used for: Extracting multiple features from the screened text data, the features including context features, writing style features, and domain knowledge features; Perform cluster analysis on the extracted features and calculate the similarity between the feature categories after clustering to evaluate the diversity of text data; Generate new text data that is semantically similar to existing text data using a generative adversarial network model; The discriminant model of the generative adversarial network is used to evaluate whether the generated new text data is authentic and meets the expected diversity standards. The discriminant model will perform adversarial training with the generative model to continuously optimize the generated new text data to make it as authentic and diverse as possible, and ultimately obtain diversified text data with a high degree of similarity to the real text data.

8. The system according to claim 7, characterized in that The generation module is specifically used for: The generated text data is annotated with entities, relationships, sentiments, and topics, and the annotation results of entities, relationships, sentiments, and topics are merged into a comprehensive annotation information table to ensure that the annotations at each level of each text can correspond one to one; Perform sentence-level and paragraph-level analysis of contextual information on the annotated text data. Analyze each sentence and paragraph of the annotated text data, identify key sentences and important information points through context association, and generate training samples containing multiple sentences with semantic coherence to improve the comprehension ability of the LLM large language model to be trained.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 4 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Document processing method and device, electronic equipment and medium

    CN114328894A

  • Web-based medical dialogue multi-granularity semantic annotation system and method

    CN116738998A

  • Text cleaning method and device, electronic equipment and storage medium

    CN117992439A

  • Personnel configuration CMS content feature extraction method and system and medium

    CN118886414A

  • Large language model data efficient preprocessing method and system based on pipeline parallelism

    CN118963992A

Cited By

  • AI intelligent live broadcast system

    CN119887474A

  • Text screening method and device, electronic equipment and storage medium

    CN119938888A

  • Text screening method and device, electronic device and storage medium

    CN119938888B

  • Letter text analysis method driven by multilayer dynamic aggregation large language model

    CN120387459A

  • Large model training data synthesis method, system and device and storage medium

    CN120409710A