Decision-making method combining large language model and rule engine

By combining decision-making methods of large language models and rules engines, the problem of lack of comprehensive solutions in the existing technology is solved, efficient decision-making and automated decision-making for complex business scenarios are achieved, decision-making efficiency and accuracy are improved, and decision-making is enhanced. The adaptive capability of the system.

CN119443048APending Publication Date: 2025-02-14中国太平洋人寿保险股份有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411375744.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The lack of comprehensive solutions that organically combine large language models and rules engines in the prior art leads to poor results in handling complex decision-making tasks, especially in scenarios where natural language understanding and complex business contexts are required.

Method used

Through a decision-making method combining a large language model and a rule engine, a large language model is used to extract key information and user intentions from the text in a business scenario, convert it into structured data, use the rule engine to process business logic, and generate preliminary decisions The result is and translated into natural language text and fed back to the user. Based on user feedback data, adjust the rule weights and priorities in the rule engine to optimize decision results.

Benefits of technology

It realizes more effective utilization of complex business scenarios, improves the efficiency and accuracy of decision-making, can realize automated decision-making in the original scenarios where it is difficult to automate decision-making, and improves the system's adaptive and self-learning capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443048A_ABST
    Figure CN119443048A_ABST
Patent Text Reader

Abstract

The invention relates to a decision-making method combining a big language model and a rule engine, and the method comprises the following steps: S1, extracting key information and a user intention from a text in a business scene based on the big language model, and converting the extracted information into structured data; s2, performing business logic processing on the structured data by using a rule engine module to generate a preliminary decision result; s3, converting the preliminary decision result into a natural language text, and feeding back the natural language text to the user; and S4, storing a natural language text corresponding to the preliminary decision result, obtaining feedback data of the user, analyzing the feedback data to obtain a rule adjustment value, adjusting the weight and priority of each rule in the rule set of the rule engine module based on the rule adjustment value to obtain an optimized rule engine module, and outputting the optimized rule engine module. And the optimized rule engine module is used for outputting a next decision result. Compared with the prior art, the method has the advantage of improving the efficiency of the existing decision-making scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a decision-making method combining a large language model and a rule engine. Background Art

[0002] LLM, such as GPT-4, can be trained on large amounts of unstructured text data and has strong natural language processing and understanding capabilities. These models can extract and summarize key information from text, generate high-quality descriptions, answer questions, and demonstrate certain reasoning capabilities at the language level. However, LLM currently has significant limitations when processing business logic and rules based on highly industry-related structured data.

[0003] Rule engines mostly use predefined rule sets to execute decisions. They can quickly and efficiently process structured business rules and logic to complete business decision-making tasks in risk control, marketing and other scenarios, but they are limited in their effectiveness when using complex natural language information and processing problems that require more complex and changeable context understanding. It is difficult to extract and design relevant rule sets to complete tasks in the above situations. The powerful language capabilities of the large model enable decision rules to break through the existing capability boundaries, making decisions more accurate and effective.

[0004] Existing technologies usually use LLM and rule engines separately in different application scenarios, lacking a comprehensive solution that organically combines the two, resulting in unsatisfactory results when processing complex decision-making tasks (especially scenarios that require natural language understanding + complex business context). Summary of the invention

[0005] The purpose of the present invention is to provide a decision-making method that combines a large language model and a rule engine in order to achieve effective utilization of more types of data in complex business scenarios and improve the efficiency of existing decision-making scenarios. By integrating the natural language processing capabilities of LLM and the structured decision-making capabilities of the rule engine, the efficiency of existing decision-making scenarios is improved, and it can also be applied in specific scenarios that were originally difficult to automate.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A decision-making method combining a large language model and a rule engine, the method comprising the following steps:

[0008] S1. Extract key information and user intent from texts in business scenarios based on a large language model, and convert the extracted information into structured data;

[0009] S2. Use the rule engine module to perform business logic processing on structured data and generate preliminary decision results;

[0010] S3, convert the preliminary decision results into natural language text and feed it back to the user;

[0011] S4. Store the natural language text corresponding to the preliminary decision result, and obtain user feedback data based on the large language model, the feedback data including positive or negative sentiment scores and accuracy scores, analyze the feedback data to obtain rule adjustment values, adjust the weight and priority of each rule in the rule set of the rule engine module based on the rule adjustment values, and obtain an optimized rule engine module, which is used to output the next decision result.

