Semantic execution-based large model reasoning capability enhancement method and system
By obtaining and decomposing problem description information, building a computing container and verifying each step, the problem of inaccurate semantic transformation of the language model during inference is solved, and the efficiency and accuracy of problem solving are improved.
Patent Information
- Application Number
- CN202411642570.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the prior art, language models stay in the semantic reasoning stage when using prompt words to reason for problem reasoning, lack the process of converting semantics into executable files and verifying the inference results through facts, resulting in the semantic reasoning results being inaccurate enough and fuzzy.
By obtaining the problem description information of the target problem, obtaining the calculation guide part of the information and inputting a large language model, generating initial prompt words, decomposing problem steps, building a calculation container, executing and verifying each step, integrating the generation reasoning process, using semantic models and Calculation containers improve the accuracy of problem solving.
Improve the efficiency and accuracy of problem solving, convert the user-entered problem description into computable content, break it down into multiple steps to solve, and verify the feasibility of each solution through middleware to ensure the correctness of the inference process.
Smart Images

Figure CN119204226A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of problem reasoning technology, and in particular to a method, system, interactive computing middleware and computer-readable storage medium for enhancing large model reasoning capabilities based on semantic execution. Background Art
[0002] Language models are good at identifying general patterns and relationships in data and can quickly predict structures that may be useful.
[0003] However, the output results of the language model lack a strictly described reasoning process or interpretability, which leads to a lack of credibility in dealing with relevant special problems. On the other hand, the symbolic reasoning engine draws conclusions based on formal logic and uses clear rules, and the compiler executor describes the problem based on code and uses calculations to obtain reliable results. Both results are rational and interpretable, but neither can directly handle problems described in natural language, and cannot handle complex problems autonomously.
[0004] Moreover, when the current language model uses prompt words to reason about problems, it remains at the semantic reasoning stage and lacks the process of converting semantics into executable files and verifying the reasoning results through factual execution. As a result, the results of semantic reasoning are inaccurate and ambiguous.
[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0006] The main purpose of the present invention is to provide a method, system, interactive computing middleware and computer-readable storage medium for enhancing the reasoning capability of a large model based on semantic execution, aiming to solve the problem that the language model in the prior art remains at the semantic reasoning stage when using prompt words to reason about problems, lacks the process of converting semantics into executable files and verifying the reasoning results through fact execution, thereby resulting in inaccurate results of semantic reasoning.
[0007] To achieve the above object, the present invention provides a method for enhancing the reasoning capability of a large model based on semantic execution, and the method for enhancing the reasoning capability of a large model based on semantic execution comprises the following steps: Obtaining problem description information of a target problem, obtaining computable guidance part information according to the problem description information, and inputting the computable guidance part information into a large language model; Obtaining an initial prompt word of the target question, and inputting the initial prompt word into the large language model, and outputting a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; Construct an initial computing container, and build a computing environment in the initial computing container to obtain a computing container, input multiple problem steps into the computing container in sequence, and obtain multiple correct execution steps output by the computing container, wherein the correct execution steps represent the solution of the computing container to solve the sub-problem; All the correctly executed steps are integrated to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
[0008] Optionally, the method for enhancing the reasoning capability of a large model based on semantic execution, wherein the step of obtaining problem description information of a target problem, obtaining computable guidance part information according to the problem description information, and inputting the computable guidance part information into a large language model, specifically comprises: Obtaining problem description information of a target problem input by a user, and extracting a plurality of structured information from a corresponding computable database and a subject database using a graph retrieval enhancement algorithm according to the problem description information; Computable guided part information is constructed according to all the structured information, wherein the computable guided part information represents a reference case of a large language module processing the target problem, and the computable guided part information is input into the large language model.
[0009] Optionally, the method for enhancing the reasoning capability of a large model based on semantic execution, wherein the steps of obtaining an initial prompt word of the target question, inputting the initial prompt word into the large language model, and outputting multiple question steps specifically include: Inputting the problem description information into the large language model to obtain an initial prompt word; The large language model generates a formal expression and a numerical expression according to the computable guided part information in the target problem; The large language model updates the initial prompt word and generates a prompt word according to the computable guide part information, the formal expression and the numerical expression; Analyzing the prompt words in the large language model to obtain a problem-solving idea, decomposing the problem-solving idea to obtain a plurality of language description information and a plurality of symbolic expressions, wherein the language description information represents an intermediate process described in natural language; In the large language model, corresponding execution codes are generated according to the multiple language description information and the multiple symbolic expressions, and problem steps are constructed according to each of the execution codes, language description information and symbolic expressions, and all the problem steps are output.
[0010] Optionally, the method for enhancing the reasoning capability of a large model based on semantic execution, wherein the corresponding execution code is generated in the large language model according to the plurality of the language description information and the plurality of the symbolic expressions, and a problem step is constructed according to each of the execution codes, the language description information and the symbolic expression, and all the problem steps are output, and then the method further includes: Input each of the language description information, symbolic expression and the corresponding execution code into the constructed large language iteration model, output corresponding first solution evaluation information, and receive corresponding second solution evaluation information input by the user; wherein the second scheme evaluation information is generated according to each of the symbolic expressions; If there is first solution evaluation information indicating that the current step is wrong, the corresponding first solution evaluation information is input into the large language iteration model, and the corresponding first modification suggestion is output; If the second solution evaluation information exists, indicating that the current step is wrong, obtaining the corresponding second modification suggestion input by the user; Inputting the first modification suggestion or the second modification suggestion into the large language model, and outputting an updated question step; If there is a second modification suggestion for the current problem step, only the second modification suggestion is input into the large language model.
[0011] Optionally, the method for enhancing the reasoning capability of a large model based on semantic execution, wherein the initial computing container is constructed, and a computing environment is built in the initial computing container to obtain a computing container, multiple problem steps are sequentially input into the computing container, and multiple correct execution steps output by the computing container are obtained, specifically including: Building an initial computing container and obtaining actual execution requirements according to each of the execution codes; Building a computing environment file according to each of the actual execution requirements, and importing the computing environment file into the initial computing container to obtain the computing container; Transmitting the plurality of problem steps to the computing container, executing each of the execution codes, and outputting the execution result of the corresponding problem step; Input each of the execution results into the large language model for analysis, and output an evaluation result; If there is a correct evaluation result, the corresponding execution result is determined as a correct execution step.
[0012] Optionally, the method for enhancing the reasoning capability of a large model based on semantic execution, wherein each of the execution results is input into the large language model for analysis and an evaluation result is output, and then further comprises: If the evaluation result is wrong, obtaining corresponding feedback information generated by the large language model, wherein the feedback information is generated by the large language model according to the corresponding execution result; The corresponding feedback information is input into the large language model, the symbolic expression and execution code corresponding to the erroneous execution result are updated, and the updated problem steps are output, until the newly output problem steps are transmitted to the computing container, and the output execution results are the correct execution steps.
[0013] Optionally, in the method for enhancing the reasoning capability of a large model based on semantic execution, the reasoning process includes: a semantic description process and a final solution process; The step of integrating all the correct execution steps to generate a reasoning process specifically includes: Integrate all the correct execution steps and the symbolic expression corresponding to each of the correct execution steps; Generate the semantic description process according to all the symbolic expressions, and generate the final solution process according to all the target correct execution steps; The semantic description process represents the textual reasoning process for solving the target problem, and the final solution process represents the digital reasoning result for solving the target problem.
[0014] In addition, to achieve the above-mentioned purpose, the present invention also provides a large model reasoning capability enhancement system based on semantic execution, wherein the large model reasoning capability enhancement system based on semantic execution includes: A formalized rewriting module is used to obtain problem description information of a target problem, obtain computable guide part information according to the problem description information, and input the computable guide part information into a large language model; a question decomposition module, configured to obtain an initial prompt word of the target question, input the initial prompt word into the large language model, and output a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; A problem solving module is used to construct an initial computing container, and to build a computing environment in the initial computing container to obtain a computing container, to sequentially input a plurality of the problem steps into the computing container, and to obtain a plurality of correct execution steps output by the computing container, wherein the correct execution steps represent a solution of the computing container to solve the sub-problem; The output summary module is used to integrate all the correct execution steps to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
[0015] In addition, to achieve the above-mentioned purpose, the present invention also provides an interactive computing middleware, wherein the interactive computing middleware includes: a memory, a processor, and a large model reasoning capability enhancement program based on semantic execution stored on the memory and executable on the processor, wherein the large model reasoning capability enhancement program based on semantic execution implements the steps of the large model reasoning capability enhancement method based on semantic execution as described above when executed by the processor.
[0016] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a large model reasoning capability enhancement program based on semantic execution, and when the large model reasoning capability enhancement program based on semantic execution is executed by a processor, the steps of the large model reasoning capability enhancement method based on semantic execution as described above are implemented.
[0017] In the present invention, the problem description information of the target problem is obtained, and the computable guide part information is obtained according to the problem description information, and the computable guide part information is input into the large language model; the initial prompt word of the target problem is obtained, and the initial prompt word is input into the large language model, and multiple problem steps are output, wherein the problem steps represent the sub-problems generated after the large language model decomposes the target problem; an initial calculation container is constructed, and a calculation environment is built in the initial calculation container to obtain a calculation container, and multiple problem steps are sequentially input into the calculation container, and multiple correct execution steps output by the calculation container are obtained, wherein the correct execution steps represent the solution of the calculation container to solve the sub-problem; all the correct execution steps are integrated to generate a reasoning process, wherein the reasoning process represents the process of solving the target problem. The present invention improves the efficiency of problem solving by converting the problem description input by the user into computable content, decomposing the computable content into multiple steps for solution, and generating the execution code corresponding to each step at the same time, and verifying the feasibility of each solution through the middleware, using the semantic model and the calculation container to calculate the correct execution steps of problem solving, and improving the accuracy of problem solving. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of a preferred embodiment of the method for enhancing the reasoning capability of a large model based on semantic execution of the present invention; Figure 2 It is a schematic diagram of a framework of a preferred embodiment of a method for enhancing the reasoning capability of a large model based on semantic execution of the present invention; Figure 3 It is a formalized rewritten flow chart of a preferred embodiment of the method for enhancing the reasoning capability of a large model based on semantic execution of the present invention; Figure 4It is a problem decomposition flow chart of a preferred embodiment of the method for enhancing the reasoning capability of a large model based on semantic execution of the present invention; Figure 5 It is a problem solving flow chart of a preferred embodiment of the method for enhancing the reasoning capability of a large model based on semantic execution of the present invention; Figure 6 It is a structural diagram of a preferred embodiment of the system for enhancing the large model reasoning capability based on semantic execution of the present invention; Figure 7 A schematic diagram of the operating environment of a preferred embodiment of the interactive computing middleware of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0020] Currently, the mainstream use of prompts to improve LLM (Large Language Model) problem reasoning capabilities only stays at the semantic reasoning stage. It lacks the process of converting semantics into executable files and verifying the reasoning results through factual execution, which leads to the ambiguity of semantic reasoning.
[0021] The method for enhancing the reasoning capability of a large model based on semantic execution described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the method for enhancing the large model reasoning capability based on semantic execution includes the following steps: Step S10: Obtain problem description information of the target problem, obtain computable guide part information according to the problem description information, and input the computable guide part information into the large language model.
[0022] Among them, Figure 2 As shown, the user provides the requirement description or problem description information in the system interaction interface, and the system automatically identifies whether the current problem can be solved by computable tools. If it can be solved by computable tools, the system adds computable guidance information to the problem based on the computable database and subject knowledge base, and uses graph retrieval enhancement technology to guide the problem, and submits it to the large language model. The large language model then formally rewrites the part of the problem that can be expressed by calculation to obtain prompt words for the structured description.
[0023] Specifically, problem description information of a target problem input by a user is obtained, and a plurality of structured information is extracted from a corresponding computable database and a subject database using a graph retrieval enhancement algorithm according to the problem description information; computable leading part information is constructed according to all the structured information, wherein the computable leading part information represents a reference case of a large language module processing the target problem, and the computable leading part information is input into the large language model.
[0024] Among them, Figure 3 As shown in the figure, after obtaining the problem description information, the graph retrieval enhancement technology is used to extract the structured information of the solution steps related to the target problem, and add it to the prompt word as the computable guide part information and necessary background information; wherein the structured information is mainly composed of typical cases of solving such problems, common solutions, computational representations of common methods, and instructions for using computing tools, and its structure is represented as: [$tip][$content][$math][$code], wherein [$tip] represents the prompt word, [$content] represents the computable guide part information, [$math] represents the subsequent digital representation, and [$code] represents the execution code.
[0025] Among them, the semantic understanding ability and formal language ability of the large language model (that is, the ability to rewrite natural language into formal language) are used to transform the natural language in the problem description information into a formal language representation (for example, expressing natural language through symbols), so as to achieve semantically consistent content rewriting and improve the accuracy of reasoning; at the same time, the logical relationship described in natural language is transformed into a structured description expressed in the form of hierarchy, category or relationship network, and the logical semantics are rewritten (for example, the relationship between the decoupling problem and the numerical value is generalized by conforming the numerical value). This makes it more convenient to solve subsequent problems, makes the reasoning process clearer, and improves the efficiency of subsequent review by users.
[0026] Step S20, obtaining an initial prompt word of the target question, and inputting the initial prompt word into the large language model, outputting a plurality of question steps, wherein the question steps are generated by the large language model by decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-problems generated after the large language model decomposes the target question.
[0027] Before performing the decomposition step of the target problem, the problem description information needs to be input into the large language model for preliminary analysis to obtain the initial prompt words and conduct preliminary screening of the target problem, thereby improving the efficiency of subsequent decomposition of the target problem. After that, the prompt words are jointly generated by the initial prompt words and the computable guidance part information to decompose the target problem.
[0028] Among them, after the large language model obtains a structured question (i.e., the prompt word), it uses its self-evaluation function and external guidance from relevant experts to iteratively evaluate and modify the solution steps of the target problem, until the decomposition of the entire target problem is evaluated by the large language model and relevant experts, thereby improving the accuracy of solving the target problem.
[0029] Specifically, the problem description information is input into the large language model to obtain an initial prompt word; the large language model generates a formal expression and a numerical expression according to the computable guide part information in the target problem; the large language model updates the initial prompt word and generates a prompt word according to the computable guide part information, the formal expression and the numerical expression; the prompt word is analyzed in the large language model to obtain a problem-solving idea, and the problem-solving idea is decomposed to obtain a plurality of language description information and a plurality of symbolic expressions, wherein the language description information represents an intermediate process described in a natural language; in the large language model, corresponding execution codes are generated according to the plurality of language description information and the plurality of symbolic expressions, and a problem step is constructed according to each of the execution codes, the language description information and the symbolic expression, and all the problem steps are output; wherein the problem step represents a sub-problem generated after the large language model decomposes the target problem.
[0030] Among them, a large language model is used to design an overall solution idea for the rewritten target problem, and then the solution idea is decomposed into multiple small steps, that is, the target problem is decomposed into multiple sub-problems, and the solution process of each sub-problem is explained with symbols and executable codes to represent the solution problem; by decomposing the target problem, the complexity of solving the target problem is reduced, and the accuracy of solving each sub-problem is improved, thereby improving the accuracy of solving the target problem.
[0031] Furthermore, each of the language description information, symbolic expression and the corresponding execution code is respectively input into the constructed large language iteration model, the corresponding first solution evaluation information is output, and the corresponding second solution evaluation information input by the user is received; wherein the second solution evaluation information is generated according to each of the symbolic expressions; if there is first solution evaluation information indicating that the current step is wrong, the corresponding first solution evaluation information is input into the large language iteration model, and the corresponding first modification opinion is output; if there is second solution evaluation information indicating that the current step is wrong, the corresponding second modification opinion input by the user is obtained; the first modification opinion or the second modification opinion is input into the large language model, and the updated problem step is output; if there is a second modification opinion for the current problem step, only the second modification opinion is input into the large language model.
[0032] Among them, Figure 4 As shown, each sub-problem and its symbolic expression are sent to the cloud display screen for inspection by relevant experts. At the same time, the large language model evaluates the symbolic expression and execution code of each sub-problem. For example, the large language model self-iterates to detect whether there are formal errors such as symbol errors and code errors. The human expert evaluates whether the reasoning process in the step is reasonable. If it is unreasonable, the human expert will give modification suggestions, and guide the large language model to modify the reasoning process (i.e., the decomposition of the target problem) through the modification suggestions. Through the evaluation of the overall solution, solution ideas, symbols and execution code of the target problem by both parties, it is judged whether the decomposition of the target problem is appropriate. Through double evaluation, it is possible to effectively avoid the occurrence of inappropriate decomposition of the target problem, provide the most suitable decomposition solution, and effectively improve the efficiency of solving the target problem.
[0033] Step S30, construct an initial computing container, and set up a computing environment in the initial computing container to obtain a computing container, input multiple problem steps into the computing container in sequence, and obtain multiple correct execution steps output by the computing container, wherein the correct execution steps represent the solution of the computing container to solve the sub-problem.
[0034] Among them, the computable module is called according to the decomposed content to build the corresponding computing environment, construct the computing container, and use the computing container to solve each sub-problem. The solution results are submitted to the large language model for interaction, and the execution content is iteratively adjusted until each sub-problem can get the correct solution steps to ensure the reasoning accuracy of the target problem.
[0035] Specifically, an initial computing container is constructed, and actual execution requirements according to each of the execution codes are obtained; a computing environment file is constructed according to each of the actual execution requirements, and the computing environment file is imported into the initial computing container to obtain the computing container; multiple problem steps are transferred to the computing container, and each of the execution codes is executed, and the execution results of the corresponding problem steps are output; each of the execution results is input into the large language model for analysis, and an evaluation result is output; if there is a correct evaluation result, the corresponding execution result is determined to be a correct execution step.
[0036] Among them, Figure 5 As shown in the figure, a docker (an open source application container engine) or WASM (WebAssembly, a portable, compact and fast-loading binary format) container is built, and the required computing environment is loaded in the container. According to the actual needs of the computable content, the computing environment usually includes a common code compiler or a professional computing engine, etc.; the computable content represented by the code in the plan is actually executed in the built computing environment, and interactively executed with the large language model until each step in the plan is executed correctly.
[0037] Furthermore, if there is an error in the evaluation result, the corresponding feedback information generated by the large language model is obtained, wherein the feedback information is generated by the large language model according to the corresponding execution result; the corresponding feedback information is input into the large language model, the symbolic expression and execution code corresponding to the erroneous execution result are updated, and the updated problem steps are output, until the newly output problem steps are transmitted to the computing container, and the output execution result is the correct execution step.
[0038] Among them, after the computing container calculates the execution result, it is handed over to the large language model for detection and evaluation. If the evaluation result indicates that the execution result is wrong, the large language model will adjust the sub-problem corresponding to this execution result, that is, modify the computable guidance part of the target problem related to this sub-problem, and use multiple sampling and optimization methods in the adjustment process. On the basis of improving the accuracy of solving the target problem, it can also improve the efficiency of the reasoning process.
[0039] Among them, sampling and selection requires locating the adjustment area, generating multiple candidate codes for sub-problems, clustering the candidate codes, and dividing the candidate codes into several sets with unequal functions. It is necessary to select the cluster set whose implemented functions are closest to the requirement description as the final generation result.
[0040] For example, when executing the code in a certain step, the compilation executor reports an error. The interactive computing middleware will obtain the current error information and the current execution code and submit them to the large language model. The large language model will evaluate the sub-problems and modify the execution code. The system generates multiple functionally identical codes based on the feedback information, first clusters them, and then selects the most semantically consistent code. The code is returned to the interactive computing middleware for execution. If it is executed correctly, the next step is executed inferencewise. If errors continue to be reported, the above collection, evaluation, modification, and execution process is repeated until it is executed correctly.
[0041] Step S40: Integrate all the correctly executed steps to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
[0042] The reasoning process includes: a semantic description process and a final solution process.
[0043] Specifically, all the correct execution steps and the symbolic expressions corresponding to each of the correct execution steps are integrated; the semantic description process is generated according to all the symbolic expressions, and the final solution process is generated according to all the target correct execution steps; wherein the semantic description process represents the textual reasoning process for solving the target problem, and the final solution process represents the digital reasoning result for solving the target problem.
[0044] After ensuring that the solution to each sub-problem is correct, the correct execution steps of each sub-problem are integrated to obtain two reasoning processes, namely the textual reasoning process for solving the target problem and the digital reasoning result for solving the target problem, which helps users grasp the reasoning process of the target problem more accurately and improves the user experience.
[0045] For example, the user submits a question description: "Please answer the following expression: Factorize the problem and give detailed steps for solving it”; the system will retrieve structured information related to the problem, including meta-problems, basic background or solution strategies, based on the computable database and using graph retrieval enhancement technology. At the same time, it will use the large language model to rewrite the part of the problem that can be expressed by calculation in a mathematical formal language to obtain structured prompt words: Meta-problems include: factoring problems (mathematical concepts and basic knowledge, the structure of polynomials, the definition of factors, prime factors and composite numbers); basic background includes: factoring steps, final results (giving the fully factored expression) and clear format (using mathematical symbols and appropriate format to make the steps easy to understand); solving strategies include: "('monomial'; 'expansion', 'extract the greatest common factor')", "('four or more terms', 'try to factorize by grouping first and then combining the same type of methods')", "('two or three terms', 'recognize patterns: square differences, perfect square trinomials, cube differences and sums, general quadratic polynomials, etc.')" and "('long division or comprehensive division')", and these words represent the extraction prompts.
[0046] After determining the structured information of the target problem, the digital representation of the target problem $[math_expression] can be obtained: math_expression= ; The process of adding structured information and rewriting the formal language to the question submitted by the user to obtain the prompt words for the question description is as follows: Step 1: Please factorize the following expression $[math_expression] and give detailed solution steps.
[0047] math_expression= ; Step 2: This problem belongs to the general category of factorization problems in mathematical solution. When trying to factorize the integer, please use the following step strategy: [ ('Monomials', 'Expand', 'Extract greatest common factor'), ('Four or more terms', 'Try grouping and combining similar methods to factor'), ('Two or three terms', 'Identify patterns: square differences, perfect square trinomials, cubed differences and sums, general quadratic polynomials, etc.'), ('Long division or comprehensive division') ] Common methods include: [ a.Mathematica (a scientific computing software) Method: Use the Factor function to factorize the expression.
[0048] Example code: Factor[a*b*(x^2-y^2)+x*y*(a^2-b^2)] b. Maple (a mathematical software) Method: Use the factor function to factorize.
[0049] Example code: factor(a*b*(x^2-y^2)+x*y*(a^2-b^2)); c.SageMath (a mathematical software system) Method: Define variables and use factor function to factorize.
[0050] Sample code: var('abxy'); expr=a*b*(x^2-y^2)+x*y*(a^2-b^2); factored_expr=expr.factor(); print(factored_expr); d.Maxima.
[0051] Method: Use the factor function to factorize.
[0052] Sample code: factor(a*b*(x^2-y^2)+x*y*(a^2-b^2)); ] Use the above strategy to factor the integer from step 1.
[0053] Responses are required to include: Factorization Steps: Expand each step of the factorization process, explaining the chosen strategy and the mathematical formulas applied.
[0054] Final result: Give the fully factored expression.
[0055] Clear formatting: Use mathematical notation and appropriate formatting to make the steps easy to understand.
[0056] Furthermore, the large language model gives a global description of the solution to the target problem and a detailed step plan based on the above prompt words. At the same time, the evaluation information or modification opinions of the large language model and relevant experts are introduced to realize the "human in the loop" dual-subject evaluation, and finally a feasible solution to the target problem is obtained: (1) Overall solution: for expressions Perform factorization; the goal is to show the factorization process in detail through mathematical derivation and code implementation; use formula expansion and reorganization; and try to regroup terms; finally verify the target factorization.
[0057] The solution process represented by Python code roughly includes: variable definition, expression definition, expression expansion, factorization operation (applying factorization method, using factor function) and result analysis, and finally the result is verified by SageMath.
[0058] (2) Decompose the target problem: Step 1: Identify the square difference and expand it using the square difference formula: Recognize the expression and is the square difference, which can be written as: = (Square Difference Formula) = .
[0059] The code means: Use the SymPy library for symbolic operations fromsympyimportsymbols,factor.
[0060] Defining symbolic variables a,b,x,y=symbols(' bxy'').
[0061] Defining Expressions expr1=x^2-y^2; expr2=a^2-b^2; Factorization factored_expr1=factor(expr1); factored_expr2=factor(expr2).
[0062] Output: print('Factoredexpr1:',factored_expr1); print('Factoredexpr2:',factored_expr2).
[0063] Execution Result: Factoredexpr1:(xy)*(x+y)Factoredexpr2:(ab)*(a+b).
[0064] Step 2: Write the original expression in a form that contains the product Substitute the square difference formula into the original expression: = + ; The code means: Original expression expr=a*b*(x+y)*(xy)+x*y*(a+b)*(ab); print('Expressionafterapplyingdifferenceofsquares:',expr).
[0065] Execution Result: Expressionafterapplyingdifferenceofsquares:a*b*(xy)*(x+y)+x*y*(ab)*(a+b).
[0066] Step 3: Expand items to group them To facilitate grouping, expand each item.
[0067] The code means: fromsympyimportexpand Expand first item first_term=expand(a*b*(xy)*(x+y))print('Firsttermexpanded:',first_term).
[0068] Expand the second item second_term=expand(x*y*(ab)*(a+b))print('Secondtermexpanded:',second_term).
[0069] Execution Result: Firsttermexpanded:a*b*x^2-a*b*y^2; Secondtermexpanded:a^2*x*yb^2*x*y.
[0070] Step 4: Combine the expanded terms into an expression The code means: Merge and expand expanded_expr=first_term+second_termprint('Expandedexpression:',expanded_expr); Execution Result: Expandedexpression:a*b*x^2-a*b*y^2+a^2*x*yb^2*x*y.
[0071] Step 5: Rearrange and group This rearranges the expression so that it is easier to extract the common factors: Group 1: , the second group: , the code means: Grouping group1=a*b*x^2+a^2*x*y; group2=-a*b*y^2-b^2*x*y; print('Group1:',group1)print('Group2:',group2).
[0072] Execution Result: Group1:a*b*x^2+a^2*x*y; Group2: -a*b*y^2-b^2*x*y.
[0073] Step 6: Extract common factors for each group Extract the first group The common factor is: = ; The code means: Extract the common factors of the first group group1_factored=factor(group1); print('Group1factored:',group1_factored); Execution Result: Group1factored:a*x*(a*y+b*x); Extract the second group is the common factor: ; The code means: Extract the common factors of the second group group2_factored=factor(group2); print('Group2factored:',group2_factored).
[0074] Execution Result: Group2factored:-b*y*(a*y+b*x).
[0075] Step 7: Extract the overall common factor Now, the expression becomes: - = ; The code means: Extracting common factors common_factor=a*y+b*x; factored_expr=common_factor*(a*xb*y); print('Factoredexpression:',factored_expr).
[0076] Execution Result: Factoredexpression:(a*y+b*x)*(a*xb*y).
[0077] Step 8: Verify the correctness of the factorization using sagemath The code means: Defining variables var('abxy'); Original expression expr_original=a*b*(x^2-y^2)+x*y*(a^2-b^2); Factored expression expr_factored=(a*xb*y)*(a*y+b*x).
[0078] Method 1: Simplify the difference between the two and see if it is zero difference=expr_original-expr_factored; simplified_difference=simplify(difference); print("Simplified difference:", simplified_difference).
[0079] Method 2: Check if the two are equal are_equal=expr_original==expr_factored; print("Are the original expression equal to the factorized expression?",are_equal).
[0080] Method 3: Use the factor function to factorize the original expression factored_expr=factor(expr_original); print("Expression factored using SageMath:",factored_expr); ... Output the result.
[0081] If you run the above code and verify that "is_equivalent" returns "True", it means that a correct factorization has been found.
[0082] After decomposing the target problem, construct a computing container and set up a computing environment. Use the computing container to execute the execution code of each sub-problem, solve each sub-problem, and feedback the corresponding results: Python code: fromsympyimportsymbols,factor,expand; Defining symbolic variables a,b,x,y=symbols('abxy'); Original expression expr=a*b*(x^2-y**2)+x*y*(a^2-b^2).
[0083] Step 1: Identify the squared difference and factorize it expr1=x^2-y^2; expr2=a^2-b^2; factored_expr1=factor(expr1); factored_expr2=factor(expr2); print('Factoredexpr1:',factored_expr1); print('Factoredexpr2:',factored_expr2).
[0084] Step 2: Apply the squared difference formula expr_after_diff_of_squares=a*b*factored_expr1+x*y*factored_expr2; print('Expressionafterapplyingdifferenceofsquares:',expr_after_diff_of_squares).
[0085] Step 3: Expand each item first_term=expand(a*b*(xy)*(x+y)); second_term=expand(x*y*(ab)*(a+b)); print('Firsttermexpanded:',first_term); print('Secondtermexpanded:',second_term).
[0086] Step 4: Merge the expanded items expanded_expr=first_term+second_term; print('Expandedexpression:',expanded_expr).
[0087] Step 5: Grouping group1=a*b*x^2+a^2*x*y; group2=-a*b*y^2-b^2*x*y; print('Group1:',group1); print('Group2:',group2).
[0088] Step 6: Extract the common factors for each group group1_factored=factor(group1); group2_factored=factor(group2); print('Group1factored:',group1_factored); print('Group2factored:',group2_factored).
[0089] Step 7: Extract the overall common factor common_factor=a*y+b*x; factored_expr=common_factor*(a*xb*y); print('Factoredexpression:',factored_expr).
[0090] Step 8: Verify the results original_expr = expand(expr); factored_expr_expanded=expand(factored_expr); print('Originalexpressionexpanded:',original_expr); print('Factoredexpressionexpanded:',factored_expr_expanded); print('Expressionsareequal:',original_expr==factored_expr_expanded).
[0091] The sagemath execution code is: Defining variables var('abxy'); Original expression expr_original=a*b*(x^2-y^2)+x*y*(a^2-b^2); Factored expression expr_factored=(a*xb*y)*(a*y+b*x).
[0092] Method 1: Simplify the difference between the two and see if it is zero difference=expr_original-expr_factored; simplified_difference=simplify(difference); print("Simplified difference:", simplified_difference).
[0093] Method 2: Check if the two are equal are_equal=expr_original==expr_factored; print("Are the original expression equal to the factorized expression?",are_equal).
[0094] Method 3: Use the factor function to factorize the original expression factored_expr=factor(expr_original); print("Expression factored using SageMath:",factored_expr).
[0095] Furthermore, the results of the reasoning execution steps are integrated, and the reasoning results are integrated to form semantic description and semantic execution feedback: The results are as follows: Factorize the following expression and give the detailed steps for solving it: .
[0096] To perform the factorization, the following steps strategy will be followed: For polynomials with four or more terms: try grouping and then combining methods of the same type to factorize.
[0097] Identify special patterns: such as the square difference formula, the perfect square formula, etc., and use these formulas to factor.
[0098] Extract common factors: Observe each group to see if there are common factors that can be extracted to simplify the expression.
[0099] Factorization steps: Step 1: Expand using the square difference formula First, recognize that and They are all square differences, which can be written as: = ; = .
[0100] Step 2: Write the original expression in expanded form Substitute the original expression into the expanded square difference formula: .
[0101] Step 3: Expand each item But in order to better group and extract common factors, first expand the original expression: Expand the first item: = - ; Expand the second item: = - ; So, the original expression becomes: .
[0102] Step 4: Arrange similar items next to each other Rearrange the terms so that terms with similar variables are adjacent: + - - .
[0103] Step 5: Group and extract common factors Group 1: Extraction is the common factor: + = .
[0104] However, we found that the contents in brackets were not easy to factorize after extraction, so we tried other grouping methods.
[0105] Regrouping: Group the first and fourth items together, and the second and third items together: Group 1: = .
[0106] extract is a common factor.
[0107] Group 2: - = .
[0108] extract is a common factor.
[0109] Step 6: Extract common factors Now, the original expression becomes: - = ; Note that both groups contain common factors .
[0110] Step 7: Extraction Common factor extract After that, the expression becomes: .
[0111] Step 8: Finishing the final result Therefore, the complete factorization of the original expression is: + .
[0112] Or written as: .
[0113] Summarize: By identifying the difference of squares formula, expanding and regrouping, and extracting the common factors, the original expression was successfully factored into the product of two binomials.
[0114] The result of full factorization is: .
[0115] Explanation of the chosen strategy and applied mathematical formulas: Square difference formula: = , identified and It is in the form of square difference and is expanded using this formula.
[0116] Grouping method: When the polynomial has four terms, try to group them so that each group can extract common factors to simplify the expression.
[0117] Extracting common factors: By extracting common factors, the expression is converted into a product form, which is convenient for further factorization. The present invention improves the efficiency of problem solving by converting the problem description input by the user into computable content, decomposing the computable content into multiple steps for solution, and generating the execution code corresponding to each step. The feasibility of each solution is verified through the middleware, and the semantic model and the computing container are used to calculate the correct execution steps for problem solving, thereby improving the accuracy of problem solving.
[0118] Furthermore, if Figure 6 As shown, based on the above-mentioned large model reasoning capability enhancement method based on semantic execution, the present invention also provides a large model reasoning capability enhancement system based on semantic execution, wherein the large model reasoning capability enhancement system based on semantic execution includes: A formalized rewriting module 51 is used to obtain problem description information of a target problem, obtain computable guide part information according to the problem description information, and input the computable guide part information into a large language model; A question decomposition module 52 is used to obtain an initial prompt word of the target question, input the initial prompt word into the large language model, and output a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; The problem solving module 53 is used to construct an initial computing container, and to build a computing environment in the initial computing container to obtain a computing container, to sequentially input a plurality of the problem steps into the computing container, and to obtain a plurality of correct execution steps output by the computing container, wherein the correct execution steps represent a solution of the computing container to solve the sub-problem; The output summary module 54 is used to integrate all the correct execution steps to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
[0119] Furthermore, if Figure 7 As shown, based on the above-mentioned semantic execution-based large model reasoning capability enhancement method and system, the present invention also provides an interactive computing middleware accordingly, and the interactive computing middleware includes a processor 10, a memory 20 and a display 30. Figure 7 Only some components of the interactive computing middleware are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0120] In some embodiments, the memory 20 may be an internal storage unit of the interactive computing middleware, such as a hard disk or memory of the interactive computing middleware. In other embodiments, the memory 20 may also be an external storage device of the interactive computing middleware, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the interactive computing middleware. Further, the memory 20 may also include both an internal storage unit of the interactive computing middleware and an external storage device. The memory 20 is used to store application software and various types of data installed in the interactive computing middleware, such as the program code of the interactive computing middleware installed. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a large model reasoning capability enhancement program 40 based on semantic execution is stored on the memory 20, and the large model reasoning capability enhancement program 40 based on semantic execution can be executed by the processor 10, thereby realizing the large model reasoning capability enhancement method based on semantic execution in the present application.
[0121] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the semantic execution-based large model reasoning capability enhancement method.
[0122] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the interactive computing middleware and to display a visual user interface. The components 10-30 of the interactive computing middleware communicate with each other via a system bus.
[0123] In one embodiment, when the processor 10 executes the semantically-based large model reasoning capability enhancement program 40 in the memory 20, the following steps are implemented: Obtaining problem description information of a target problem, obtaining computable guidance part information according to the problem description information, and inputting the computable guidance part information into a large language model; Obtaining an initial prompt word of the target question, and inputting the initial prompt word into the large language model, and outputting a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; Construct an initial computing container, and build a computing environment in the initial computing container to obtain a computing container, input multiple problem steps into the computing container in sequence, and obtain multiple correct execution steps output by the computing container, wherein the correct execution steps represent the solution of the computing container to solve the sub-problem; All the correctly executed steps are integrated to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
[0124] The step of obtaining problem description information of the target problem, obtaining computable guide part information according to the problem description information, and inputting the computable guide part information into the large language model specifically includes: Obtaining problem description information of a target problem input by a user, and extracting a plurality of structured information from a corresponding computable database and a subject database using a graph retrieval enhancement algorithm according to the problem description information; Computable guided part information is constructed according to all the structured information, wherein the computable guided part information represents a reference case of a large language module processing the target problem, and the computable guided part information is input into the large language model.
[0125] The step of obtaining the initial prompt word of the target question, inputting the initial prompt word into the large language model, and outputting multiple question steps specifically includes: Inputting the problem description information into the large language model to obtain an initial prompt word; The large language model generates a formal expression and a numerical expression according to the computable guided part information in the target problem; The large language model updates the initial prompt word and generates a prompt word according to the computable guide part information, the formal expression and the numerical expression; Analyzing the prompt words in the large language model to obtain a problem-solving idea, decomposing the problem-solving idea to obtain a plurality of language description information and a plurality of symbolic expressions, wherein the language description information represents an intermediate process described in natural language; In the large language model, corresponding execution codes are generated according to the multiple language description information and the multiple symbolic expressions, and problem steps are constructed according to each of the execution codes, language description information and symbolic expressions, and all the problem steps are output.
[0126] The method further comprises generating corresponding execution codes according to the plurality of language description information and the plurality of symbolic expressions in the large language model, constructing a problem step according to each of the execution codes, the language description information and the symbolic expression, and outputting all the problem steps, and then: Input each of the language description information, symbolic expression and the corresponding execution code into the constructed large language iteration model, output corresponding first solution evaluation information, and receive corresponding second solution evaluation information input by the user; wherein the second scheme evaluation information is generated according to each of the symbolic expressions; If there is first solution evaluation information indicating that the current step is wrong, the corresponding first solution evaluation information is input into the large language iteration model, and the corresponding first modification suggestion is output; If the second solution evaluation information exists, indicating that the current step is wrong, obtaining the corresponding second modification suggestion input by the user; Inputting the first modification suggestion or the second modification suggestion into the large language model, and outputting an updated question step; If there is a second modification suggestion for the current problem step, only the second modification suggestion is input into the large language model.
[0127] The step of constructing an initial computing container, setting up a computing environment in the initial computing container, obtaining a computing container, sequentially inputting a plurality of the problem steps into the computing container, and obtaining a plurality of correct execution steps output by the computing container specifically includes: Building an initial computing container and obtaining actual execution requirements according to each of the execution codes; Building a computing environment file according to each of the actual execution requirements, and importing the computing environment file into the initial computing container to obtain the computing container; Transmitting the plurality of problem steps to the computing container, executing each of the execution codes, and outputting the execution result of the corresponding problem step; Input each of the execution results into the large language model for analysis, and output an evaluation result; If there is a correct evaluation result, the corresponding execution result is determined as a correct execution step.
[0128] The step of inputting each of the execution results into the large language model for analysis and outputting an evaluation result further includes: If the evaluation result is wrong, obtaining corresponding feedback information generated by the large language model, wherein the feedback information is generated by the large language model according to the corresponding execution result; The corresponding feedback information is input into the large language model, the symbolic expression and execution code corresponding to the erroneous execution result are updated, and the updated problem steps are output, until the newly output problem steps are transmitted to the computing container, and the output execution results are the correct execution steps.
[0129] The reasoning process includes: semantic description process and final solution process; The step of integrating all the correct execution steps to generate a reasoning process specifically includes: Integrate all the correct execution steps and the symbolic expression corresponding to each of the correct execution steps; Generate the semantic description process according to all the symbolic expressions, and generate the final solution process according to all the target correct execution steps; The semantic description process represents the textual reasoning process for solving the target problem, and the final solution process represents the digital reasoning result for solving the target problem.
[0130] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a large model reasoning capability enhancement program based on semantic execution, and when the large model reasoning capability enhancement program based on semantic execution is executed by a processor, the steps of the large model reasoning capability enhancement method based on semantic execution as described above are implemented.
[0131] In summary, the present invention provides a method for enhancing the reasoning ability of a large model based on semantic execution and related equipment, the method comprising: obtaining problem description information of a target problem, obtaining computable guide part information according to the problem description information, and inputting the computable guide part information into a large language model; obtaining an initial prompt word of the target problem, and inputting the initial prompt word into the large language model, and outputting a plurality of problem steps, wherein the problem steps are generated by the large language model decomposing the target problem according to the computable guide part information and the initial prompt word, and represent the sub-problems generated after the large language model decomposes the target problem; constructing an initial computing container, and setting up a computing environment in the initial computing container to obtain a computing container, inputting a plurality of the problem steps into the computing container in sequence, and obtaining a plurality of correct execution steps output by the computing container, wherein the correct execution steps represent the solution of the computing container to solve the sub-problems; integrating all the correct execution steps to generate a reasoning process, wherein the reasoning process represents the process of solving the target problem. The present invention improves the efficiency of problem solving by converting the problem description input by the user into computable content, decomposing the computable content into multiple steps for solution, generating execution code corresponding to each step, and verifying the feasibility of each solution through middleware, and using semantic models and computing containers to calculate the correct execution steps for problem solving, thereby improving the accuracy of problem solving.
[0132] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or interactive computing middleware 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, article or interactive computing middleware. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or interactive computing middleware including the element.
[0133] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0134] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for enhancing the reasoning capability of a large model based on semantic execution, characterized in that: The method for enhancing the large model reasoning capability based on semantic execution includes: Obtaining problem description information of a target problem, obtaining computable guidance part information according to the problem description information, and inputting the computable guidance part information into a large language model; Obtaining an initial prompt word of the target question, and inputting the initial prompt word into the large language model, and outputting a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; Construct an initial computing container, and build a computing environment in the initial computing container to obtain a computing container, input multiple problem steps into the computing container in sequence, and obtain multiple correct execution steps output by the computing container, wherein the correct execution steps represent the solution of the computing container to solve the sub-problem; All the correctly executed steps are integrated to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
2. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 1 is characterized in that: The step of obtaining problem description information of the target problem, obtaining computable guide part information according to the problem description information, and inputting the computable guide part information into the large language model specifically includes: Obtaining problem description information of a target problem input by a user, and extracting a plurality of structured information from a corresponding computable database and a subject database using a graph retrieval enhancement algorithm according to the problem description information; Computable guided part information is constructed according to all the structured information, wherein the computable guided part information represents a reference case of a large language module processing the target problem, and the computable guided part information is input into the large language model.
3. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 1 is characterized in that: The step of obtaining an initial prompt word of the target question, inputting the initial prompt word into the large language model, and outputting multiple question steps specifically includes: Inputting the problem description information into the large language model to obtain an initial prompt word; The large language model generates a formal expression and a numerical expression according to the computable guided part information in the target problem; The large language model updates the initial prompt word and generates a prompt word according to the computable guide part information, the formal expression and the numerical expression; Analyzing the prompt words in the large language model to obtain a problem-solving idea, decomposing the problem-solving idea to obtain a plurality of language description information and a plurality of symbolic expressions, wherein the language description information represents an intermediate process described in natural language; In the large language model, corresponding execution codes are generated according to the multiple language description information and the multiple symbolic expressions, and problem steps are constructed according to each of the execution codes, language description information and symbolic expressions, and all the problem steps are output.
4. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 3 is characterized in that: The method further comprises: generating corresponding execution codes according to the plurality of language description information and the plurality of symbolic expressions in the large language model, constructing a problem step according to each of the execution codes, the language description information and the symbolic expression, and outputting all the problem steps, and then further comprising: Input each of the language description information, symbolic expression and the corresponding execution code into the constructed large language iteration model, output corresponding first solution evaluation information, and receive corresponding second solution evaluation information input by the user; wherein the second scheme evaluation information is generated according to each of the symbolic expressions; If there is first solution evaluation information indicating that the current step is wrong, the corresponding first solution evaluation information is input into the large language iteration model, and the corresponding first modification suggestion is output; If the second solution evaluation information exists, indicating that the current step is wrong, obtaining the corresponding second modification suggestion input by the user; Inputting the first modification suggestion or the second modification suggestion into the large language model, and outputting an updated question step; If there is a second modification suggestion for the current problem step, only the second modification suggestion is input into the large language model.
5. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 3 is characterized in that: The step of constructing an initial computing container, setting up a computing environment in the initial computing container, obtaining a computing container, sequentially inputting a plurality of the problem steps into the computing container, and obtaining a plurality of correct execution steps output by the computing container specifically includes: Building an initial computing container and obtaining actual execution requirements according to each of the execution codes; Building a computing environment file according to each of the actual execution requirements, and importing the computing environment file into the initial computing container to obtain the computing container; Transmitting the plurality of problem steps to the computing container, executing each of the execution codes, and outputting the execution result of the corresponding problem step; Input each of the execution results into the large language model for analysis, and output an evaluation result; If there is a correct evaluation result, the corresponding execution result is determined as a correct execution step.
6. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 5 is characterized in that: The step of inputting each of the execution results into the large language model for analysis and outputting an evaluation result further includes: If the evaluation result is wrong, obtaining corresponding feedback information generated by the large language model, wherein the feedback information is generated by the large language model according to the corresponding execution result; The corresponding feedback information is input into the large language model, the symbolic expression and execution code corresponding to the erroneous execution result are updated, and the updated problem steps are output, until the newly output problem steps are transmitted to the computing container, and the output execution results are the correct execution steps.
7. The method for enhancing the reasoning capability of a large model based on semantic execution according to claim 6 is characterized in that: The reasoning process includes: semantic description process and final solution process; The step of integrating all the correct execution steps to generate a reasoning process specifically includes: Integrate all the correct execution steps and the symbolic expression corresponding to each of the correct execution steps; Generate the semantic description process according to all the symbolic expressions, and generate the final solution process according to all the target correct execution steps; The semantic description process represents the textual reasoning process for solving the target problem, and the final solution process represents the digital reasoning result for solving the target problem.
8. A large model reasoning capability enhancement system based on semantic execution, characterized in that: The semantic execution-based large model reasoning capability enhancement system includes: A formalized rewriting module is used to obtain problem description information of a target problem, obtain computable guide part information according to the problem description information, and input the computable guide part information into a large language model; a question decomposition module, configured to obtain an initial prompt word of the target question, input the initial prompt word into the large language model, and output a plurality of question steps, wherein the question steps are generated by the large language model decomposing the target question according to the computable guide part information and the initial prompt word, and represent sub-questions generated after the large language model decomposes the target question; A problem solving module is used to construct an initial computing container, and to build a computing environment in the initial computing container to obtain a computing container, to sequentially input a plurality of the problem steps into the computing container, and to obtain a plurality of correct execution steps output by the computing container, wherein the correct execution steps represent a solution of the computing container to solve the sub-problem; The output summary module is used to integrate all the correct execution steps to generate a reasoning process, wherein the reasoning process represents a process of solving the target problem.
9. An interactive computing middleware, characterized in that: The interactive computing middleware includes: a memory, a processor, and a large model reasoning capability enhancement program based on semantic execution stored in the memory and executable on the processor. When the large model reasoning capability enhancement program based on semantic execution is executed by the processor, the steps of the large model reasoning capability enhancement method based on semantic execution as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a large model reasoning capability enhancement program based on semantic execution, and when the large model reasoning capability enhancement program based on semantic execution is executed by a processor, the steps of the large model reasoning capability enhancement method based on semantic execution as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Complex problem processing method and device, equipment and medium
CN116737912A
Question processing method and device, equipment and storage medium
CN117743544A
Data analysis method and device, computer equipment and computer readable storage medium
CN117951271A
Cited By
Inference task execution method, electronic equipment, readable storage medium and program product
CN119886360A
Method for improving mathematical reasoning ability of large language model by integrating mathematica code and natural language reasoning step
CN121581194A
Mathematical problem solving method oriented to small-parameter large language model and application of mathematical problem solving method
CN122366681A
