Mathematical reasoning training data generation method and device and medium

By converting mathematical problems described in natural language into formal language, using solvers and validators to generate and verify the mathematical reasoning process, and converting them back to natural language, the problem of mathematical logical reasoning data annotation in large model training is solved, and low-cost, large-scale data generation and improvement of large-scale logical reasoning capabilities are achieved.

CN119721240APending Publication Date: 2025-03-28SHANDONG SYNTHESIS ELECTRONICS TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411778199.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The mathematical logical inference data used for large-scale model training in the prior art requires manual annotation, which makes it difficult to achieve large-scale annotation and is costly.

Method used

By obtaining mathematical problems described in natural language, converting them into formal language descriptions, using formal language solvers to generate candidate mathematical reasoning processes, and determining the correct mathematical reasoning process through formal language validators, and finally converting them into natural language descriptions to generate mathematical reasoning training data.

Benefits of technology

It realizes large-scale generation of mathematical inference training data without manual annotation, which reduces costs and improves the logical inference ability of large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721240A_ABST
    Figure CN119721240A_ABST
Patent Text Reader

Abstract

The invention discloses a mathematical reasoning training data generation method and device and a medium, belongs to the technical field of artificial intelligence, and is used for solving the technical problems that existing mathematical reasoning training data generally needs manual annotation, is difficult to implement and is relatively high in cost. The method comprises the steps of taking a first mathematical question described by a natural language; converting the first mathematical question into a second mathematical question described by a formalized language; based on the formalized language solver, a candidate mathematical reasoning process corresponding to the second mathematical problem is generated, and the candidate mathematical reasoning process is described by a formalized language; determining a first mathematical reasoning process in the candidate mathematical reasoning process based on a formalized language verifier; converting the first mathematical reasoning process into a second mathematical reasoning process described by a natural language; and determining the first mathematical problem and the corresponding second mathematical reasoning process as mathematical reasoning training data. According to the method, mathematical reasoning training data can be automatically generated in a low-cost and large-batch mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device and medium for generating mathematical reasoning training data. Background Art

[0002] A large model refers to a deep learning model with a very large number of parameters. It is usually used to process large data sets and can learn the complex features of the data. The emergence of large models has greatly improved the capabilities of artificial intelligence and has achieved remarkable results in speech recognition, image processing, natural language processing and other fields. The application of large models is very extensive. For example, in the field of natural language processing, large models can be used for tasks such as machine translation, text generation, and dialogue systems. At present, large models have strong language comprehension and knowledge reserves, but their logical reasoning ability is generally poor. Experiments have shown that training large models with mathematical logical reasoning data can help increase the reasoning ability of large models.

[0003] In the prior art, mathematical and logical reasoning data used for large model training usually needs to be obtained through manual labeling. Manual labeling of mathematical and logical reasoning data in large quantities is difficult to achieve and the cost is high. Summary of the invention

[0004] The present invention provides a method, device and medium for generating mathematical reasoning training data, which are used to solve the technical problems that the existing mathematical logic reasoning data for large model training usually requires manual labeling, large-scale manual labeling of mathematical logic reasoning data is difficult to achieve, and the cost is high.

[0005] In a first aspect, the present invention provides a method for generating mathematical reasoning training data, comprising:

[0006] Get the first mathematical problem described in natural language;

[0007] Converting the first mathematical problem into a second mathematical problem described in a formal language;

[0008] Generate, based on a formal language solver, a candidate mathematical reasoning process corresponding to the second mathematical problem, wherein the candidate mathematical reasoning process is described in a formal language;

[0009] Based on the formal language verifier, determining a first mathematical reasoning process among the candidate mathematical reasoning processes;

[0010] Converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language;

[0011] The first mathematical problem and the corresponding second mathematical reasoning process are determined as mathematical reasoning training data.

[0012] In a feasible implementation manner, converting the first mathematical problem into a second mathematical problem described in a formal language includes:

[0013] Based on a first translation model, the first mathematical problem is converted into a second mathematical problem described in a formal language, wherein the first translation model is a machine learning model.

