Method, electronic device, and computer program product for generating answers to questions

By designing multiple response rules and simulating different thinking processes in the supplementary learning question-and-answer model, the optimal response content is generated, which solves the problem of low intelligence level of the supplementary learning question-and-answer model and improves the accuracy of the answers.

CN119808962BActive Publication Date: 2025-12-05IFLYTEK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510247222.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-12-05
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

Existing tutoring question-answering models have low intelligence and accuracy, and their performance can only be improved by increasing the amount of training data.

Method used

The design represents multiple response rules for the thinking process in the context of supplementary learning. By sorting the multiple response rules in different ways, different thinking processes are simulated. The optimal thinking process is selected to generate the response content. The pre-trained supplementary learning question-and-answer model is used to simulate the human thinking process.

Benefits of technology

It improves the intelligence level of the response process and the accuracy of the answers without increasing the amount of training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808962B_ABST
    Figure CN119808962B_ABST
Patent Text Reader

Abstract

The application provides a method for generating an answer to a question, an electronic device and a computer program product, and applies to the technical field of artificial intelligence. The method comprises the following steps: in response to an input question to be replied, a plurality of reply rules representing a thinking process in an auxiliary learning scenario are determined; the reply rules are rules that need to be followed when replying to the question; the plurality of reply rules are sorted differently, different thinking processes are simulated based on different sorting results, and the reply content generated under the optimal thinking process is selected as the answer to the question to be replied; wherein the reply content generated under the thinking process is generated based on the reply content corresponding to each reply rule included in the thinking process. The application designs a plurality of reply rules representing a thinking process in an auxiliary learning scenario, and combines different reply rule sequences, so that the reply process can reflect the human thinking process. Compared with directly generating an answer based on model parameters, the intelligent level is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method for generating answers to questions, an electronic device, and a computer program product. Background Technology

[0002] Throughout the history of education, personalized education has gradually become an important direction for current educational reform and development. The traditional compulsory education model, focusing on the uniform transmission of knowledge, often fails to fully tap into the potential of each student. In the current social environment, personalized education is gradually becoming an inevitable choice for cultivating talent adapted to future societal development. Currently, online learning platforms and intelligent learning aids are emerging in large numbers. Through question-and-answer models, these aids can automatically respond to learners' questions. This not only helps learners improve their learning but also allows for the collection and analysis of learners' learning data. Educators can then use this data to understand students' learning progress and precisely customize learning plans for each learner, thus achieving personalized education.

[0003] Currently, large-scale models, with their powerful language processing capabilities and intelligent algorithms, provide a solid technical foundation for intelligent learning assistance. Therefore, learning assistance question-answering models are typically large-scale models. Furthermore, by training large-scale models with a large amount of high-quality labeled data, learning assistance question-answering models capable of automatically answering questions can be obtained.

[0004] However, this current supplementary learning question-answering model has a low level of intelligence, typically generating answers directly from the model parameters, resulting in low accuracy. Furthermore, the only way to improve the model's accuracy is to increase the amount of training data. Summary of the Invention

[0005] Based on the above-mentioned technological status, this application proposes a method, electronic device, and computer program product for generating answers to questions.

[0006] According to a first aspect of the embodiments of this application, a method for generating answers to questions is provided, the method comprising:

[0007] In response to an input question to be answered, multiple response rules are determined to represent the thinking process in the context of supplementary learning; the response rules are the rules that need to be followed when answering a question.

[0008] Multiple response rules are sorted in different ways, different thinking processes are simulated based on the different sorting results, and the response content generated under the optimal thinking process is selected as the answer to the question to be answered; wherein, the response content generated under the thinking process is generated based on the response content corresponding to each response rule included in the thinking process.

[0009] Optionally, in response to the input question to be answered, multiple response rules representing the thinking process in the learning assistance scenario are determined; the multiple response rules are sorted in different orders, different thinking processes are simulated based on the different sorting results, and the response content generated under the optimal thinking process is selected as the answer to the question to be answered, including:

[0010] The question to be answered is input into a pre-trained tutoring question-answering model, so that the tutoring question-answering model responds to the input question to determine multiple answer rules that represent the thinking process in the tutoring scenario; the multiple answer rules are sorted in different ways, different thinking processes are simulated based on the different sorting results, and the answer content generated under the optimal thinking process is selected as the answer to the question to be answered.

[0011] Optionally, the multiple response rules for the thinking process in the representation-assisted learning scenario include:

[0012] Answering rules for responding to questions in supplementary learning scenarios and answering rules for evaluating and / or re-responding to answers to questions in supplementary learning scenarios.

[0013] Optionally, the response rules for answering questions in the context of supplementary learning include at least one of the following:

[0014] Each step of the reasoning process is presented at a time;

[0015] The answer is given directly after a simple deduction.

[0016] Break down the original problem into multiple sub-problems and answer the sub-problems;

[0017] Paraphrase the question;

[0018] Emphasizing the original problem.

[0019] Optionally, multiple response rules are sorted in different ways, different thought processes are simulated based on the different sorting results, and the response content generated under the optimal thought process is selected as the answer to the question to be answered, including:

[0020] Multiple response content paths are generated; wherein, the multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and different response rule paths are composed of multiple response rules arranged in different orders;

[0021] The optimal response path is determined based on the reward score for each of the aforementioned response content paths; wherein, the reward score is positively correlated with the response quality.

[0022] The last reply in the optimal reply path is determined as the answer to the question to be answered.

[0023] Optionally, the reward score includes the sum of the result reward score and the process reward score;

[0024] The result reward score includes a reward score that is positively correlated with the quality of the last reply in the reply content path, and the process reward score includes a reward score that is positively correlated with the quality of the reply in the reply content path.

[0025] Optionally, the multiple response content paths are search paths constructed based on the Monte Carlo tree search algorithm, and each response content in the response content path corresponds to a node in the search path;

[0026] Based on the reward score for each of the aforementioned response content paths, the optimal response content path is determined, including:

