A multi-hop question and answer system and method thereof
By combining the data extraction, generation, and filtering modules of the multi-hop question answering system with semantic similarity and named entity recognition, and jointly training the multi-hop question generation and question answering models, the problem of low accuracy in multi-hop question answering systems is solved, and higher semantic accuracy and system performance are achieved.
Patent Information
- Application Number
- CN202310498412.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Existing multi-hop question answering systems have low accuracy. Existing multi-hop question generation models focus on complexity while neglecting semantic accuracy, and the evaluation metrics are singular, resulting in inaccurate semantic relationships between generated multi-hop questions and answers, and the data augmentation effect is not obvious.
A multi-hop question answering system is adopted, including a data extraction module, a multi-hop question generation module, a filtering module, and a multi-hop question answering module. New multi-hop questions are filtered through semantic similarity calculation and named entity recognition. The multi-hop question generation and question answering models are jointly trained, and multi-hop question answering data is introduced to improve semantic accuracy and system accuracy.
This improves the semantic accuracy and precision of multi-hop question answering systems, avoids the introduction of invalid data, breaks free from the limitations of a single evaluation metric, and enhances the performance and practicality of multi-hop question answering systems.
Smart Images

Figure CN116501848B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of multi-hop question answering, and in particular to a multi-hop question answering system and a method thereof. BACKGROUND
[0002] With the continuous development of question answering systems, the requirements for question answering systems are no longer limited to answering factual questions that do not require reasoning, but also require question answering systems to be able to answer multi-hop questions. Multi-hop questions are questions that require reasoning to obtain the answer to the user input question from multiple supporting documents. A question answering system that can accept multi-hop questions and provide answers is a multi-hop question answering system.
[0003] The model complexity of current multi-hop question answering systems is continuously improving, but the data level is still limited by the fact that existing multi-hop question answering datasets are not large enough, multi-hop question answering data annotation costs are high, and the difficulty is great. Multi-hop question generation is an important approach to solving this problem. However, existing multi-hop question generation models only focus on generating complex multi-hop questions, and their evaluation indicators only use BLEU, METEOR, ROUGE values, etc. That is, they only focus on the complexity of the generated questions and the matching degree with the original dataset, but do not focus on the actual model effect improvement, that is, do not focus on the improvement of the accuracy of the actual model.
[0004] Current multi-hop question generation model training methods are mostly based on graph neural network encoders, which use semantic-level graph structures and entity-level graph structures to capture information between multiple context documents. Some existing methods add soft or hard constraints to ensure the complexity of the generated multi-hop questions. This method can ensure the complexity of the generated multi-hop questions, but the matching with the supporting documents is limited to the corresponding entity matching, and the evaluation indicators are only composed of a series of machine translation evaluation indicators such as BLEU, METEOR, and ROUGE. The model uses the matching degree of the generated question at the entity level as the only evaluation indicator of the model. The generated multi-hop question answering data is not accurate enough in terms of semantic expression, and the semantic relationship between the generated multi-hop question, answer, and supporting document is not accurate enough. Moreover, it cannot be determined whether the data enhancement for the multi-hop question answering model is effective in improving the overall performance of the model, that is, whether the accuracy is improved. SUMMARY
[0005] The present application aims to solve the problem of low accuracy of existing multi-hop question answering systems and provides a multi-hop question answering system and a method thereof.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0007] The multi-hop question and answer system comprises a data extraction module, a multi-hop question generation module, a screening module and a multi-hop question and answer module, wherein: the data extraction module is used for extracting training data from a knowledge base; the multi-hop question generation module is used for inputting the training data into a constructed multi-hop question generation model and obtaining new multi-hop questions; the screening module is used for screening the new multi-hop questions and obtaining multi-hop question and answer data; and the multi-hop question and answer module is used for training a multi-hop question and answer model using the multi-hop question and answer data and obtaining answers to multi-hop questions.
[0008] In some embodiments of the present application, the multi-hop question and answer module is further used for judging whether the training times of the multi-hop question and answer model reach a set value, if not, calculating the accuracy of the multi-hop question and answer model, and feeding back the accuracy to the multi-hop question generation module; if yes, outputting answers to multi-hop questions.
[0009] In some embodiments of the present application, the training data comprises initial multi-hop questions, multi-hop answers, support documents and entities.
[0010] In some embodiments of the present application, the data extraction module comprises a natural language processing tool and a first named entity recognition tool; and the extraction of training data specifically comprises: extracting initial multi-hop questions, multi-hop answers and support documents from the knowledge base, removing duplicates and correcting errors of the initial multi-hop questions, multi-hop answers and support documents through the natural language processing tool, and splitting entities from the support documents through the first named entity recognition tool.
[0011] In some embodiments of the present application, the multi-hop question and answer data comprises the new multi-hop questions, the multi-hop answers, support documents and entities.
[0012] In some embodiments of the present application, the training process parameters of the multi-hop question generation model comprise at least one of the size of batch data, the training period and the stop condition; and the processing of the batch data specifically comprises: splitting the batch data into mini-batch data, training each mini-batch data in the multi-hop question generation model and calculating the Loss value of the loss function, performing back propagation and calculating the gradient, returning the calculation result of the Loss value of the loss function to the multi-hop question generation model after evaluation, and updating the parameters of the multi-hop question generation model.
[0013] In some embodiments of the present invention, the filtering module includes a pre-trained language model encoder, which is used to filter the new multi-hop problem; the filtering of the new multi-hop problem specifically includes: calculating the semantic similarity between the new multi-hop problem and the initial multi-hop problem, setting a similarity threshold, and discarding the new multi-hop problem if the semantic similarity between the new multi-hop problem and the initial multi-hop problem is greater than the threshold; and limiting the minimum number of entities in the new multi-hop problem.
[0014] In some embodiments of the present invention, the formula for calculating the semantic similarity is:
[0015]
[0016] Where, q o This represents the initial multi-hop problem, consisting of m characters; q g This represents a new multi-hop problem, consisting of n characters; T represents matrix transpose, E o E represents the vector generated by the pre-trained language model encoder for the initial multi-hop problem. g E represents the vector generated by the pre-trained language model encoder for the new multi-hop problem. o The calculation formula is:
[0017] E o =Decoder(t1,t2,…,t) m )
[0018] E g The calculation formula is:
[0019] E g =Decoder(t1,t2,…,t) n )
[0020] Wherein, Decoder represents the pre-trained language model encoder, and t represents a character.
[0021] In some embodiments of the present invention, the filtering module further includes a second named entity recognition tool, which is used to identify and limit the number of entities in the new multi-hop problem.
[0022] This invention also proposes a multi-hop question answering method, based on the multi-hop question answering system described above, comprising the following steps: S1: extracting training data from the knowledge base through the data extraction module; S2: using the training data to train and generate a multi-hop question generation model through the multi-hop question generation module, and obtaining new multi-hop questions; S3: filtering the new multi-hop questions through the filtering module and obtaining multi-hop question answering data; S4: using the multi-hop question answering data to train and generate a multi-hop question answering model through the multi-hop question answering module, and obtaining the answers to the multi-hop questions.
[0023] In some embodiments of the present invention, step S5 is further included: determining whether the number of training times of the multi-hop question answering model has reached a set value; if not, calculating the accuracy of the multi-hop question answering model, feeding the accuracy back to the multi-hop question generation model, and repeating steps S2 to S5; if the number of training times has reached a set value, retaining the multi-hop question answering model.
[0024] The present invention has the following beneficial effects:
[0025] The multi-hop question answering system proposed in this invention extracts training data from a knowledge base through a data extraction module. A multi-hop question generation module inputs the training data into a multi-hop question generation model to obtain new multi-hop questions. A filtering module then filters these new multi-hop questions to obtain multi-hop question-and-answer data. Finally, a multi-hop question-and-answer module inputs this data into a multi-hop question-and-answer model to obtain the answers to the multi-hop questions. This improves the semantic accuracy of the multi-hop question-and-answer data, thereby enhancing the performance and accuracy of the multi-hop question answering system and increasing the practicality of the multi-hop question generation method.
[0026] Furthermore, in some embodiments of the present invention, the following beneficial effects are also achieved:
[0027] By using a filtering module to filter multi-hop questions based on semantic similarity calculation, invalid data generated during the multi-hop question generation process is avoided from being introduced into the training process of the multi-hop question answering system, thereby improving the semantic accuracy of the multi-hop question answering data and further improving the accuracy of the multi-hop question answering system.
[0028] By calculating the accuracy of the multi-hop question answering model and feeding the accuracy back to the multi-hop question generation module for joint training, the multi-hop question answering system can break free from the limitations of a single evaluation metric, further improving the accuracy of the multi-hop question answering system.
[0029] Other beneficial effects of the embodiments of the present invention will be further described below. Attached Figure Description
[0030] Figure 1 This is an overall structural diagram of the multi-hop question-answering system in an embodiment of the present invention;
[0031] Figure 2 This is a flowchart of the multi-hop question-answering system in an embodiment of the present invention;
[0032] Figure 3 This is a flowchart of the user system module in an embodiment of the present invention;
[0033] Figure 4 This is a flowchart of the data flow management module in an embodiment of the present invention;
[0034] Figure 5This is a diagram illustrating the joint training steps of the multi-hop question-answering method in this embodiment of the invention. Detailed Implementation
[0035] The present invention will be further described below with reference to the accompanying drawings and preferred embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0036] It should be noted that the directional terms such as left, right, up, down, top, and bottom used in this embodiment are only relative concepts or are based on the normal use of the product, and should not be considered as restrictive.
[0037] The basic principle of existing question-answering systems is that the more training data a system has, and the higher the quality of the training data, the better the system's performance.
[0038] Existing multi-hop question answering data augmentation methods are all multi-hop question generation methods, such as graph-based methods and sequence-based methods. However, these methods are essentially question generation methods, aiming to generate better multi-hop questions. Their evaluation metric is the degree of character overlap between the generated questions and the reference questions in the test set. But this improvement in character overlap does not directly reflect the improvement in the performance and accuracy of the multi-hop question answering system after the generated data is applied.
[0039] To address the mismatch between existing multi-hop question answering data augmentation methods and performance improvements, the following embodiments of the present invention provide a multi-hop question answering system and method. This system employs a semantic understanding-based multi-hop question answering data augmentation method, utilizing strategies such as semantic matching, similarity calculation, and joint training to simultaneously improve the quality of multi-hop question generation and the performance of the multi-hop question answering system. Using these strategies for model training allows existing multi-hop question generation models to overcome the limitations of a single evaluation system, providing ample training data for improving the performance of the multi-hop question answering system. By providing more and higher-quality training data, the performance and accuracy of the multi-hop question answering system are improved.
[0040] The following embodiments of the present invention propose a multi-hop question-answering system and method. The multi-hop question-answering system includes a data extraction module, a multi-hop question generation module, a filtering module, and a multi-hop question-answering module, wherein: the data extraction module is used to extract training data from a knowledge base; the multi-hop question generation module is used to input the training data into a constructed multi-hop question generation model to obtain new multi-hop questions; the filtering module is used to filter the new multi-hop questions and obtain multi-hop question-answering data; and the multi-hop question-answering module is used to train a multi-hop question-answering model using the multi-hop question-answering data and obtain answers to the multi-hop questions.
[0041] The multi-hop question-answering system proposed in this invention is a computer system that allows users to pose complex questions (requiring multiple supporting documents for an answer) and input them into the system. The system uses a pre-trained language model encoder to encode the user-inputted complex question and retrieved supporting documents into a multi-dimensional vector space, and then uses a pre-trained language model decoder to decode the question and obtain the answer. The pre-trained language model encoder, the pre-trained language model decoder, and their input and output text interfaces constitute a whole, namely, the multi-hop question-answering model. The system is as follows: Figure 1 and Figure 2 As shown, the specific functions are as follows:
[0042] I. Data Extraction Module
[0043] In a multi-hop question-answering system, the data extraction module retrieves relevant supporting documents from a given knowledge base for complex user-input questions using methods such as keyword matching and word frequency retrieval. The knowledge base in this embodiment depends on the actual situation; the given knowledge base can be the dataset used in the experiment. For example, if the system uses an offline dataset with 10,000 documents, then the given knowledge base consists of these 10,000 documents. Training data includes initial multi-hop questions, multi-hop answers, supporting documents, and entities.
[0044] The data extraction module includes a natural language processing tool and a first named entity recognition tool. After obtaining the initial multi-hop questions, multi-hop answers, and related supporting documents from the knowledge base, i.e., the original dataset, the natural language processing tool performs deduplication and error correction on the initial multi-hop questions, multi-hop answers, and supporting documents. The first named entity recognition tool is used to extract the corresponding entities from the supporting documents. The training data composed of multi-hop questions, multi-hop answers, supporting documents, and entities is then fed into the multi-hop question generation model.
[0045] II. Multi-hop Problem Generation Module
[0046] The multi-hop question generation module inputs the above training data into the constructed multi-hop question generation model and obtains new multi-hop questions. The new multi-hop questions, the multi-hop answers, supporting documents, and entities constitute multi-hop question and answer data.
[0047] III. Filtering Module
[0048] The question filtering system is responsible for filtering the output of the multi-hop question generation model, that is, filtering the newly generated multi-hop questions. The filtering criteria are: ① semantic similarity calculation based on the pre-trained language model; ② entity number limit based on second named entity recognition.
[0049] The filtering module calculates the semantic similarity between the generated new multi-hop questions and the initial multi-hop questions using a pre-trained language model encoder, removes generated new multi-hop questions that are highly similar to the initial multi-hop questions to ensure the validity of the new multi-hop question-answering data; and limits the minimum number of entities to generate new multi-hop questions to ensure that the new questions have a certain degree of complexity.
[0050] The specific selection criteria are as follows:
[0051] 1. The semantic similarity calculation method is as follows: Assume a pre-trained language model encoder (Decoder): Assume the initial multi-hop problem is q o The generated new multi-hop problem is q g Assuming the initial multi-hop problem and the generated new multi-hop problem consist of m characters and n characters (tokens) respectively, the initial multi-hop problem and the generated new multi-hop problem are encoded by a pre-trained language model encoder, and their vector representation E is generated in the multi-dimensional semantic vector space. o and E g They are respectively:
[0052] E o =Decoder(t1,t2,…,t) m (1)
[0053] E g =Decoder(t1,t2,…,t) n (2)
[0054] Where t represents a token, then q o and q g similarity sim(q) o ,q g The calculation is as follows:
[0055]
[0056] T denotes matrix transpose, E o and E g Multiplication yields a similarity score. When sim(q) o ,q g When the similarity between the generated new problem and the original problem is greater than a specified threshold k, this embodiment of the invention considers that the generated new problem is too similar to the original problem and cannot increase the diversity of the training data, so the generated problem is discarded. Preferably, the value of k is 0.6-1.
[0057] 2. The number of entities in the newly generated multi-hop questions is limited by a second named entity recognition tool. The second named entity recognition tool performs named entity recognition on the newly generated questions and sets a specified threshold value n. Preferably, the value of n is 4 or 5 to avoid the newly generated questions being too simple and failing to improve the model's ability to perform complex reasoning.
[0058] IV. Multi-jump Question and Answer Module
[0059] The multi-hop question answering module provides answers to multi-hop questions through the multi-hop question answering model encoder-decoder structure, and feeds back the accuracy of the decoded answers to the multi-hop question generation model, thereby achieving the goal of jointly training the multi-hop question generation model and the multi-hop question answering model.
[0060] The multi-hop question answering module is also used to determine whether the number of training iterations of the multi-hop question answering model has reached a set value. If it has not reached the set value, the accuracy of the multi-hop question answering model is calculated and the accuracy is fed back to the multi-hop question generation module. If it has reached the set value, the answer to the multi-hop question is output.
[0061] The system in this embodiment of the invention also includes a user system module and a data flow management module.
[0062] V. User System Module
[0063] The user system module manages the entire process of a user using the question-and-answer system, from input to output. Specifically, it includes the initial interface for user question input, the interface displaying supporting documents for the user's input and reasoning questions, the interactive interface where the system provides answers and collects user feedback, and the backend feedback collection module. The feedback unit collects and organizes user feedback in the backend, providing data support for system optimization. The user system management module workflow is as follows: Figure 3 As shown.
[0064] VI. Data Flow Management Module
[0065] The data flow management module is responsible for the extraction, cleaning, storage, and output of data in the multi-hop question-answering system. The workflow of the data flow management module is as follows: Figure 4 As shown, the specific steps are as follows: ① First, extract multi-hop questions, multi-hop answers, and corresponding supporting documents from the structured data or unstructured text in the original dataset, and perform data cleaning: deduplication and error correction are performed using natural language processing tools, and entities are extracted using a first named entity recognition tool; ② Then, input the cleaned data into the multi-hop question generation model to generate new multi-hop questions, and select corresponding answers and supporting documents from the source text of the generated new multi-hop questions to form new question-and-answer data; ③ The data flow management module stores the generated new question-and-answer data and inputs it into the multi-hop question-and-answer model to train the multi-hop question-and-answer model and obtain multi-hop question answers; ④ Collect and store user feedback data, analyze it, and provide data support for the joint training of the multi-hop question-and-answer model and the multi-hop question generation model.
[0066] The data flow management module can remove duplicate data, correct text spelling errors in the data, and improve data quality.
[0067] This invention also provides a multi-hop question-answering method, comprising the following steps: S1: extracting training data from a knowledge base using the data extraction module; S2: using the training data to train a multi-hop question generation model using the multi-hop question generation module, and obtaining new multi-hop questions; S3: filtering the new multi-hop questions using the filtering module and obtaining multi-hop question-answering data; S4: using the multi-hop question-answering data to train a multi-hop question-answering model using the multi-hop question-answering module, and obtaining the answers to the multi-hop questions.
[0068] In a preferred embodiment, the method further includes step S5: determining whether the number of training iterations of the multi-hop question answering model has reached a set value; if not, calculating the accuracy of the multi-hop question answering model, feeding the accuracy back to the multi-hop question generation model, and repeating steps S2 to S5; if the number of training iterations has reached a set value, retaining the multi-hop question answering model.
[0069] This invention provides a model training method that incorporates a joint training mechanism in a multi-hop question answering method, such as... Figure 5 As shown, the steps are as follows:
[0070] Step 1: Resource Acquisition
[0071] Users upload task code and training datasets (including structured data and unstructured text) to the data flow management module. If they need to continue training from an already trained model, they also upload the already trained model. Based on the size of the training data, users apply for computing resources and obtain relevant parameters of the resources, including computing power, video memory, RAM, network bandwidth, etc.
[0072] Step 2: Data Extraction
[0073] Extract multi-hop questions, multi-hop answers, and supporting documents from the original dataset and store them in the data flow management module.
[0074] Step 3: Data Cleaning
[0075] Natural language processing tools are used to deduplicate and correct the extracted data, and a first named entity recognition tool is used to perform named entity recognition on the extracted data to extract the entities in the problem.
[0076] Step 4: Training the multi-hop problem generation model
[0077] Based on resource availability, model parameter size, and training data size, configure the model training process, including batch size, epoch (training period), and stopping conditions.
[0078] The processing for each batch of data is as follows:
[0079] Step 4.1: Data Splitting
[0080] Split a batch of data into s mini-batches, and start s computing processes in sequence.
[0081] Step 4.2: Loss Function Update
[0082] After each mini-batch of data is trained in the model, the loss function is calculated, backpropagation is performed and the gradient is calculated. Evaluation is performed based on metrics such as BLEU and ROUGE. The calculated loss function value is then returned to the model to update the model parameters.
[0083] Step 4.3: Save the model after each parameter update.
[0084] Step 4.4: Repeat steps 4.1-4.3 until the stopping condition is met (all training data has been trained once or the number of training rounds has reached the set value).
[0085] Step 5: Using the multi-hop problem generation model obtained from the training, and the cleaned data from Step 3 as the source text, generate new multi-hop problems.
[0086] Step 6: Calculate the semantic similarity between the generated new multi-hop problem and the original multi-hop problem, and retain the generated new multi-hop problems with a similarity less than a specified threshold k.
[0087] Step 7: Perform named entity recognition on the problems retained in Step 6, and retain new multi-hop problems with a number of entities greater than a specified threshold n.
[0088] Step 8: Combine the generated questions retained in Step 7 with the answers, supporting documents, and entities in the source text to form new training data, and mix them with the initial training data to form new question-and-answer data.
[0089] Step 9: Input the new question-answering data obtained in Step 8 into the multi-hop question-answering model for training. The training steps are the same as in Step 4 (the difference is that the pre-trained language model used in Step 4 is a generative model, and the evaluation metrics are BLEU value, ROUGE value, etc., while the pre-trained language model used in Step 9 is a retrieval-reading model, and the evaluation metrics are MRR value, Recall value, accuracy, etc.).
[0090] Step 10: Based on the evaluation metrics (such as accuracy) of the multi-hop question answering model in Step 9, introduce the parameter update from Step 4.2, and repeat Steps 4-9 until a certain number of iterations.
[0091] To improve the semantic accuracy of multi-hop question-answering data generated by existing multi-hop question generation models, and to optimize multi-hop question generation models with a focus on improving the performance of multi-hop question-answering systems, this invention proposes a multi-hop question-answering system and method. This system and method employ a semantic understanding-based multi-hop question-answering data augmentation approach. By introducing pre-trained language model encoders and decoders, the generated multi-hop question-answering data is evaluated and filtered to improve its semantic accuracy. Furthermore, by jointly training the multi-hop question generation model and the multi-hop question-answering model, their performance is enhanced. The multi-hop question generation model uses machine translation metrics such as ROUGE values, while the multi-hop question-answering model uses accuracy metrics.
[0092] Traditional methods can only continuously improve the machine translation metrics for multi-hop question generation, i.e., the character coverage between the generated multi-hop question and the reference question. However, high character coverage does not necessarily equate to good performance. Models that prioritize maximizing a single metric during training are prone to getting stuck in suboptimal solutions (i.e., local optima). Incorporating the accuracy of the multi-hop question answering system as an evaluation metric can effectively increase the system's robustness, which aligns with the ultimate goal of multi-hop question generation: improving the performance of the multi-hop question answering system.
[0093] The embodiments of the present invention can enable the triples (question-answer-supporting document) generated by the multi-hop question generation model to have higher semantic accuracy, and through joint training methods, it can get rid of the limitation of a single evaluation index and improve the practicality of current multi-hop question generation methods.
[0094] This invention improves the quality of training data and thus enhances the accuracy of the multi-hop question answering system by using an information filtering method based on semantic similarity calculation, thus avoiding the introduction of invalid data from the multi-hop question generation process into the training process of the multi-hop question answering system.
[0095] This invention, through the design of a joint training system for a multi-hop question answering system and a multi-hop question generation system, enables existing multi-hop question generation methods to overcome the limitations of a single evaluation metric, thereby improving the performance of existing multi-hop question answering systems and guiding the optimization of multi-hop question generation systems.
[0096] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, several equivalent substitutions or obvious modifications can be made without departing from the concept of the present invention, and all such modifications, achieving the same performance or purpose, should be considered within the scope of protection of the present invention.
Claims
1. A multi-hop question-answering system, characterized in that, It includes a data extraction module, a multi-hop question generation module, a filtering module, and a multi-hop question answering module, among which: The data extraction module is used to extract training data from the knowledge base; The multi-hop problem generation module is used to input the training data into the constructed multi-hop problem generation model and obtain new multi-hop problems; The filtering module is used to filter the new multi-hop questions and obtain multi-hop question-and-answer data; The filtering module includes a pre-trained language model encoder and a second named entity recognition tool, used to calculate the semantic similarity between the new multi-hop problem and the initial multi-hop problem and set a similarity threshold for filtering, as well as to identify and limit the number of entities in the new multi-hop problem; The multi-hop question answering module is used to train and generate a multi-hop question answering model using the multi-hop question answering data, and to obtain answers to multi-hop questions; The multi-hop question answering module is also used to determine whether the number of training iterations of the multi-hop question answering model has reached a set value. If not, the accuracy of the multi-hop question answering model is calculated and fed back to the multi-hop question generation module for joint training.
2. The multi-hop question-answering system according to claim 1, characterized in that, The training data includes the initial multi-hop problem, multi-hop answer, supporting documents, and entities.
3. The multi-hop question-answering system according to claim 2, characterized in that, The data extraction module includes a natural language processing tool and a first named entity recognition tool; The extraction of training data specifically includes: extracting initial multi-hop questions, multi-hop answers, and supporting documents from the knowledge base; deduplicating and correcting errors in the initial multi-hop questions, multi-hop answers, and supporting documents using the natural language processing tool; and extracting entities from the supporting documents using the first named entity recognition tool.
4. The multi-hop question-answering system according to any one of claims 2 to 3, characterized in that, The multi-hop question-and-answer data includes the new multi-hop question, the multi-hop answer, supporting documents, and entities.
5. The multi-hop question-answering system according to any one of claims 1 to 3, characterized in that, The training process parameters of the multi-hop problem generation model include at least one of the following: batch size, training period, and stopping condition. The processing of the batch data specifically includes: splitting the batch data into mini-batch data, training each mini-batch data in the multi-hop problem generation model and calculating the loss value of the loss function, performing backpropagation and calculating the gradient, evaluating and returning the calculation result of the loss value of the loss function to the multi-hop problem generation model, and updating the parameters of the multi-hop problem generation model.
6. The multi-hop question-answering system according to claim 1, characterized in that, The formula for calculating semantic similarity is: ; in, This represents the initial multi-hop problem, by Composed of 10 characters; This represents the new multi-hop problem, by It consists of 10 characters; T represents matrix transpose. This represents the vector generated by the pre-trained language model encoder for the initial multi-hop problem. This represents the vector generated by the pre-trained language model encoder for the new multi-hop problem. The calculation formula is: ; The calculation formula is: ; in, This refers to the pre-trained language model encoder. Represents a character.
7. A multi-hop question-and-answer method, characterized in that, The multi-hop question-answering system based on any one of claims 1 to 6 includes the following steps: S1: Extract training data from the knowledge base using the data extraction module; S2: Using the training data, the multi-hop problem generation module trains and generates a multi-hop problem generation model to obtain new multi-hop problems; S3: Filter the new multi-hop questions through the filtering module and obtain multi-hop question-and-answer data; S4; Using the multi-hop question-answering module, a multi-hop question-answering model is trained using the multi-hop question-answering data, and answers to multi-hop questions are obtained.
8. The multi-hop question-answering method according to claim 7, characterized in that, The method also includes step S5: determining whether the number of training iterations of the multi-hop question answering model has reached a set value. If not, the accuracy of the multi-hop question answering model is calculated, the accuracy is fed back to the multi-hop question generation model, and steps S2 to S5 are repeated. If the number of training iterations has reached a set value, the multi-hop question answering model is retained.
Citation Information
Patent Citations
Candidate paragraph generation and multi-hop question answering method based on text classification
CN115878794A