[0012] Furthermore, the rule adjustment value includes a weight adjustment value and a priority adjustment value.

[0013] Furthermore, the weight adjustment value is:

[0014]

[0015] Among them, F ij Representation rule R i The contribution value in feedback sample j, S j represents the sentiment score of feedback sample j, which is positive or negative, and n represents the number of samples.

[0016] Furthermore, the priority adjustment value is:

[0017]

[0018] Among them, A j represents the accuracy score of feedback sample j, and k represents the number of samples.

[0019] Furthermore, the weights of the adjusted rules in the optimized rule engine module are:

[0020] W i ′=W i +α·ΔW

[0021] Among them, α is the learning rate, ΔW is the weight adjustment value, and W i ′ is the weight of the adjusted rule, W i The weight of the current rule.

[0022] Furthermore, the priority of the adjusted rules in the optimized rule engine module is:

[0023] P′ i =P i +γ·ΔP

[0024] Among them, γ is the adjustment coefficient, ΔP is the priority adjustment value, and P′ i is the priority of the adjusted rule, Pi The weight of the current rule.

[0025] Furthermore, the text in the business scenario includes natural language text and various related business knowledge documents.

[0026] Furthermore, the specific steps of S2 are:

[0027] The structured data is input into the rule engine module, and preliminary decision results are generated based on the predefined rule set in the rule engine module and combined with the structured data.

[0028] Furthermore, in S4, before analyzing the feedback data to obtain the rule adjustment value, the feedback data is preprocessed.

[0029] Furthermore, the preprocessing includes cleaning, extraction of classification labels and normalization of numerical data.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] The present invention processes complex business scenarios and decision-making tasks through a large language model, thereby improving the efficiency and accuracy of decision-making. At the same time, it converts decisions into natural language to facilitate user feedback. The feedback information extracted by the large language model is combined to update the priorities and weights in the rules of the rule engine, automatically adjust and optimize the rule set in the rule engine, realize the system's self-adaptation and self-learning capabilities, improve the effectiveness of existing decision-making scenarios, and realize automated decision-making in complex business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a module flow chart of the present invention. DETAILED DESCRIPTION

[0033] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0034] The present invention provides a decision-making method combining a large language model (LLM) and a rule engine, the method comprising the following steps:

[0035] S1. Extract key information and user intent from texts in business scenarios based on a large language model, and convert the extracted information into structured data;

[0036] S2. Use the rule engine module to perform business logic processing on structured data and generate preliminary decision results;

[0037] S3, convert the preliminary decision results into natural language text and feed it back to the user;

[0038] S4. Store the natural language text corresponding to the preliminary decision result, and obtain user feedback data based on the large language model, the feedback data including positive or negative sentiment scores and accuracy scores, analyze the feedback data to obtain rule adjustment values, adjust the weight and priority of each rule in the rule set of the rule engine module based on the rule adjustment values, and obtain an optimized rule engine module, which is used to output the next decision result.

[0039] The present invention integrates the natural language processing capabilities of LLM and the structured decision-making capabilities of the rule engine to achieve effective utilization of more types of data in complex business scenarios, improve the efficiency of existing decision-making scenarios, and can also be applied in specific scenarios that were previously difficult to automate.

[0040] The steps of the present invention can be implemented based on a decision platform combining a large language model (LLM) and a rule engine, the platform comprising:

[0041] Input parsing module: LLM is used to parse user input and various related business knowledge documents to extract key intent and information. LLM can process natural language input and generate structured data for use by the rule engine.

[0042] Rule engine module: The rule engine is used to process the structured data passed from the LLM and combined with the existing structured data as the input of the rule engine. The rule engine makes decisions based on the predefined rule set to ensure the accurate execution of business logic.

[0043] Feedback generation module: The decision results of the rule engine are generated through LLM and provided to users in natural language. This module ensures that users can understand the decision results in an easy-to-understand form.

[0044] Data storage and management module: responsible for storing user input, knowledge documents, analysis results, decision-making processes and results, etc., to support continuous learning and optimization of the system.