[0027] For each of the search paths, the sum of the upper confidence interval values ​​of each node is calculated;

[0028] The target search path is determined as the optimal response content path, wherein the target search path is the search path with the largest sum of upper confidence interval values.

[0029] Optionally, the training process of the supplementary learning question-answering model includes:

[0030] Acquire training data; wherein each piece of training data includes: a question and response content generated by multiple response rules based on the thinking process in the representation-assisted learning scenario;

[0031] The learning assistance question-answering model is trained based on the training data; wherein, during the training process, the learning assistance question-answering model will generate answers to the questions in the training data based on multiple response rules representing the thinking process in the learning assistance scenario.

[0032] Optionally, the supplementary learning question-answering model includes: a reward score module and a question-answering module. The reward score module is used to generate a reward score for each answer content path. The question-answering module is used to generate multiple answer content paths and determine the answer to the question in the training data based on the reward score of each answer content path.

[0033] The reward score is positively correlated with the quality of the response. The multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and the different response rule paths are composed of multiple response rules arranged in different orders.

[0034] Optionally, the training process of the supplementary learning question-answering model further includes:

[0035] The proportion of correct answers generated by the supplementary learning question-answering model under the target conditions is taken as the actual reward score; and / or, the average reward score of the supplementary learning question-answering model under the target conditions is taken as the actual reward score; wherein, the target conditions include the situation of generating answers to the same question multiple times in a row;

[0036] The reward score module is trained based on the actual reward score.

[0037] According to a second aspect of the embodiments of this application, an apparatus for generating answers to questions is provided, the apparatus comprising:

[0038] The response rules module is used to determine multiple response rules that represent the thinking process in the learning assistance scenario in response to the input question to be answered; the response rules are the rules that need to be followed when answering the question;

[0039] The answer generation module is used to sort multiple response rules in different ways, simulate different thinking processes based on different sorting results, and select the response content generated under the optimal thinking process as the answer to the question to be answered; wherein, the response content generated under the thinking process is generated based on the response content corresponding to each response rule included in the thinking process.

[0040] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor; the memory is connected to the processor and is used to store a program; the processor is used to implement the method for generating question answers as described in the first aspect by running the program in the memory.

[0041] According to a fourth aspect of the embodiments of this application, a storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the method for generating answers to questions as described in the first aspect.

[0042] According to a fifth aspect of the embodiments of this application, a computer program product is provided, comprising: a computer program that, when executed by a processor, implements the method for generating answers to questions as described in the first aspect.

[0043] In this embodiment, multiple response rules are designed to represent the thinking process in a learning-assisted scenario. During the response to an input question, these rules are sorted differently to simulate different thinking processes, and the response generated under the optimal thinking process is selected as the answer to the question. This makes the response process closer to human thinking. Compared to directly generating answers based on model parameters, this improves the level of intelligence. Furthermore, it improves the accuracy of the answers without increasing the amount of training data. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0045] Figure 1 This is a flowchart illustrating a method for generating answers to questions, as provided in an embodiment of this application.

[0046] Figure 2 This is a schematic diagram of a search tree provided in an embodiment of this application.

[0047] Figure 3 This is a schematic diagram of a device for generating answers to questions, provided in an embodiment of this application.

[0048] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] Overview

[0051] As described in the background section, question-answering models for learning assistance are typically large-scale models. Existing training paradigms for large-scale models mainly include the following: 1. Retraining: Training a large model from scratch using a mixture of general-purpose and domain-specific data. 2. Secondary pre-training: Performing continued pre-training based on a general-purpose model. 3. Fine-tuning of the basic large-scale model: Performing instruction tuning based on a general-purpose model. 4. General-purpose large-scale model + vector knowledge base: For questions where the general-purpose large-scale model has limited knowledge, relevant content is found in the vector knowledge base based on the question, and then the powerful capabilities of the general-purpose large-scale model are used to generate the response.

[0052] However, existing large-scale model training paradigms face the following challenges: First, they are highly dependent on training data: performance improvements typically require increasing the amount of training data, rather than improving the learning algorithm itself. Second, they have limited generalization ability: performance may drop sharply in scenarios outside the training data distribution. Finally, they lack the ability to experiment, reflect, and self-correct. Due to these challenges, current supplementary learning question-answering models have low levels of intelligence and low accuracy. Furthermore, the only way to improve model accuracy is by increasing the amount of training data.

[0053] To address the aforementioned technological limitations, this application proposes a method for generating answers to questions. Multiple response rules are designed to represent the thought process in a learning-assisted scenario. During the response to an input question, these rules are sorted differently to simulate different thought processes, and the response generated under the optimal thought process is selected as the answer to the question. This makes the response process closer to human thought processes. Compared to directly generating answers based on model parameters, this method improves the level of intelligence. Furthermore, it improves the accuracy of answers without increasing the amount of training data.

[0054] Exemplary methods

[0055] Please see Figure 1 In one exemplary embodiment, a method for generating answers to questions is provided. This method can be applied to any electronic device, including but not limited to computers, servers, and smartphones. The method for generating answers to questions may include:

[0056] S101: In response to an input question to be answered, determine multiple response rules that represent the thinking process in the context of learning assistance.

[0057] It should be noted that the question to be answered can be any question entered by the user. In some embodiments, in the context of supplementary learning, the question to be answered can be content related to the learning content raised by the user during the learning process. This learning process includes at least one of six learning processes: analysis, video, structured analysis, interactive analysis, interactive video, and Socratic blackboard explanation based on error causes. Analysis can be understood as providing a detailed explanation and description of the learning content to help learners understand the knowledge points. Video can be understood as enabling learners to understand the knowledge points more intuitively by watching relevant teaching videos, thus improving learning effectiveness. Structured analysis can be understood as systematically organizing and summarizing knowledge points to form a structured knowledge system, making it easier for learners to memorize and master. Interactive analysis can be understood as adding an interactive element to the aforementioned analysis, allowing learners to participate in the question-solving process, thereby improving their initiative and enthusiasm for learning. Interactive video can be understood as combining video teaching with interactive elements, allowing learners to participate in the interaction while watching the video, enhancing the fun and practicality of learning. Socratic blackboard explanation based on error causes can be understood as using a Socratic questioning approach to address common errors learners make during the learning process. This guides students to discover, analyze, and solve problems themselves, thereby improving their learning and thinking abilities. In some implementations, users can input voice data, which is then converted into text data using speech recognition technology to obtain the question to be answered.