[0014] In a feasible implementation manner, before converting the first mathematical problem into a second mathematical problem described in a formal language based on the first translation model, the method further includes:

[0015] Acquire first annotated data, wherein the first annotated data is at least part of the first mathematical problem and the corresponding manually annotated second mathematical problem;

[0016] The first translation model is trained based on the first annotated data.

[0017] In a feasible implementation, based on a formal language verifier, determining a first mathematical reasoning process from among the candidate mathematical reasoning processes includes:

[0018] Based on Matlab, a first mathematical reasoning process is determined among the candidate mathematical reasoning processes.

[0019] In a feasible implementation, based on a formal language verifier, determining a first mathematical reasoning process from among the candidate mathematical reasoning processes includes:

[0020] Verifying whether the candidate mathematical reasoning process is correct based on a formal language verifier;

[0021] If correct, the candidate mathematical reasoning process is determined as the first mathematical reasoning process.

[0022] In a feasible implementation, after determining the first mathematical reasoning process among the candidate mathematical reasoning processes based on the formal language verifier, the method further includes:

[0023] The formal language solver is trained based on the second mathematical problem and the corresponding first mathematical reasoning process.

[0024] In a feasible implementation, converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language includes:

[0025] Based on a second translation model, the first mathematical reasoning process is converted into a second mathematical reasoning process described in natural language, and the second translation model is a machine learning model.

[0026] In a feasible implementation manner, before converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language based on a second translation model, the method further includes:

[0027] Acquire second annotated data, wherein the second annotated data is at least part of the first mathematical reasoning process and the corresponding manually annotated second mathematical reasoning process;

[0028] The second translation model is trained based on the second labeled data.

[0029] In a second aspect, the present invention provides a mathematical reasoning training data generating device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor so that the at least one processor can execute a mathematical reasoning training data generating method described in any of the above-mentioned embodiments.

[0030] In a third aspect, the present invention provides a non-volatile computer storage medium, which is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by a terminal, the terminal executes a method for generating mathematical reasoning training data described in any of the above-mentioned embodiments.

[0031] The present invention provides a method, device and medium for generating mathematical reasoning training data, which have the following beneficial technical effects compared with the prior art:

[0032] (1) After obtaining a mathematical problem described in natural language, the method provided by the present invention can automatically generate mathematical reasoning training data through a formal language solver and a formal language verifier, without the need for manual labeling, and can generate mathematical reasoning training data in large quantities at low cost.

[0033] (2) After the language conversion between the first translation model and the second translation model, the mathematical reasoning training data generated by the present invention, whether it is input (the first mathematical problem) or output (the second mathematical reasoning process), is described in natural language and can be directly used to train the large model to give a mathematical reasoning process described in natural language based on the mathematical problem described in natural language by the user; by training the large model with the mathematical reasoning training data, the logical reasoning ability of the large model can be improved, so that the large model can better handle logically complex problems.

[0034] (3) In the present invention, only the training of the first translation model and the second translation model requires limited manually annotated first annotated data and second annotated data. The formal language verifier can be implemented using tools corresponding to the formal language, and the training of the formal language solver can be implemented through the first mathematical reasoning process output by the formal language verifier. That is to say, after limited manual annotation, almost unlimited mathematical reasoning training data can be generated through the first translation model, the formal language solver, the formal language verifier, and the second translation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0036] Figure 1 A flowchart of a method for generating mathematical reasoning training data provided by the present invention;

[0037] Figure 2 A schematic diagram of a mathematical reasoning training data generation system provided by the present invention;

[0038] Figure 3 A schematic diagram of a second mathematical problem described in a formal language provided by the present invention;

[0039] Figure 4 A schematic diagram of a first mathematical reasoning process described in a formal language provided by the present invention;

[0040] Figure 5 A schematic diagram of a second mathematical reasoning process described in a natural language provided by the present invention;

