Intelligent decision-making method and device, equipment and medium
Patent Information
- Application Number
- CN202511904087.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-27
AI Technical Summary
[0004]但上述方式存在一定问题,由于是根据思考内容直接生成动作指令,其输出格式缺乏稳定性,易引发解析错误,导致动作执行失败或结果无效;同时,动作转换逻辑与核心推理过程高度耦合,可维护性低
[0064]本申请提供的智能决策方法、装置、设备及介质,智能代理模块通过大语言模型对用户请求进行解析,生成包含行动计划的推理结果;将推理结果交由专门的动作解析模块进行处理,该模块基于预设的动作规则集,输出规范化的动作指令;根据动作指令调用相应的目标工具执行操作,并获取执行结果;最后,结合历史交互信息,通过大语言模型生成最终决策结果并返回给用户。该方法通过动作规则集规范指令生成,提升了系统执行的可靠性;将动作解析模块独立设计,增强了系统的安全管控能力;采用模块化架构,使动作规则的更新和扩展无需修改核心推理模块,显著提高了系统的可维护性和迭代效率。
Smart Images

Figure CN121743447A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, specifically relating to an intelligent decision-making method, device, equipment, and medium. Background Technology
[0002] In some business scenarios, such as in the field of intelligent customer service, the system needs to make autonomous decisions on whether to call the knowledge base, call the interface, or directly generate an answer based on the user's question; in the scenario of automated operation and maintenance, the intelligent agent needs to determine whether to perform server status checks, log analysis, or fault handling actions; in the scenario of financial risk control, the system needs to decide whether to trigger an early warning, perform data verification, or generate a compliance report based on risk signals.
[0003] Existing technologies typically employ a design pattern that combines reasoning and execution. This pattern, upon receiving a user's question, first performs reasoning to generate corresponding thought content; then, based on this thought content, it executes specific actions and obtains feedback results. These steps are repeated until the answer to the question is finally obtained.
[0004] However, the above method has certain problems. Since it generates action instructions directly based on the thought content, its output format lacks stability and is prone to parsing errors, resulting in action execution failure or invalid results. At the same time, the action conversion logic is highly coupled with the core reasoning process, resulting in low maintainability. Summary of the Invention
[0005] To address the aforementioned issues, this application provides an intelligent decision-making method, apparatus, device, and medium.
[0006] Firstly, this application provides an intelligent decision-making method applied to an intelligent agent module, the method comprising:
[0007] In response to the request information output by the user, the reasoning result corresponding to the request information is determined through a large language model, and the reasoning result includes the action plan corresponding to the request information;
[0008] The inference result is sent to the action parsing module, and the corresponding action instruction output by the action parsing module is received. The action instruction is determined by the action parsing module based on a preset action rule set and the inference result. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate.
[0009] According to the action instruction, the corresponding target tool is invoked to execute the action instruction, and the execution result returned by the target tool is obtained;
[0010] Based on historical output information, the final decision result corresponding to the request information is determined through the large language model, and the final decision result is output to the user. The historical output information includes the request information, reasoning result, action instruction, and execution result.
[0011] In one possible implementation, determining the final decision result corresponding to the request information through the large language model includes:
[0012] Obtain the response content corresponding to the request information output by the large language model based on historical output information;
[0013] Determine whether the response content contains an end tag;
[0014] If not, the steps of determining the latest inference result and the latest response content through the large language model are executed repeatedly until the latest response content is output with the end tag.
[0015] In each iteration of the loop, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical loop.
[0016] In one possible implementation, determining the inference result corresponding to the request information through a large language model includes:
[0017] Based on the request information and the preset first prompt word template, the corresponding first prompt word is obtained. The first prompt word includes the request information, background information and output convention information.
[0018] The first prompt word is input into the large language model to obtain the reasoning result output by the large language model.
[0019] Secondly, this application provides an intelligent decision-making method applied to an action analysis module, the method comprising:
[0020] The system receives inference results sent by the intelligent agent module. These inference results are determined by the intelligent agent module in response to user-output request information, using a large language model. The inference results include the action plan corresponding to the request information.
[0021] Based on a preset set of action rules, the action instruction corresponding to the reasoning result is determined. The set of action rules is used to indicate at least one of the action types, action parameters, and output formats that the large language model can generate.
[0022] The action command is sent to the intelligent agent module, so that the intelligent agent module calls the corresponding target tool to execute the action command, obtains the corresponding execution result, and determines the final decision result corresponding to the request information through the large language model based on the historical output information, and outputs the final decision result to the user.
[0023] In one possible implementation, determining the action instruction corresponding to the reasoning result based on a preset set of action rules includes:
[0024] Based on the reasoning result and the preset action rule set, determine the second prompt word;
[0025] The second prompt word is input into the large language model to obtain the action command output by the large language model.
[0026] In one possible implementation, the inference result further includes the user's user identifier, and before determining the action instruction corresponding to the inference result according to a preset action rule set, the method further includes:
[0027] Based on the reasoning results, the corresponding task type is determined;
[0028] Based on the task type, a corresponding list of action rules is determined, and the task type and the list of action rules are in a one-to-one correspondence.
[0029] Based on the user identifier, determine the user type corresponding to the user identifier;
[0030] Determine at least one target action rule in the action rule list that matches the user type, and obtain the action rule set based on the at least one target action rule.
[0031] In one possible implementation, the method further includes:
[0032] In response to the adjustment command output by the operation terminal, the action rule set is updated to obtain an updated action rule set. The adjustment command is used to instruct at least one of adding, modifying, or deleting content in the action rule set.
[0033] Secondly, this application provides an intelligent decision-making device applied to an intelligent agent module, the device comprising:
[0034] The response module is used to respond to the request information output by the user and determine the reasoning result corresponding to the request information through a large language model. The reasoning result includes the action plan corresponding to the request information.
[0035] The sending module is used to send the inference result to the action parsing module and receive the corresponding action instruction output by the action parsing module. The action instruction is determined by the action parsing module based on a preset action rule set and the inference result. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate.
[0036] The invocation module is used to invoke the corresponding target tool to execute the action instruction according to the action instruction, and obtain the execution result returned by the target tool;
[0037] The output module is used to determine the final decision result corresponding to the request information based on the historical output information through the large language model, and output the final decision result to the user. The historical output information includes the request information, reasoning result, action instruction and execution result.
[0038] In one possible implementation, the output module is specifically used for:
[0039] Obtain the response content corresponding to the request information output by the large language model based on historical output information;
[0040] Determine whether the response content contains an end tag;
[0041] If not, the steps of determining the latest inference result and the latest response content through the large language model are executed repeatedly until the latest response content is output with the end tag.
[0042] In each iteration of the loop, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical loop.
[0043] In one possible implementation, the response module is specifically used for:
[0044] Based on the request information and the preset first prompt word template, the corresponding first prompt word is obtained. The first prompt word includes the request information, background information and output convention information.
[0045] The first prompt word is input into the large language model to obtain the reasoning result output by the large language model.
[0046] Fourthly, this application provides an intelligent decision-making device applied to an action analysis module, comprising:
[0047] A receiving module is used to receive the inference results sent by the intelligent agent module. The inference results are determined by the intelligent agent module in response to the request information output by the user through a large language model. The inference results include the action plan corresponding to the request information.
[0048] The determination module is used to determine the action instruction corresponding to the inference result according to a preset action rule set, wherein the action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate;
[0049] The sending module is used to send the action instruction to the intelligent agent module, so that the intelligent agent module calls the corresponding target tool to execute the action instruction, obtains the corresponding execution result, and determines the final decision result corresponding to the request information through the large language model based on historical output information, and outputs the final decision result to the user.
[0050] In one possible implementation, the module is specifically used for:
[0051] Based on the reasoning result and the preset action rule set, determine the second prompt word;
[0052] The second prompt word is input into the large language model to obtain the action command output by the large language model.
[0053] In one possible implementation, the inference result further includes the user's user identifier, and the determining module is further configured to:
[0054] Based on the reasoning results, the corresponding task type is determined;
[0055] Based on the task type, a corresponding list of action rules is determined, and the task type and the list of action rules are in a one-to-one correspondence.
[0056] Based on the user identifier, determine the user type corresponding to the user identifier;
[0057] Determine at least one target action rule in the action rule list that matches the user type, and obtain the action rule set based on the at least one target action rule.
[0058] In one possible implementation, the determining module is also used for:
[0059] In response to the adjustment command output by the operation terminal, the action rule set is updated to obtain an updated action rule set. The adjustment command is used to instruct at least one of adding, modifying, or deleting content in the action rule set.
[0060] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of the first and / or second aspects.
[0061] Sixthly, this application provides an electronic device, comprising: at least one processor and a memory; wherein,
[0062] The memory stores computer-executed instructions;
[0063] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of the first and / or second aspects.
[0064] The intelligent decision-making method, apparatus, device, and medium provided in this application involve an intelligent agent module that parses user requests using a large language model to generate inference results containing action plans. These inference results are then processed by a dedicated action parsing module, which outputs standardized action instructions based on a preset set of action rules. The module then invokes the corresponding target tool to perform the operation according to the action instructions and obtains the execution results. Finally, combining historical interaction information, the large language model generates the final decision result, which is returned to the user. This method improves the reliability of system execution by standardizing instruction generation through action rule sets; it enhances the system's security control capabilities by designing the action parsing module independently; and it adopts a modular architecture, allowing updates and expansions of action rules without modifying the core inference module, significantly improving the system's maintainability and iteration efficiency. Attached Figure Description
[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0066] Figure 1 The flow of the intelligent decision-making method provided in the embodiments of this application Figure 1 ;
[0067] Figure 2 The flow of the intelligent decision-making method provided in the embodiments of this application Figure 2 ;
[0068] Figure 3 A timing diagram of the intelligent decision-making application scenario provided in the embodiments of this application;
[0069] Figure 4 A diagram of an intelligent decision-making device provided in an embodiment of the present invention;
[0070] Figure 5 A diagram of an intelligent decision-making device provided in an embodiment of the present invention;
[0071] Figure 6 This is a hardware schematic diagram of an electronic device provided in an embodiment of the present invention.
[0072] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0074] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0075] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0077] In some business scenarios, existing technologies typically employ a design pattern that combines reasoning and execution. However, this pattern relies on the direct generation of action instructions from the reasoning results, and the instability of the model's output format makes the program prone to errors during parsing, leading to execution failures or invalid operations. Furthermore, the high coupling between the transformation logic and the core reasoning process necessitates modifications to the agent's core logic when expanding or updating action capabilities, significantly reducing system maintainability and iteration efficiency. Moreover, the difficulty in strictly constraining the model's behavior within pre-defined safe and compliant action ranges presents significant risk management challenges in enterprise-level applications, hindering effective behavior supervision and compliance control.
[0078] To address the aforementioned issues, this application provides an intelligent decision-making method. The intelligent agent module parses user requests using a large language model to generate inference results containing action plans. The inference results are then processed by a dedicated action parsing module, which outputs standardized action instructions based on a preset set of action rules. The module then invokes the corresponding target tool to perform the operation according to the action instructions and obtains the execution results. Finally, by combining historical interaction information, the module generates the final decision result using the large language model and returns it to the user.
[0079] This method improves the reliability of system execution by generating instructions through action rule sets; it enhances the system's security control capabilities by designing the action parsing module independently; and it adopts a modular architecture so that the updating and expansion of action rules do not require modification of the core inference module, which significantly improves the maintainability and iteration efficiency of the system.
[0080] The aforementioned intelligent decision-making method can be widely applied to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. The user-end devices in this method are not limited to PCs, mobile phones, tablets, smart air conditioners, smart range hoods, smart refrigerators, smart ovens, smart stoves, smart washing machines, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual systems, smart sockets, smart speakers, smart speakers, smart ventilation systems, smart kitchen and bathroom equipment, smart bathroom fixtures, smart robot vacuums, smart window cleaning robots, smart mopping robots, smart air purifiers, smart steam ovens, smart microwave ovens, smart water heaters, smart air purifiers, smart water dispensers, and smart door locks, etc.
[0081] The technical solutions of this application and how they solve the aforementioned technical problems are described in detail below with specific embodiments. These specific embodiments may exist independently or in combination with each other. Similar or identical concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0082] This embodiment provides an intelligent decision-making method. Figure 1 The flow of the intelligent decision-making method provided in the embodiments of this application Figure 1 The method includes:
[0083] S101 The intelligent agent module responds to the request information output by the user and determines the reasoning result corresponding to the request information through the large language model. The reasoning result includes the action plan corresponding to the request information.
[0084] In this step, the request information refers to a high-level goal statement or problem description presented by the user to the intelligent agent module. It contains the final task to be completed or the core question to be answered. The request information is equivalent to a clear final goal, but the specific path, required data, or operations to achieve this goal are not predetermined and cannot be directly achieved through a single, fixed rule or instruction. The intelligent agent module must first perform task analysis and solution design, dynamically decomposing and planning a complex macro-goal into an ordered, executable sequence of micro-steps. The reasoning result refers to the intermediate conclusion generated by the large language model after step-by-step analysis and logical thinking of the user request; it includes the thought process leading to the final answer. The action plan is the core part of the reasoning result, describing the execution operations required to answer the user request.
[0085] Therefore, the intelligent agent module needs to implement this reasoning process through a large language model. When the large language model performs reasoning and generates an action plan, it essentially mimics the natural thinking process of humans solving problems: first, it analyzes the problem using internal logic, and then describes the solution steps using fluent natural language. Its output is unstructured natural language. For example, a user asks, "What are the latest research advances on a certain cutting-edge technology?" To provide an accurate answer, the large language model needs to generate an action plan, whose core steps might include: searching for specific keywords related to the query content to obtain the latest information and extracting and summarizing key points from the search results.
[0086] S102, The intelligent agent module sends the inference results to the action parsing module.
[0087] Correspondingly, the action parsing module receives the inference results sent by the intelligent agent module.
[0088] It should be noted that the intelligent agent module can be a coordinator service in a microservice architecture or the main program of a monolithic application, responsible for overall task scheduling and final decision-making. The action parsing module can be a standalone rule engine service or an embedded function library, which transforms flexible natural language plans into standardized, securely executable instructions through preset rule sets.
[0089] S103. The action parsing module determines the action instruction corresponding to the reasoning result based on the preset action rule set. The action rule set is used to indicate at least one of the action types, action parameters and output formats that the large language model can generate.
[0090] In this step, the action rule set refers to a predefined, configurable rule base that clearly defines the system's capability boundaries. Specifically, this includes, but is not limited to, the types of actions that can be generated, action parameters, and output formats. An action type is a categorized list or whitelist of all executable operations; each action type corresponds to a specific, implemented function or tool. Action parameters are the input information or configuration options necessary to execute a specific action type, defining the specific content or execution conditions required for the action. The output format refers to the standardized data structure that the action instruction itself must follow. It defines how the action parsing module should organize the action type and action parameters when generating the final instruction, so that the intelligent agent module can unambiguously parse and invoke the target tool.
[0091] For example, unstructured action plans can be processed using natural language understanding. Keyword matching, regular expressions, or lightweight text classification models can be used to identify the action type corresponding to the user's intent (such as data query or information search). Then, named entity recognition or template matching methods can be used to extract the parameters required to perform the action (such as query conditions and search keywords) from the plan text. Finally, these elements are assembled into a standard action instruction according to the output format specified by the action rule set.
[0092] Alternatively, for action plans with relatively fixed structures, a finite state machine or decision tree can be used to jump between different states based on key nodes in the plan text (such as "first", "then", "query", "calculate"). Each time a specific state is reached, a corresponding standard action instruction with preset parameters or that can be deduced from the context is triggered.
[0093] S104. The action parsing module sends the action instructions to the intelligent agent module.
[0094] Correspondingly, the intelligent agent module receives the corresponding action instructions output by the action parsing module.
[0095] S105. The intelligent agent module calls the corresponding target tool to execute the action command based on the action command and obtains the execution result returned by the target tool.
[0096] In this step, the target tool refers to a callable capability unit that carries specific functions, such as a microservice, application programming interface, database query engine, user-defined function, or third-party service. The execution result refers to the structured or semi-structured data returned by the target tool after completing the action instructions.
[0097] For example, an internal service registry can be maintained, recording the mapping between each action type and the network address of a specific tool service. Upon receiving an action command, the intelligent proxy module queries the registry, finds the corresponding service endpoint, sends the action parameters to the target tool via remote procedure call, and synchronously waits for and receives the execution result. Alternatively, various tool functions can be encapsulated as local plugins or functions, and a local plugin library can be maintained. Based on the type in the action command, the intelligent proxy module directly loads the corresponding plugin or function from the library, executes the call within the local process, and returns the result.
[0098] S106. The intelligent agent module determines the final decision result corresponding to the request information through a large language model based on historical output information, and outputs the final decision result to the user. The historical output information includes request information, inference results, action instructions, and execution results.
[0099] In this step, historical output information refers to a complete record of all key intermediate states and results generated throughout the entire execution process from S101 to S105, which constitutes the entire context for making the final decision. The final decision result refers to the user-oriented, conclusive final output generated by the large language model after fully understanding and integrating all historical information.
[0100] For example, the intelligent agent module can assemble the entire historical output information (user requests, model-generated inference results, executed action instructions, and tool-returned execution results) into a large prompt context in chronological order. Based on this context, explicit instructions are added, such as "Based on all the information and results obtained from the above steps, please provide a comprehensive and accurate final answer to the user's initial question."
[0101] For example, determining the final decision result corresponding to the requested information through a large language model includes:
[0102] Obtain the response content corresponding to the request information output by the large language model based on historical output information;
[0103] Check if the reply contains an ending tag;
[0104] If not, the steps of determining the latest inference result and the latest response content through the large language model are executed repeatedly until the latest response content is output with an end tag.
[0105] In each iteration, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical iteration.
[0106] In this example, the end label refers to a predefined, special text marker or signal used to indicate that the large language model considers the current task complete, and its generated response can serve as the final decision result for the user. For example, the end label can be a specific string, such as [FINAL_ANSWER]. <end>It can also be a specific structured field in the model output.
[0107] In this example, considering that some requested information may be complex, involving correspondingly complex and cumbersome operations, the generation of the final decision can be a dynamic, iterative exploratory process. By introducing an end label as a judgment criterion, a loop process is initiated: when the response given by the large language model based on existing information is incomplete or not the final answer (i.e., without an end label), it is considered an intermediate conclusion, and a new round of reasoning-action-observation process is automatically triggered, incorporating newly acquired information and requesting the large language model to make a judgment and generate the result again. This process repeats until the large language model itself determines that the problem has been solved and actively marks the task completion by outputting an end label; only then is the response generated the true final decision result.
[0108] This example, through multiple rounds of iterative iteration, allows for subsequent steps to be taken to explore and supplement information when initial information is insufficient or the first action fails to fully resolve the issue, thereby significantly improving the accuracy and completeness of the final decision.
[0109] For example, determining the inference result corresponding to the request information through a large language model includes:
[0110] Based on the request information and the preset first prompt word template, the corresponding first prompt word is obtained. The first prompt word includes the request information, background information and output convention information.
[0111] Input the first prompt word into the large language model to obtain the inference result output by the large language model.
[0112] In this example, the first prompt template refers to a predefined, structured text framework containing specific placeholders. Different content (such as user requests and background information) can be automatically populated into these placeholders to form the final instruction (i.e., the first prompt) sent to the large language model. Explanation refers to the contextual information added to the first prompt template, beyond the original user request, during prompt generation, providing the large language model with richer decision-making support. For example, this may include system role settings, relevant domain knowledge fragments, etc. Output convention information refers to the explicit instructions in the prompt to the large language model regarding the format and content rules its response must follow. For example, this may include the requirement to include a reasoning process and action plan (i.e., the reasoning result), as well as format and grammatical requirements.
[0113] This example improves the reliability of large language model output and the overall stability of the system through a structured and standardized interaction method.
[0114] The intelligent decision-making method provided in this application involves an intelligent agent module parsing user requests using a large language model to generate inference results containing action plans. These inference results are then processed by a dedicated action parsing module, which outputs standardized action instructions based on a preset set of action rules. The module then invokes the corresponding target tool to perform the operation according to the action instructions and obtains the execution results. Finally, combining historical interaction information, the large language model generates the final decision result and returns it to the user. This method improves the reliability of system execution by standardizing instruction generation through action rule sets; it enhances the system's security control capabilities by designing the action parsing module independently; and it adopts a modular architecture, allowing updates and expansions of action rules without modifying the core inference module, significantly improving system maintainability and iteration efficiency.
[0115] This embodiment provides an intelligent decision-making method. Figure 2 The flow of the intelligent decision-making method provided in the embodiments of this application Figure 2 .like Figure 2 As shown, applied to the action parsing module, this method includes:
[0116] S201, Receive the inference results sent by the intelligent agent module.
[0117] S202. Based on the reasoning results, determine the corresponding task type.
[0118] In this step, the task type is used to classify the business requirements involved in the requested information (e.g., data retrieval task, approval process task, information analysis task), with the aim of matching a complete set of corresponding rules in the future.
[0119] For example, a list of task types and their corresponding keywords or patterns can be predefined. For instance, when words like "query," "get," or "search" appear in the inference results, they are categorized as "data retrieval tasks"; when words like "whether," "approval," or "agree" appear, they are categorized as "approval process tasks." The action parsing module can determine the final task type by scanning the inference result text and matching these predefined rules.
[0120] Alternatively, a lightweight text classification model can be used. This model is trained to automatically categorize the inference results of natural language descriptions into predefined task types. This approach better understands context and semantics, and is more accurate than rule-based methods for classifying complex or implicit intentions.
[0121] S203. Based on the task type, determine the corresponding action rule list. The task type and the action rule list have a one-to-one correspondence.
[0122] In this step, the action rule list is a collection of permitted actions and their constraints, bound to a specific task type. For example, the rule list for a data retrieval task might allow actions such as querying a database and searching a knowledge base; while the list for an approval process task might allow updating status and sending notifications. Exemplarily, all action rules can be stored in a central rule base or database. When the rule list for a specific task type needs to be retrieved, the action parsing module sends a query request to the rule base, filtering out all currently valid action rules belonging to that type using the task type field or its corresponding identifier.
[0123] S204. Determine the user type corresponding to the user identifier based on the user identifier.
[0124] S205. Determine at least one target action rule in the action rule list that matches the user type, and obtain the action rule set based on the at least one target action rule.
[0125] S206. Based on the preset action rule set, determine the action command corresponding to the reasoning result and send the action command to the intelligent agent module.
[0126] It should be noted that user types can be categorized based on permissions, roles, or levels, such as administrators, regular users, employees of department A, etc. For example, after the action parsing module holds a user identifier, it can initiate a query to a directory service such as a user information database to retrieve the predefined user type or role fields from the user's profile based on the user identifier.
[0127] Target action rules refer to the specific action rules that are explicitly allowed for the current user under this task type, after filtering by user type. Each rule, in addition to defining the action, also associates its required parameters and output format. For example, each rule in the action rule list can have a allowed user type field. By traversing the entire list and matching the current user's user type against this field, all matching rules together constitute the final, personalized set of action rules.
[0128] For example, based on a preset set of action rules, the action instruction corresponding to the reasoning result is determined, including:
[0129] Based on the reasoning results and the preset action rule set, determine the second prompt word;
[0130] The second prompt word is input into the large language model, and the action command output by the large language model is obtained.
[0131] In this example, the second cue word is a cue word used to instruct the large language model to perform instruction conversion, which includes, but is not limited to, unstructured inference results and structured action rule sets.
[0132] For example, the second cue word can include the following:
[0133] 1. Role Positioning:
[0134] Example: You are a reasoning assistant. Please analyze the following reasoning results and determine which action should be taken next.
[0135] 2. Reasoning results:
[0136] {The newly generated inference result text}
[0137] 3. Action type list:
[0138] Example:
[0139] search (query): Used when you need to find information.
[0140] calculate (expression): Used when mathematical calculations are required.
[0141] 4. Output Conventions:
[0142] Please output your judgment strictly according to the following JSON format:
[0143] "reasoning": "Briefly explain why this action was chosen".
[0144] "action": "action name",
[0145] "parameters": Parameters required for the action.
[0146] "query": "If it's a search, put the search terms here."
[0147] "expression": "If it's a calculation, put the expression here."
[0148] "answer": "If it's complete, put the final answer here."
[0149] This example significantly improves the parsing ability and robustness for complex, ambiguous, or unseen action plans while ensuring that the output instructions are standardized and controllable.
[0150] For example, the method also includes:
[0151] In response to the adjustment instructions output by the operation side, the action rule set is updated to obtain the updated action rule set. The adjustment instructions are used to instruct at least one of adding, modifying, or deleting content in the action rule set.
[0152] In this example, during the actual operation and maintenance and continuous improvement phase, when operation and management personnel are monitoring business performance or responding to new compliance requirements and business needs, if they find that the existing action rule set is insufficient (such as the lack of a necessary action, inaccurate existing rule parameters, or the need to disable a high-risk action), they can directly add, delete, and modify the content of the action rule set in real time through specific methods, such as a dedicated operation management interface, thereby dynamically adjusting and optimizing the behavior capabilities and boundaries of the intelligent agent.
[0153] The intelligent decision-making method provided in this embodiment combines business scenarios with user permissions, which not only ensures the high accuracy of action command generation and business compliance, but also realizes flexible configuration and security isolation of permission management, thereby significantly improving the adaptability of intelligent agents in complex and ever-changing real-world application environments.
[0154] Figure 3 This is a timing diagram illustrating the operation of an intelligent decision-making application scenario provided in an embodiment of this application. Figure 3 As shown, the user outputs a request message, the intelligent agent module receives the request message, and calls the large language model so that the large language model outputs an unstructured reasoning result based on the first prompt word and the request message.
[0155] Furthermore, the intelligent agent module sends the reasoning result to the action parsing module, which then calls the large language model again so that the large language model can output structured action instructions based on the second prompt word containing the reasoning result and the preset action rule set.
[0156] Furthermore, the action parsing module calls a structured text parsing tool to parse the action instruction, thereby obtaining a directly executable parsed action instruction, and returns the parsed action instruction to the intelligent agent module.
[0157] The intelligent agent module executes the parsed action command by calling the corresponding target tool and obtains the execution result. The intelligent agent module then calls the large language model again, so that the large language model outputs the corresponding response content based on the historical output information, namely the previous request information, inference results, action commands, and execution results.
[0158] Furthermore, the intelligent agent module determines whether the current response content carries an ending tag;
[0159] If no end label is provided, the steps described above for determining the latest inference result and the latest response content using the large language model are repeated until the latest response content is output with an end label. In each iteration, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical iteration.
[0160] If an ending tag is included, the current response content represents the final decision result corresponding to the requested information, and the final decision result will be output to the user.
[0161] This embodiment also provides an intelligent decision-making device. Figure 4 A diagram of an intelligent decision-making device provided in an embodiment of the present invention is shown, such as... Figure 4 As shown, the intelligent decision-making device 40, applied to the intelligent agent module, includes:
[0162] The response module 401 is used to respond to the request information output by the user and determine the reasoning result corresponding to the request information through the large language model. The reasoning result includes the action plan corresponding to the request information.
[0163] The sending module 402 is used to send the inference result to the action parsing module and receive the corresponding action instruction output by the action parsing module. The action instruction is determined by the action parsing module based on the preset action rule set and the inference result. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate.
[0164] The calling module 403 is used to call the corresponding target tool to execute the action instruction according to the action instruction, and to obtain the execution result returned by the target tool;
[0165] The output module 404 is used to determine the final decision result corresponding to the request information based on the historical output information through the large language model, and output the final decision result to the user. The historical output information includes the request information, reasoning result, action instruction and execution result.
[0166] In one possible implementation, output module 404 is specifically used for:
[0167] Obtain the response content corresponding to the request information output by the large language model based on historical output information;
[0168] Check if the reply contains an ending tag;
[0169] If not, the steps of determining the latest inference result and the latest response content through the large language model are executed repeatedly until the latest response content is output with an end tag.
[0170] In each iteration, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical iteration.
[0171] In one possible implementation, response module 401 is specifically used for:
[0172] Based on the request information and the preset first prompt word template, the corresponding first prompt word is obtained. The first prompt word includes the request information, background information and output convention information.
[0173] Input the first prompt word into the large language model to obtain the inference result output by the large language model.
[0174] This embodiment also provides an intelligent decision-making device. Figure 5 A diagram of an intelligent decision-making device provided in an embodiment of the present invention is shown, such as... Figure 5 As shown, the intelligent decision-making device 50, applied to the action analysis module, includes:
[0175] The receiving module 501 is used to receive the inference results sent by the intelligent agent module. The inference results are determined by the intelligent agent module in response to the request information output by the user through the large language model. The inference results include the action plan corresponding to the request information.
[0176] The determination module 502 is used to determine the action instruction corresponding to the reasoning result according to the preset action rule set. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate.
[0177] The sending module 503 is used to send action instructions to the intelligent agent module, so that the intelligent agent module calls the corresponding target tool to execute the action instructions, obtains the corresponding execution results, and determines the final decision result corresponding to the request information through a large language model based on historical output information, and outputs the final decision result to the user.
[0178] In one possible implementation, the determining module 502 is specifically used for:
[0179] Based on the reasoning results and the preset action rule set, determine the second prompt word;
[0180] The second prompt word is input into the large language model, and the action command output by the large language model is obtained.
[0181] In one possible implementation, the inference result also includes the user's user identifier, and the determining module 502 is further used for:
[0182] Based on the reasoning results, determine the corresponding task type;
[0183] Based on the task type, determine the corresponding list of action rules. There is a one-to-one correspondence between task types and list of action rules.
[0184] Based on the user identifier, determine the user type corresponding to the user identifier;
[0185] Identify at least one target action rule in the action rule list that matches the user type, and obtain the action rule set based on the at least one target action rule.
[0186] In one possible implementation, the determining module 502 is further configured to:
[0187] In response to the adjustment instructions output by the operation side, the action rule set is updated to obtain the updated action rule set. The adjustment instructions are used to instruct at least one of adding, modifying, or deleting content in the action rule set.
[0188] The intelligent decision-making device provided in this embodiment can execute the intelligent decision-making method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0189] Figure 6 This is a hardware schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. The device 60 also includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0190] In the specific implementation process, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above method.
[0191] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0192] In the above Figure 6 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0193] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0194] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0195] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described above.
[0196] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0197] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0198] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0199] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0200] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0201] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0202] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0203] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.< / end>
Claims
1. An intelligent decision-making method, characterized in that, Applied to an intelligent agent module, the method includes: In response to the request information output by the user, the reasoning result corresponding to the request information is determined through a large language model, and the reasoning result includes the action plan corresponding to the request information; The inference result is sent to the action parsing module, and the corresponding action instruction output by the action parsing module is received. The action instruction is determined by the action parsing module based on a preset action rule set and the inference result. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate. According to the action instruction, the corresponding target tool is invoked to execute the action instruction, and the execution result returned by the target tool is obtained; Based on historical output information, the final decision result corresponding to the request information is determined through the large language model, and the final decision result is output to the user. The historical output information includes the request information, reasoning result, action instruction, and execution result.
2. The intelligent decision-making method according to claim 1, characterized in that, The step of determining the final decision result corresponding to the request information through the large language model includes: Obtain the response content corresponding to the request information output by the large language model based on historical output information; Determine whether the response content contains an end tag; If not, the steps of determining the latest inference result and the latest response content through the large language model are executed repeatedly until the latest response content is output with the end tag. In each iteration of the loop, the large language model determines the latest inference result and the latest response content based on the latest historical output information. The latest historical output information includes the request information, as well as the inference result, action instruction, and execution result corresponding to each historical loop.
3. The intelligent decision-making method according to claim 1, characterized in that, The step of determining the inference result corresponding to the request information through a large language model includes: Based on the request information and the preset first prompt word template, the corresponding first prompt word is obtained. The first prompt word includes the request information, background information and output convention information. The first prompt word is input into the large language model to obtain the reasoning result output by the large language model.
4. An intelligent decision-making method, characterized in that, Applied to the action parsing module, the method includes: The system receives inference results sent by the intelligent agent module. These inference results are determined by the intelligent agent module in response to user-output request information, using a large language model. The inference results include the action plan corresponding to the request information. Based on a preset set of action rules, the action instruction corresponding to the reasoning result is determined. The set of action rules is used to indicate at least one of the action types, action parameters, and output formats that the large language model can generate. The action command is sent to the intelligent agent module, so that the intelligent agent module calls the corresponding target tool to execute the action command, obtains the corresponding execution result, and determines the final decision result corresponding to the request information through the large language model based on the historical output information, and outputs the final decision result to the user.
5. The intelligent decision-making method according to claim 4, characterized in that, The step of determining the action instruction corresponding to the reasoning result based on a preset action rule set includes: Based on the reasoning result and the preset action rule set, determine the second prompt word; The second prompt word is input into the large language model to obtain the action command output by the large language model.
6. The intelligent decision-making method according to claim 4, characterized in that, The reasoning result also includes the user's user identifier. Before determining the action instruction corresponding to the reasoning result based on a preset action rule set, the method further includes: Based on the reasoning results, the corresponding task type is determined; Based on the task type, a corresponding list of action rules is determined, and the task type and the list of action rules are in a one-to-one correspondence. Based on the user identifier, determine the user type corresponding to the user identifier; Determine at least one target action rule in the action rule list that matches the user type, and obtain the action rule set based on the at least one target action rule.
7. The intelligent decision-making method according to claim 4, characterized in that, The method further includes: In response to the adjustment command output by the operation terminal, the action rule set is updated to obtain an updated action rule set. The adjustment command is used to instruct at least one of adding, modifying, or deleting content in the action rule set.
8. An intelligent decision-making device, characterized in that, The device, applied to an intelligent agent module, includes: The response module is used to respond to the request information output by the user and determine the reasoning result corresponding to the request information through a large language model. The reasoning result includes the action plan corresponding to the request information. The sending module is used to send the inference result to the action parsing module and receive the corresponding action instruction output by the action parsing module. The action instruction is determined by the action parsing module based on a preset action rule set and the inference result. The action rule set is used to indicate at least one of the action type, action parameters and output format that the large language model can generate. The invocation module is used to invoke the corresponding target tool to execute the action instruction according to the action instruction, and obtain the execution result returned by the target tool; The output module is used to determine the final decision result corresponding to the request information based on the historical output information through the large language model, and output the final decision result to the user. The historical output information includes the request information, reasoning result, action instruction and execution result.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
10. An electronic device, characterized in that, include: At least one processor and memory; wherein, The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 1-7.