[0058] It is understood that the learning assistance scenarios in this application specification include any scenario that assists learners in their learning, such as the scenarios in which the above six learning processes take place.

[0059] Response rules are the rules that must be followed when answering a question. For example, a response rule could be to directly provide the answer after a simple deduction. When answering the question "What does 1+1 equal?" according to this rule, the answer "1+1 equals 2" could be output. In this embodiment, these multiple response rules are determined based on the thought process of answering questions in a supplementary learning scenario. Therefore, the process of answering questions according to these multiple response rules can simulate a human response. The aforementioned thought process includes, but is not limited to, trial and error, reflection, and backtracking.

[0060] In some embodiments, multiple answer rules that humans need to follow sequentially when answering questions can be summarized based on the above six learning processes.

[0061] S102: Sort multiple response rules in different ways, simulate different thinking processes based on different sorting results, and select the response content generated under the optimal thinking process as the answer to the question to be answered.

[0062] It should be noted that the logic or line of thought that humans follow in answering questions is usually not unique. For example, most people will try different thought processes or lines of thought to find the best answer. In this step, after sorting or combining multiple answer rules in different orders, each sorting result will correspond to a line of thought or thought process. After determining the optimal thought process, the answer content obtained under its corresponding sorting result can be used as the answer to the question to be answered.

[0063] It is worth noting that when generating a response for any given response rule, it is necessary to consider the response content corresponding to all previous response rules within the same thought process. Therefore, the response content generated for the same response rule will differ across different thought processes. In this embodiment, the response content generated under a thought process is based on the response content corresponding to each response rule included in the thought process.

[0064] In this embodiment, multiple response rules are designed to represent the thinking process in a learning-assisted scenario. During the response to an input question, these rules are sorted differently to simulate different thinking processes, and the response generated under the optimal thinking process is selected as the answer to the question. This makes the response process closer to human thinking. Compared to directly generating answers based on model parameters, this improves the level of intelligence. Furthermore, it improves the accuracy of the answers without increasing the amount of training data.

[0065] In some embodiments of this application, in response to an input question to be answered, multiple response rules representing the thinking process in a learning assistance scenario are determined; the multiple response rules are sorted in different ways, different thinking processes are simulated based on the different sorting results, and the response content generated under the optimal thinking process is selected as the answer to the question to be answered, including:

[0066] The question to be answered is input into a pre-trained supplementary learning question-answering model, so that the supplementary learning question-answering model responds to the input question to determine multiple answer rules that represent the thinking process in the supplementary learning scenario; the multiple answer rules are sorted in different ways, different thinking processes are simulated based on different sorting results, and the answer content generated under the optimal thinking process is selected as the answer to the question to be answered.

[0067] It should be noted that the above steps S101-S102 can be achieved using a supplementary learning question-answering model. This supplementary learning question-answering model is pre-trained and can simulate the human thinking process when answering questions, thereby generating answers to the questions to be answered. In some embodiments, this supplementary learning question-answering model can be a large model, but it is not limited to this.

[0068] In this embodiment of the application, a pre-trained learning-assisted question-and-answer model is used to simulate the human thinking process when answering questions and generate answers to the questions to be answered.

[0069] In some embodiments of this application, multiple response rules characterizing the thinking process in a learning-assisted scenario include:

[0070] Answering rules for responding to questions in supplementary learning scenarios and answering rules for evaluating and / or re-responding to answers to questions in supplementary learning scenarios.

[0071] It should be noted that the response rules for answering questions in supplementary learning scenarios include: the response rules that should be followed when simulating human responses to learners' questions about learning content in supplementary learning scenarios. In some embodiments, the response rules for answering questions in supplementary learning scenarios include at least one of the following:

[0072] Each step of the reasoning process is presented at a time;

[0073] The answer is given directly after a simple deduction.

[0074] Break down the original problem into multiple sub-problems and answer the sub-problems;

[0075] Paraphrase the question;

[0076] Emphasizing the original problem.

[0077] Response rules for evaluating and / or re-responding to answers to questions in supplementary learning scenarios include: response rules that should be followed in a supplementary learning scenario, simulating human evaluation or re-response to questions. In some embodiments, the response rules for evaluating and / or re-responding to answers to questions in supplementary learning scenarios include: rethinking the answer; evaluating the quality of the answer.

[0078] In some embodiments, the multiple response rules include: A1: Propose one reasoning step at a time; A2: Provide the answer directly after simple reasoning; A3: Decompose the original problem into multiple sub-problems and answer the sub-problems; A4: Rethink the answer; A5: Restate the problem; A6: Emphasize the original problem. Restate the problem by using a different description than the original problem. Taking a math interactive video scenario (where students can ask questions about parts of the video they have doubts about, or ask an independent question) as an example, let's explain the meaning of A1-A7. A4 and A7 depend on the already output answers or responses, so they need to be cascaded after A1, A2, and A3. For example, if the question to be answered is: What does 1+1 equal?, then the response for A1 could be: 1+1 equals 2. The response for A2 could be: 1+1 equals 2. The response for A3 could be: In what scenario was this question asked? In a primary school math scenario. The response for A6 could be: We need to solve the original problem: What does 1+1 equal? If you choose A3 first, then A4, the answer will be that it is indeed in a primary school math scenario. If you choose A1 first, then A7, the answer will be that the answer is too simplistic and not comprehensive enough, for example, in computer binary operations, 1+1 does not equal 2.

