Method, system and equipment for generating propositional logic statements in non-axiom reasoning system
Through the method of automating the conversion of natural language into propositional logical statements, the problem of high user threshold, low efficiency and error-prone manual conversion in the existing technology is solved, high-quality and reliable inference results are achieved, and the application scenarios of non-axial inference systems are expanded.
Patent Information
- Application Number
- CN202510140764.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, the propositional logic statements that manually convert natural language into non-axial reasoning systems have problems such as high user threshold, low efficiency, easy errors, low quality of reasoning results, and poor adaptability.
By obtaining the initial text, the target prompt word of the preset large language model is obtained based on the input requirements of the non-axial reasoning system, and the initial text is input to the preset large language model to output the target proposition logical statement.
It realizes the automatic conversion of initial text to propositional logical statements, lowers the threshold for user usage, improves the intuitiveness and ease of use of reasoning tasks, expands application scenarios, avoids the occurrence of human errors, ensures the accuracy and completeness of input information, and improves the quality and reliability of inference results.
Smart Images

Figure CN120031133A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of non-axiomatic reasoning systems, and in particular to a method, system and device for generating propositional logic statements in a non-axiomatic reasoning system. Background Art
[0002] Non-Axiomatic Reasoning System (NARS) is an artificial general intelligence (AGI) framework that aims to simulate the reasoning mechanism in human cognitive processes. Unlike traditional axiom-based logical reasoning, NARS can handle incomplete, uncertain or contradictory information and reason in the absence of sufficient information.
[0003] Existing non-axiomatic reasoning systems usually require propositional logic statements in a specific format as input, which not only requires users to have certain knowledge of logic and computer science, but also poses a high barrier to use for ordinary users who do not have relevant background.
[0004] Manually converting natural language descriptions into propositional logic statements that conform to the input format of non-axiomatic reasoning systems is a complex and time-consuming process. Manual conversion is not only inefficient but also prone to errors, especially when a large amount of information or complex logical relationships are involved.
[0005] The manual conversion step may contain biases, which will directly affect the quality of the subsequent reasoning results.
[0006] With the changes in application scenarios and the development of technology, non-axiomatic reasoning systems need to be continuously updated and improved. The process of manually converting natural language into propositional logic statements is time-consuming and error-prone, which limits the application scope of NARS and has poor adaptability. Summary of the invention
[0007] The technical problem to be solved by the present disclosure is to overcome the defects of manually converting natural language into propositional logic statements in a non-axiomatic reasoning system in the prior art, such as high user threshold, low manual conversion efficiency, easy errors, low quality of reasoning results, poor adaptability, etc., and to provide a method, system and device for generating propositional logic statements in a non-axiomatic reasoning system.
[0008] The present invention solves the above technical problems through the following technical solutions:
[0009] The present disclosure provides a method for generating propositional logic statements in a non-axiomatic reasoning system, the generating method comprising:
[0010] Get the initial text;
[0011] Based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system, the target prompt words of the preset large language model are obtained;
[0012] Based on the target prompt word, the initial text is input into the preset large language model to output a target propositional logic sentence.
[0013] Preferably, the step of inputting the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence includes:
[0014] Obtaining domain information of the initial text;
[0015] Modifying the target prompt word based on the domain information;
[0016] Based on the modified target prompt word, the initial text is input into the preset large language model to output the target propositional logic sentence.
[0017] Preferably, the step of inputting the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence includes:
[0018] Get historical data;
[0019] Wherein, the historical data includes several groups of mutually corresponding historical texts and historical propositional logic statements;
[0020] Based on the target prompt word and the historical data, the initial text is input into the preset large language model to output the target propositional logic sentence.
[0021] Preferably, after the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes:
[0022] Performing a quality evaluation on the target propositional logic statement based on a first preset standard to obtain a first evaluation question and a first evaluation result;
[0023] In response to the first evaluation result satisfying a first preset condition, generating a first prompt word based on the first evaluation question;
[0024] Based on the first prompt word, inputting the initial text into the preset large language model to output a new target propositional logic sentence;
[0025] or,
[0026] After the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes:
[0027] Inputting the target propositional logic statement into the non-axiomatic reasoning system to output a reasoning result;
[0028] Performing a quality evaluation on the reasoning result based on a second preset standard to obtain a second evaluation question and a second evaluation result;
[0029] In response to the second evaluation result satisfying a second preset condition, generating a second prompt word based on the second evaluation question;
[0030] Based on the second prompt word, the initial text is input into the preset large language model to output a new target propositional logic sentence.
[0031] Preferably, after the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes:
[0032] Performing a quality evaluation on the target propositional logic statement based on a third preset standard to obtain a third evaluation question;
[0033] Based on the third evaluation question, the target propositional logic statement is modified to obtain a modified target propositional logic statement.
[0034] Preferably, before the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes:
[0035] Inputting historical propositional logic sentences into the preset large language model to output historical text;
[0036] The historical text is used as input and the historical propositional logic sentence is used as output to train the preset large language model.
[0037] The present disclosure also provides a system for generating propositional logic statements in a non-axiomatic reasoning system, the generation system comprising:
[0038] An initial text acquisition module, used to acquire the initial text;
[0039] A prompt word acquisition module is used to obtain target prompt words of a preset large language model based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system;
[0040] The first sentence output module is used to input the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence.
[0041] Preferably, the first sentence output module includes:
[0042] A domain information acquisition unit, used to acquire the domain information of the initial text;
[0043] A prompt word modification unit, used for modifying the target prompt word based on the domain information;
[0044] The first sentence output unit is used to input the initial text into the preset large language model based on the modified target prompt word to output the target propositional logic sentence.
[0045] Preferably, the first sentence output module includes:
[0046] A historical data acquisition unit, used for acquiring historical data;
[0047] Wherein, the historical data includes several groups of mutually corresponding historical texts and historical propositional logic statements;
[0048] The second sentence output unit is used to input the initial text into the preset large language model based on the target prompt word and the historical data to output the target propositional logic sentence.
[0049] Preferably, the generation system further comprises:
[0050] A first evaluation module, used to perform a quality evaluation on the target propositional logic statement based on a first preset standard to obtain a first evaluation question and a first evaluation result;
[0051] A first prompt word generating module, configured to generate a first prompt word based on the first evaluation question in response to the first evaluation result satisfying a first preset condition;
[0052] A second sentence output module, used for inputting the initial text into the preset large language model based on the first prompt word to output a new target propositional logic sentence;
[0053] or,
[0054] The generation system further comprises:
[0055] A reasoning result generating module, used for inputting the target propositional logic statement into the non-axiomatic reasoning system to output a reasoning result;
[0056] A second evaluation module, used for performing a quality evaluation on the reasoning result based on a second preset standard to obtain a second evaluation question and a second evaluation result;
[0057] A second prompt word generating module, configured to generate a second prompt word based on the second evaluation question in response to the second evaluation result satisfying a second preset condition;
[0058] The third sentence output module is used to input the initial text into the preset large language model based on the second prompt word to output a new target propositional logic sentence.
[0059] Preferably, the generation system further comprises:
[0060] A third evaluation module, used to perform a quality evaluation on the target propositional logic statement based on a third preset standard to obtain a third evaluation question;
[0061] The fourth statement output module is used to modify the target propositional logic statement based on the third evaluation question to obtain a modified target propositional logic statement.
[0062] Preferably, the generation system further comprises:
[0063] A historical text output module, used for inputting historical propositional logic sentences into the preset large language model to output historical text;
[0064] The model training module is used to take the historical text as input and the historical propositional logic sentence as output to train the preset large language model.
[0065] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor implements the method for generating propositional logic statements in the non-axiomatic reasoning system described above when executing the computer program.
[0066] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for generating propositional logic statements in the non-axiomatic reasoning system described above is implemented.
[0067] The present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating propositional logic statements in a non-axiomatic reasoning system as described above.
[0068] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0069] The positive and progressive effects of this disclosure are:
[0070] The present invention obtains a target prompt word through the input requirement of a propositional logic statement, and then inputs the initial text into a preset large language model according to the target prompt word to output the target propositional logic statement, thereby realizing the automatic conversion of the initial text to the propositional logic statement, significantly reducing the user's usage threshold, making complex reasoning tasks more intuitive and easy to use, greatly expanding its application scenarios, and enabling more non-professional users to conveniently use the non-axiomatic reasoning system to perform complex reasoning tasks, greatly improving the conversion efficiency of propositional logic statements, avoiding the occurrence of human errors, ensuring the accuracy and completeness of the input information of the non-axiomatic reasoning system, and thus improving the quality and reliability of the reasoning results of the non-axiomatic reasoning system, using a preset large language model to convert propositional logic statements, providing a friendly and flexible interface for the non-axiomatic reasoning system, having good extensibility, maintainability and adaptability, and improving the degree of intelligence, convenience, practical application value and scope. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flowchart of a method for generating propositional logic statements in a non-axiomatic reasoning system in Embodiment 1 of the present disclosure;
[0072] Figure 2 It is a first flow chart of step S13 in the method for generating propositional logic statements in the non-axiomatic reasoning system of embodiment 2 of the present disclosure;
[0073] Figure 3 A second flow chart of step S13 in the method for generating propositional logic statements in the non-axiomatic reasoning system of embodiment 2 of the present disclosure;
[0074] Figure 4 A first flow chart of a method for generating propositional logic statements in a non-axiomatic reasoning system in Embodiment 2 of the present disclosure;
[0075] Figure 5 A second flow chart of the method for generating propositional logic statements in the non-axiomatic reasoning system of Embodiment 2 of the present disclosure;
[0076] Figure 6 A third flow chart of the method for generating propositional logic statements in the non-axiomatic reasoning system of Embodiment 2 of the present disclosure;
[0077] Figure 7 A fourth flow chart of the method for generating propositional logic statements in the non-axiomatic reasoning system of Embodiment 2 of the present disclosure;
[0078] Figure 8 It is a module schematic diagram of a system for generating propositional logic statements in a non-axiomatic reasoning system of Embodiment 3 of the present disclosure;
[0079] Fig. 9This is a module diagram of a system for generating propositional logic statements in a non-axiomatic reasoning system in Embodiment 4 of the present disclosure.
[0080] Fig.10 This is a schematic diagram of the structure of an electronic device according to Embodiment 5 of the present disclosure. DETAILED DESCRIPTION
[0081] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0082] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
[0083] In the embodiments of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0084] Example 1
[0085] This embodiment provides a method for generating propositional logic statements in a non-axiomatic reasoning system, such as Figure 1 As shown, the generation method includes:
[0086] S11, obtaining initial text;
[0087] S12, based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system, obtaining target prompt words of a preset large language model;
[0088] S13. Based on the target prompt word, the initial text is input into a preset large language model to output a target propositional logic sentence.
[0089] Specifically, the preset large language model is a deep learning model that is fully trained with a large amount of text data, and can output the target propositional logic sentence based on the input initial text. Preset large language models, such as the GPT (Generative Pre-trained Transformer) series, Tongyi Qianwen, Wenxin Yiyan or other models suitable for natural language understanding tasks. You can also choose a model that performs well in instruction following, so that it is suitable for realizing the conversion of the initial text to the target propositional logic sentence through the target prompt word.
[0090] A large amount of text data is a series of sample data collected and organized, including natural language descriptions and their corresponding propositional logic statements, which are used to train and evaluate the conversion capabilities of the preset large language model. These sample data should cover a variety of different fields and expressions to ensure that the preset large language model has wide applicability and robustness. Fine-tune the selected preset large language model based on the sample data, focusing on improving its ability to convert natural language into logical sentences, especially in the design and optimization of target prompt words, focusing on the preset large language model's understanding and execution accuracy of instructions.
[0091] The initial text is a question, statement, or instruction in natural language. The initial text can be direct input into the text box or text obtained from other sources (such as speech recognition results).
[0092] According to the input requirements of propositional logic statements in the non-axiomatic reasoning system, the target prompt word (Prompt) of the preset large language model is obtained. The input requirements include format requirements and logical rules. The target prompt word is used to guide the preset large language model to output the target propositional logic statement that conforms to the expected format. The target prompt word needs to contain clear instructions to guide the preset large language model on how to convert the natural language input, that is, the initial text, into the target propositional logic statement. For example, the following format can be used:
[0093] "Given the following statement, please convert it into a propositional logic statement that conforms to the NARS format: [natural language input]"; or,
[0094] “Please identify the entities and their relationships in the following text, and generate corresponding propositional logic statements in NARS format: [natural language input]”.
[0095] In this embodiment, the target prompt word is obtained through the input requirement of the propositional logic statement, and then the initial text is input into the preset large language model according to the target prompt word to output the target propositional logic statement, thereby realizing the automatic conversion of the initial text to the propositional logic statement, significantly lowering the user's usage threshold, making complex reasoning tasks more intuitive and easy to use, greatly expanding its application scenarios, and enabling more non-professional users to conveniently use the non-axiomatic reasoning system to perform complex reasoning tasks, greatly improving the conversion efficiency of propositional logic statements, avoiding the occurrence of human errors, ensuring the accuracy and completeness of the input information of the non-axiomatic reasoning system, and thus improving the quality and reliability of the reasoning results of the non-axiomatic reasoning system, and using the preset large language model to convert propositional logic statements, providing a friendly and flexible interface for the non-axiomatic reasoning system, with good extensibility, maintainability and adaptability, and improving the degree of intelligence, convenience, practical application value and scope.
[0096] Example 2
[0097] This embodiment provides a method for generating propositional logic statements in a non-axiomatic reasoning system, which is a further improvement on Embodiment 1.
[0098] In one feasible solution, Figure 2 As shown, step S13 includes:
[0099] S131, obtaining domain information of the initial text;
[0100] S132, modifying the target prompt word based on the domain information;
[0101] S133. Based on the modified target prompt word, the initial text is input into a preset large language model to output a target propositional logic sentence.
[0102] Specifically, the prompt words are adjusted dynamically according to the different fields of the initial text. For example, when solving legal problems, in order to better understand the field terms, you can add "assuming you are a lawyer, please analyze this legal clause..." to guide the preset large language model to more accurately understand the user's field problem input. For example, the modified target prompt word is "assuming you are a lawyer, please analyze this legal clause and express its meaning with a NARS logical statement: [legal clause]". The legal clause is the initial text.
[0103] In this scheme, the target prompt words are modified according to the domain information of the initial text, which improves the accuracy, reliability and adaptability of the target prompt words and ensures the accuracy and reliability of the target propositional logic statements.
[0104] In one feasible solution, Figure 3 As shown, step S13 includes:
[0105] S134, obtaining historical data;
[0106] The historical data includes several groups of corresponding historical texts and historical propositional logic statements;
[0107] S135. Based on the target prompt words and historical data, the initial text is input into a preset large language model to output a target propositional logic sentence.
[0108] Specifically, the historical data is a successful conversion case of the preset large language model. Providing some successful conversion cases as examples can help the preset large language model learn how to correctly map the initial text to the target propositional logic statement, for example: "The following are several examples of successful conversions. Please refer to their formats for conversion: [Example 1], [Example 2]... Now please convert the following text: [Text to be converted]". The text to be converted is the initial text.
[0109] In this scheme, based on several groups of corresponding historical texts and historical propositional logic statements, the preset large language model converts the initial text into the target propositional logic statement, which improves the accuracy and reliability of the conversion performed by the preset large language model and ensures the accuracy and reliability of the target propositional logic statement.
[0110] In one feasible solution, Figure 4 As shown, after step S13, the following steps are also included:
[0111] S14, performing a quality evaluation on the target propositional logic statement based on a first preset standard to obtain a first evaluation question and a first evaluation result;
[0112] S15, in response to the first evaluation result satisfying the first preset condition, generating a first prompt word based on the first evaluation question;
[0113] S16. Based on the first prompt word, the initial text is input into a preset large language model to output a new target propositional logic sentence.
[0114] Specifically, the first preset standard includes the grammatical structure standard of the target propositional logic statement, entity recognition and other standards. The grammatical structure standard is, for example, the subject-predicate-object structure, and the entity recognition is, for example, name recognition. According to the first preset standard, the logical statement generated by the preset large language model for the first time, that is, the target propositional logic statement, is evaluated for quality, and a first evaluation question and a first evaluation result are obtained. If the first evaluation result meets the first preset condition, that is, it does not meet the user's expectations, a first prompt word is generated according to the first evaluation question. The second prompt word can be an adjustment to the content of the target prompt word, or a new prompt word generated to guide the preset large language model to re-run the conversion process. The first evaluation problem is, for example, the subject-predicate-object structure is inaccurate, and the name is not accurately recognized. According to the first prompt word, the preset large language model generates a new target propositional logic statement. The new target propositional logic statement can be evaluated for quality again until the first evaluation result meets the user's expectations. That is, multiple rounds of iterations can be performed until a satisfactory output is obtained. For example: "The last conversion result seems to be wrong, please reconsider and improve your conversion: [last logical statement], now please try to convert again: [original natural language input]".
[0115] In this solution, the first evaluation question is obtained by performing a quality evaluation on the target propositional logic statement, and then the first prompt word is generated according to the first evaluation question, so that the preset large language model generates a new target propositional logic statement, thereby ensuring the accuracy and reliability of the target propositional logic statement and improving the user experience.
[0116] In one feasible solution, Figure 5 As shown, after step S13, the following steps are also included:
[0117] S17, inputting the target propositional logic statement into the non-axiomatic reasoning system to output the reasoning result;
[0118] S18, performing a quality evaluation on the reasoning result based on a second preset standard to obtain a second evaluation question and a second evaluation result;
[0119] S19, in response to the second evaluation result satisfying the second preset condition, generating a second prompt word based on the second evaluation question;
[0120] S20. Based on the second prompt word, the initial text is input into a preset large language model to output a new target propositional logic sentence.
[0121] Specifically, the target propositional logic statement obtained according to the preset large language model is input into the non-axiomatic reasoning system, so that the non-axiomatic reasoning system performs reasoning operations, and the reasoning results output by the non-axiomatic reasoning system are quality evaluated according to the second preset standard to obtain a second evaluation question and a second evaluation result. If the second evaluation result meets the second preset condition, that is, it does not meet the user's expectations, a second prompt word is generated according to the second evaluation question. The preset large language model is enabled to generate a new target propositional logic statement according to the second prompt word. The second prompt word can be an adjustment to the content of the target prompt word, or it can be a new prompt word generated to guide the preset large language model to re-run the conversion process. The new target propositional logic statement can be quality evaluated again until the second evaluation result meets the user's expectations. That is, a feedback loop can be established to allow the quality evaluation of the reasoning results until a satisfactory output is obtained. For example: "Please check whether the following conversion result accurately reflects your intention: [logical statement]. If it is inaccurate, please point out the problem and we will try to improve it."
[0122] In this scheme, by performing a quality evaluation on the reasoning results output by the non-axiomatic reasoning system, a second evaluation question is obtained, and then a second prompt word is generated according to the second evaluation question, so that the preset large language model generates a new target propositional logic statement, thereby ensuring the accuracy and reliability of the target propositional logic statement and improving the responsiveness and user experience.
[0123] In one feasible solution, Figure 6 As shown, after step S13, the following steps are also included:
[0124] S21, performing a quality evaluation on the target propositional logic statement based on a third preset standard to obtain a third evaluation question;
[0125] S22. Based on the third evaluation question, modify the target propositional logic statement to obtain a modified target propositional logic statement.
[0126] Specifically, the third preset standard includes the format standard and semantic standard of the target propositional logic statement. The format standard includes whether there are errors in punctuation marks, and the semantic standard includes whether the target propositional logic statement is semantically consistent with the initial text. According to the third preset standard, the quality of the logical statement initially generated by the preset large language model, that is, the target propositional logic statement, is evaluated to obtain a third evaluation problem. The third evaluation problem includes the lack of punctuation marks such as brackets, and the semantic inconsistency between the target propositional logic statement and the initial text. According to the third evaluation problem, the target propositional logic statement is modified or supplemented to ensure that the modified or supplemented target propositional logic statement meets the input requirements of the propositional logic statement in the non-axiomatic reasoning system and is easy to be understood and processed by the non-axiomatic reasoning system.
[0127] In this scheme, the target propositional logic statement is evaluated for quality to obtain the third evaluation question, and then the target propositional logic statement is modified according to the third evaluation question, thereby avoiding misunderstandings or errors introduced in the conversion process of the preset large language model and ensuring the accuracy and reliability of the target propositional logic statement.
[0128] In one feasible solution, Figure 7 As shown, before step S13, it also includes:
[0129] S136, inputting the historical propositional logic sentence into the preset large language model to output the historical text;
[0130] S137. Take historical text as input and historical propositional logic statements as output to train the preset large language model.
[0131] Specifically, historical propositional logic statements are known logic statements, from which multiple possible historical texts are inferred, and a preset large language model is trained based on multiple historical texts and historical propositional logic statements. Possible natural language descriptions, i.e. historical texts, are inferred from known logic statements to enrich the learning resources of the preset large language model. For example:
[0132] "Given the following logical statement, please try to construct a natural language description that can be converted into this logical statement: [logical statement]".
[0133] In this solution, a preset large language model outputs historical texts according to historical propositional logic sentences, and then the preset large language model is trained according to the historical propositional logic sentences and historical texts, thereby improving the accuracy and reliability of the preset large language model.
[0134] In addition, the success cases and failure cases of each conversion of each preset large language model can also be recorded to form a growing data set. Success cases and failure cases are determined based on the evaluation results. The evaluation results include a first evaluation result and a second evaluation result. If the evaluation result meets the preset conditions, that is, meets the user's expectations, the corresponding target logic sentence and initial text are success cases; if the evaluation result does not meet the preset conditions, that is, does not meet the user's expectations, the corresponding target logic sentence and initial text are failure cases. Use this data set to regularly update and fine-tune the preset large language model, and improve the design strategy of the prompt words, so as to continuously improve the performance of the preset large language model.
[0135] A series of test cases can be designed to verify the performance of the model, including but not limited to indicators such as accuracy, recall, and F1 score.
[0136] In the development environment, the system for generating propositional logic statements in non-axiomatic reasoning systems is fully tested to ensure that each component works properly and the overall process is smooth and error-free. In particular, the effectiveness of Prompt and the accuracy of logical conversion should be verified. Experts and ordinary users from different fields are invited to participate in the test, collect feedback, and further optimize the design of Prompt and system functions. By processing a large amount of real-world data, the performance of the system is evaluated, and any problems that arise are recorded and analyzed for continuous improvement. Encourage users and the developer community to contribute new templates and improvement suggestions to the Prompt library to promote the continuous development and innovation of the system. Through the careful design and continuous optimization of Prompt, the system can better understand and respond to the user's natural language input, significantly improving the accuracy and efficiency of reasoning. This improvement not only enhances the user experience, but also promotes the widespread application and development of non-axiomatic reasoning systems in multiple fields.
[0137] In this embodiment, the target prompt word is obtained through the input requirement of the propositional logic statement, and then the initial text is input into the preset large language model according to the target prompt word to output the target propositional logic statement, thereby realizing the automatic conversion of the initial text to the propositional logic statement, significantly lowering the user's usage threshold, making complex reasoning tasks more intuitive and easy to use, greatly expanding its application scenarios, and enabling more non-professional users to conveniently use the non-axiomatic reasoning system to perform complex reasoning tasks, greatly improving the conversion efficiency of propositional logic statements, avoiding the occurrence of human errors, ensuring the accuracy and completeness of the input information of the non-axiomatic reasoning system, and thus improving the quality and reliability of the reasoning results of the non-axiomatic reasoning system, and using the preset large language model to convert propositional logic statements, providing a friendly and flexible interface for the non-axiomatic reasoning system, with good extensibility, maintainability and adaptability, and improving the degree of intelligence, convenience, practical application value and scope.
[0138] Example 3
[0139] This embodiment provides a system for generating propositional logic statements in a non-axiomatic reasoning system, such as Figure 8 As shown, the generation system includes:
[0140] An initial text acquisition module 11 is used to acquire the initial text;
[0141] A prompt word acquisition module 12, used to obtain a target prompt word of a preset large language model based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system;
[0142] The first sentence output module 13 is used to input the initial text into a preset large language model based on the target prompt word to output a target propositional logic sentence.
[0143] In this embodiment, the target prompt word is obtained through the input requirement of the propositional logic statement, and then the initial text is input into the preset large language model according to the target prompt word to output the target propositional logic statement, thereby realizing the automatic conversion of the initial text to the propositional logic statement, significantly lowering the user's usage threshold, making complex reasoning tasks more intuitive and easy to use, greatly expanding its application scenarios, and enabling more non-professional users to conveniently use the non-axiomatic reasoning system to perform complex reasoning tasks, greatly improving the conversion efficiency of propositional logic statements, avoiding the occurrence of human errors, ensuring the accuracy and completeness of the input information of the non-axiomatic reasoning system, and thus improving the quality and reliability of the reasoning results of the non-axiomatic reasoning system, and using the preset large language model to convert propositional logic statements, providing a friendly and flexible interface for the non-axiomatic reasoning system, with good extensibility, maintainability and adaptability, and improving the degree of intelligence, convenience, practical application value and scope.
[0144] Example 4
[0145] This embodiment provides a system for generating propositional logic statements in a non-axiomatic reasoning system, which is a further improvement on Embodiment 3.
[0146] In one feasible solution, Fig. 9 As shown, the first sentence output module 13 includes:
[0147] A domain information acquisition unit 131, used to acquire domain information of an initial text;
[0148] A prompt word modification unit 132, used to modify the target prompt word based on the domain information;
[0149] The first sentence output unit 133 is used to input the initial text into a preset large language model based on the modified target prompt word to output a target propositional logic sentence.
[0150] In an implementable solution, the first sentence output module 13 includes:
[0151] A historical data acquisition unit 134, used to acquire historical data;
[0152] The historical data includes several groups of corresponding historical texts and historical propositional logic statements;
[0153] The second sentence output unit 135 is used to input the initial text into a preset large language model based on the target prompt word and historical data to output a target propositional logic sentence.
[0154] In one feasible solution, the generation system further includes:
[0155] A first evaluation module 14, configured to perform a quality evaluation on the target propositional logic statement based on a first preset standard to obtain a first evaluation question and a first evaluation result;
[0156] A first prompt word generating module 15, configured to generate a first prompt word based on a first evaluation question in response to the first evaluation result satisfying a first preset condition;
[0157] The second sentence output module 16 is used to input the initial text into a preset large language model based on the first prompt word to output a new target propositional logic sentence.
[0158] In one feasible solution, the generation system further includes:
[0159] A reasoning result generating module 17, used for inputting the target propositional logic statement into the non-axiomatic reasoning system to output the reasoning result;
[0160] A second evaluation module 18, used to perform quality evaluation on the reasoning result based on a second preset standard to obtain a second evaluation question and a second evaluation result;
[0161] A second prompt word generating module 19, configured to generate a second prompt word based on a second evaluation question in response to the second evaluation result satisfying a second preset condition;
[0162] The third sentence output module 20 is used to input the initial text into a preset large language model based on the second prompt word to output a new target propositional logic sentence.
[0163] In one feasible solution, the generation system further includes:
[0164] A third evaluation module 21, used to perform a quality evaluation on the target propositional logic statement based on a third preset standard to obtain a third evaluation question;
[0165] The fourth statement output module 22 is used to modify the target propositional logic statement based on the third evaluation question to obtain a modified target propositional logic statement.
[0166] In one feasible solution, the generation system further includes:
[0167] A historical text output module 23, used for inputting historical propositional logic sentences into a preset large language model to output historical text;
[0168] The model training module 24 is used to take the historical text as input and the historical propositional logic sentence as output to train the preset large language model.
[0169] In this embodiment, the target prompt word is obtained through the input requirement of the propositional logic statement, and then the initial text is input into the preset large language model according to the target prompt word to output the target propositional logic statement, thereby realizing the automatic conversion of the initial text to the propositional logic statement, significantly lowering the user's usage threshold, making complex reasoning tasks more intuitive and easy to use, greatly expanding its application scenarios, and enabling more non-professional users to conveniently use the non-axiomatic reasoning system to perform complex reasoning tasks, greatly improving the conversion efficiency of propositional logic statements, avoiding the occurrence of human errors, ensuring the accuracy and completeness of the input information of the non-axiomatic reasoning system, and thus improving the quality and reliability of the reasoning results of the non-axiomatic reasoning system, and using the preset large language model to convert propositional logic statements, providing a friendly and flexible interface for the non-axiomatic reasoning system, with good extensibility, maintainability and adaptability, and improving the degree of intelligence, convenience, practical application value and scope.
[0170] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.
[0171] Example 5
[0172] Fig.10 This is a structural diagram of an electronic device shown in an example embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, it implements the method for generating propositional logic statements in the non-axiomatic reasoning system described in any of the above embodiments. Fig.10 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0173] like Fig.10 As shown, the electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).
[0174] The bus 93 includes a data bus, an address bus, and a control bus.
[0175] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read only memory (ROM) 923 .
[0176] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0177] The processor 91 executes various functional applications and data processing by running the computer program stored in the memory 92, such as the method for generating propositional logic statements in the non-axiomatic reasoning system provided in any of the above embodiments.
[0178] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the electronic device 90 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with other modules of the electronic device 90 via a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0179] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0180] Example 6
[0181] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for generating propositional logic statements in a non-axiomatic reasoning system provided in any of the above embodiments is implemented.
[0182] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0183] Example 7
[0184] The embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for generating propositional logic statements in a non-axiomatic reasoning system.
[0185] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0186] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A method for generating propositional logic statements in a non-axiomatic reasoning system, characterized in that: The generation method comprises: Get the initial text; Based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system, the target prompt words of the preset large language model are obtained; Based on the target prompt word, the initial text is input into the preset large language model to output a target propositional logic sentence.
2. The method for generating propositional logic statements in a non-axiomatic reasoning system according to claim 1, characterized in that: The step of inputting the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence includes: Obtaining domain information of the initial text; Modifying the target prompt word based on the domain information; Based on the modified target prompt word, the initial text is input into the preset large language model to output the target propositional logic sentence.
3. The method for generating propositional logic statements in a non-axiomatic reasoning system according to claim 1, characterized in that: The step of inputting the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence includes: Get historical data; Wherein, the historical data includes several groups of mutually corresponding historical texts and historical propositional logic statements; Based on the target prompt word and the historical data, the initial text is input into the preset large language model to output the target propositional logic sentence.
4. The method for generating propositional logic statements in a non-axiomatic reasoning system according to any one of claims 1 to 3, characterized in that: After the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes: Performing a quality evaluation on the target propositional logic statement based on a first preset standard to obtain a first evaluation question and a first evaluation result; In response to the first evaluation result satisfying a first preset condition, generating a first prompt word based on the first evaluation question; Based on the first prompt word, inputting the initial text into the preset large language model to output a new target propositional logic sentence; or, After the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes: Inputting the target propositional logic statement into the non-axiomatic reasoning system to output a reasoning result; Performing a quality evaluation on the reasoning result based on a second preset standard to obtain a second evaluation question and a second evaluation result; In response to the second evaluation result satisfying a second preset condition, generating a second prompt word based on the second evaluation question; Based on the second prompt word, the initial text is input into the preset large language model to output a new target propositional logic sentence.
5. The method for generating propositional logic statements in a non-axiomatic reasoning system according to any one of claims 1 to 3, characterized in that: After the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes: Performing a quality evaluation on the target propositional logic statement based on a third preset standard to obtain a third evaluation question; Based on the third evaluation question, the target propositional logic statement is modified to obtain a modified target propositional logic statement.
6. The method for generating propositional logic statements in a non-axiomatic reasoning system according to any one of claims 1 to 3, characterized in that: Before the step of inputting the initial text into the preset large language model based on the target prompt word to output the target propositional logic sentence, the method further includes: Inputting historical propositional logic sentences into the preset large language model to output historical text; The historical text is used as input and the historical propositional logic sentence is used as output to train the preset large language model.
7. A system for generating propositional logic statements in a non-axiomatic reasoning system, characterized in that: The generation system comprises: An initial text acquisition module, used to acquire the initial text; A prompt word acquisition module is used to obtain target prompt words of a preset large language model based on the input requirements of propositional logic sentences in the non-axiomatic reasoning system; The first sentence output module is used to input the initial text into the preset large language model based on the target prompt word to output a target propositional logic sentence.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the method for generating propositional logic statements in the non-axiomatic reasoning system according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating propositional logic statements in a non-axiomatic reasoning system according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating propositional logic statements in a non-axiomatic reasoning system as described in any one of claims 1 to 6 is implemented.