[0045] Feedback Learning Module: Through LLM, the system analyzes user feedback, automatically adjusts and optimizes the parameters in the rule set in the rule engine, and realizes the system's self-adaptation and self-learning capabilities.

[0046] The flow chart of the method of the present invention executed by the platform is as follows Figure 1 shown.

[0047] Based on the above platform, in S1, the specific steps are as follows:

[0048] 1.1. Use large language models (LLM, such as GPT-4, Llama 3, Qwen2, etc.) to parse natural language texts and various related business knowledge documents (such as terms, process descriptions, etc.) in business scenarios to extract key information and user intent.

[0049] 1.2. Convert the extracted information into normalized structured data for subsequent processing.

[0050] In S2, the specific steps are:

[0051] 2.1. Pass the structured data obtained from the input parsing module to the rule engine.

[0052] 2.2. Based on the predefined rule set, the rule engine processes and makes decisions on the extracted structured data in combination with the existing structured data.

[0053] 2.3. Generate preliminary decision results and pass them to the feedback generation module.

[0054] In S3, the specific steps are:

[0055] 3.1. Use LLM to convert the structured decision results of the rule engine into natural language text.

[0056] 3.2. Generate clear and understandable feedback information and return it to the user.

[0057] The natural language text corresponding to the preliminary decision results is stored, and the user input, business knowledge base, analysis results, decision process and final feedback information are also stored. A data management interface is provided to support continuous learning and optimization of the system, realize secure storage and access control of data, and ensure data privacy and security.

[0058] In S4, LLM analyzes user feedback, automatically adjusts and optimizes the parameters in the rule set in the rule engine, and realizes the system's self-adaptation and self-learning capabilities. The specific steps are as follows:

[0059] In the rule engine, the key parameters of the rule set include weight and priority. Through user feedback learning, the system can dynamically adjust the parameters to optimize the decision-making effect.

[0060] Weight adjustment:

[0061] For each rule R i Set the initial weight W i , adjusted based on user feedback:

[0062] W i ′=W i +α·ΔW

[0063] Among them, α is the learning rate, ΔW is the weight adjustment value, which is calculated based on the number of positive and negative samples fed back by users.

[0064] Priority Adjustment

[0065] For each rule R i Set the initial priority P i , adjusted based on user feedback:

[0066] P′ i =P i +γ·ΔP

[0067] Among them, γ is the adjustment coefficient, and ΔP is the priority adjustment value, which is calculated according to the accuracy of the feedback decision result.

[0068] The specific process of automatic learning and adjustment is as follows:

[0069] User feedback collection: After the decision result is generated, the system displays the result to the user and collects the user's feedback data. User feedback can be explicit satisfaction evaluation, error report, or implicit behavior data (such as clicks, purchases, etc.).

[0070] (2) Feedback data processing: The collected feedback data is preprocessed, such as text data cleaning, classification label extraction, and numerical data normalization.

[0071] (3) LLM analysis of feedback: Use LLM to conduct in-depth analysis of feedback data, identify positive and negative feedback samples, and extract relevant features and patterns. For example, LLM can analyze the sentiment tendency in text feedback through natural language processing technology.

[0072] (4) Calculate the adjustment value: Calculate the adjustment value of each rule based on the LLM analysis results. The specific calculation formula is as follows:

[0073] Weight adjustment value ΔW:

[0074]

[0075] Among them, F ij Representation rule R i The contribution value in feedback sample j, S j represents the sentiment score (positive or negative) of feedback sample j, and n represents the number of samples.

[0076] Priority adjustment value ΔP:

[0077]

[0078] Among them, A j represents the accuracy score of feedback sample j, and k represents the number of samples.

[0079] Update rule set parameters to apply the calculated adjustment values ​​to the rule set of the rule engine, update weight and priority parameters, and enable the system to apply the optimized rule set in the next decision.

[0080] The key technologies of the present invention are:

[0081] Text big model technology: Use Qwen2 and other LLM models to parse and understand text, extract and generate structured information.

[0082] Rule engine technology: Use rule engines such as Drools for business logic processing, reasoning, and calculation.

[0083] Data storage technology: Combine relational database and NoSQL database to store and manage structured and unstructured data.

[0084] API interface: Data interaction and function calls between modules are realized through RESTful API.