[0041] Figure 6 A schematic diagram of the structure of a mathematical reasoning training data generating device provided by the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0043] The current large models have strong language comprehension and knowledge reserves, but their logical reasoning abilities are generally poor. Experiments have shown that adding mathematical reasoning training data to the training data helps improve the reasoning ability of the large models. However, there are currently problems with generating mathematical reasoning training data: manual labeling is usually required, and it is difficult to manually label mathematical reasoning training data in large quantities, and the cost is too high. Therefore, the present invention proposes a method of first converting mathematical problems described in natural language into mathematical problems described in formal language, and then generating mathematical reasoning processes described in formal language in large quantities, and finally converting the process to mathematical reasoning processes described in natural language. The technical solution proposed in the present invention is described in detail below with the help of the accompanying drawings.

[0044] Figure 1 The flowchart of a method for generating mathematical reasoning training data provided by the present invention is as follows. Figure 1 As shown, the method includes the following execution steps:

[0045] S101. Obtain a first mathematical problem described in natural language.

[0046] The mathematical reasoning training data in the present invention is used to train a large model for processing natural language. Therefore, firstly, mathematical problems described in natural language are collected and acquired, that is, the first mathematical problems, such as "proving that √2 is not a rational number".

[0047] S102. Convert the first mathematical problem into a second mathematical problem described in a formal language.

[0048] In mathematics, logic, and computer science, a formal language is a language defined in terms of precise mathematical or machine-processable formulas.

[0049] In order to facilitate the machine to process mathematical problems, the mathematical problems described in natural language are converted into mathematical problems described in formal language, that is, the first mathematical problem is converted into the second mathematical problem, that is, the mathematical problem is translated from natural language into formal language, for example, into lean language, matlab language, etc.

[0050] As a possible implementation method, translating the first mathematical problem from natural language into formal language can be achieved through a machine learning model, that is, S102 converts the first mathematical problem into a second mathematical problem described in a formal language, including: based on a first translation model, converting the first mathematical problem into a second mathematical problem described in a formal language, and the first translation model is a machine learning model.

[0051] As a possible implementation method, a part of the first mathematical problem described in natural language obtained in S101 can be manually annotated and manually translated into a second mathematical problem described in formal language, and the first translation model is trained through these manually annotated first mathematical problems and second mathematical problems.

[0052] That is, before S102 converts the first mathematical problem into a second mathematical problem described in a formal language based on the first translation model, the method also includes: obtaining first annotated data, wherein the first annotated data is at least part of the first mathematical problem and the corresponding manually annotated second mathematical problem; and training the first translation model based on the first annotated data.

[0053] S103. Generate a candidate mathematical reasoning process corresponding to the second mathematical problem based on a formal language solver.

[0054] Among them, the candidate mathematical reasoning process is described in a formal language.

[0055] In the present invention, the candidate mathematical reasoning process may be one or more. The formal language solver may be a machine learning model, such as ChatGPT.

[0056] S104. Determine a first mathematical reasoning process from candidate mathematical reasoning processes based on a formal language verifier.

[0057] In the present invention, the candidate mathematical reasoning process may be one or more, and according to the demand for mathematical reasoning training data, a mathematical reasoning process that meets the demand, that is, the first mathematical reasoning process, can be determined from the one or more candidate mathematical reasoning processes through a formal language verifier.

[0058] As a possible implementation method, the demand for mathematical reasoning training data may be a correct mathematical reasoning process. Then, based on a formal language verifier, a first mathematical reasoning process is determined from candidate mathematical reasoning processes, including: based on a formal language verifier, verifying whether the candidate mathematical reasoning process is correct; if correct, determining the candidate mathematical reasoning process as the first mathematical reasoning process.

[0059] As a possible implementation method, the formal language verifier can be an existing tool corresponding to the formal language. For example, when the formal language is Matlab, S104 determines the first mathematical reasoning process from the candidate mathematical reasoning processes based on the formal language verifier, including: determining the first mathematical reasoning process from the candidate mathematical reasoning processes based on Matlab.

[0060] As a possible implementation manner, after determining the first mathematical reasoning process among candidate mathematical reasoning processes based on the formal language verifier, the method further includes: training the formal language solver based on the second mathematical problem and the corresponding first mathematical reasoning process.

[0061] The present invention trains a formal language solver through the above data to obtain a formal language solver with more powerful performance. The candidate mathematical reasoning process obtained by the trained formal language solver is closer to the first mathematical reasoning process that meets the requirements.

