CN-121981284-A - Method and device for generating solving problem strategy
Abstract
At least one embodiment of the present disclosure provides a method for generating a solution strategy and a device for generating a solution strategy. The method comprises the steps of inputting questions into a question solving strategy generation model, and generating a question solving strategy sequence of model prediction questions through the question solving strategy, wherein the question solving strategy generation model is trained by a training sample pool in a mode that the ratio of the number of first samples used for next training of the question solving strategy generation model to the total number of samples of the training sample pool is improved in response to the current prediction accuracy of the question solving strategy generation model being greater than or equal to a preset threshold, and the first samples are samples which cause the current prediction result of the question solving strategy generation model to be wrong.
Inventors
- GAO XINGLONG
- LU XIUZHI
- YE XINYONG
- CHEN WEIFENG
Assignees
- 新东方教育科技集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260331
Claims (10)
- 1. A method of generating a solution strategy, comprising: Inputting the questions into a question solving strategy to generate a model; Predicting a problem solving strategy sequence of the problem by the problem solving strategy generating model, The problem solving strategy generation model is trained by a training sample pool in the following mode: In response to the current prediction accuracy of the solution strategy generation model being greater than or equal to a predetermined threshold, increasing a ratio of a number of first samples for next training the solution strategy generation model to a total number of samples of the training sample pool, wherein the first samples are samples that make the solution strategy generation model current prediction result erroneous, wherein the training sample pool is constructed by: extracting one or more preliminary question solving strategies which correspond to each sample question and have a connection sequence from a plurality of sample questions by using a large language model through the prompt word; combining at least one preliminary solving strategy with similarity higher than a similarity threshold according to the one or more preliminary solving strategies to obtain a combined solving strategy; Determining the combined solving strategies with the connection sequence as a sample solving strategy sequence according to the connection sequence of the one or more preliminary solving strategies; And obtaining the training sample pool according to each sample question and the corresponding sample question solving strategy sequence.
- 2. The method of claim 1, further comprising: And in response to the current prediction accuracy of the solution strategy generation model being less than the predetermined threshold, reducing a ratio of a number of first samples for next training of the solution strategy generation model to a total number of samples of the training sample pool.
- 3. The method of claim 1, wherein the training sample pool further comprises a second sample, the second sample being a sample that makes the solution strategy generation model current prediction result correct.
- 4. A method according to claim 3, wherein the current prediction accuracy is determined from the number of the first samples and the number of the second samples.
- 5. The method of claim 1, wherein the increasing the ratio of the number of first samples for the next training of the solution strategy generation model to the total number of samples of the training sample pool in response to the current prediction accuracy of the solution strategy generation model being greater than or equal to a predetermined threshold comprises: calculating a current accuracy average based on a previous prediction accuracy and a moving average or weighted average of the current prediction accuracy; The ratio is determined based on the current average of the accuracy rates, an upper limit and a lower limit of the ratio.
- 6. The method of claim 1, wherein the merging at least one preliminary solution strategy with a similarity above a similarity threshold according to the one or more preliminary solution strategies to obtain a merged solution strategy comprises: Carrying out grammatical component synonymous expansion on each preliminary problem solving strategy to obtain a plurality of expansion problem solving strategies corresponding to each preliminary problem solving strategy; Calculating paragraph embedded vectors for each preliminary solving strategy and the plurality of expansion solving strategies corresponding to the preliminary solving strategy, and carrying out average pooling and regularization to generate regularized solving strategy mixed vectors corresponding to each preliminary solving strategy; performing similarity calculation based on a kernel function on all regularized problem solving strategy mixed vectors to obtain problem solving strategy mixed vectors Similarity matrix of dimensions Wherein the number of the solution strategy mixing vectors is N, and the similarity matrix Each element of (3) The similarity between the ith solution strategy mixed vector and the jth solution strategy mixed vector is represented, and N, i and j are positive integers; According to the similarity matrix Calculation of Degree matrix of dimensions The degree matrix Is a diagonal matrix, the diagonal of the diagonal matrix is the first Individual elements Defined as the similarity matrix Middle (f) Summing all elements of a row; using the similarity matrix And the degree matrix To construct Normalized Laplace matrix of dimension ; For the normalized Laplace matrix Performing eigenvalue decomposition and solving the normalized Laplace matrix Characteristic values of elements in the model (a) and corresponding characteristic vectors; Before selecting Corresponding to the smallest non-zero characteristic value Individual feature vectors Wherein Clustering the cluster number for a preset solving strategy The feature vectors form a feature matrix by columns For the feature matrix Normalized for each row to obtain embedded matrix ; Embedding the matrix Each row of (a) is regarded as One data point in the dimensional space to obtain N data points, using a clustering algorithm Clustering the data points, and carrying out clustering treatment on the data points Data points are divided into mutually disjoint points Individual solving strategy cluster ; Repeating the following steps until one solving strategy remains in each solving strategy cluster, namely summarizing each preset number of solving strategies in each solving strategy cluster by utilizing the large language model each time to obtain summarized solving strategies so as to replace the preset number of solving strategies; And taking the rest of the problem solving strategies in each problem solving strategy cluster as the combined problem solving strategies of each problem solving strategy cluster.
- 7. The method of claim 6, wherein the determining, as the sample solution policy sequence, the combined solution policies having a connection order according to the connection order of the one or more preliminary solution policies, comprises: Responsive to said The connection sequence exists between any preliminary solving strategy included in a first solving strategy cluster and any preliminary solving strategy included in a second solving strategy cluster in the individual solving strategy clusters, and the connection sequence is used as the connection sequence between the combined first solving strategy of the first solving strategy cluster and the combined second solving strategy of the second solving strategy cluster; and determining the sample solving strategy sequence according to the connection sequence.
- 8. The method of claim 1, wherein the solution strategy generation model is trained by: Constructing a problem solving strategy knowledge graph by using the sample problem solving strategy sequence; inputting each sample topic into a topic encoder model to predict a posterior probability of a preliminary predicted topic solving strategy sequence for each sample topic, wherein each topic solving strategy in the preliminary predicted topic solving strategy sequence is included in the topic solving strategy knowledge graph; Obtaining prior probability of the preliminary prediction problem solving strategy sequence based on problem solving strategy occurrence frequency, wherein the problem solving strategy occurrence frequency is the number of times the problem solving strategy is predicted in the prediction sequence of all sample problems divided by the total number of the sample problems; Inputting each preliminary prediction problem solving strategy sequence into a problem decoder model to infer a prediction problem corresponding to each preliminary prediction problem solving strategy sequence; Constructing a loss function based on semantic similarity between each sample topic and a corresponding prediction topic, posterior probability and prior probability of the preliminary prediction topic solving strategy sequence; The topic encoder model is trained and converged based on the loss function as the solution strategy generation model.
- 9. The method of claim 8, wherein the loss function is calculated by the formula: , Wherein, the For the sample title And the predicted title The expected value of the semantic similarity between them, Is the predictive probability distribution of the topic encoder model of the input topic X to the topic solving strategy sequence H, H represents the slave A solution strategy sequence of the middle sampling, Posterior probability for the preliminary predictive solution strategy sequence Prior probability A kind of electronic device Divergence; is a weight coefficient.
- 10. An apparatus for generating a solution strategy, comprising: a memory for storing instructions; a processor for reading instructions in said memory and performing the method of any of claims 1-9.
Description
Method and device for generating solving problem strategy Technical Field At least one embodiment of the present disclosure relates to the field of data processing, and more particularly, to a method of generating a solution strategy and an apparatus for generating a solution strategy. Background The solving strategy description is the main idea method description for solving a problem. For a specific discipline, the description of the problem solving strategy is generally a closed and limited problem solving step set, has relative universality when solving the problems of a discipline segment of a discipline, and can prevent the problem of super-class problem solving. If multiple problem solving strategy methods are flexibly understood and mastered, the description of solving ideas can be given to complex problems by using different subset combinations in the problem solving strategy sequence. Students often have difficulty in finding a problem solving strategy in the face of a problem, teaching experts are required to label a large number of problems by manually solving the problem strategy, and the construction cost is high. Therefore, there is a need to devise a method of automatically generating a solution strategy for each subject matter in the education field at low cost. Disclosure of Invention According to one aspect of the present disclosure, there is provided a method of generating a solution strategy, including: Inputting the questions into a question solving strategy to generate a model; generating a problem solving strategy sequence of model prediction problems through a problem solving strategy, wherein the problem solving strategy generation model is trained by a training sample pool in the following way: And in response to the current prediction accuracy of the solution strategy generation model being greater than or equal to a predetermined threshold, increasing a ratio of a number of first samples for the next training solution strategy generation model to a total number of samples of the training sample pool, wherein the first samples are samples that cause a current prediction result of the solution strategy generation model to be incorrect. In some embodiments, the method further comprises: and in response to the current prediction accuracy of the solution strategy generation model being less than the predetermined threshold, reducing a ratio of the number of first samples for the next training solution strategy generation model to the total number of samples of the training sample pool. In some embodiments, the training sample pool further includes a second sample, where the second sample is a sample that enables the solution strategy generation model to have a correct current prediction result. In some embodiments, the current prediction accuracy is determined from the number of first samples and the number of second samples. In some embodiments, responsive to the current prediction accuracy of the solution strategy generation model being greater than or equal to a predetermined threshold, increasing the ratio of the number of first samples for the next training solution strategy generation model to the total number of samples of the training sample pool comprises: calculating a current accuracy average based on a moving average or weighted average of the previous prediction accuracy and the current prediction accuracy; the scale is determined based on the current accuracy mean, upper and lower limits of the scale. In some embodiments, the training sample pool is constructed by: extracting one or more preliminary question solving strategies which correspond to each sample question and have a connection sequence from a plurality of sample questions by using a large language model through the prompt word; combining at least one preliminary solving strategy with similarity higher than a similarity threshold according to one or more preliminary solving strategies to obtain a combined solving strategy; Determining the combined solving strategies with the connection sequence as a sample solving strategy sequence according to the connection sequence of one or more preliminary solving strategies; and obtaining a training sample pool according to each sample question and the corresponding sample question solving strategy sequence. In some embodiments, combining at least one preliminary solution strategy with a similarity above a similarity threshold according to one or more preliminary solution strategies to obtain a combined solution strategy comprises: Carrying out grammatical component synonymous write expansion on each preliminary problem solving strategy to obtain a plurality of write expansion problem solving strategies corresponding to each preliminary problem solving strategy; Calculating paragraph embedded vectors for each preliminary solving strategy and a plurality of expansion solving strategies corresponding to the preliminary solving strategy, and carrying out average pooling an