[0079] In this embodiment of the application, the response rules include not only rules for responding to questions, but also rules for evaluating the answers to questions and re-responding to questions, thereby fully reflecting the thought process.

[0080] In some embodiments of this application, multiple response rules are sorted in different ways, different thought processes are simulated based on the different sorting results, and the response content generated under the optimal thought process is selected as the answer to the question to be answered, including:

[0081] Multiple response content paths are generated; among them, multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and different response rule paths are composed of multiple response rules in different order.

[0082] The optimal response content path is determined based on the reward score for each response content path; the reward score is positively correlated with the response quality.

[0083] The last reply in the optimal reply path is identified as the answer to the question to be answered.

[0084] It should be noted that arranging multiple response rules in different ways can generate different response rule paths, which can also represent different thought processes. The response content path corresponding to each thought process or each response rule path includes: a path composed of response content generated by responding sequentially according to the order of the response rules in that response rule path. For example, a certain response rule path includes: A1, A2, A3, and A4 provided in the above embodiments. Assume the question to be answered is: What does 1+1 equal? ​​Then the response content path corresponding to this response rule path includes: A1: 1+1 equals 2. A2: 1+1 equals 2. A3: In what scenario was this question asked? In a primary school math scenario. A4: Indeed, in a primary school math scenario. It is worth noting that the number of response rules in each response rule path is not necessarily the same. In some embodiments, a random sorting method can be used to combine and sort multiple response rules to generate multiple response rule paths. In other embodiments, the combination and sorting methods of multiple response rules can be exhaustively enumerated to generate response rule paths for each combination and sorting method.

[0085] It is understandable that when answering questions according to different thought processes, the quality of the answer is closely related to the rationality of the thought process. The more rational the thought process, the higher the quality of the answer. Conversely, the more irrational the thought process, the lower the quality of the answer. Here, a reward score is used to measure the quality of the answer based on the thought process, answer rule path, or answer content path. Therefore, when selecting the optimal answer content path from multiple answer content paths, the selection is based on the reward score. In some embodiments, the answer content path with the highest reward score can be selected as the optimal answer content path. In other embodiments, the reward score can be used as an initial value and substituted into a pre-designed calculation formula to obtain a calculation result that more accurately measures the answer quality. Then, the answer content path with the largest calculation result is selected as the optimal answer content path.

[0086] In some embodiments, when generating answers to questions using a supplementary question-and-answer model, a reward score module for outputting reward scores can be set within the model. During model training, the reward score module is trained to generate reward scores for each response content path.

[0087] In some embodiments, the last response rule in a response rule path can be set as the response rule used to define the final conclusion. This way, after determining the optimal response content path, the last response can be output as the final answer. For example, if multiple response rules include A1 to A7 in the above embodiments, the last response rule in each response rule path is A2 or A3.

[0088] In this embodiment, different human thought processes can be simulated to generate multiple response paths. Then, the answer to the question is generated based on the optimal response path, further improving the accuracy of the answer.

[0089] In some embodiments of this application, the reward score includes the sum of the result reward score and the process reward score;

[0090] The result reward score includes a reward score that is positively correlated with the quality of the last reply in the reply content path, and the process reward score includes a reward score that is positively correlated with the quality of the reply in the reply content path.

[0091] It should be noted that the result reward score can be considered as the reward score generated with a focus on the final result (the final determined answer). Since the last response in the response content path is used as the answer when determining the final result, the result reward score is positively correlated with the quality of the last response in the response content path. In some embodiments, where the response content path includes multiple nodes, and each node represents a response, the result reward score can be the reward score of the last node.

[0092] The process reward score can be considered as a reward score generated when the thinking process is emphasized. This is related to each response in the response content path. Therefore, the process reward score is positively correlated with the response quality of the response content path. The response quality of the response content path can be the response quality of each response in that path or the response quality of the remaining responses excluding the last one. In some embodiments, when the response content path includes multiple nodes, and each node represents a response, the process reward score is the sum of the reward scores of all non-leaf nodes. For example, the reward score can be expressed as: reward score = m * leaf node reward score + (1-m) * non-leaf node reward score, where the leaf node is the last node.

[0093] In this embodiment of the application, a process reward score is added to the reward score, incorporating the thinking process into the reward, making the reward score more reasonable and accurate.

[0094] In some embodiments of this application, multiple response content paths are search paths constructed based on the Monte Carlo tree search algorithm, and each response content in the response content path corresponds to a node in the search path;

[0095] Based on the reward score for each response content path, the optimal response content path is determined, including:

[0096] For each search path, the sum of the upper confidence interval values ​​of each node is calculated;

[0097] The target search path is determined as the optimal response content path, where the target search path is the search path with the largest sum of upper confidence interval values.

[0098] It should be noted that the upper confidence interval value is the UCT (Upper Confidence Bound Apply to Tree) value. The UCT values ​​for each point can be calculated using Formula 1:

[0099] ;

[0100] Where UCT represents the UCT value; Q represents the cumulative reward of the node up to this round; and N represents the cumulative number of times the node has been visited up to this round. This represents the cumulative number of times the parent node of this node has been visited up to the current round; C represents the exploration weight, with a larger C value indicating a greater emphasis on exploration rather than exploitation. In some embodiments, a larger C is used for the initial rounds, emphasizing exploration, while a smaller C is used for later rounds.

[0101] As we can understand, the Monte Carlo Tree Search (MCTS) algorithm is used to find the optimal decision in the decision-making process. It typically includes four main steps: Selection, Expansion, Simulation, and Backpropagation. Selection: Starting from the root node, the selection strategy guides the algorithm down the tree to the leaf nodes. This process repeatedly applies the UCT formula, continuously comparing the statistical data of each node until a node that is not yet fully expanded is reached. The main goal is to find a balance point that ensures that nodes with high UCT values ​​are repeatedly visited, while also ensuring that nodes that have not been fully explored are explored. Expansion: Once the selection process reaches a node that is not yet fully expanded, the algorithm selects one or more unexplored actions to expand the search tree. This step mainly increases the width of the search tree, allowing the algorithm to explore new strategies. Simulation: After the expansion phase, the algorithm simulates the game by starting from the current node. The simulation process continues until a predetermined termination condition is reached, such as the game ending or reaching a certain depth limit. Backtracking: After the simulation ends, the algorithm backtracks the simulation results from the current node all the way to the root node, updating the statistics of all nodes along this path. This step ensures the learning process of the algorithm, enabling subsequent selection steps to make better decisions.