[0062] For example, if the first mathematical reasoning process is the correct mathematical reasoning process among the candidate mathematical reasoning processes, then training the formal language solver by using the second mathematical problem and the first mathematical reasoning process can improve the correctness of the candidate mathematical reasoning process obtained by the trained formal language solver.

[0063] S105: Convert the first mathematical reasoning process into a second mathematical reasoning process described in a natural language.

[0064] In the present invention, the candidate mathematical reasoning process is described in a formal language. Obviously, the first mathematical reasoning process determined from the candidate mathematical reasoning process is also described in a formal language.

[0065] In order to be suitable for the training of large models, the mathematical reasoning process in the mathematical reasoning training data is also described in natural language. Therefore, after obtaining the first mathematical reasoning process described in formal language, the mathematical reasoning process can be translated from formal language into natural language, that is, the first mathematical reasoning process can be converted into a second mathematical reasoning process described in natural language.

[0066] As a possible implementation method, translating the first mathematical reasoning process from a formal language into a natural language can be achieved through a machine learning model, that is, S105 converts the first mathematical reasoning process into a second mathematical reasoning process described in a natural language, including: based on a second translation model, converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language, and the second translation model is a machine learning model.

[0067] As a possible implementation method, a part of the first mathematical reasoning process described in the formal language obtained in S104 can be manually annotated and manually translated into a second mathematical reasoning process described in a natural language. The second translation model is trained through these manually annotated first mathematical reasoning processes and second mathematical reasoning processes.

[0068] That is, before S105 converts the first mathematical reasoning process into a second mathematical reasoning process described in natural language based on the second translation model, the method also includes: obtaining second annotated data, wherein the second annotated data is at least part of the first mathematical reasoning process and the corresponding manually annotated second mathematical reasoning process; and training the second translation model based on the second annotated data.

[0069] S106: Determine the first mathematical problem and the corresponding second mathematical reasoning process as mathematical reasoning training data.

[0070] In the present invention, the first mathematical problem and the corresponding second mathematical reasoning process are both described in natural language, and the data can be determined as mathematical reasoning training data. That is to say, the mathematical reasoning training data generated by the present invention, whether it is input (the first mathematical problem) or output (the second mathematical reasoning process), is described in natural language, and can be directly used to train the large model to give a mathematical reasoning process described in natural language according to the mathematical problem described in natural language by the user; by training the large model with mathematical reasoning training data, the logical reasoning ability of the large model can be improved, so that the large model can better handle logically complex problems.

[0071] Exemplarily, a method for generating mathematical reasoning training data provided by the present invention can be implemented by the following system, which is described in detail below.

[0072] 1. System composition

[0073] Figure 2 A schematic diagram of a mathematical reasoning training data generation system provided by the present invention, such as Figure 2 As shown, the system consists of four models, namely the first translation model, the second translation model, the formal language solver, and the formal language verifier.

[0074] in:

[0075] 1) The first translation model is responsible for converting the first mathematical problem described in natural language into the second mathematical problem described in formal language, for example, Figure 3 A schematic diagram of a second mathematical problem described in a formal language provided by the present invention. The first translation model can convert the mathematical problem "proving that the root 2 is not a rational number" described in natural language into Figure 3 The lean language shown describes "Prove that the root 2 is not a rational number".

[0076] 2) Formal language solver: responsible for generating a candidate mathematical reasoning process described in a formal language according to a second mathematical problem described in a formal language.

[0077] 3) Formal language verifier: responsible for analyzing the candidate mathematical reasoning process described in the formal language and verifying the correctness of each step. This step is automatic and does not require manual annotation.

[0078] 4) The second translation model is responsible for converting the first mathematical reasoning process described in formal language into the corresponding second mathematical reasoning process described in natural language. For example, Figure 4 A schematic diagram of a first mathematical reasoning process described in a formal language provided by the present invention, Figure 5 A schematic diagram of a second mathematical reasoning process described in a natural language provided by the present invention. The second translation model can be Figure 4 The first mathematical reasoning process described by the lean code of "Prove that √2 is not a rational number" is converted into Figure 5 As shown, Figure 4 The first mathematical reasoning process shown corresponds to the second mathematical reasoning process described in natural language.

