A data generation method and device, electronic equipment and storage medium
By using iterative difficulty enhancement and verification techniques, highly challenging question-answer pairs are automatically constructed, solving the problem of scarce high-quality training data and improving the logical reasoning ability and data generation efficiency of large-scale language models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- IFLYTEK CO LTD
- Filing Date
- 2026-02-04
- Publication Date
- 2026-06-05
AI Technical Summary
High-quality, high-difficulty training data is scarce in existing technologies, and the construction process relies on manual creation, resulting in high costs and low efficiency, making it difficult to meet the needs of large-scale language models.
By obtaining an initial question, the difficulty is increased in at least two rounds using a large difficulty-increasing model to select target questions that meet the quality requirements, and high-difficulty question-answer pairs are constructed, including syntactic, semantic consistency and formal proof verification, to achieve automated construction.
It enables the automated construction of complex question-answer pairs, improves the logical reasoning and generalization capabilities of large language models, reduces data generation costs, and increases efficiency.
Smart Images

Figure CN122152982A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data generation technology, and in particular to a data generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, there are two main challenges in collecting high-quality, high-difficulty training data (e.g., high-quality, high-difficulty mathematical training data) for large-scale language models. First, existing datasets lack large-scale, high-quality resources that meet the needs of high-order reasoning, especially data at the level of high-difficulty competitions such as the International Mathematical Olympiad (IMO). Second, the construction of high-quality data still heavily relies on expert creation, resulting in high production costs and low efficiency, making it difficult to meet the demands of modern large-scale model training for massive amounts of high-quality data. Summary of the Invention
[0003] The main technical problem addressed by this application is to provide a data generation method, apparatus, electronic device, and storage medium that can automate the construction of highly complex question-answer pairs.
[0004] To address the aforementioned technical problems, the first aspect of this application provides a data generation method, which includes: acquiring a plurality of initial questions; using a difficulty-increasing model to increase the difficulty of each of the initial questions in at least two rounds to obtain a plurality of first target questions; wherein, the question to be increased in the subsequent round of difficulty increase is the target question obtained by the previous round of difficulty increase, and the question to be increased in the first round of difficulty increase is the initial question; and constructing a corresponding target question-answer pair for each of the first target questions.
[0005] The steps for each round of difficulty increase include: taking the large difficulty increase model corresponding to the current round of difficulty increase as the current model; using the current model to increase the difficulty of each problem to be increased in the current round of difficulty increase to obtain each candidate problem to be increased; selecting at least one candidate problem to be increased that meets the quality requirements from each candidate problem to be increased, as the target problem to be increased in the current round of difficulty increase; wherein, the current round of difficulty increase is the final round of difficulty increase, and the target problem to be increased in the current round of difficulty increase is the first target problem.
[0006] The candidate boosting problem that meets the quality requirements is a candidate boosting problem with a number of characters less than a first quantity threshold and greater than a second quantity threshold, wherein the first quantity threshold is greater than the second quantity threshold.
[0007] Wherein, the difficulty increase model corresponding to different rounds of difficulty increase is the same; and / or, the current model increases the difficulty of each problem to be improved in the current round of difficulty increase based on the first prompt word, the first prompt word being used to prompt the current model to increase the difficulty of each problem to be improved.
[0008] The step of constructing a corresponding target question-answer pair for each first target question includes: for each first target question, generating answers for the first target question using at least two different answer generation models to obtain at least two target answers corresponding to the first target question; selecting at least one first target question whose corresponding at least two target answers meet the answer consistency requirement as a second target question; and constructing a corresponding target question-answer pair for each second target question using each second target question and the target answers corresponding to each second target question.
[0009] Wherein, the first target question that meets the answer consistency requirement is: a first target question with at least two corresponding target answers being the same; and / or, the answer generation model is a large model, the answer generation model generates answers to the first target question based on a second prompt word, the second prompt word being used to prompt the answer generation model to generate answers to the first target question; and / or, filtering out at least one first target question whose corresponding at least two target answers meet the answer consistency requirement is performed using a large filtering model, the large filtering model filters out at least one first target question whose corresponding at least two target answers meet the answer consistency requirement based on a third prompt word, the third prompt word being used to prompt the large filtering model to filter out at least one first target question whose corresponding at least two target answers meet the answer consistency requirement.
[0010] The data generation method further includes, after constructing corresponding target question-answer pairs for each of the first target questions, verifying the correctness of each target question-answer pair and retaining the verified target question-answer pairs.
[0011] The correctness verification of each target question-answer pair includes: performing data transformation on each target question-answer pair to obtain formal propositional data corresponding to each target question-answer pair; performing at least one type of verification on each formal propositional data to verify whether each target question-answer pair is correct; wherein the verification type includes at least one of the following: syntactic verification, semantic consistency verification, and formal proof verification, wherein the semantic consistency verification verifies whether the formal propositional data is semantically consistent with the corresponding target question-answer pair, and the formal proof verification verifies whether the formal proof data corresponding to the formal propositional data is correct, wherein the formal proof data is obtained by data transformation of the formal propositional data.
[0012] The verification types include syntax verification, semantic consistency verification, and formal proof verification. Performing at least one type of verification on each of the formal proposition data includes: performing syntax verification on the formal proposition data; performing semantic consistency verification on the formal proposition data in response to passing the syntax verification; performing data transformation on the formal proposition data to obtain formal proof data in response to passing the semantic consistency verification; and performing correctness verification on the formal proof data; and / or, the verification types include at least two types, and the data generation method further includes: for each of the formal proposition data, in response to all verification types passing, determining that the target question-answer pair corresponding to the formal proposition data is correct.
[0013] The step of obtaining several initial questions includes: obtaining several reference question-answer pairs; performing at least two rounds of difficulty filtering on the several reference question-answer pairs, and using the reference questions in the remaining reference question-answer pairs after the at least two rounds of difficulty filtering as the initial questions.
[0014] The reference question-answer pair further includes the reference answer corresponding to the reference question; the step of performing at least two rounds of difficulty filtering on the plurality of reference question-answer pairs, and using the reference questions in the remaining reference question-answer pairs after the at least two rounds of difficulty filtering as the initial questions, includes: taking each difficulty filtering object of the current round of difficulty filtering as a first filtering object, and generating a predicted answer for each of the first filtering objects; wherein, the current round of difficulty filtering is the first round of difficulty filtering, the difficulty filtering object is the input plurality of reference question-answer pairs, the current round of difficulty filtering is a non-first round of difficulty filtering, the difficulty filtering object is the difficulty filtering result of the previous round of difficulty filtering, and the difficulty filtering result of the previous round of difficulty filtering is... The result is the remaining reference question-answer pairs after the previous round of difficulty filtering; from each of the first filtering objects, at least one first filtering object whose predicted answer is inconsistent with the corresponding reference answer is selected as the difficulty filtering result of the current round of difficulty filtering; in response to the current round of difficulty filtering being a non-final round of difficulty filtering, the next round of difficulty filtering is taken as the current round of difficulty filtering, and the process of taking each difficulty filtering object of the current round of difficulty filtering as the first filtering object, generating the predicted answer for each of the first filtering objects and its subsequent steps is repeated; in response to the current round of difficulty filtering being the final round of difficulty filtering, the reference question in the difficulty filtering result of the current round of difficulty filtering is taken as the initial question.
[0015] Wherein, the difficulty-increasing model is a large language model; and / or, the initial problem includes a mathematical problem.
[0016] To address the aforementioned technical problems, a second aspect of this application provides a data generation apparatus, comprising an acquisition module, a difficulty enhancement module, and a construction module. The acquisition module acquires a plurality of initial questions. The difficulty enhancement module performs at least two rounds of difficulty enhancement on each of the initial questions using a large difficulty enhancement model to obtain a plurality of first target questions. The question to be enhanced in the subsequent round of difficulty enhancement is the target enhanced question obtained from the previous round of difficulty enhancement, and the question to be enhanced in the first round of difficulty enhancement is the initial question. The construction module constructs corresponding target question-answer pairs for each of the first target questions.
[0017] To address the aforementioned technical problems, a third aspect of this application provides an electronic device comprising a memory and a processor, wherein the memory stores program instructions and the processor executes the program instructions to implement the aforementioned data generation method.
[0018] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium for storing program instructions that can be executed to implement the aforementioned data generation method.
[0019] In the above technical solution, each primary target problem is obtained by using a large-scale difficulty-increasing model to increase the difficulty of each initial problem in at least two rounds. Therefore, each primary target problem is obtained by iteratively increasing the difficulty of each initial problem using the large-scale difficulty-increasing model, gradually increasing the difficulty of each initial problem. Consequently, the primary target problems obtained through difficulty-increasing are highly challenging. Therefore, the target question-answer pairs constructed for each primary target problem are highly challenging question-answer pairs, achieving the automated construction of highly challenging question-answer pairs. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating an embodiment of the data generation method provided in this application; Figure 2 yes Figure 1 The flowchart of step S11 shown is a schematic diagram of one embodiment. Figure 3 This is a flowchart illustrating an embodiment of each round of difficulty increase steps provided in this application; Figure 4 yes Figure 1 The flowchart of step S13 shown is a schematic diagram of one embodiment. Figure 5 This is a flowchart illustrating another embodiment of the data generation method provided in this application; Figure 6 This is a schematic diagram of the framework of an embodiment of the data generation apparatus provided in this application; Figure 7This is a schematic diagram of the framework of an embodiment of the electronic device provided in this application; Figure 8 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation
[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0022] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0023] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0024] Please see Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the data generation method provided in this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that result. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, this embodiment includes: Step S11: Obtain several initial questions.
[0025] In this embodiment, several initial questions are obtained. The number of initial questions is not limited and can be set according to actual usage needs.
[0026] In one implementation, the initial problem is a science problem.
[0027] In one specific embodiment, the initial problem is further defined as a mathematical problem. Of course, in other specific embodiments, the initial problem may also be a physical problem, a chemical problem, etc., and this is not limited here.
[0028] Step S12: Use the difficulty-increasing model to increase the difficulty of each initial problem at least twice to obtain several first target problems.
[0029] In this implementation, a large-scale difficulty-increasing model is used to increase the difficulty of each initial problem in at least two rounds, resulting in several first target problems. The problem to be increased in each subsequent round of difficulty increase is the target problem obtained from the previous round of difficulty increase, while the problem to be increased in the first round of difficulty increase is the initial problem. In the at least two rounds of difficulty increase for each initial problem, the problem to be increased in each subsequent round of difficulty increase is the target problem obtained from the previous round of difficulty increase; therefore, increasing the difficulty of each initial problem in at least two rounds is an iterative process, gradually increasing the difficulty of each initial problem. Furthermore, the large-scale difficulty-increasing model possesses powerful logical reasoning, generalization, and content generation capabilities. Therefore, using the large-scale difficulty-increasing model to increase the difficulty of each initial problem in at least two rounds not only ensures the logical coherence and gradual increase in difficulty of the generated first target problems but also provides good reproducibility and generalizability. Therefore, using the difficulty-increasing model to increase the difficulty of each initial problem in at least two rounds is to iteratively increase the difficulty of each initial problem, thereby gradually increasing the difficulty of each initial problem, so that the first target problems obtained by increasing the difficulty have high difficulty, and realizing the automated construction of high-difficulty first target problems.
[0030] There is no limit to the number of rounds of difficulty increase for each initial problem; it can be set according to actual usage needs. For example, the difficulty of each initial problem can be increased in two, three, or five rounds.
[0031] In one implementation, the model with significantly increased difficulty is the Large Language Model (LLM).
[0032] Step S13: Construct corresponding target question-answer pairs for each first target question.
[0033] In this implementation, corresponding target question-answer pairs are constructed for each first target question. Each first target question is obtained by using a difficulty-increasing model to increase the difficulty of each initial question in at least two rounds; therefore, each first target question is obtained by iteratively increasing the difficulty of each initial question using the difficulty-increasing model, gradually increasing the difficulty of each initial question. Thus, the first target questions obtained through difficulty-increasing are highly challenging. Therefore, the target question-answer pairs constructed for each first target question are highly challenging question-answer pairs, achieving automated construction of highly challenging question-answer pairs.
[0034] Furthermore, the constructed target question-answer pairs are used to train or fine-tune the large language model to enhance its understanding and generalization ability to complex problems, thereby improving its robustness and accuracy in challenging reasoning tasks. For example, if the target question-answer pairs are target mathematical question-answer pairs, the constructed target mathematical question-answer pairs can be used to train or fine-tune the large language model to enhance its understanding and generalization ability to complex mathematical problems, thereby improving its robustness and accuracy in challenging and complex mathematical reasoning tasks.
[0035] Please see Figure 2 , Figure 2 yes Figure 1 The flowchart shown is a schematic diagram of one embodiment of step S11. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily follow the same pattern. Figure 2 The illustrated process sequence is limited. For example... Figure 2 As shown, this embodiment includes: Step S21: Obtain several reference question-and-answer pairs.
[0036] In this embodiment, several reference question-and-answer pairs are obtained. The number of reference question-and-answer pairs is not limited and can be set according to actual usage needs. The specific reference question-and-answer pairs are as follows:
[0037] in, This represents the initial dataset constructed from several reference question-and-answer pairs; This represents the reference question in the i-th reference question-answer pair; This represents the reference answer in the i-th reference question-answer pair, where the reference answer is the correct answer to the corresponding reference question; n represents the number of reference question-answer pairs.
[0038] In one embodiment, several reference question-and-answer pairs can be obtained from local storage or cloud storage. Of course, in other embodiments, several reference question-and-answer pairs can also be obtained from relevant databases in real time, and this is not limited here.
[0039] To ensure data diversity, in one embodiment, several reference question-and-answer pairs may come from different sources. Of course, in other embodiments, several reference question-and-answer pairs may come from the same source, and this is not limited here.
[0040] Step S22: Perform at least two rounds of difficulty filtering on several reference question-answer pairs, and use the reference questions from the remaining reference question-answer pairs after at least two rounds of difficulty filtering as the initial questions.
[0041] In this embodiment, at least two rounds of difficulty filtering are performed on several reference question-answer pairs, and the reference questions in the remaining reference question-answer pairs after at least two rounds of difficulty filtering are used as initial questions. The difficulty distribution of the reference questions in several reference question-answer pairs is uneven, with some simple reference questions. If difficulty filtering is not performed, constructing new question-answer pairs using these simple reference questions may result in new question-answer pairs with low difficulty, failing to meet the requirements for constructing high-difficulty question-answer pairs. Therefore, by performing difficulty filtering on several reference question-answer pairs to filter out simple reference questions and select and retain reference questions with a certain level of difficulty as initial questions, a good foundation can be provided for the subsequent construction of high-difficulty question-answer pairs. Furthermore, performing at least two rounds of difficulty filtering on several reference question-answer pairs further filters out simple reference questions, increasing the difficulty of the retained reference questions.
[0042] There is no limit to the number of rounds of difficulty filtering applied to a number of reference question-and-answer pairs; this can be set according to actual usage needs. For example, two, three, or five rounds of difficulty filtering can be applied to a number of reference question-and-answer pairs.
[0043] In one embodiment, the reference question-answer pair further includes a reference answer corresponding to the reference question; at least two rounds of difficulty filtering are performed on several reference question-answer pairs, and the reference questions in the remaining reference question-answer pairs after at least two rounds of difficulty filtering are used as initial questions. Specifically, each difficulty filtering object in the current round of difficulty filtering is used as a first filtering object, and a predicted answer for each first filtering object is generated; wherein, the current round of difficulty filtering is the first round of difficulty filtering, and the difficulty filtering object is the input several reference question-answer pairs; if the current round of difficulty filtering is a non-first round of difficulty filtering, the difficulty filtering object is the difficulty filtering result of the previous round of difficulty filtering, and the difficulty filtering result of the previous round of difficulty filtering is used as the first round of difficulty filtering. If the result is the reference question-answer pair remaining after the previous round of difficulty filtering; from each first filter object, select at least one first filter object whose predicted answer is inconsistent with the corresponding reference answer, and use it as the difficulty filtering result of the current round of difficulty filtering; if the current round of difficulty filtering is not the last round of difficulty filtering, use the next round of difficulty filtering as the current round of difficulty filtering, and repeat the process of using each difficulty filter object of the current round of difficulty filtering as the first filter object, generating the predicted answer of each first filter object and its subsequent steps; if the current round of difficulty filtering is the last round of difficulty filtering, use the reference question in the difficulty filtering result of the current round of difficulty filtering as the initial question.
[0044] The filtering model corresponding to the current round of difficulty filtering is used to generate predicted answers for the first filtering objects corresponding to the current round of difficulty filtering. The current round of difficulty filtering is the first round of difficulty filtering, and the difficulty filtering objects are several input reference question-answer pairs. If the current round of difficulty filtering is not the first round, the difficulty filtering objects are the difficulty filtering results of the previous round of difficulty filtering, which are the remaining reference question-answer pairs after the previous round of difficulty filtering. If the predicted answer of a first filtering object matches the corresponding reference answer, it indicates that the reference question in the first filtering object is a simple reference question, so it is filtered out. If there are subsequent rounds of difficulty filtering, it will not participate. If the predicted answer of a first filtering object does not match the corresponding reference answer, it indicates that the reference question in the first filtering object can be tentatively considered a reference question with a certain degree of difficulty, and it is retained. If there are subsequent rounds of difficulty filtering, it will participate in subsequent difficulty filtering. If there are no subsequent rounds of difficulty filtering, the reference question is used as the initial question.
[0045] It should be noted that the filtering models are different for different rounds of filtering difficulty.
[0046] For example, consider performing two rounds of difficulty filtering on several reference question-and-answer pairs: The initial dataset D0 is constructed from several reference question-answer pairs. The first round of difficulty filtering, or the filtering model corresponding to the initial difficulty filtering, generates predicted answers to the reference questions in each reference question-answer pair within the initial dataset D0. Reference question-answer pairs whose predicted answers match their corresponding reference answers are then filtered out from the initial dataset D0; that is, correctly answered reference question-answer pairs are filtered out from the initial dataset D0, resulting in the final dataset. Here, n1 represents the number of reference question-answer pairs remaining after the first round of difficulty filtering, where n1 < n. The filtering model corresponding to the second or final round of difficulty filtering is used to generate predicted answers for the reference questions in each reference question-answer pair in dataset D1. Reference question-answer pairs whose predicted answers match their corresponding reference answers are then filtered out from dataset D1; that is, correctly answered reference question-answer pairs are filtered out from dataset D1, resulting in the dataset... n2 represents the number of reference question-answer pairs remaining after the second round of difficulty filtering, and n2 < n1.
[0047] Please see Figure 3 , Figure 3 This is a flowchart illustrating one embodiment of the difficulty increase steps provided in this application. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily follow the same pattern. Figure 3 The illustrated process sequence is limited. For example... Figure 3 As shown, this embodiment includes: Step S31: Take the large model corresponding to the current round of difficulty increase as the current model, and use the current model to increase the difficulty of each problem to be increased in the current round of difficulty increase to obtain each candidate problem to be increased.
[0048] In this implementation, the large difficulty improvement model corresponding to the current round of difficulty improvement is used as the current model. The current model is then used to increase the difficulty of each problem to be improved in the current round, resulting in candidate problems for improvement. The large difficulty improvement model corresponding to the current round of difficulty improvement is then used to increase the difficulty of each problem to be improved in the current round, thus performing a round of problem difficulty improvement.
[0049] It should be noted that if the current round of difficulty increase is the same as the first round of difficulty increase, then the current round of difficulty increase means increasing the difficulty of the initial problems obtained; if the current round of difficulty increase is not the same as the first round of difficulty increase, then the current round of difficulty increase means increasing the difficulty of the target problems obtained from the previous round of difficulty increase.
[0050] In one implementation, the overall difficulty increase model corresponding to different rounds of difficulty increases can be the same. Of course, in other implementations, the overall difficulty increase model corresponding to different rounds of difficulty increases can also be different, or some rounds of difficulty increases can have the same overall difficulty increase model, while some rounds of difficulty increases can have different overall difficulty increase models.
[0051] In one implementation, the current model increases the difficulty of each problem to be improved in the current round based on a first prompt word. The first prompt word is used to guide the current model to increase the difficulty of each problem to be improved. That is, the current model is guided to increase the difficulty of each problem to be improved through a clear hierarchy and semantically explicit first prompt word.
[0052] Step S32: Select at least one candidate improvement problem that meets the quality requirements from all candidate improvement problems, and use it as the target improvement problem for the current round of difficulty improvement.
[0053] In this embodiment, at least one candidate question that meets the quality requirements is selected from all candidate questions to be improved, and this candidate question is chosen as the target question for the current round of difficulty improvement. The current round of difficulty improvement is the final round of difficulty improvement, and the target question for the current round is the first target question. Because there are inherent uncertainties in improving the difficulty of each question in the current round using the large difficulty improvement model corresponding to the current round of difficulty improvement, selecting at least one candidate question that meets the quality requirements from all candidate questions to be improved, and choosing this target question for the current round of difficulty improvement, allows for quality screening of the candidate questions obtained through difficulty improvement. This improves the quality of the several first target questions obtained after at least two rounds of difficulty improvement, providing a good foundation for subsequently constructing high-difficulty, high-quality question-answer pairs.
[0054] It should be noted that, since each candidate problem that has been improved in the current round of difficulty will be subject to quality screening, the number of the first target problems obtained after at least two rounds of difficulty improvement may be less than the number of the initial problems obtained.
[0055] In one implementation, a candidate boosting problem that meets the quality requirements is defined as a candidate boosting problem with a character count less than a first threshold and greater than a second threshold, where the first threshold is greater than the second threshold. The first and second thresholds are not strictly defined and can be set according to actual usage needs. If the character count of a candidate boosting problem is less than or equal to the second threshold, the problem may be too short or contain incomplete or meaningless text; therefore, it is considered to fail to meet the quality requirements. If the character count of a candidate boosting problem is greater than or equal to the first threshold, the problem may be too long, potentially causing the model to enter a loop of repeated decoding; therefore, it is also considered to fail to meet the quality requirements.
[0056] For example, a large difficulty-increasing model can be used to increase the difficulty of each initial problem in two rounds, and the dataset... Taking the reference question in the reference question and answer pair as an example, and using the reference question in the reference question and answer pair as the initial question: Step 1: Combine the first prompt word with the dataset The initial problem input is the large model corresponding to the first round of difficulty increase, which generates candidate difficulty increase problems for the first round of difficulty increase. The specific candidate difficulty increase problems for the first round of difficulty increase are as follows:
[0057] in, M1 represents the dataset constructed from candidate improved problems corresponding to the first round of difficulty improvement; M1 represents the large model with improved difficulty corresponding to the first round of difficulty improvement. Let represent the i-th initial question; p represents the first prompt word; n2 represents the initial question and the number of candidate questions corresponding to the first round of difficulty increase; This represents the i-th candidate problem that corresponds to the first round of difficulty increase.
[0058] Step Two: From the candidate improvement problems corresponding to the first round of difficulty increases, select at least one candidate improvement problem that meets the quality requirements as the target improvement problem for the current round of difficulty increases. The target improvement problem for the first round of difficulty increases is as follows:
[0059] in, This represents the dataset constructed from the increased difficulty questions corresponding to the initial difficulty increase. This indicates quality screening processing; Let n represent the i-th candidate improved problem that meets the quality requirements, that is, the i-th target improved problem obtained from the first round of difficulty improvement; n3 represents the number of target improved problems corresponding to the first round of difficulty improvement, n3 < n2.
[0060] Step 3: Combine the first prompt word with the dataset The target difficulty improvement problem is input into the large difficulty improvement model corresponding to the second round of difficulty improvement to generate candidate difficulty improvement problems for the second round of difficulty improvement. The specific candidate difficulty improvement problems for the second round of difficulty improvement are as follows:
[0061] in, M2 represents the dataset constructed from candidate improved problems corresponding to the second round of difficulty improvement; M2 represents the large model with increased difficulty corresponding to the second round of difficulty improvement. Let represent the target question obtained after the first round of difficulty increase; p represents the first prompt word; n3 represents the number of target questions corresponding to the first round of difficulty increase; This represents the i-th candidate problem that corresponds to the second round of difficulty increase.
[0062] Step 4: From the candidate improvement problems corresponding to the second round of difficulty increase, select at least one candidate improvement problem that meets the quality requirements as the first target problem. The first target problem is as follows:
[0063] in, This represents the dataset constructed for the primary objective problem; This indicates quality screening processing; Let n represent the i-th candidate improved problem that meets the quality requirements, i.e., the i-th target improved problem obtained from the second round of difficulty improvement, i.e., the i-th first target problem; n4 represents the number of first target problems, n4 < n3.
[0064] In one implementation, each candidate problem can be directly used as the target problem for increasing the difficulty in the current round.
[0065] Please see Figure 4 , Figure 4 yes Figure 1 The diagram shows a flowchart of one embodiment of step S13. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily follow that approach. Figure 4 The illustrated process sequence is limited. For example... Figure 4 As shown, this embodiment includes: Step S41: For each first target question, use at least two different answer generation models to generate answers for the first target question, and obtain at least two target answers corresponding to the first target question.
[0066] In this embodiment, for each first target question, at least two different answer generation models are used to generate answers to the first target question, resulting in at least two target answers corresponding to the first target question. The number of answer generation models is not limited and can be set according to actual usage needs; for example, two or three answer generation models may be used.
[0067] In one implementation, the answer generation model is a large model that generates answers to the first target questions based on second prompts. The second prompts guide the answer generation model to generate answers to the first target questions. That is, the answer generation model is guided to generate answers to each first target question through clearly defined and semantically explicit second prompts.
[0068] Step S42: Select at least one first target question whose corresponding at least two target answers meet the answer consistency requirement, and use it as the second target question.
[0069] In this embodiment, at least one first target question whose corresponding at least two target answers meet the answer consistency requirement is selected as the second target question. First target questions whose target answers generated using different answer generation models meet the answer consistency requirement are considered to have correct answers.
[0070] In one implementation, the first target question that meets the answer consistency requirement is a first target question in which at least two corresponding target answers are the same.
[0071] In one embodiment, the process of selecting at least one first target question whose corresponding at least two target answers meet the answer consistency requirement is performed using a large-scale selection model. This model selects at least one first target question whose corresponding at least two target answers meet the answer consistency requirement based on a third prompt word. The third prompt word is used to guide the large-scale selection model in selecting at least one first target question whose corresponding at least two target answers meet the answer consistency requirement. That is, the large-scale selection model is guided to select at least one first target question whose corresponding at least two target answers meet the answer consistency requirement through a clearly defined and semantically explicit third prompt word.
[0072] Step S43: Using each second objective question and its corresponding objective answer, construct a corresponding objective question-answer pair for each second objective question.
[0073] In this embodiment, each second objective question and its corresponding objective answer are used to construct a corresponding objective question-answer pair for each second objective question.
[0074] For example, consider using two different answer generation models to generate answers for each primary target question: Step 1: Generate answers for each primary target question using two different answer generation models. The two target answers for each primary target question are shown below:
[0075]
[0076] in, This represents the dataset consisting of the target answers generated for each first target question using the answer generation model N1; N1 represents the dataset consisting of target answers generated for each first target question using answer generation model N2; N1 represents one answer generation model; N2 represents another answer generation model. This represents the dataset constructed for the primary objective problem; This represents the i-th primary objective problem; This represents the target answer generated for the i-th first target question using the answer generation model N1; This represents the target answer generated for the i-th first target question using the answer generation model N2; n4 represents the number of first target questions.
[0077] Step Two: Utilize a large-scale screening model to verify the consistency of the two target answers corresponding to the first target question. The specific formula is shown below:
[0078] in, This represents the dataset constructed from each primary objective question and its corresponding two objective answers; "R" indicates the third prompt word; "R" indicates filtering large models.
[0079] Step 3: Retain the first target questions with the same target answer as the second target questions, and use each second target question and its corresponding target answer to construct a target question-answer pair for each second target question. The specific formula is shown below:
[0080] in, This represents the dataset constructed from the target question-answer pairs corresponding to each secondary target question; This indicates the handling of the first target question where two target answers are the same; n5 represents the number of target question-answer pairs, n5 < n4.
[0081] Please see Figure 5 , Figure 5 This is a flowchart illustrating another embodiment of the data generation method provided in this application. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily reflect that outcome. Figure 5 The illustrated process sequence is limited. For example... Figure 5 As shown, this embodiment includes: Step S51: Obtain several initial questions.
[0082] Step S51 is similar to step S11, and will not be described again here.
[0083] Step S52: Use the difficulty-increasing model to increase the difficulty of each initial problem at least twice to obtain several first target problems.
[0084] Step S52 is similar to step S12, and will not be described again here.
[0085] Step S53: Construct corresponding target question-answer pairs for each first target question.
[0086] Step S53 is similar to step S13, and will not be described again here.
[0087] Step S54: Verify the correctness of each target question-answer pair.
[0088] In this implementation, the correctness of each target question-and-answer pair is verified to ensure that the target question-and-answer pairs retained in the future are correct and of high quality, thereby achieving the automated construction of high-difficulty and high-quality question-and-answer pairs.
[0089] In one embodiment, the correctness verification of each target question-answer pair is performed, specifically by: transforming each target question-answer pair into formal propositional data corresponding to each target question-answer pair; and performing at least one type of verification on each formal propositional data to verify whether each target question-answer pair is correct. The verification types include at least one of the following: syntactic verification, semantic consistency verification, and formal proof verification. Semantic consistency verification verifies whether the formal propositional data is semantically consistent with the corresponding target question-answer pair. Formal proof verification verifies whether the formal proof data corresponding to the formal propositional data is correct. The formal proof data is obtained by transforming the formal propositional data. By performing formal verification on each target question-answer pair, the target question-answer pair is transformed into a proof form that can be rigorously verified by a machine, thereby ensuring the correctness of the target question-answer pair. Furthermore, since formal verification is performed on each target question-answer pair, automated verification of each target question-answer pair is achieved, and the verification efficiency of each target question-answer pair can be improved, thus providing a reliable path for the batch and large-scale production of target question-answer pairs.
[0090] In one specific implementation, the verification types include at least two. For each formal proposition data, in response to each verification type being verified as passed, the target question-answer pair corresponding to the formal proposition data is determined to be correct.
[0091] In one specific implementation, the verification types include syntax verification, semantic consistency verification, and formal proof verification. At least one type of verification is performed on each formal proposition data, specifically: for each formal proposition data, syntax verification is performed; in response to passing the syntax verification of the formal proposition data, semantic consistency verification is performed; in response to passing the semantic consistency verification of the formal proposition data, data transformation is performed on the formal proposition data to obtain formal proof data, and the correctness of the formal proof data is verified.
[0092] Specifically, (1) the target question-answer pairs are transformed into formalized propositional data. The transformation formula is as follows:
[0093] in, This represents the dataset constructed from the formal propositional data corresponding to each target question-answer pair; This indicates that the Goedelformalizer is used to transform the target question-answer pairs into formal propositional data. This represents the i-th target question-answer pair. This represents the first target question in the i-th target question-answer pair. This represents the target answer in the i-th target question-answer pair; n5 represents the formalized propositional data corresponding to each target question-answer pair; n5 represents the number of target question-answer pairs and formalized propositional data.
[0094] (2) Syntax verification The formal propositional data obtained in (1) was verified using the Lean4 tool (Lean4 is a tool that deeply integrates programming and mathematical proof, which can formalize mathematical theorems and proofs and rigorously verify them by computer to ensure the absolute correctness of the logic). This retains grammatically correct or grammatically validated formal propositional data. The specific formula is shown below:
[0095] in, This represents a dataset constructed from formal propositional data that have passed grammatical validation. This indicates the use of Lean4 code to verify formal propositional data. The syntax; n6 represents the number of formal propositional data that passed syntax validation; n6 represents the number of formal propositional data that passed syntax validation. <n5。
[0096] (3) Semantic consistency verification Formal propositional data that passes Lean4 validation indicates syntactic correctness. However, it doesn't yet reveal semantic correctness; semantic consistency is needed to verify whether the semantics of the formal propositional data have changed. The specific formula is shown below:
[0097] in, This represents a dataset constructed from formal propositional data that has passed semantic consistency verification. This indicates that CriticLeanGPT is used to verify formal propositional data. Corresponding target question and answer pair Has the semantic meaning changed? n7 represents the number of formal propositional data that passed the semantic consistency verification; n7 represents the number of formal propositional data that passed the semantic consistency verification. <n6。
[0098] (4) Transform the formal propositional data into formal proof data. The transformation formula is shown below:
[0099] in, This represents the dataset constructed from the formal proof data corresponding to the formal proposition data that passed the semantic consistency verification. This represents formal propositional data that has passed semantic consistency verification using GoedelProver. Convert it into the form of formal proof data; n7 represents the formal proof data corresponding to each formal proposition data that passes the semantic consistency verification; n7 represents the number of formal proposition data and formal proof data that pass the semantic consistency verification.
[0100] (5) Formal proof of the correctness of the data The Lean4 tool was used to verify the correctness of each formal proof data. The specific formulas are shown below:
[0101] in, The dataset represents the formal proof data that passed each correctness verification; This indicates that Lean4 code is used to verify the formal proof data. The correctness; n represents the formal proof data that passed each correctness verification; n8 represents the number of formal proof data that passed the correctness verification. <n7。
[0102] (6) The target question-answer pair corresponding to the data verified by Lean4 is the final target question-answer pair generated, which can be expressed as:
[0103] in, This represents the dataset constructed to represent the final target question-and-answer pairs; This indicates that data is formally proven. Mapped to the corresponding original natural language final target question-answer pair The operation; n8 represents the formal proof data that passed the correctness verification and the number of the final target question-answer pairs.
[0104] Step S55: Retain the verified target question-answer pairs.
[0105] In this implementation, the target question-answer pairs that have been verified are retained.
[0106] Please see Figure 6 , Figure 6This is a schematic diagram of a framework of an embodiment of the data generation apparatus provided in this application. The data generation apparatus 60 includes an acquisition module 61, a difficulty enhancement module 62, and a construction module 63. The acquisition module 61 is used to acquire a plurality of initial questions; the difficulty enhancement module 62 is used to perform at least two rounds of difficulty enhancement on each initial question using a large difficulty enhancement model to obtain a plurality of first target questions; wherein, the question to be enhanced in the later round of difficulty enhancement is the target enhanced question obtained by the previous round of difficulty enhancement, and the question to be enhanced in the first round of difficulty enhancement is the initial question; the construction module 63 is used to construct corresponding target question-answer pairs for each first target question.
[0107] The difficulty enhancement module 62 is used for the steps of each round of difficulty enhancement, including: taking the large difficulty enhancement model corresponding to the current round of difficulty enhancement as the current model, using the current model to enhance the difficulty of each problem to be enhanced in the current round of difficulty enhancement, and obtaining each candidate enhanced problem; selecting at least one candidate enhanced problem that meets the quality requirements from each candidate enhanced problem as the target enhanced problem of the current round of difficulty enhancement; wherein, the current round of difficulty enhancement is the final round of difficulty enhancement, and the target enhanced problem of the current round of difficulty enhancement is the first target problem.
[0108] Among them, the candidate boosting problems that meet the quality requirements are: candidate boosting problems with a number of characters less than the first quantity threshold and greater than the second quantity threshold, wherein the first quantity threshold is greater than the second quantity threshold.
[0109] Among them, the difficulty increase model corresponding to different rounds of difficulty increase is the same; and / or, the above current model increases the difficulty of each problem to be improved in the current round based on the first prompt word, and the first prompt word is used to prompt the current model to increase the difficulty of each problem to be improved.
[0110] The construction module 63 is used to construct corresponding target question-answer pairs for each first target question, including: for each first target question, using at least two different answer generation models to generate answers for the first target question, obtaining at least two target answers corresponding to the first target question; selecting at least one first target question whose corresponding at least two target answers meet the answer consistency requirements as a second target question; and using each second target question and the target answers corresponding to each second target question to construct corresponding target question-answer pairs for each second target question.
[0111] Wherein, the first target question that meets the answer consistency requirement is: a first target question with at least two corresponding target answers being the same; and / or, the above answer generation model is a large model, the answer generation model generates answers to the first target question based on a second prompt word, the second prompt word being used to prompt the answer generation model to generate answers to the first target question; and / or, selecting at least one first target question whose corresponding at least two target answers meet the answer consistency requirement is performed using a large filtering model, the large filtering model selects at least one first target question whose corresponding at least two target answers meet the answer consistency requirement based on a third prompt word, the third prompt word being used to prompt the large filtering model to select at least one first target question whose corresponding at least two target answers meet the answer consistency requirement.
[0112] The data generation device 60 further includes a verification module 64, which is used to: verify the correctness of each target question-answer pair after constructing corresponding target question-answer pairs for each first target question; and retain the verified target question-answer pairs.
[0113] The verification module 64 is used to verify the correctness of each target question-answer pair, including: performing data transformation on each target question-answer pair to obtain the formal proposition data corresponding to each target question-answer pair; performing at least one type of verification on each formal proposition data to verify whether each target question-answer pair is correct; wherein the verification type includes at least one of the following: syntax verification, semantic consistency verification, and formal proof verification. Semantic consistency verification verifies whether the formal proposition data is semantically consistent with the corresponding target question-answer pair. Formal proof verification verifies whether the formal proof data corresponding to the formal proposition data is correct. The formal proof data is obtained by transforming the formal proposition data.
[0114] The aforementioned verification types include syntactic verification, semantic consistency verification, and formal proof verification. Verification module 64 is used to perform at least one type of verification on each formal proposition data, including: performing syntactic verification on the formal proposition data for each formal proposition data; performing semantic consistency verification on the formal proposition data in response to passing the syntactic verification; performing data transformation on the formal proposition data to obtain formal proof data in response to passing the semantic consistency verification; and verifying the correctness of the formal proof data; and / or, the aforementioned verification types include at least two, and verification module 64 is used to determine that the target question-answer pair corresponding to the formal proposition data is correct in response to all verification types passing.
[0115] The acquisition module 61 is used to acquire several initial questions, including: acquiring several reference question-answer pairs; performing at least two rounds of difficulty filtering on the reference question-answer pairs; and using the reference questions in the remaining reference question-answer pairs after at least two rounds of difficulty filtering as initial questions.
[0116] The aforementioned reference question-and-answer pairs also include reference answers corresponding to reference questions; the acquisition module 61 is used to perform at least two rounds of difficulty filtering on several reference question-and-answer pairs, and to take the reference questions in the remaining reference question-and-answer pairs after at least two rounds of difficulty filtering as initial questions, including: taking each difficulty filtering object in the current round of difficulty filtering as a first filtering object, and generating predicted answers for each first filtering object; wherein, the current round of difficulty filtering is the first round of difficulty filtering, and the difficulty filtering object is the input several reference question-and-answer pairs; the current round of difficulty filtering is a non-first round of difficulty filtering, and the difficulty filtering object is the difficulty filtering result of the previous round of difficulty filtering, and the difficulty filtering result of the previous round of difficulty filtering is... The filtering result is the reference question-answer pairs remaining after the previous round of difficulty filtering; from each first filtering object, at least one first filtering object whose predicted answer is inconsistent with the corresponding reference answer is selected as the difficulty filtering result of the current round of difficulty filtering; in response to the current round of difficulty filtering being a non-final round of difficulty filtering, the next round of difficulty filtering is used as the current round of difficulty filtering, and the process of using each difficulty filtering object of the current round of difficulty filtering as the first filtering object, generating the predicted answer for each first filtering object and its subsequent steps is repeated; in response to the current round of difficulty filtering being the final round of difficulty filtering, the reference question in the difficulty filtering result of the current round of difficulty filtering is used as the initial question.
[0117] Please see Figure 7 , Figure 7 This is a schematic diagram of a framework of an embodiment of the electronic device provided in this application. The electronic device 70 includes a memory 71 and a processor 72 coupled to each other. The memory 71 stores program instructions, and the processor 72 is used to execute the program instructions to implement the steps in any of the above-described data generation method embodiments. Specifically, the electronic device 70 may include, but is not limited to, desktop computers, laptops, servers, mobile phones, tablet computers, etc., and is not limited thereto.
[0118] Specifically, processor 72 controls itself and memory 71 to implement the steps in any of the above data generation method embodiments. Processor 72 can also be referred to as a CPU (Central Processing Unit). Processor 72 may be an integrated circuit chip with signal processing capabilities. Processor 72 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 72 can be implemented using integrated circuit chips.
[0119] Please see Figure 8 , Figure 8 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. The computer-readable storage medium 80 stores program instructions 81 that can be executed by a processor. The program instructions 81 are used to implement the steps in any of the above-described data generation method embodiments.
[0120] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0121] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0122] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0124] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0125] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0126] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the user through pop-up information or by asking the user to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
[0127] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A data generation method, characterized in that, The method includes: Obtain several initial questions; The initial problems are subjected to at least two rounds of difficulty escalation using a large difficulty escalation model to obtain several first target problems; wherein, the target problem to be escalated in the next round of difficulty escalation is the target problem to be escalated after the previous round of difficulty escalation, and the target problem to be escalated in the first round of difficulty escalation is the initial problem. Construct corresponding target question-answer pairs for each of the first target questions.
2. The method according to claim 1, characterized in that, Each round of increasing difficulty includes the following steps: The current model is used as the large model corresponding to the current difficulty increase. The current model is then used to increase the difficulty of each problem to be increased in the current difficulty increase, resulting in each candidate problem to be increased. From all candidate improvement problems, at least one candidate improvement problem that meets the quality requirements is selected as the target improvement problem for the current round of difficulty improvement; wherein, the current round of difficulty improvement is the final round of difficulty improvement, and the target improvement problem for the current round of difficulty improvement is the first target problem.
3. The method according to claim 2, characterized in that, The candidate boosting problem that meets the quality requirements is: a candidate boosting problem with a number of characters less than a first quantity threshold and greater than a second quantity threshold, wherein the first quantity threshold is greater than the second quantity threshold.
4. The method according to claim 2, characterized in that, The difficulty increases for different rounds correspond to the same overall difficulty model. And / or, the current model increases the difficulty of each problem to be improved in the current round based on the first prompt word, the first prompt word being used to prompt the current model to increase the difficulty of each problem to be improved.
5. The method according to claim 1, characterized in that, The step of constructing corresponding target question-answer pairs for each of the first target questions includes: For each of the first target questions, at least two different answer generation models are used to generate answers to the first target questions, thereby obtaining at least two target answers corresponding to the first target questions; Select at least one first target question whose corresponding at least two target answers meet the answer consistency requirement, and use it as the second target question; Using each of the second target questions and the corresponding target answers, construct corresponding target question-answer pairs for each of the second target questions.
6. The method according to claim 5, characterized in that, The first target question that meets the answer consistency requirement is: a first target question in which at least two corresponding target answers are the same; And / or, the answer generation model is a large model, and the answer generation model generates an answer to the first target question based on a second prompt word, wherein the second prompt word is used to prompt the answer generation model to generate an answer to the first target question; And / or, the screening of at least one first target question whose corresponding at least two target answers meet the answer consistency requirement is performed using a large screening model, which is based on a third prompt word to prompt the large screening model to screen at least one first target question whose corresponding at least two target answers meet the answer consistency requirement.
7. The method according to claim 1, characterized in that, After constructing corresponding target question-answer pairs for each of the first target questions, the method further includes: The correctness of each target question-answer pair is verified; Retain the target question-and-answer pairs that have been verified correctly.
8. The method according to claim 7, characterized in that, The correctness verification of each target question-answer pair includes: Data transformation is performed on each of the target question-answer pairs to obtain the formalized propositional data corresponding to each target question-answer pair; At least one type of verification is performed on each of the formal proposition data to verify whether each of the target question-answer pairs is correct; wherein, the verification type includes at least one of the following: syntactic verification, semantic consistency verification, and formal proof verification, wherein the semantic consistency verification verifies whether the semantics of the formal proposition data and the corresponding target question-answer pair are consistent, and the formal proof verification verifies whether the formal proof data corresponding to the formal proposition data is correct, wherein the formal proof data is obtained by data transformation of the formal proposition data.
9. The method according to claim 8, characterized in that, The verification types include syntax verification, semantic consistency verification, and formal proof verification; the verification of each of the formal proposition data by at least one type includes: For each of the formal propositional data, perform grammatical validation on the formal propositional data; In response to the passing of the grammatical validation of the formal propositional data, a semantic consistency validation is performed on the formal propositional data. In response to the passing of the semantic consistency verification of the formal proposition data, the formal proposition data is transformed to obtain formal proof data, and the correctness of the formal proof data is verified. And / or, the verification types include at least two, and the method further includes: For each of the formal propositional data, in response to each of the verification types being verified as passed, the target question-answer pair corresponding to the formal propositional data is determined to be correct.
10. The method according to claim 1, characterized in that, The process of obtaining several initial questions includes: Obtain several reference Q&A pairs; The reference question-and-answer pairs are subjected to at least two rounds of difficulty filtering, and the reference questions in the remaining reference question-and-answer pairs after the at least two rounds of difficulty filtering are used as the initial questions.
11. The method according to claim 10, characterized in that, The reference question-and-answer pair also includes the reference answer corresponding to the reference question; the step of performing at least two rounds of difficulty filtering on the plurality of reference question-and-answer pairs, and using the reference questions in the remaining reference question-and-answer pairs after the at least two rounds of difficulty filtering as the initial questions, includes: Each difficulty filtering object in the current round is taken as a first filtering object, and a predicted answer is generated for each first filtering object; wherein, the current round of difficulty filtering is the first round of difficulty filtering, the difficulty filtering object is the input of several reference question-answer pairs, the current round of difficulty filtering is a non-first round of difficulty filtering, the difficulty filtering object is the difficulty filtering result of the previous round of difficulty filtering, and the difficulty filtering result of the previous round of difficulty filtering is the reference question-answer pairs remaining after the previous round of difficulty filtering; From each of the first filtering objects, at least one first filtering object whose predicted answer is inconsistent with the corresponding reference answer is selected as the difficulty filtering result of the current round of difficulty filtering; In response to the current round of difficulty filtering being a non-final round of difficulty filtering, the next round of difficulty filtering is taken as the current round of difficulty filtering, and the process of taking each difficulty filtering object of the current round of difficulty filtering as the first filtering object is repeated to generate the predicted answer for each of the first filtering objects and its subsequent steps. In response to the current round of difficulty filtering being the final round of difficulty filtering, the reference question in the difficulty filtering result of the current round of difficulty filtering is used as the initial question.
12. The method according to claim 1, characterized in that, The model described as having a significantly increased difficulty level is a large language model; And / or, the initial problem includes a mathematical problem.
13. A data generation apparatus, characterized in that, The device includes: The acquisition module is used to acquire several initial questions; The difficulty enhancement module is used to perform at least two rounds of difficulty enhancement on each of the initial problems using a large difficulty enhancement model to obtain several first target problems; wherein, the problem to be enhanced in the next round of difficulty enhancement is the target enhanced problem obtained by the previous round of difficulty enhancement, and the problem to be enhanced in the first round of difficulty enhancement is the initial problem. The construction module is used to build corresponding target question-answer pairs for each of the first target questions.
14. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store program instructions, and the processor being used to execute the program instructions to implement the data generation method as described in any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program instructions that can be executed to implement the data generation method as described in any one of claims 1-12.