[0102] To facilitate understanding, the following example illustrates the process of determining the optimal path (optimal response content path) using the Monte Carlo tree algorithm. In this example, the multiple response rules representing the thinking process in the supplementary learning scenario include the contents of A1~A7 in the above embodiment, which will not be repeated here. This example can divide the process of determining the optimal path into three stages.

[0103] Phase 1: Constructing the search tree.

[0104] 1.1 The root node of the search tree is the original problem. Starting from the root node, the process of constructing the search tree in the first round is as follows:

[0105] Perform the selection step and select the root node. Given the original problem is "What does 1+1 equal?", the root node 201 is... Figure 2 As shown.

[0106] Perform the extension step, creating all possible child nodes for the selected node (root node 201) according to the content of A1~A7 and the quality control dependency rules. The quality control dependency rules include: A4 and A7 depend on already output answers or responses, so they need to be cascaded after A1, A2, and A3. The child nodes of root node 201 are as follows: Figure 2 As shown, this can be considered as a first-level child node 202. Here, Figure 2 Only a portion of the search tree is shown.

[0107] Perform the simulation steps, randomly select a child node (first-level child node 202), and repeat the expansion steps until a leaf node (A2, A3) is encountered or the set maximum search depth is reached.

[0108] Perform a backtracking step, calculate the reward for the leaf nodes, and simultaneously add the rewards for all non-leaf nodes on the current search path to m * leaf node reward + (1-m) * non-leaf node reward, and increment the node visit count by 1. For leaf nodes, output the reward using the result-based reward model (equivalent to the result reward score in the above embodiment). For non-leaf nodes, output the reward using the process-based reward model (equivalent to the process reward score in the above embodiment).

[0109] 1.2. Perform the second round of search tree construction. The process of constructing the search tree in the second round is as follows:

[0110] The selection step in round 2 will start from the search tree constructed during the backtracking step in round 1. Again, it will start from the root node and select downwards, first reaching the first level. If an unexplored child node is found, it will be randomly selected and used for the expansion step. This selection step follows two principles: 1) Each time, it starts from the root node and explores downwards level by level until an unexplored node is found. 2) If, starting from the root node, all nodes at a certain level (e.g., the first level) have been explored, then the node with the largest UCT value is selected, and the search continues downwards, and so on.

[0111] The same steps as those in the first round of constructing the search tree are performed in the same way as the expansion step, simulation step, and backtracking step, and will not be repeated here.

[0112] 1.3. Repeat this process several times to construct the search tree. It is worth noting that... Figure 2 Except for the root node, each node corresponds to one reply. Figure 2 The code shows the corresponding response content and rules for each node. It's understandable that for the same response rule across different paths, the response content may be the same or different. For example, the first path consists of "A1: 1+1 equals 2", "A7: The answer is too simple and not comprehensive enough; for example, in binary arithmetic in computers, 1+1 does not equal 2", and "A2: In elementary school math, 1+1 equals 2". The second path consists of "A3: In what scenario is this question asked? In an elementary school math scenario", "A1: In elementary school math, 1+1 equals 2", "A7: The answer is direct and without error", and "A2: In elementary school math, 1+1 equals 2". The responses for A7 differ between the two paths, while the responses for A2 are the same.

[0113] Phase Two: Based on the search tree finally constructed in Phase One, calculate the UCT value of each node. The process of calculating the UCT value is described in Formula One above, and will not be repeated here.

[0114] Phase 3: Select the path with the highest node cascading score as the optimal path.

[0115] In this embodiment of the application, the Monte Carlo tree search algorithm can be used to determine the best search path, thereby quickly determining the optimal response content path.

[0116] In some embodiments of this application, the training process of the learning-assisted question-answering model includes:

[0117] Acquire training data; where each piece of training data includes: a question and the response content generated by multiple response rules based on the thinking process in the representation-assisted learning scenario;

[0118] The supplementary learning question-answering model is trained based on the training data. During the training process, the supplementary learning question-answering model will generate answers to the questions in the training data based on multiple response rules that represent the thinking process in the supplementary learning scenario.

[0119] It should be noted that the questions in the training data can be questions raised by learners in pre-collected supplementary learning scenarios. The responses can be understood as the results of labeling the training data. Therefore, by using the questions and labeled responses as training data to train the model, a supplementary learning question-answering model with the ability to simulate the human thinking process in generating answers when responding to questions can be obtained.

[0120] In some embodiments, during the training of the supplementary learning question-answering model, the model generates multiple response content paths. These paths correspond to response rule paths representing different thinking processes in the supplementary learning scenario, and each path consists of multiple response rules arranged in different orders. The optimal response content path is determined based on the reward score of each path, where the reward score is positively correlated with response quality. The last response in the optimal path is identified as the answer to the question. This process is similar to the description in the above embodiments and will not be repeated here. Further, during the training of the supplementary learning question-answering model, the multiple response content paths are search paths constructed using a Monte Carlo tree search algorithm, with each response corresponding to a node in the search path. Determining the optimal response content path based on the reward score of each path includes: calculating the sum of the upper confidence interval values ​​for each node in each search path; and identifying the target search path as the optimal response content path, where the target search path is the search path with the largest sum of upper confidence interval values. The process can be found in the description of similar content in the above embodiments, and will not be repeated here.

[0121] In some embodiments, the pre-training supplementary question-answering model can be a large model with general question-answering capabilities. Training the supplementary question-answering model based on training data includes: fine-tuning the supplementary question-answering model based on the training data.