[0085] Through the combination of the above steps and key technologies, an efficient and intelligent decision-making platform is realized, which can break through the capacity limitations of the original rule engine and use text information to make accurate and fast decisions in complex business scenarios.

[0086] The innovative features of the present invention are as follows:

[0087] 1) Comprehensive solution: The LLM and rule engine are organically combined, which not only utilizes the powerful natural language processing capabilities of LLM, but also gives play to the advantages of the rule engine in structured decision-making.

[0088] 2) The system is able to generate natural language feedback, making it easier for users to understand complex decision results.

[0089] 3) Dynamic rule adjustment: LLM analyzes user feedback, automatically adjusts and optimizes the rule set in the rule engine, and realizes the system's self-adaptation and self-learning capabilities.

[0090] Beneficial effects of the present invention:

[0091] 1) Efficiently handle complex decisions: The platform can handle complex business scenarios and decision-making tasks, improving the efficiency and accuracy of decision-making.

[0092] 2) Improve user experience: Through natural language input and feedback, the user experience and satisfaction are greatly improved.

[0093] 3) Flexible scalability: The modular design of the platform enables it to have good scalability and can be flexibly customized and expanded according to specific needs.

[0094] 4) Improve system adaptability: Through feedback learning, the platform can automatically adjust and optimize the rule set, enhancing the system's adaptability and self-learning capabilities.

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

Claims

1. A decision-making method combining a large language model and a rule engine, characterized in that: The method comprises the following steps: S1. Extract key information and user intent from texts in business scenarios based on a large language model, and convert the extracted information into structured data; S2. Use the rule engine module to perform business logic processing on structured data and generate preliminary decision results; S3, convert the preliminary decision results into natural language text and feed it back to the user; S4. Store the natural language text corresponding to the preliminary decision result, and obtain user feedback data based on the large language model, the feedback data including positive or negative sentiment scores and accuracy scores, analyze the feedback data to obtain rule adjustment values, adjust the weight and priority of each rule in the rule set of the rule engine module based on the rule adjustment values, and obtain an optimized rule engine module, which is used to output the next decision result.

2. A decision-making method combining a large language model and a rule engine according to claim 1, characterized in that: The rule adjustment value includes a weight adjustment value and a priority adjustment value.

3. A decision-making method combining a large language model and a rule engine according to claim 2, characterized in that: The weight adjustment values ​​are: Among them, F ij Representation rule R i The contribution value in feedback sample j, S j represents the sentiment score of feedback sample j, which is positive or negative, and n represents the number of samples.

4. A decision-making method combining a large language model and a rule engine according to claim 3, characterized in that: The priority adjustment values ​​are: Among them, A j represents the accuracy score of feedback sample j, and k represents the number of samples.

5. A decision-making method combining a large language model and a rule engine according to claim 4, characterized in that: The weights of the adjusted rules in the optimized rule engine module are: IN' i =In i +α ΔW Among them, α is the learning rate, ΔW is the weight adjustment value, and W′ i is the weight of the adjusted rule, W i The weight of the current rule.

6. A decision-making method combining a large language model and a rule engine according to claim 5, characterized in that: The priorities of the adjusted rules in the optimized rule engine module are: P′ i =P i +γ·ΔP Among them, γ is the adjustment coefficient, ΔP is the priority adjustment value, and P′ i is the priority of the adjusted rule, P i The weight of the current rule.

7. The decision-making method combining a large language model and a rule engine according to claim 1, characterized in that: The text in the business scenario includes natural language text and various related business knowledge documents.

8. The decision-making method combining a large language model and a rule engine according to claim 1, characterized in that: The specific steps of S2 are: The structured data is input into the rule engine module, and preliminary decision results are generated based on the predefined rule set in the rule engine module and combined with the structured data.

9. The decision-making method combining a large language model and a rule engine according to claim 1, characterized in that: In S4, before analyzing the feedback data to obtain the rule adjustment value, the feedback data is preprocessed.

10. A decision-making method combining a large language model and a rule engine according to claim 9, characterized in that: The preprocessing includes cleaning, extraction of classification labels and normalization of numerical data.

Citation Information

Cited By

  • Digital plan method and system based on large model and rule engine

    CN121329315A