Symbol logical reasoning optimization system based on large language model
By introducing a large language model into the symbolic logical reasoning system, using a hierarchical prompt generator, chain reasoning engine and symbolic expression optimizer, the problems of inefficient reasoning and insufficient rigor in the existing technology are solved, and a more efficient and intelligent logical reasoning process is achieved.
Patent Information
- Application Number
- CN202411959663.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The existing technology performs poorly when dealing with fuzzy logic expressed in natural language. The huge search space in complex scenarios leads to inefficient reasoning, it is difficult to effectively balance the rigor and flexibility of reasoning, and lacks an effective mechanism to integrate domain knowledge and common sense reasoning capabilities.
A symbolic logical reasoning optimization system based on large language models is adopted, including a hierarchical prompt generator, a chain reasoning engine and a symbolic expression optimizer. By integrating the semantic understanding ability of large language models and the rigor of traditional symbolic reasoning systems, a more efficient and intelligent logical reasoning process is achieved.
It improves the degree of matching of logical expressions to visual scenes, improves inference efficiency and interpretability, realizes seamless transformation from language understanding to logic optimization, and enhances the system's modular design and functional expansion capabilities.
Smart Images

Figure CN119849632A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence and symbolic logic reasoning, and in particular refers to a symbolic logic reasoning optimization system based on a large language model. Background Art
[0002] In recent years, symbolic logic reasoning technology has been widely used in the field of artificial intelligence and has become an important way to achieve explainable artificial intelligence. Existing technologies mainly develop along two routes: one is a rule system based on expert knowledge, which realizes logical deduction by manually defining reasoning rules. Although this method has strong interpretability, the rule design is cumbersome and difficult to cover complex scenarios; the other is a reasoning method based on machine learning, which learns reasoning patterns through data-driven, which has strong adaptability but often lacks logical rigor and interpretability.
[0003] The development of current technology faces several key challenges: traditional symbolic reasoning systems perform poorly when processing fuzzy logic expressed in natural language; the search space in complex scenarios is huge, resulting in low reasoning efficiency; existing methods find it difficult to effectively balance the rigor and flexibility of reasoning; and there is a lack of effective mechanisms to integrate domain knowledge and common sense reasoning capabilities. Summary of the invention
[0004] The main purpose of the present invention is to provide a symbolic logic reasoning optimization system based on a large language model to solve the problems existing in the prior art, focusing on using a large language model to enhance the optimization capability of the symbolic logic reasoning system, and achieving a more efficient and intelligent logic reasoning process by integrating the semantic understanding capability of the large language model and the rigor of the traditional symbolic reasoning system.
[0005] In order to achieve the above object, the solution of the present invention is: A symbolic logic reasoning optimization system based on a large language model, including three core modules: hierarchical prompt generator, chain reasoning engine and symbolic expression optimizer, to achieve end-to-end processing from scene input to optimization result output; the system first constructs the initial symbolic feature space based on the scene information input by the user ; The work of the three core modules is as follows: The multi-level prompt architecture of the Hierarchical Prompt Generator includes scene initialization prompts , Thinking Chain Guidance Tips and feedback integration tips ; First, the hierarchical hint generator transforms the symbolic feature space The information is combined with the preset scene prompt template to generate a scene initialization prompt ; Secondly, the hierarchical prompt generator decomposes the reasoning steps into continuous thinking chain nodes based on the scene prompt template and generates thinking chain guiding prompts ; Furthermore, the hierarchical prompt generator collects historical optimization results, evaluation feedback, and the best expression of the current search to form feedback integrated prompts and guide tips with thought chain Cooperate to guide subsequent optimization by dynamically updating prompt content; The chained inference engine firstly calculates the symbolic feature space Construct an initial population of symbolic expressions , and use the genetic evolution algorithm to perform several rounds of search iterations to optimize the current moment The population of symbolic expressions ; Secondly, the chain reasoning engine uses the thinking chain in the hierarchical prompt generator to guide the prompt and feedback integration tips Input the current context information into the large language model, and let the large language model give optimization suggestions based on its symbolic reasoning and scenario mode. In this process, the thinking chain guides prompts Used to gradually unfold the reasoning process and provide feedback and integration prompts Continue to deepen the understanding of logical expressions and provide optimization suggestions; After receiving the inference result of the current large language model, the symbolic expression optimizer uses the mapping function Transform the inference results into symbolic feature space Optimize the execution of the specified operations , adding it to the symbolic expression population of symbolic search; the optimization process adopts an iterative strategy to continuously evaluate and improve the quality of the expression until the predetermined optimization goal or convergence condition is reached.
[0006] The scene information includes scene entity categories, location information, feature information of category counts, and a set of symbolic operators specified by a user.
[0007] The whole prompt generation process of the hierarchical prompt generator is expressed as: ; in, represents the generated prompt sequence; stands for Hierarchical Prompt Generator; Representative scene prompt template; Represents the acquired scene information and context information.
[0008] The reasoning process of the chain reasoning engine is expressed as: ; in, Represents the inference results, including optimization suggestions and possible improvement directions; stands for Chain Reasoning Engine; Thinking chain guidance prompts representing the input chain reasoning engine and feedback integration tips ; Represents the best individual in the expression population.
[0009] In the chained reasoning engine, the constructed symbolic expression population includes a number of symbolic expression individuals, which are used to match the pattern of the scene; first, the chained reasoning engine will be based on the current moment The population of symbolic expressions Perform several rounds of logical search and construct the population after the search , and then the population after the search and its corresponding fitness evaluation results are sent to the hierarchical prompt generator and combined with the preset feedback integration prompt template to realize the construction of feedback integration prompt , the process is expressed as: ; in, Represents the scene prompt template, Represents the population after the search the assessment results; Guide the chain of thought Integrate prompts with feedback They are organically combined and fed into a large language model to obtain new reasoning suggestions based on the symbolic reasoning and common sense judgment of the large language model.
[0010] Preferably, the symbolic expression optimizer first extracts practical reasoning results from the reasoning suggestions of the large language model. ; Secondly, the symbolic expression optimizer combines the symbolic feature space of the current scene , the inference result Transformed into specific and available executable optimization operations, this process can be expressed as , after evaluating the fitness of these executable optimization operations, update them to the population at the next moment to obtain the updated population , and repeat this process until the termination condition is reached, and the symbolic expression with the highest fitness is obtained from the latest symbolic expression population as the output of the system. The output is a symbolic expression that conforms to the scene mode constructed for the scene given by the user.
[0011] Preferably, the termination condition is the number of iterations or the fitness target.
[0012] After adopting the above technical solution, the present invention has the following technical effects: ① This paper focuses on the optimization problem of symbolic logic reasoning, proposes a new optimization paradigm for symbolic logic reasoning, successfully realizes the deep integration of large language models and symbolic reasoning systems, and improves the matching degree of logical expressions to visual scenes; ② Through the spatial design of hierarchical prompts, the system can effectively guide the large language model to conduct structured thinking, so that it can accurately understand the scene features provided by the user; ③The reasoning mechanism based on chain thinking ensures the coherence and reliability of the reasoning process; ④ The innovative symbol optimization strategy realizes the seamless transition from language understanding to logic optimization; ⑤ It can also generate reasonable optimization suggestions through the reasoning ability of the large language model and effectively convert these suggestions into specific optimization operations; ⑥The modular design of the system not only ensures the clarity of the processing flow, but also provides convenience for subsequent functional expansion and performance optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 The flowchart of a specific embodiment of the present invention. DETAILED DESCRIPTION
[0014] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.
[0015] refer to Figure 1 As shown, the present invention discloses a symbolic logic reasoning optimization system based on a large language model. The system realizes an end-to-end processing process from scene input to optimization result output through the collaborative work of three core modules: a hierarchical prompt generator, a chain reasoning engine, and a symbolic expression optimizer. The system first constructs an initial symbolic feature space based on the scene information input by the user. , which provides a basic operating environment for the subsequent reasoning optimization process. The scene information includes feature information such as scene entity categories, positioning information, category counts, and a set of symbolic operators specified by the user. The three core modules work as follows: (1) Hierarchical Prompt Generator The module uses a carefully designed multi-level prompt architecture, including scene initialization prompts , Thinking Chain Guidance Tips and feedback integration tips ; Specifically: First, the hierarchical hint generator transforms the symbolic feature space The information is combined with the preset scene prompt template to generate a scene initialization prompt , used to activate the large language model’s prior knowledge of specific scenarios; Secondly, the hierarchical prompt generator decomposes the reasoning steps into continuous thinking chain nodes based on the scene prompt template and generates thinking chain guiding prompts. , which is used to help large language models break down the large problem of combining scene analysis and symbolic reasoning into multiple small problems; Furthermore, the hierarchical prompt generator collects historical optimization results, evaluation feedback, and the best expression of the current search to form feedback integrated prompts and guide tips with thought chain Cooperate to guide subsequent optimization by dynamically updating prompt content.
[0016] The whole prompt generation process of the hierarchical prompt generator can be expressed as: ; in, represents the generated prompt sequence; stands for Hierarchical Prompt Generator; Representative scene prompt template; Represents the acquired scene information and context information. Generated prompt sequence This is then used to guide the inference process of a large language model.
[0017] (2) Chain Reasoning Engine The engine implements an innovative reasoning mechanism based on a large language model; specifically: First, the chained reasoning engine is based on the symbolic feature space Construct an initial population of symbolic expressions , and use the genetic evolution algorithm to perform several rounds of search iterations to optimize the current moment The population of symbolic expressions ; Secondly, the chain reasoning engine uses the chain of thoughts in the hierarchical prompt generator to guide prompts and feedback integration tips Input the current context information into the large language model, and let the large language model give optimization suggestions based on its symbolic reasoning and scenario mode. In this process, the thinking chain guides prompts Used to gradually unfold the reasoning process and provide feedback and integration prompts Continue to deepen the understanding of logical expressions and provide optimization suggestions.
[0018] The reasoning process of the chain reasoning engine can be expressed as: ; in, Represents the inference results, including optimization suggestions and possible improvement directions; stands for Chain Reasoning Engine; Thinking chain guidance prompts representing the input chain reasoning engine and feedback integration tips ; The best individual representing the expression population. The engine uses a fitness-based screening mechanism to ensure that the inference results match the current scenario.
[0019] (3) Symbolic Expression Optimizer This module is responsible for converting the inference results of the large language model into specific optimization operations; specifically: After receiving the inference result of the current large language model, through the mapping function Transform the inference results into symbolic feature space Optimize the execution of the specified operations , adding it to the population of symbolic expressions for symbolic search. The optimization process adopts an iterative strategy to continuously evaluate and improve the quality of the expression until the predetermined optimization goal or convergence condition is reached.
[0020] Through the above scheme, the present invention focuses on the optimization problem of symbolic logic reasoning, proposes a new symbolic logic reasoning optimization paradigm, successfully realizes the deep integration of large language model and symbolic reasoning system (this is the core innovation of the present invention), and improves the matching degree of logical expression to visual scene; through the spatial design of layered prompts, the system can effectively guide the large language model to perform structured thinking, so that it can accurately understand the scene characteristics provided by the user; the reasoning mechanism based on chain thinking ensures the consistency and reliability of the reasoning process; the innovative symbolic optimization strategy realizes the seamless transition from language understanding to logic optimization; it can also generate reasonable optimization suggestions through the reasoning ability of the large language model, and effectively convert these suggestions into specific optimization operations; the modular design of the system not only ensures the clarity of the processing flow, but also provides convenience for subsequent function expansion and performance optimization.
[0021] In terms of technical effects, the present invention demonstrates significant advantages: in terms of reasoning efficiency, the system improves the search speed by 60% under the guidance of a large language model in the visual event detection task, and the searched pattern matching index is improved by an average of 12%, which significantly improves the optimization efficiency; at the same time, the interpretability of the logical expressions generated by the system is also significantly improved, while maintaining a high level of logical rigor; more importantly, the system demonstrates excellent practical value, and through collaboration with a large language model, the system can understand and optimize a wider range of logical expressions; in addition, the reasoning process and optimization suggestions provided by the system are well interpretable, which is convenient for users to understand and verify.
[0022] The above characteristics make the present invention not only innovative in technology, but also show obvious advantages and values in practical applications, providing a new paradigm and ideas for the development of symbolic logic reasoning technology.
[0023] Specific embodiments of the present invention are shown below.
[0024] In the above chain reasoning engine, the constructed symbolic expression population contains several symbolic expression individuals, which are used to match the pattern of the scene. First, the chain reasoning engine will be based on the current moment The population of symbolic expressions Perform several rounds of logical search and construct the population after the search , and then the population after the search and its corresponding fitness evaluation results are sent to the hierarchical prompt generator and combined with the preset feedback integration prompt template to realize the construction of feedback integration prompt , the process can be expressed as: ; in, Represents the scene prompt template, Represents the population after the search the assessment results; Guide the chain of thought Integrate prompts with feedback They are organically combined and fed into a large language model to obtain new reasoning suggestions based on the symbolic reasoning and common sense judgment of the large language model.
[0025] Furthermore, since the reasoning suggestions given by the large language model are texts composed of natural language and cannot be directly merged into the symbolic expression population to participate in the next round of iteration, the present invention uses a symbolic expression optimizer: First, extract practical inference results from the inference suggestions of the large language model ; Secondly, combined with the symbolic feature space of the current scene , the inference result Converted into specific available executable optimization operations (expression individuals), this process can be expressed as , after evaluating the fitness of these executable optimization operations, update them to the population at the next moment to obtain the updated population , and repeat this process until the termination condition is reached (the termination condition can be the number of iterations or the fitness target), and the symbolic expression with the highest fitness is obtained from the latest symbolic expression population as the output of the system. The output is a symbolic expression that conforms to the scenario mode constructed for the scenario given by the user.
[0026] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by ordinary technicians in the relevant technical field should be deemed to be within the patent scope of the present invention.
Claims
1. A symbolic logic reasoning optimization system based on a large language model, characterized by: It includes three core modules: hierarchical prompt generator, chained reasoning engine and symbolic expression optimizer, which realize the end-to-end processing from scene input to optimization result output; The system first constructs the initial symbol feature space based on the scene information input by the user ; The work of the three core modules is as follows: The multi-level prompt architecture of the Hierarchical Prompt Generator includes scene initialization prompts , Thinking Chain Guidance Tips and feedback integration tips ; First, the hierarchical hint generator transforms the symbolic feature space The information is combined with the preset scene prompt template to generate a scene initialization prompt ; Secondly, the hierarchical prompt generator decomposes the reasoning steps into continuous thinking chain nodes based on the scene prompt template and generates thinking chain guiding prompts ; Furthermore, the hierarchical prompt generator collects historical optimization results, evaluation feedback, and the best expression of the current search to form feedback integrated prompts and guide tips with thought chain Cooperate to guide subsequent optimization by dynamically updating prompt content; The chained inference engine firstly calculates the symbolic feature space Construct an initial population of symbolic expressions , and use the genetic evolution algorithm to perform several rounds of search iterations to optimize the current moment The population of symbolic expressions ; Secondly, the chain reasoning engine uses the chain of thoughts in the hierarchical prompt generator to guide prompts and feedback integration tips Input the current context information into the large language model, and let the large language model give optimization suggestions based on its symbolic reasoning and scenario mode. In this process, the thinking chain guides prompts Used to gradually unfold the reasoning process and provide feedback and integration prompts Continue to deepen the understanding of logical expressions and provide optimization suggestions; After receiving the inference result of the current large language model, the symbolic expression optimizer uses the mapping function Transform the inference results into symbolic feature space Optimize the execution of the specified operations , add it to the population of symbolic expressions for symbolic search; The optimization process adopts an iterative strategy to continuously evaluate and improve the quality of the expression until the predetermined optimization goal or convergence condition is reached.
2. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 1, characterized in that: The scene information includes scene entity categories, location information, feature information of category counts, and a set of symbolic operators specified by a user.
3. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 1, characterized in that: The whole prompt generation process of the hierarchical prompt generator is expressed as: ; in, represents the generated prompt sequence; stands for Hierarchical Prompt Generator; Representative scene prompt template; Represents the acquired scene information and context information.
4. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 1, characterized in that: The reasoning process of the chain reasoning engine is expressed as: ; in, Represents the inference results, including optimization suggestions and possible improvement directions; stands for Chain Reasoning Engine; Thinking chain guidance prompts representing the input chain reasoning engine and feedback integration tips ; Represents the best individual in the expression population.
5. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 1, characterized in that: In the chained reasoning engine, the constructed symbolic expression population includes a number of symbolic expression individuals, which are used to match the pattern of the scene; first, the chained reasoning engine will be based on the current moment The population of symbolic expressions Perform several rounds of logical search and construct the population after the search , and then the population after the search and its corresponding fitness evaluation results are sent to the hierarchical prompt generator and combined with the preset feedback integration prompt template to realize the construction of feedback integration prompt , the process is expressed as: ; in, Represents the scene prompt template, Represents the population after the search the assessment results; Guide the chain of thought Integrate prompts with feedback They are organically combined and fed into a large language model to obtain new reasoning suggestions based on the symbolic reasoning and common sense judgment of the large language model.
6. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 5, characterized in that: The symbolic expression optimizer first extracts practical inference results from the inference suggestions of the large language model ; Secondly, the symbolic expression optimizer combines the symbolic feature space of the current scene , the inference result Transformed into specific and available executable optimization operations, this process can be expressed as , after evaluating the fitness of these executable optimization operations, update them to the population at the next moment to obtain the updated population , and repeat this process until the termination condition is reached, and the symbolic expression with the highest fitness is obtained from the latest symbolic expression population as the output of the system. The output is a symbolic expression that conforms to the scene mode constructed for the scene given by the user.
7. The symbolic logic reasoning optimization system based on a large language model as claimed in claim 6, characterized in that: The termination condition is the number of iterations or the fitness target.
Citation Information
Patent Citations
Intelligent image automatic description method based on deep neural network
CN110598713A
Intelligent search engine construction method based on large language model
CN118964589A
BOM data multi-dimensional analysis system and analysis method based on large language model
CN119004372A
Composite symbolic and non-symbolic artificial intelligence system for advanced reasoning and semantic search
US20240386015A1
Cited By
Method and system for enhancing logical reasoning ability of large language model
CN120806171A
Spatial reasoning optimization method and device based on large language model, equipment and medium
CN121072779A