[0122] In this embodiment, the questions and labeled responses are used as training data to train the model, resulting in a supplementary learning question-answering model capable of generating answers by simulating the human thought process when responding to questions. This allows for the generation of a highly accurate supplementary learning question-answering model without excessive reliance on the amount of training data.

[0123] In some embodiments of this application, the supplementary learning question-answering model includes: a reward score module and a question-answering module. The reward score module is used to generate a reward score for each answer content path. The question-answering module is used to generate multiple answer content paths and determine the answer to the question in the training data based on the reward score of each answer content path.

[0124] Among them, the reward score is positively correlated with the quality of the response. Multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and different response rule paths are composed of multiple response rules arranged in different orders.

[0125] It should be noted that the supplementary learning question-answering model utilizes a reinforcement learning approach, designing a reward score module and a question-answering module. These two parts work together to perform reinforcement learning and complete the model training process. It is worth noting that descriptions regarding reward scores and response quality can be found in the descriptions of the same features in the above embodiments, and will not be repeated here.

[0126] In this embodiment of the application, a reward score module and a question-answering module are designed using a reinforcement learning scheme, thereby enabling the auxiliary learning question-answering model to integrate the advantages of reinforcement learning during the training process.

[0127] To improve the rationality and accuracy of reward scores, in some embodiments of this application, the reward score module is trained, including:

[0128] The first type of data and / or the second type of data are filtered using a supplementary question-and-answer model.

[0129] The reward score module is trained based on the selected first type of data and / or second type of data;

[0130] The first type of data includes training data where the total reward score is higher than the first score threshold, but the answer to the question is incorrect. The second type of data includes training data where the total reward score is higher than the second score threshold, but the result reward score is lower than the third score threshold. The total reward score includes the sum of the result reward score and the process reward score. The result reward score includes the reward score that is positively correlated with the quality of the last reply in the reply content path, and the process reward score includes the reward score that is positively correlated with the quality of the reply in the reply content path.

[0131] It should be noted that training the reward score module can make its output reward scores more reasonable and accurate. In this embodiment, considering that the training data should focus on different aspects in different learning scenarios, data that meets the requirements is selected as the training data for the reward score module through a screening process. For example, in parsing, video, and structured parsing scenarios, data with a high overall score (total reward score) but an incorrect final answer is selected. In interactive parsing, interactive video, and Socratic blackboard explanation based on error causes scenarios, data with a high overall score (total reward score) but a low final reward score is selected. The descriptions of parsing, video, structured parsing, interactive parsing, interactive video, Socratic blackboard explanation based on error causes, and final reward scores in this embodiment can be found in the descriptions of the same content in the above embodiments, and will not be repeated here.

[0132] In some embodiments, during the training of the reward score module using the first type of data and the second type of data, human scoring can be used as the model's actual reward score. The trained reward score module is then generated through iterative training.

[0133] In this embodiment, the reward score module is trained using filtered first and second type data, making the training process more targeted. The reward score output by the trained module is more reasonable and accurate.

[0134] To improve the rationality and accuracy of reward scores, in some embodiments of this application, the training process of the tutoring question-answering model further includes:

[0135] The proportion of correct answers generated by the supplementary learning question-answering model under the target conditions is used as the actual reward score; and / or, the average reward score of the supplementary learning question-answering model under the target conditions is used as the actual reward score; wherein, the target conditions include the situation where answers to the same question are generated multiple times consecutively;

[0136] The reward score module is trained based on the actual reward scores.

[0137] It should be noted that training the reward score module can make its output reward score more reasonable and accurate. In this embodiment, considering that the calculation rules for reward scores are not entirely the same in different learning scenarios, different algorithms are designed to calculate the real reward score for different learning scenarios. For example, in parsing, video, and structured parsing scenarios, N answers are generated for the same question, and then the proportion of correct answers is calculated, which is used as the real reward score; 2) In interactive parsing, interactive video, and Socratic blackboard explanation based on error causes scenarios, M final results are generated for the same question, and then the average reward score of the M final results is calculated, which is used as the real reward score. The relevant descriptions of parsing, video, structured parsing, interactive parsing, interactive video, and Socratic blackboard explanation based on error causes can be found in the descriptions of the same content in the above embodiments, and will not be repeated here. M and N are both integers greater than 2.

[0138] In this embodiment, different algorithms are designed to calculate the real reward score for different learning scenarios, so that the reward score output by the reward score module after training is more reasonable and accurate.

[0139] In some embodiments, when training the reward score module, a real reward score can be generated by manual scoring, and then the reward score module can be trained based on the real reward score.

[0140] The question-answering model provided in this application can continuously improve through learning, reflection, backtracking, and adaptation, just like a human, thus exhibiting a higher level of intelligence. In the training phase, a general thought process is first defined; then, the model is fine-tuned based on the thought process; finally, a reward model based on the thought process is trained. In the inference phase, the Monte Carlo tree search algorithm is used to find the optimal response result.

[0141] Exemplary device

[0142] Accordingly, embodiments of this application also provide an apparatus for generating answers to questions, see [link to relevant documentation]. Figure 3 As shown, the apparatus for generating answers to questions includes:

[0143] The response rule module 301 is used to determine multiple response rules that represent the thinking process in the learning assistance scenario in response to the input question to be answered; the response rules are the rules that need to be followed when answering the question.

[0144] The answer generation module 302 is used to sort multiple response rules in different ways, simulate different thinking processes based on different sorting results, and select the response content generated under the optimal thinking process as the answer to the question to be answered; wherein, the response content generated under the thinking process is generated based on the response content corresponding to each response rule included in the thinking process.

[0145] In some embodiments, in response to an input question to be answered, multiple response rules representing the thinking process in a learning assistance scenario are determined; the multiple response rules are sorted in different ways, different thinking processes are simulated based on the different sorting results, and the response content generated under the optimal thinking process is selected as the answer to the question to be answered, including:

[0146] The question to be answered is input into a pre-trained supplementary learning question-answering model, so that the supplementary learning question-answering model responds to the input question to determine multiple answer rules that represent the thinking process in the supplementary learning scenario; the multiple answer rules are sorted in different ways, different thinking processes are simulated based on different sorting results, and the answer content generated under the optimal thinking process is selected as the answer to the question to be answered.

[0147] In some embodiments, multiple response rules characterizing the thinking process in a learning-assisted scenario include:

[0148] Answering rules for responding to questions in supplementary learning scenarios and answering rules for evaluating and / or re-responding to answers to questions in supplementary learning scenarios.

[0149] In some embodiments, the response rules for answering questions in tutoring scenarios include at least one of the following:

[0150] Each step of the reasoning process is presented at a time;

[0151] The answer is given directly after a simple deduction.

[0152] Break down the original problem into multiple sub-problems and answer the sub-problems;

[0153] Paraphrase the question;

[0154] Emphasizing the original problem.

[0155] In some embodiments, the answer generation module 302 includes:

[0156] The response content unit is used to generate multiple response content paths; among them, the multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and different response rule paths are composed of multiple response rules in different order.

[0157] The selection unit is used to determine the optimal response content path based on the reward score for each response content path; where the reward score is positively correlated with the response quality.

[0158] The determining unit is used to identify the last response in the optimal response path as the answer to the question to be answered.

[0159] In some embodiments, the reward score includes the sum of the result reward score and the process reward score; wherein the result reward score includes the reward score that is positively correlated with the quality of the last response in the response content path, and the process reward score includes the reward score that is positively correlated with the quality of the response in the response content path.

[0160] In some embodiments, multiple response content paths are search paths constructed based on the Monte Carlo tree search algorithm, and each response content in the response content path corresponds to a node in the search path;

[0161] The selection unit is specifically used to calculate the sum of the upper confidence interval values ​​of each node for each search path; and to determine the target search path as the optimal response content path, wherein the target search path is the search path with the largest sum of upper confidence interval values.

[0162] In some embodiments, the device further includes:

[0163] The training data module is used to acquire training data; each piece of training data includes: a question and the response content generated by multiple response rules based on the thinking process in the representation-assisted learning scenario;

[0164] The training module is used to train the supplementary learning question-answering model based on training data. During the training process, the supplementary learning question-answering model will generate answers to the questions in the training data based on multiple response rules that represent the thinking process in the supplementary learning scenario.

[0165] In some embodiments, the supplementary learning question-answering model includes: a reward score module and a question-answering module; the reward score module is used to generate a reward score for each answer content path; the question-answering module is used to generate multiple answer content paths and determine the answer to the question in the training data based on the reward score of each answer content path.

[0166] Among them, the reward score is positively correlated with the quality of the response. Multiple response content paths correspond to response rule paths that represent different thinking processes in the learning assistance scenario, and different response rule paths are composed of multiple response rules arranged in different orders.

[0167] In some embodiments, the device further includes:

[0168] The reward training module is used to take the proportion of correct answers generated by the supplementary learning question-answering model under the target situation as the real reward score; and / or, to take the average reward score of the supplementary learning question-answering model under the target situation as the real reward score; wherein, the target situation includes the situation of generating question answers multiple times in a row for the same question; and to train the reward score module based on the real reward score.

[0169] In some embodiments, the training module is specifically used to filter first type data and / or second type data through the supplementary question-answering model; and to train the reward score module based on the filtered first type data and / or second type data.

[0170] The first type of data includes training data where the total reward score is higher than the first score threshold, but the answer to the question is incorrect. The second type of data includes training data where the total reward score is higher than the second score threshold, but the result reward score is lower than the third score threshold. The total reward score includes the sum of the result reward score and the process reward score. The result reward score includes the reward score that is positively correlated with the quality of the last reply in the reply content path, and the process reward score includes the reward score that is positively correlated with the quality of the reply in the reply content path.

[0171] The apparatus for generating answers to questions provided in this embodiment belongs to the same concept as the method for generating answers to questions provided in the above embodiments of this application. It can execute the method for generating answers to questions provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the specific processing content of the method for generating answers to questions provided in the above embodiments of this application, and will not be repeated here.

[0172] It should be understood that the modules in the above device can be implemented by a processor calling software. For example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit of the device. The processor can be a general-purpose processor, such as a CPU or microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented as hardware circuits. By designing the hardware circuits, some or all of the unit functions can be implemented. The hardware circuits can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented by designing the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented by a PLD, such as an FPGA, which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files to implement the functions of some or all of the above units. All units of the above device can be implemented entirely by a processor calling software, entirely by hardware circuits, or partially by a processor calling software with the remaining parts implemented by hardware circuits.

[0173] In this application embodiment, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, GPU, or DSP. In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships are fixed or reconfigurable. For example, the processor may be a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, or DPU.

[0174] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0175] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a System-on-Chip (SoC). The SoC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.

[0176] Exemplary electronic devices

[0177] This application provides an electronic device, see [link to relevant documentation] Figure 4 As shown, the device includes:

[0178] Memory 400 and processor 410;

[0179] The memory 400 is connected to the processor 410 and is used to store programs;

[0180] The processor 410 is configured to implement the method for generating answers to questions disclosed in any of the above embodiments by running programs stored in the memory 400.

[0181] Specifically, the aforementioned electronic device may also include: a bus, a communication interface 420, an input device 430, and an output device 440.

[0182] The processor 410, memory 400, communication interface 420, input device 430, and output device 440 are interconnected via a bus. Among them:

[0183] A bus can include a pathway for transmitting information between various components of a computer system.

[0184] The processor 410 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0185] Processor 410 may include a main processor, as well as a baseband chip, modem, etc.

[0186] The memory 400 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 400 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.

[0187] Input device 430 may include a device for receiving user input data and information, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.