[0079] 2. System Implementation

[0080] S1: Collect the first mathematical problems described in natural language.

[0081] S2: Manually annotate part of the first mathematical problem described in natural language to correspond to the second mathematical problem described in formal language.

[0082] S3: Use the data annotated in S2 to train the first translation model.

[0083] S4: Using the first translation model, convert all collected first mathematical problems described in natural language into corresponding second mathematical problems described in formal language.

[0084] S5: For each second mathematical problem described in a formal language, the formal language problem solver generates one or more candidate mathematical reasoning processes described in a formal language.

[0085] S6: For each candidate mathematical reasoning process described in the formal language, the formal language verifier analyzes and verifies the correctness of each step, and obtains the final correct candidate mathematical reasoning process, and determines the correct candidate reasoning process as the first mathematical reasoning process.

[0086] S7: Use all the second mathematical problems described in the formal language and the corresponding correct candidate reasoning processes (that is, the first mathematical reasoning processes) as training data to train the formal language problem solver to obtain a more powerful formal language solver.

[0087] S8: Iterate steps S5, S6, and S7 N times, and the formal language solver is trained. N is an integer greater than 1.

[0088] S9: Manually annotate part of the second mathematical reasoning process described in natural language corresponding to the first mathematical reasoning process described in formal language.

[0089] S10: Use the data annotated in S9 to train the second translation model.

[0090] S11: So far, the three models of the first translation model, the second translation model and the formal language solver have been trained. In addition, the formal language verifier is already available in the formal language and does not need to be trained.

[0091] S12: Based on the above four models, namely the first translation model, the second translation model, the formal language solver and the formal language verifier, all the first mathematical problems described in natural language collected by S1 are converted into the second mathematical reasoning process described in natural language. The first mathematical problems and the corresponding second mathematical reasoning process are the mathematical reasoning training data that can be used for large model training. For example, the first mathematical problem described in natural language is “proving that √2 is not a rational number”, and Figure 5 The second mathematical reasoning process described in natural language corresponding to the first mathematical problem shown.

[0092] 3. System Advantages

[0093] (1) Only the training of the first translation model and the second translation model requires limited manually annotated first annotated data and second annotated data. The formal language verifier can be implemented using tools corresponding to the formal language, and the training of the formal language solver can be implemented through the first mathematical reasoning process output by the formal language verifier. That is to say, after limited manual annotation, almost unlimited mathematical reasoning training data can be generated through the first translation model, the formal language solver, the formal language verifier, and the second translation model.

[0094] (2) After the language conversion between the first translation model and the second translation model, the mathematical reasoning training data generated by the present invention, whether it is input (the first mathematical problem) or output (the second mathematical reasoning process), is described in natural language and can be directly used to train the large model to give a mathematical reasoning process described in natural language based on the mathematical problem described in natural language by the user; by training the large model with the mathematical reasoning training data, the logical reasoning ability of the large model can be improved, so that the large model can better handle logically complex problems.

[0095] Corresponding to the above-mentioned embodiment, the present invention also provides a device for generating mathematical reasoning training data. Figure 6A structural schematic diagram of a mathematical reasoning training data generation device provided for an embodiment of the present invention, the device may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute a mathematical reasoning training data generation method as described in the above embodiment.

[0096] In a possible implementation of the present invention, the at least one processor is capable of executing the following steps: obtaining a first mathematical problem described in natural language; converting the first mathematical problem into a second mathematical problem described in formal language; generating, based on a formal language solver, a candidate mathematical reasoning process corresponding to the second mathematical problem, wherein the candidate mathematical reasoning process is described in formal language; determining, based on a formal language verifier, a first mathematical reasoning process from among the candidate mathematical reasoning processes; converting the first mathematical reasoning process into a second mathematical reasoning process described in natural language; and determining the first mathematical problem and the corresponding second mathematical reasoning process as mathematical reasoning training data.