[0188] Output device 440 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0189] The communication interface 420 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0190] The processor 410 executes the program stored in the memory 400 and calls other devices, which can be used to implement the various steps of any of the methods for generating answers to questions provided in the above embodiments of this application.

[0191] This application also proposes a chip including a processor and a data interface. The processor reads and runs a program stored in a memory through the data interface to execute the method for generating answers to questions described in any of the above embodiments. For details of the processing and its beneficial effects, please refer to the embodiments of the method for generating answers to questions described above.

[0192] Exemplary computer program products and storage media

[0193] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for generating answers to questions according to various embodiments of this application as described in any of the foregoing embodiments of this specification.

[0194] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0195] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor through steps in the methods for generating answers to questions according to various embodiments of this application as described in any of the foregoing embodiments of this specification.

[0196] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0197] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0198] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.

[0199] The modules and sub-modules in the various embodiments of the present application's devices and terminals can be merged, divided, and deleted according to actual needs.

[0200] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0201] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.

[0202] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.

[0203] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0204] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0205] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0206] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of generating an answer to a question, characterized by, The method comprises: in response to an input question to be replied, determining a plurality of reply rules representing the thinking process in the tutoring scenario; a reply rule is a rule that needs to be followed when replying to a question; different sorting of the plurality of reply rules to determine a plurality of reply rule paths representing different thinking processes; for each of the reply rule paths, replying to the question to be replied in the order of the reply rules in the reply rule path, and using the reply content corresponding to each reply rule to form a reply content path corresponding to the reply rule path; wherein when replying to the question to be replied according to the current reply rule in the reply rule path, the reply content corresponding to all the reply rules before the current reply rule in the reply rule path is referred to for reply; based on the reward score of each of the reply content paths, determining an optimal reply content path; determining the last reply content in the optimal reply content path as the answer to the question to be replied.

2. The method of claim 1, wherein, in response to an input question to be replied, determining a plurality of reply rules representing the thinking process in the tutoring scenario; different sorting of the plurality of reply rules to determine a plurality of reply rule paths representing different thinking processes; for each of the reply rule paths, replying to the question to be replied in the order of the reply rules in the reply rule path, and using the reply content corresponding to each reply rule to form a reply content path corresponding to the reply rule path; based on the reward score of each of the reply content paths, determining an optimal reply content path; determining the last reply content in the optimal reply content path as the answer to the question to be replied, comprising: inputting the question to be replied into a pre-trained tutoring question and answer model, so that the tutoring question and answer model determines a plurality of reply rules representing the thinking process in the tutoring scenario in response to the input question to be replied; different sorting of the plurality of reply rules to determine a plurality of reply rule paths representing different thinking processes; for each of the reply rule paths, replying to the question to be replied in the order of the reply rules in the reply rule path, and using the reply content corresponding to each reply rule to form a reply content path corresponding to the reply rule path; based on the reward score of each of the reply content paths, determining an optimal reply content path; determining the last reply content in the optimal reply content path as the answer to the question to be replied.

3. The method according to any of claims 1 or 2, characterized in that, The plurality of reply rules representing the thinking process in the tutoring scenario comprises: reply rules for replying to questions in the tutoring scenario and reply rules for evaluating and / or re-replying to answers to questions in the tutoring scenario.

4. The method of claim 3, wherein, The reply rules for replying to questions in the tutoring scenario comprise at least one of: proposing one reasoning step at a time; directly giving an answer after one-time simple reasoning; disassembling the original question into a plurality of sub-questions and answering the sub-questions; repeating the question; emphasizing the original question.

5. The method of claim 1, wherein, The reward score comprises the sum of the result reward score and the process reward score; The result reward score includes a reward score positively correlated with the reply quality of the last reply content in the reply content path, and the process reward score includes a reward score positively correlated with the reply quality of the reply content path.

6. The method of claim 1, wherein, The reply content path is a search path constructed based on a Monte Carlo tree search algorithm, and each reply content in the reply content path corresponds to a node in the search path. Based on the reward scores of each reply content path, the optimal reply content path is determined, including: For each search path, the sum of the upper confidence interval values of the nodes is calculated. The target search path is determined as the optimal reply content path, wherein the target search path is the search path with the largest sum of upper confidence interval values.

7. The method of claim 2, wherein, The training process of the auxiliary learning question and answer model includes: Obtaining training data; wherein each training data includes a question and reply content generated based on a plurality of reply rules representing the thinking process in the auxiliary learning scenario; Training the auxiliary learning question and answer model based on the training data; wherein during the training process, the auxiliary learning question and answer model will generate answers to the questions in the training data based on the plurality of reply rules representing the thinking process in the auxiliary learning scenario.

8. The method of claim 7, wherein, The auxiliary learning question and answer model includes a reward score module and a question and answer module, the reward score module is used to generate a reward score for each reply content path, and the question and answer module is used to generate a plurality of reply content paths and determine the answer to the question in the training data based on the reward scores of each reply content path. The reward score is positively correlated with the reply quality, the plurality of reply content paths correspond to reply rule paths representing different thinking processes in the auxiliary learning scenario, and different reply rule paths are composed of the plurality of reply rules in different arrangement orders.

9. The method of claim 8, wherein, The training process of the auxiliary learning question and answer model further includes: The proportion of the auxiliary learning question and answer model generating correct answers in a target situation is taken as the real reward score; and / or the average of the reward scores of the auxiliary learning question and answer model in the target situation is taken as the real reward score; wherein the target situation includes the case of generating answers to the same question for multiple times in succession; The reward score module is trained according to the real reward score.

10. An electronic device, comprising: It includes a memory and a processor; The memory is connected with the processor and is used to store programs; The processor is used to realize the method for generating answers to questions according to any one of claims 1 to 9 by running the programs in the memory.

11. A computer program product, characterised in that, It includes: A computer program, when executed by a processor, realizes the method for generating answers to questions according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Campus spoofing prevention and control management method, device, system and equipment and storage medium

    CN118964561A

  • Self-teaching large language models

    US20240362416A1