[0097] In a specific implementation, the present invention can also be provided as a non-volatile computer storage medium, wherein the storage medium is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each program includes instructions, and when the instructions are executed by a terminal, the terminal executes a method for generating mathematical reasoning training data as described in the above embodiment.

[0098] In a possible implementation of the present invention, the aforementioned terminal executes, taking a first mathematical problem described in natural language; converting the first mathematical problem into a second mathematical problem described in a formal language; generating, based on a formal language solver, a candidate mathematical reasoning process corresponding to the second mathematical problem, the candidate mathematical reasoning process being described in a formal language; determining, based on a formal language verifier, a first mathematical reasoning process from the candidate mathematical reasoning processes; converting the first mathematical reasoning process into a second mathematical reasoning process described in natural language; and determining the first mathematical problem and the corresponding second mathematical reasoning process as mathematical reasoning training data.

[0099] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0101] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating mathematical reasoning training data, characterized in that: The method comprises: Get the first mathematical problem described in natural language; Converting the first mathematical problem into a second mathematical problem described in a formal language; Generate, based on a formal language solver, a candidate mathematical reasoning process corresponding to the second mathematical problem, wherein the candidate mathematical reasoning process is described in a formal language; Based on the formal language verifier, determining a first mathematical reasoning process among the candidate mathematical reasoning processes; Converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language; The first mathematical problem and the corresponding second mathematical reasoning process are determined as mathematical reasoning training data.

2. A method for generating mathematical reasoning training data according to claim 1, characterized in that: Converting the first mathematical problem into a second mathematical problem described in a formal language comprises: Based on a first translation model, the first mathematical problem is converted into a second mathematical problem described in a formal language, wherein the first translation model is a machine learning model.

3. A method for generating mathematical reasoning training data according to claim 2, characterized in that: Before converting the first mathematical problem into a second mathematical problem described in a formal language based on the first translation model, the method further includes: Acquire first annotated data, wherein the first annotated data is at least part of the first mathematical problem and the corresponding manually annotated second mathematical problem; The first translation model is trained based on the first annotated data.

4. The method for generating mathematical reasoning training data according to claim 1, characterized in that: Based on the formal language verifier, a first mathematical reasoning process is determined among the candidate mathematical reasoning processes, including: Based on Matlab, a first mathematical reasoning process is determined among the candidate mathematical reasoning processes.

5. The method for generating mathematical reasoning training data according to claim 1, characterized in that: Based on the formal language verifier, a first mathematical reasoning process is determined among the candidate mathematical reasoning processes, including: Verifying whether the candidate mathematical reasoning process is correct based on a formal language verifier; If correct, the candidate mathematical reasoning process is determined as the first mathematical reasoning process.

6. A method for generating mathematical reasoning training data according to claim 1, characterized in that: After determining the first mathematical reasoning process among the candidate mathematical reasoning processes based on the formal language verifier, the method further includes: The formal language solver is trained based on the second mathematical problem and the corresponding first mathematical reasoning process.

7. The method for generating mathematical reasoning training data according to claim 1, characterized in that: Converting the first mathematical reasoning process into a second mathematical reasoning process described in natural language comprises: Based on a second translation model, the first mathematical reasoning process is converted into a second mathematical reasoning process described in natural language, and the second translation model is a machine learning model.

8. A method for generating mathematical reasoning training data according to claim 7, characterized in that: Before converting the first mathematical reasoning process into a second mathematical reasoning process described in a natural language based on a second translation model, the method further includes: Acquire second annotated data, wherein the second annotated data is at least part of the first mathematical reasoning process and the corresponding manually annotated second mathematical reasoning process; The second translation model is trained based on the second labeled data.

9. A mathematical reasoning training data generation device, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute a method for generating mathematical reasoning training data according to any one of claims 1-8.

10. A non-volatile computer storage medium, characterized in that: The storage medium is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by the terminal, the terminal executes a method for generating mathematical reasoning training data according to any one of claims 1-8.

Citation Information

Cited By

  • Method for improving mathematical reasoning ability of large language model by integrating mathematica code and natural language reasoning step

    CN121581194A