Decision generation execution method and system based on AI intelligent agent
Through the decision generation method based on AI agents, natural language processing and graph neural networks are used to evaluate the confidence of decision solutions, the problem of difficult decision quality in traditional systems is solved, and efficient and reliable intelligent decision support is achieved.
Patent Information
- Application Number
- CN202510610130.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-13
AI Technical Summary
Traditional decision support systems cannot independently evaluate the quality of decisions after understanding user needs, resulting in high demand for manual intervention in the decision-making process, low degree of automation, and difficult to ensure the quality of decisions, especially in high-risk areas, there are hidden dangers of serious consequences.
The decision-making generation method based on AI agents is adopted, user demand documents are analyzed through natural language processing, structured prompt words are constructed, preliminary decision-making plans are generated in combination with professional field databases, and the adversarial introspection probes and graph neural networks are used to evaluate the confidence of the decision-making plans, and the execution script is automatically generated.
It realizes seamless automation from requirements understanding to execution, improves decision-making efficiency and accuracy, reduces the risk of wrong decisions, provides quantitative guarantees for decision-making reliability, and is suitable for intelligent decision-making support in complex environments.
Smart Images

Figure CN120524939A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a decision-making generation and execution method and system based on an AI agent. Background Art
[0002] Traditional decision support systems often suffer from a "understanding-execution" gap: This means the system may understand user needs but be unable to independently assess the quality of the decision, or it may be able to execute an action but lack a deep understanding of its rationality. This results in a high demand for human intervention in the decision-making process, a low level of automation, and difficulty ensuring decision quality. This is particularly true in high-risk sectors such as finance, healthcare, and industrial control systems, where incorrect decisions can have serious consequences. Traditional systems lack adequate mechanisms to ensure decision reliability. Furthermore, existing systems often lack self-assessment and reflection capabilities, preventing them from fully validating decisions before execution. This makes it difficult to promptly identify and address blind spots and risks in the decision-making process. This issue of automating and ensuring quality throughout the entire process, from needs understanding to final execution, has long been a core challenge in the field of intelligent decision-making systems, directly impacting the availability and reliability of automated decision-making systems in critical business scenarios. Summary of the Invention
[0003] The present invention provides a decision generation and execution method and system based on AI intelligent agent to solve the problem of poor reliability of decision solutions automatically generated by intelligent decision systems.
[0004] In a first aspect, the present invention provides a decision generation and execution method based on an AI agent, the method comprising the following steps:
[0005] Use natural language processing technology to parse the user-entered requirement documents and build a structured prompt word project based on the key requirement information and constraints extracted from the analysis;
[0006] Input the prompt word project into the private domain AI agent with the big model as the underlying engine. The private domain AI agent generates a preliminary decision plan by combining it with the professional domain database corresponding to the requirement document.
[0007] Generate a set of adversarial introspection probe prompts based on the preliminary decision plan. The probe prompts are used to guide the private domain AI agent to evaluate the internal consistency, potential risks or constraint compliance of the preliminary decision plan;
[0008] Input the probe prompt word into the private domain AI agent and obtain the private domain AI agent's feedback response to the preliminary decision plan;
[0009] Analyze feedback responses using a pre-trained graph neural network and assess the confidence score of the initial decision solution;
[0010] When the confidence score meets the preset threshold, the execution script is automatically generated based on the preset script template and the preliminary decision plan or the decision plan revised based on the feedback response;
[0011] By executing the script and calling the preset application programming interface, the corresponding target software or system automatically operates to execute the decision plan and generate a decision execution document.
[0012] Optionally, the step of parsing the user input requirement document using natural language processing technology and constructing a structured prompt word project based on the key requirement information and constraints extracted from the parsing includes the following steps:
[0013] Receive a requirement document containing a natural language description through a preset user interaction interface;
[0014] Perform natural language processing on the requirements document to identify key entities in the requirements document and the relationships between key entities. Natural language processing includes performing word segmentation, part-of-speech tagging, named entity recognition, and relationship extraction.
[0015] Identify the user's core needs and intentions based on the results of natural language processing, and fill in the predefined slot information associated with the core needs and intentions;
[0016] Extract the constraints and pre-conditions for decision execution from the requirements document explicitly or implicitly;
[0017] Combining core demand intent with predefined slot information and based on preset prompt word templates, a structured prompt word project containing constraints and pre-rules is constructed.
[0018] Optionally, the step of inputting the prompt word project into a private domain AI agent using the large model as the underlying engine, and generating a preliminary decision plan through the private domain AI agent in combination with the professional domain database corresponding to the requirement document includes the following steps:
[0019] Dynamically determine the retrieval strategy based on the task complexity and domain specificity of the prompt word project;
[0020] Perform multi-stage search in the professional domain database corresponding to the requirement document according to the search strategy to obtain multiple knowledge fragments;
[0021] All knowledge fragments are confidence-weighted and fused. The weights are calculated based on the reliability of the source, timeliness, and relevance of the knowledge fragments to the current task. The weighted fused knowledge content is then injected into the prompt word project.
[0022] The enhanced prompt word engineering containing weighted fusion knowledge is input into the private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan containing steps, dependencies, expected intermediate states, required resources and preliminary risk assessment, and outputs the preliminary decision plan in a graphical or semi-structured format.
[0023] Optionally, generating a set of adversarial introspection probe prompt words based on the preliminary decision plan includes the following steps:
[0024] Construct decision logic diagrams by parsing graphical or semi-structured data of preliminary decision solutions;
[0025] Identify the topological structure of the decision logic diagram and the key decision nodes in the topological structure;
[0026] The probe generator is trained based on a generative adversarial network and generates adversarial introspection probe prompts for private domain AI agents according to the topological structure and key decision nodes.
[0027] Optionally, the probe prompt word types include causal chain tracing probes, resource conflict detection probes, secondary effect prediction probes, model vulnerability detection probes, and ethics and compliance boundary probes.
[0028] Optionally, analyzing the feedback response using a pre-trained graph neural network to evaluate the confidence score of the preliminary decision solution includes the following steps:
[0029] The cross-response attention model is used to analyze the mutual confirmation or contradiction between the feedback responses corresponding to each probe prompt word to obtain the hidden logic evaluation results;
[0030] Use a Transformer-based natural language inference model to identify the relationship between feedback responses and preliminary decision plans;
[0031] Quantify risk indicators and uncertainty expressions in feedback responses into risk levels;
[0032] The decision logic diagram, feedback response, hidden logic evaluation results, correlation relationships and risk levels are input into a pre-trained graph neural network, and the confidence score of the preliminary decision plan is output through the graph neural network.
[0033] Optionally, the method further comprises the following steps:
[0034] When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence in the decision logic diagram is located based on the hidden logic evaluation results and association relationships;
[0035] Generate structured remediation recommendations with guided remediation directions for root cause nodes;
[0036] Integrate structured correction suggestions into the prompt word project and adjust the reasoning parameters of the private domain AI agent according to the structured correction suggestions;
[0037] The probe prompt word generation step, feedback response acquisition step and confidence evaluation step are repeatedly executed, and the preliminary decision plan is continuously revised using an iterative optimization process based on Monte Carlo tree search until the confidence score of the preliminary decision plan meets the preset threshold.
[0038] Optionally, referring to a preset script template and automatically generating an execution script according to a preliminary decision plan or a decision plan revised based on feedback responses includes the following steps:
[0039] Generate a script execution dependency graph based on the step dependencies and data flows in the preliminary decision plan or the revised decision plan;
[0040] Generate script code using program synthesis technology combined with a preset script template library and the semantic description of the decision-making plan;
[0041] Based on the potential risks assessed by the probe prompt words, dynamic assertions are injected into the generated script code to verify the execution status in real time during script execution;
[0042] Generate the corresponding idempotent compensation script for the step that defines the compensation operation, and associate the idempotent compensation script with the main execution script in the script code;
[0043] Use formal methods to statically verify the script properties of script code and idempotent compensation scripts;
[0044] Assemble the verified script code and idempotent compensation script into a deployable execution script package according to the script execution dependency graph.
[0045] In a second aspect, the present invention also provides a decision generation and execution system based on an AI agent, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the decision generation and execution method based on the AI agent as described in the first aspect is implemented.
[0046] In a third aspect, the present invention also provides a computer-readable storage medium having instructions stored thereon, which, when executed by a processor, configures the processor to execute the decision-making generation execution method based on the AI agent described in the first aspect.
[0047] The beneficial effects of the present invention are:
[0048] The present invention utilizes structured prompt word engineering technology to effectively solve the problem of converting unstructured requirements into precise instructions, greatly improving the accuracy of understanding requirements; by introducing an adversarial introspection probe mechanism, the system can actively discover potential defects and risk points in decision-making solutions, and realize self-verification of decision-making quality, which is almost impossible to achieve in traditional systems; furthermore, the confidence assessment mechanism based on graph neural networks provides quantitative guarantees for decision reliability, enabling the system to objectively evaluate the quality of decision-making solutions and decide whether to execute them accordingly, significantly reducing the risk of wrong decisions; the present invention realizes seamless connection from decision generation to script execution automation, greatly reducing the manual intervention link and improving decision execution efficiency; through deep integration with professional field databases, the present invention can provide more professional and accurate decision support in specific fields, overcoming the problem of knowledge limitations of general systems. In summary, the present invention constructs an intelligent decision-making ecosystem that is self-learning, self-verified, and automatically executed, which not only greatly improves decision-making efficiency and accuracy, but also reduces decision-making risks through a built-in quality assurance mechanism, providing a new technical path for organizations to make intelligent decisions in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of a decision-making generation and execution method based on an AI agent in one embodiment of the present application.
[0050] Figure 2 This is a schematic diagram of the framework of the decision-making generation and execution process based on the AI agent in one embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of this application.
[0052] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0053] Figure 1FIG. 1 is a flow chart of a decision generation and execution method based on an AI agent in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps in the above process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps. Figure 1 As shown, the decision generation and execution method based on AI agent disclosed in the present invention specifically includes the following steps:
[0054] S101. Use natural language processing technology to parse the requirement document input by the user, and build a structured prompt word project based on the key requirement information and constraints extracted from the analysis.
[0055] Among them, reference Figure 2 First, word segmentation techniques are used to break the text into its smallest semantic units, such as using conditional random fields (CRFs) or BERT-based word segmentation models. Part-of-speech tagging is then performed to identify nouns, verbs, adjectives, and other entities, using hidden Markov models (HMMs) or recurrent neural networks (RNNs). Named entity recognition is then performed to mark key entities in the document, such as names, organizations, dates, and numbers, typically using BiLSTM-CRF or BERT-NER models. Relationship extraction identifies semantic connections between entities, such as the time constraint in "Task B needs to be completed by time A." Dependency parsing or deep learning models based on attention mechanisms can be used. Based on this, intent classification algorithms (such as support vector machines or Transformer-based classifiers) identify core demand intents, such as "optimize inventory" and "increase sales conversion rate," and populate predefined slots with information, such as "target value: increase by 20%" and "timeframe: next quarter." Constraints and preconditions are also extracted, either explicitly or implicitly, such as "budget does not exceed 100,000 yuan." Finally, based on the preset prompt word template (such as the "task type-goal-constraint-resource-deadline" structure), this information is organized into a structured prompt word project, forming formatted prompts such as "Please design a plan based on [domain knowledge] that can achieve [specific goal] within [time range], while meeting [constraints], and the available resources include [available resources]", providing a clear and unambiguous input framework for subsequent AI decision-making.
[0056] S102. Input the prompt word project into the private domain AI intelligent agent with the big model as the underlying engine, and generate a preliminary decision plan through the private domain AI intelligent agent and combined with the professional field database corresponding to the demand document.
[0057] Among them, the retrieval strategy is dynamically determined according to the complexity of the task and the specificity of the domain. For simple tasks, keyword matching based on TF-IDF or BM25 may be used; for complex tasks, semantic retrieval based on vector similarity is used, such as using models such as Sentence-BERT to convert prompt words into high-dimensional vectors (usually 768 dimensions or 1024 dimensions), and calculating the cosine similarity with the documents in the knowledge base. The retrieval strategy will also adjust the depth-first or breadth-first search method according to the urgency of the task. For example, a shallow but broad search is used for tasks with high timeliness requirements. Then a multi-stage retrieval is performed. The first stage may be a coarse-grained retrieval to obtain relevant documents; the second stage is a fine-grained retrieval to locate specific knowledge fragments; if necessary, a third stage of cross-document reasoning retrieval will be performed to integrate information from multiple sources. The acquired knowledge fragments are fused by confidence weighting, where the weight calculation formula is: W i =α·R i +β·T i +γ·S i , where R i Indicates source reliability (0-1 points), T i Represents timeliness (based on the decay function of the release time, such as ), S i represents the relevance to the current task (vector similarity score), while α, β, and γ are adjustable hyperparameters that sum to 1. This integrated knowledge is injected into the prompt word project to form enhanced prompt words, which are then fed into the private domain AI agent. Based on this injected domain knowledge and leveraging the reasoning capabilities of the large model, the agent generates a decision plan with clear steps, dependencies, expected intermediate states, required resources, and a preliminary risk assessment. This plan is then output in a graphical format (e.g., decision tree, flowchart) or semi-structured format (e.g., JSON, YAML) for easy subsequent processing and analysis.
[0058] S103. Generate a set of adversarial introspective probe prompt words based on the preliminary decision plan. The probe prompt words are used to guide the private domain AI agent to evaluate the internal consistency, potential risks or constraint compliance of the preliminary decision plan.
[0059] Among them, the graphical or semi-structured data (such as JSON, YAML or GraphML format) of the decision plan is converted into a computer-processable decision logic graph through a parser. The logic graph adopts a directed acyclic graph (DAG) structure, where nodes represent decision points or actions, and edges represent causal relationships or temporal dependencies. The formal representation of the graph is G = (V, E), where V is a node set and E is an edge set. Then, the topological structure of the decision logic graph is analyzed by graph theory algorithms, including calculating the in-degree and out-degree of nodes, identifying critical paths, and discovering strongly connected components. The identification of key decision nodes uses centrality metrics, such as betweenness centrality. where σ st is the number of shortest paths from s to t, σ st (v) is the number of shortest paths from s to t that pass through node v. Nodes with high betweenness centrality are often critical points in the decision-making process, and probing them effectively verifies the robustness of the decision-making solution. Subsequently, a probe generator based on a pre-trained generative adversarial network (GAN) creates probe prompts. The generator consists of a generative network G and a discriminative network D. G is responsible for creating probe prompts, while D evaluates the effectiveness of the probes. The training objective is to minimize the function:
[0060]
[0061] The generated probe prompts are designed to test the internal consistency, potential risks, or constraint compliance of different types of decision nodes, such as "If link A fails, how will the critical path of the entire plan be affected?" and "If resource X only reaches 80% of the expected level, can the plan still achieve its goals?", thus forming a comprehensive set of adversarial introspection probe prompts.
[0062] S104. Input the probe prompt word into the private domain AI agent, and obtain the private domain AI agent's feedback response to the preliminary decision plan.
[0063] Among them, each probe prompt word is structured and encapsulated to ensure that the prompt word can accurately trigger the specific cognitive path of the AI agent. The encapsulation format usually includes three parts: context information (key elements of the preliminary decision-making plan), probe core questions, and expected response format. For example, for a resource conflict detection probe, a possible encapsulation format is: "Considering that step A and step B in the decision-making plan require the use of resource X at the same time, please analyze whether there will be a resource competition problem when the capacity of resource X is [current set value]? If there is a problem, please specify the possible conflict scenario, the degree of impact (level 1-5) and possible solutions." The encapsulated probe prompt word is input into the private domain AI agent through the API interface or direct interaction. The calling parameters include temperature value (usually set low, such as 0.1-0.3, to obtain a highly deterministic response), top_p value (usually set to above 0.9), maximum number of tokens (set according to the expected response complexity, usually 1000-2000), etc.
[0064] After receiving the probe prompt, the private domain AI agent generates an analytical response to the preliminary decision plan based on its trained large-scale language model and injected domain knowledge. These responses typically include assessments across multiple dimensions, such as a logical consistency score (1-10 points), a list of potential risk points, constraint compliance analysis, and identification of sources of uncertainty. The response content is stored in a structured format, typically using JSON or a similar format, to facilitate subsequent automated processing and analysis. For example, in response to the probe "If customer requirements change mid-project, is the current decision path sufficiently adaptable?" the agent might return a structured response containing an adaptability score, possible adjustment points, and an estimated cost for the adjustment.
[0065] S105. Use the pre-trained graph neural network to analyze the feedback response and evaluate the confidence score of the preliminary decision solution.
[0066] Among them, the cross-response attention model is used to analyze the relationship between the corresponding feedback of each probe prompt word. This model is based on the multi-head self-attention mechanism, and the calculation formula is: Where Q, K, and V are query, key, and value matrices respectively, d k The key dimension is . This allows the model to identify mutually corroborating or contradictory relationships between feedback. For example, the response from Probe A indicates that the solution may fail under high load, while the response from Probe B indicates that the system is under-resourced during peak periods. Next, a Transformer-based natural language inference model (such as RoBERTa or DeBERTa) is used to identify the association between the feedback responses and the preliminary decision solution, classifying the relationship as supportive, neutral, or opposing.
[0067] At the same time, through sentiment analysis and keyword extraction technology, the risk indicators and uncertainty expressions in the feedback responses are quantified into risk levels, using a 5-level scale (level 1 is negligible risk and level 5 is serious risk). Subsequently, the decision logic graph is converted into an adjacency matrix and node feature matrix that can be processed by the graph neural network. The node features contain information such as decision point type, resource requirements, and time constraints. The graph neural network adopts a graph convolutional network (GCN) or graph attention network (GAT) architecture to aggregate node information through a message passing mechanism. After multiple layers of graph convolution, the network outputs a confidence score between 0 and 1, indicating the reliability of the decision plan. For example, 0.85 indicates that the plan has high reliability, while 0.45 indicates that the plan has significant problems and needs to be corrected.
[0068] S106. When the confidence score meets the preset threshold, an execution script is automatically generated based on the preset script template and the preliminary decision plan or the decision plan revised based on the feedback response.
[0069] Based on the step dependencies and data flows in the decision plan, a script execution dependency graph is generated. This graph is represented as a directed acyclic graph (DAG), with nodes representing execution steps and edges representing dependencies or data flows. The dependency graph construction algorithm analyzes semantic tags such as "preconditions" and "subsequent operations" in the decision plan and determines the execution order through topological sorting. Next, program synthesis technology combines a pre-set script template library with the semantic description of the decision plan to generate script code. This program synthesis utilizes a neural network-based code generation model (such as CodeT5 or GPT-Codex) to convert the natural language description of the decision steps into structured script code. For example, the step "extracting sales data from the database for the past 30 days and calculating the average" in the decision plan is converted into a corresponding SQL query or data processing script.
[0070] Based on the potential risks assessed by the probe prompt words, dynamic assertions can be injected into the generated script code, such as "assertresponse_time<5000, 'API response time exceeds the threshold'", to verify the execution status in real time. For steps that define compensation operations (such as database transactions, resource allocation, etc.), corresponding idempotent compensation scripts are generated to ensure safe rollback when the operation fails. The design of the compensation script follows the idempotence principle, that is, executing it multiple times has the same effect as executing it once. Subsequently, formal methods (such as model checking and symbolic execution) are used to statically verify the script code and compensation script to check for deadlocks, resource leaks, invalid states, and other problems. Finally, the verified script code and compensation script are assembled into a deployable execution script package according to the execution dependency graph, including the main execution script, error handling module, logging component, and monitoring interface, forming a complete execution unit.
[0071] S107. Calling a preset application programming interface by executing the script automatically operates the corresponding target software or system to execute the decision plan and generate a decision execution document.
[0072] First, a secure API connection channel is established, using authentication mechanisms such as OAuth2.0 or API keys to ensure authorized access. Once the connection is established, the execution script sequentially calls the target system's API in the order defined by the dependency graph, executing each step in the decision-making plan. API calls are asynchronous, using technologies such as Promises (JavaScript) or asyncio (Python) to handle concurrent requests and improve execution efficiency. Each API call is configured with a timeout mechanism and retry strategy, such as an exponential backoff algorithm (with an initial wait time of 100ms, doubling the wait time after each failure, and a maximum of three retries). Key metrics such as API response time, resource utilization, and error rate are monitored in real time during execution, triggering alerts when these metrics exceed preset thresholds. The execution script also maintains a state machine that records the execution status of each step (not started, in progress, completed, failed) and key output data. If a step fails, the failure type determines whether to retry, skip, or execute a compensation script. Upon completion, a decision execution document is automatically generated, including an execution summary (overall success rate, time consumption, and achievement of key indicators), a detailed execution log (inputs, outputs, time consumption, and status of each step), an analysis of any exceptions (if any), and follow-up recommendations. This document is stored in a structured format (such as HTML, PDF, or Markdown) and can be optionally distributed to relevant stakeholders, such as via email, internal corporate messaging tools, or stored in a document management system, ensuring transparency and traceability of the decision execution process.
[0073] In one embodiment, using natural language processing technology to parse the user input requirement document and constructing a structured prompt word project based on the key requirement information and constraints extracted from the parsing includes the following steps:
[0074] Receive a requirement document containing a natural language description through a preset user interaction interface;
[0075] Perform natural language processing on the requirements document to identify key entities in the requirements document and the relationships between key entities. Natural language processing includes performing word segmentation, part-of-speech tagging, named entity recognition, and relationship extraction.
[0076] Identify the user's core needs and intentions based on the results of natural language processing, and fill in the predefined slot information associated with the core needs and intentions;
[0077] Extract the constraints and pre-conditions for decision execution from the requirements document explicitly or implicitly;
[0078] Combining core demand intent with predefined slot information and based on preset prompt word templates, a structured prompt word project containing constraints and pre-rules is constructed.
[0079] In this embodiment, when receiving requirements documents containing natural language descriptions through a pre-set user interface, a multimodal interactive portal was designed, including a web form, a mobile application interface, and an internal enterprise portal. The interface utilizes a responsive design, automatically adapting to different device screen sizes. Users can directly enter their requirements descriptions in a text box or upload documents in formats such as Word and PDF, with the system automatically extracting the text content. To enhance the user experience, the interface also provides voice input, using real-time speech recognition technology to convert spoken requirements into text. After input is complete, the system displays a document preview, allowing the user to confirm the accuracy of the content. Furthermore, the interface records document metadata, such as submission time, user identity, and document source, which serves as context for subsequent processing. Natural language processing of the requirements document begins with word segmentation, breaking the text into its smallest semantic units. A character-level BiLSTM-based word segmentation model is used for Chinese text, achieving an accuracy rate exceeding 95%, while a rule-based word segmenter is used for English text. Part-of-speech tagging is then performed, using a hidden Markov model to assign a part-of-speech tag (e.g., noun, verb, adjective, etc.) to each word. Next, named entity recognition is performed, using the BiLSTM-CRF model to identify proper nouns, time expressions, quantity expressions, and other expressions in the text. Finally, relation extraction is performed, using dependency parsing and a BERT-based relation classifier to identify semantic relationships between entities, such as the temporal relationship in "A needs to be completed before B" or the constraint relationship in "C must not exceed D," thereby constructing a preliminary semantic network diagram.
[0080] A multi-layer classification strategy is employed to identify core user requirement intent based on natural language processing results. First, an intent classifier (based on a classification model fine-tuned with BERT) categorizes requirements into predefined high-level intent categories, such as "resource allocation," "process optimization," and "risk assessment." The classifier outputs a probability distribution, such as {resource allocation: 0.75, process optimization: 0.18, risk assessment: 0.07}, and the highest probability is selected as the main intent. Subsequently, a slot-filling model is activated for the identified main intent. Based on sequence labeling technology, this model maps key information in the text to predefined slots. For example, for the "resource allocation" intent, the relevant slots include "resource type," "allocation target," "time window," and "priority," thereby forming a structured requirement representation. To extract decision-making constraints and preconditions from the requirements document, a combination of explicit and implicit extraction methods is used. Explicit extraction uses keyword matching and syntactic pattern recognition to capture expressions containing explicit constraints such as "must," "must not," "at least," and "at most." For example, it identifies the numerical constraint in "The budget must not exceed 1 million yuan." Implicit extraction uses semantic-based reasoning to infer implicit constraints through contextual analysis. For example, human resource constraints can be inferred from "The project team includes 5 engineers." Extracted constraints are categorized by type (resource constraints, time constraints, quality constraints, etc.) and quantified into computable expressions, such as the time constraint "T (completion time) ≤ 2023-12-31." Preconditions are identified as condition-result pairs, such as "If A occurs, then execute B."
[0081] When constructing a structured prompt project based on core requirement intent and predefined slot information, the first step is to select a prompt template from a pre-set template library that best matches the current requirement intent. This template library contains standardized structures for different decision types, such as the "[Task Type] Decision Template" and the "[Resource Allocation] Optimization Template." After selecting a template, the filled-in slot information is inserted according to the placeholder positions in the template to form a preliminary prompt. The extracted constraints and pre-conditions are then converted into standardized expressions and added to the corresponding parts of the prompt. Finally, prompt enhancement techniques are applied, such as adding examples and clarifying output format requirements, to improve the accuracy of subsequent AI processing. The resulting structured prompt retains the semantic integrity of the original requirement while presenting it in a format that can be efficiently processed by AI.
[0082] In one embodiment, the prompt word project is input into a private domain AI agent based on a large model. The private domain AI agent generates a preliminary decision solution by combining it with the professional domain database corresponding to the requirements document, including the following steps:
[0083] Dynamically determine the retrieval strategy based on the task complexity and domain specificity of the prompt word project;
[0084] Perform multi-stage search in the professional domain database corresponding to the requirement document according to the search strategy to obtain multiple knowledge fragments;
[0085] All knowledge fragments are confidence-weighted and fused. The weights are calculated based on the reliability of the source, timeliness, and relevance of the knowledge fragments to the current task. The weighted fused knowledge content is then injected into the prompt word project.
[0086] The enhanced prompt word engineering containing weighted fusion knowledge is input into the private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan containing steps, dependencies, expected intermediate states, required resources and preliminary risk assessment, and outputs the preliminary decision plan in a graphical or semi-structured format.
[0087] In this embodiment, when dynamically determining the retrieval strategy based on the task complexity and domain specificity of the prompt word project, the semantic complexity of the prompt word is first analyzed by the complexity assessment module. This module calculates the number of entities, relationship complexity, and number of constraints in the prompt word, generating a complexity score (1-10 points). At the same time, the domain identifier determines the professional domain to which the prompt word belongs and its degree of specificity by matching the similarity with the predefined domain ontology. For example, if the risk assessment task in the financial field has a complexity of 8 points and a specificity of 9 points, a depth-first semantic retrieval strategy is selected; while a general market research task has a complexity of 4 points and a specificity of 3 points, a breadth-first keyword-enhanced retrieval is adopted. The strategy selection also takes timeliness into consideration. For urgent tasks, lightweight but efficient retrieval methods are preferred to ensure that sufficient relevant knowledge support is obtained within a limited time. When performing a multi-stage search in the professional domain database according to the determined retrieval strategy, the first stage performs a coarse-grained search, converting the prompt word into a query vector (using the domain-adapted Sentence-BERT model) and searching the vector database for the top N documents with the highest similarity (N is usually 50-100). The second stage performs fine-grained retrieval, breaking down the N documents into paragraphs. The similarity with the query vector is then recalculated, selecting the M most relevant paragraphs (M is typically 20-30). For complex tasks, a third stage of cross-document reasoning retrieval is performed, building a network of associations between knowledge entities using a graph database to identify indirect but important pieces of knowledge. Ultimately, a complete knowledge set is formed, encompassing both direct and indirect related information.
[0088] When all knowledge fragments are confidence-weighted and fused, a three-dimensional weight value is first calculated for each knowledge fragment. The source reliability weight is determined based on the authority score of the knowledge source, such as 0.9-1.0 for official documents, 0.7-0.9 for peer-reviewed research, and 0.3-0.6 for publicly available online materials. The timeliness weight is calculated using a time decay function, and the relevance weight is the cosine similarity between the knowledge fragment and the query vector. The weights of the three dimensions are weighted averaged to obtain the final weight. The knowledge content is fused according to the final weight, and high-weight content is retained first in the event of conflict. The fused knowledge is then injected into the prompt word project in the form of inline annotations or additional context. Next, the prompt word needs to be formatted to ensure that it meets the input requirements of the large model. The input format generally includes four parts: task description, background knowledge, constraints, and expected output format. Private domain AI agents generate preliminary decision plans based on large language models (such as fine-tuned versions of GPT or LLaMA), combined with domain knowledge enhancement and reasoning capabilities. The generation process utilizes a chain-of-thought approach, first analyzing the essence of the problem and then gradually building a solution. The resulting decision plan includes clear execution steps (typically 5-15 key steps), inter-step dependencies (pre-, post-, or parallel), a description of the expected intermediate states for each step, a list of required resources (human, material, time, budget, etc.), and a preliminary risk assessment (identification of risk points and recommended responses). The final plan is output in a graphical format (such as a BPMN flowchart or Gantt chart) or a semi-structured format (such as JSON or YAML) for easy processing and visualization.
[0089] In one embodiment, generating a set of adversarial introspection probe prompts based on a preliminary decision plan includes the following steps:
[0090] Construct decision logic diagrams by parsing graphical or semi-structured data of preliminary decision solutions;
[0091] Identify the topological structure of the decision logic diagram and the key decision nodes in the topological structure;
[0092] The probe generator is trained based on a generative adversarial network and generates adversarial introspection probe prompts for private domain AI agents according to the topological structure and key decision nodes.
[0093] In this embodiment, the probe prompt word types include causal chain tracing probes, resource conflict detection probes, secondary effect prediction probes, model vulnerability detection probes, and ethics and compliance boundary probes. To parse the graphical or semi-structured data of the preliminary decision plan and construct a decision logic diagram, it is first necessary to select the corresponding parser according to the data format. For JSON or YAML formats, a dedicated parsing library is used to extract structured data; for graphical formats such as BPMN or flowcharts, computer vision technology is used to identify nodes and connections. After parsing, the data is converted into a standardized graph structure representation using a directed graph G = (V, E) format, where V represents the set of decision nodes and E represents the set of relationships between nodes. Each node stores attribute information, including node type (decision point, action point, conditional branch, etc.), node description, execution conditions, resource requirements, etc.; edges store relationship types (causal relationship, temporal dependency, resource flow, etc.) and relationship strength. The constructed decision logic diagram is stored in the form of a memory object to facilitate subsequent analysis and processing.
[0094] Graph theory algorithms are applied to analyze the overall topological characteristics. Global metrics such as the graph diameter (the longest and shortest path lengths), average path length, and clustering coefficient are calculated to determine the complexity and closeness of the decision-making process. Key decision nodes are then identified, primarily using centrality metrics: degree centrality (the number of edges associated with a node) identifies highly connected nodes; betweenness centrality (the number of shortest paths passing through the node) identifies key points controlling information flow. The calculation formula is BC(v) = ∑(s≠v≠t)(σst(v) / σst), where σst is the number of shortest paths from s to t and σst(v) is the number of shortest paths passing through v; eigenvector centrality identifies nodes connected to other important nodes. Furthermore, community detection algorithms (such as the Louvain method) are applied to identify decision-making submodules and analyze inter-module dependencies.
[0095] Next, a dual-network architecture is constructed: the generator G is responsible for creating probe prompts, while the discriminator D evaluates the effectiveness of the probes. The generator inputs include the topological feature vector of the decision logic graph, key node attributes, and predefined probe templates; the output is structured probe prompts. During training, the generator learns to produce probes that maximize the discriminator's uncertainty, while the discriminator learns to distinguish valid from invalid probes, in a continuous game of optimization. In practice, prompts are generated for different probe types: causal chain tracing probes, such as "If assumption X in step A fails, how will the decision chain be affected?"; resource conflict detection probes, such as "When resource R is required by both steps B and C, how is the potential conflict resolved?"; secondary effect prediction probes, such as "What unintended consequences might arise from executing step D?"; model vulnerability detection probes, such as "To which external factors is the decision solution most sensitive?"; and ethical and compliance boundary probes, such as "Does the solution meet all the requirements of industry standard S?" These probe prompts specifically test the robustness and integrity of the decision solution.
[0096] In one embodiment, analyzing feedback responses using a pre-trained graph neural network to evaluate the confidence score of a preliminary decision solution includes the following steps:
[0097] The cross-response attention model is used to analyze the mutual confirmation or contradiction between the feedback responses corresponding to each probe prompt word to obtain the hidden logic evaluation results;
[0098] Use a Transformer-based natural language inference model to identify the relationship between feedback responses and preliminary decision plans;
[0099] Quantify risk indicators and uncertainty expressions in feedback responses into risk levels;
[0100] The decision logic diagram, feedback response, hidden logic evaluation results, correlation relationships and risk levels are input into a pre-trained graph neural network, and the confidence score of the preliminary decision plan is output through the graph neural network.
[0101] In this embodiment, when using the cross-response attention model to analyze the mutual confirmation or contradiction relationship between the feedback responses corresponding to each probe prompt word, all feedback response texts are first converted into vector representations. A pre-trained language model (such as BERT or RoBERTa) is used to encode each response into a high-dimensional vector, and then an attention matrix is constructed to calculate the attention score between each pair of responses. Through the multi-head attention mechanism, the semantic association between responses is captured from different angles. For example, when the "resource conflict probe" response points out that the project is short of resources in the middle term, and the "secondary effect probe" response also mentions the risk at the same time point, the model will recognize this consistency. Similarly, when the "causal chain probe" response and the "compliance boundary probe" response are inconsistent in the assessment of the consequences of a certain decision, the model will mark this inconsistency. Finally, a hidden logic evaluation result is generated, which includes a structured representation of consistency reinforcement points and logical conflict points.
[0102] When using a Transformer-based natural language inference model to identify the relationships between feedback responses and preliminary decision proposals, each key statement in the decision proposal is considered a premise, and the evaluation content in the feedback response is considered a hypothesis. These are fed into a pretrained NLI (natural language inference) model. This model, based on the Transformer architecture and typically fine-tuned from pretrained models such as BERT, RoBERTa, or DeBERTa, can determine the type of relationship between a hypothesis and a premise: entailment, contradiction, or neutrality. For example, if a decision proposal states, "Supplier A can deliver within 10 days," while the feedback response states, "Based on historical data, Supplier A's average delivery time is 15 days," the model identifies this as a contradiction. The model outputs a probability distribution for each premise-hypothesis relationship, such as {entailment: 0.15, contradiction: 0.75, neutrality: 0.10}, and aggregates these relationships into support or skepticism scores for each component of the decision proposal.
[0103] To quantify risk indicators and uncertainty expressions in feedback responses into risk levels, we first identify risk-related terms and expressions using domain-specific vocabularies. These terms are categorized by severity, such as "possible failure" (medium risk) and "serious consequences" (high risk). Sentiment analysis techniques are then applied to assess the sentiment of risk expressions, and a BERT-based sentiment classifier is used to calculate the intensity of negative sentiment within risk expressions. Furthermore, uncertainty markers such as "possible," "perhaps," and "about" are identified, and the degree of uncertainty is assessed based on their frequency and pattern of use in context. A weighted formula is used to calculate a risk score, taking into account the severity, sentiment intensity, and degree of uncertainty of risk terms. Ultimately, the risk score is mapped to a 1-5 risk scale, with 1 indicating negligible risk and 5 indicating severe risk. Finally, the decision logic graph is converted into a representation suitable for neural network processing. The node feature matrix X contains the attribute information of the decision nodes, and the edge relationship matrix A represents the connections between nodes. The node feature matrix is then augmented with the semantic representation of the feedback responses, the hidden logic evaluation results, the associations, and the risk level as additional node features. Graph neural networks employ a graph convolutional network (GCN) or graph attention network (GAT) architecture, aggregating node information through a message-passing mechanism. After multiple layers of graph convolution, the network aggregates information across the entire graph through a global pooling operation. Finally, through a fully connected layer and a sigmoid activation function, the network outputs a confidence score between 0 and 1, indicating the reliability of the decision.
[0104] In one embodiment, the method further comprises the steps of:
[0105] When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence in the decision logic diagram is located based on the hidden logic evaluation results and association relationships;
[0106] Generate structured remediation recommendations with guided remediation directions for root cause nodes;
[0107] Integrate structured correction suggestions into the prompt word project and adjust the reasoning parameters of the private domain AI agent according to the structured correction suggestions;
[0108] The probe prompt word generation step, feedback response acquisition step and confidence evaluation step are repeatedly executed, and the preliminary decision plan is continuously revised using an iterative optimization process based on Monte Carlo tree search until the confidence score of the preliminary decision plan meets the preset threshold.
[0109] In this embodiment, when the confidence score falls below a preset threshold, a backward tracing algorithm is used, starting from the node with low confidence and propagating backward along the edges of the decision logic graph, to calculate the error contribution of each node. The error contribution calculation formula is EC(v) = ∑(u∈S(v))α_vu·EC(u), where S(v) is the set of successor nodes of node v, and α_vu represents the weight of v's influence on u. At the same time, the contradictions found in the hidden logic evaluation are matched with the nodes in the graph to identify the source of the logical conflict. In addition, the contradiction types in the association relationship are analyzed, such as resource allocation conflicts, timing dependency violations, and constraint violations. Combining these three aspects of information, a weighted scoring mechanism is used to determine the root node of the problem. Next, the corresponding repair template is selected based on the problem type of the root node. The repair template library contains standardized repair frameworks for different error types (such as resource conflicts, logical contradictions, constraint violations, etc.). The specific parameters in the template are then filled in according to the node attributes and error characteristics. For example, for a resource overallocation problem, the recommended fix is "Adjust resource allocation: Reduce resource A from task X by 20% and reallocate it to task Y." The recommended fix uses a structured format, consisting of four key components: a problem description (clearly identifying the nature of the problem), a fix goal (the desired state), specific actions (detailed modification guidelines), and a verification method (how to confirm the fix is effective). Each recommended fix also comes with a confidence estimate, indicating the likely success rate of the fix.
[0110] Convert correction suggestions into prompt word enhancement content. This includes converting the problem description into background information, converting the repair goal into task goals, and converting specific operations into guiding prompts. For example, the original correction suggestion "increase resource diversity considerations" was converted into "Please give special consideration to at least 3 different types of resource sources in the plan, and analyze their complementarity." Then, according to the nature of the correction suggestion, adjust the reasoning parameters of the AI agent. For problems that require more comprehensive thinking, increase the reasoning depth parameter (such as increasing the number of steps in the thinking chain); for problems that require more conservative decisions, lower the temperature parameter (such as from 0.7 to 0.4); for problems that require more diverse thinking, appropriately increase the top_p value (such as from 0.92 to 0.98). These parameter adjustments, together with the enhanced prompt words, guide the AI agent to improve its reasoning process in a specific direction and generate a decision-making plan that better meets the requirements.
[0111] Next, we need to construct a search tree for the decision space. Each node in the tree represents a possible decision solution variant, and the edges represent modification operations. The search process follows four phases: selection, expansion, simulation, and backpropagation. The selection phase uses the UCT formula to select the most promising node: Where Q(v) is the cumulative reward of node v, N(v) is the number of visits, N(p) is the number of visits to the parent node, and c is the exploration constant. The expansion phase generates new solution variants based on the proposed corrections. The simulation phase rapidly evaluates the potential confidence of the new solutions. The backpropagation phase updates the value estimates of the nodes in the search tree. Through multiple rounds of iteration (typically 50-100 rounds), the search process gradually converges to the solution with the highest confidence. When the confidence score of the best solution exceeds a preset threshold (typically 0.8 or 0.85), the iteration process terminates and the final optimized decision solution is output.
[0112] In one embodiment, automatically generating an execution script based on a preset script template and a preliminary decision plan or a revised decision plan based on feedback responses includes the following steps:
[0113] Generate a script execution dependency graph based on the step dependencies and data flows in the preliminary decision plan or the revised decision plan;
[0114] Generate script code using program synthesis technology combined with a preset script template library and the semantic description of the decision-making plan;
[0115] Based on the potential risks assessed by the probe prompt words, dynamic assertions are injected into the generated script code to verify the execution status in real time during script execution;
[0116] Generate the corresponding idempotent compensation script for the step that defines the compensation operation, and associate the idempotent compensation script with the main execution script in the script code;
[0117] Use formal methods to statically verify the script properties of script code and idempotent compensation scripts;
[0118] Assemble the verified script code and idempotent compensation script into a deployable execution script package according to the script execution dependency graph.
[0119] In this embodiment, when generating a script execution dependency graph based on the step dependencies and data flow in a decision scenario, all execution steps in the decision scenario and their relationships are first extracted. Each step is represented as a node in the dependency graph, with node attributes including step ID, name, estimated execution time, resource requirements, etc. Dependencies between steps are represented as directed edges, with edge types including "must complete before" (strong dependency), "preferably complete before" (weak dependency), and "data input and output" (data flow). The dependency graph adopts a directed acyclic graph (DAG) structure to ensure the rationality of the execution order. A topological sorting algorithm is used to determine the execution sequence of the steps, and the critical path is calculated to identify the key steps that affect the total execution time. The resulting dependency graph is stored in GraphML or JSON format and serves as the infrastructure for subsequent script generation. The best-matching script template is then selected from a template library based on the functional type of the decision step. The template library contains standardized script snippets for various common operations, such as database operations, API calls, and file processing. The selection process uses semantic similarity matching, calculating the cosine similarity between the decision step description and the template description using a pre-trained text embedding model (such as BERT or Word2Vec). After selecting a template, a slot-filling mechanism inserts specific decision-making parameters, variable names, conditional values, and other information into the template's placeholders. For complex steps, neural program synthesis technology is used to directly convert natural language descriptions into executable code. The generated code snippets also include comments, logging, and error handling logic, improving code readability and robustness.
[0120] Analyze the probe assessment results based on the potential risks assessed by the probe prompt words, and extract high-risk points and their risk characteristics. For each risk point, design the corresponding assertion logic, including conditional expressions and handling strategies in case of violations. Assertion types include data validity assertions (checking whether the data conforms to the expected format and range), resource status assertions (monitoring system resource usage), business rule assertions (ensuring that operations comply with business logic), and performance assertions (monitoring execution time and response speed). For example, for the "API response timeout" risk, insert an assertion to check the API response time and set the threshold to 3 seconds. The assertion implementation adopts a lightweight design to minimize the impact on execution performance, and configures the behavior when the assertion is violated, such as logging warnings, retrying operations, triggering compensation logic, or aborting execution. These assertions act as a safety net to capture potential problems at runtime and prevent errors from spreading.
[0121] For each step with a defined compensating action, corresponding compensation logic is designed to ensure safe rollback to the pre-operation state even if executed multiple times. Compensation scripts are designed to adhere to the principle of idempotence, meaning that the resulting state remains the same whether executed once or multiple times. Common techniques for achieving idempotence include using unique identifiers to track operation states, implementing a check-and-execute pattern, and employing conditional execution statements. For example, for a "create user account" operation, the compensation script is to "check and delete the specified user account"; for an "inventory reduction" operation, the compensation script is to "restore a specific amount of inventory." Compensation scripts are associated with the main execution script via a transaction ID, stored in a compensation registry, and referenced within the main script's try-catch blocks or error handling logic. This design ensures that the system can recover to a consistent state even when complex operations fail. When using formal methods to statically verify the script code and idempotent compensation scripts for their properties, the script code is first converted into a formal model, such as a state transition system or a process algebra expression. This conversion process uses a domain-specific parser to extract the script's control flow, data dependencies, and resource operations. Then, define the key properties that need to be verified, including termination (whether the program always terminates), safety (whether it does not enter an undesirable state), liveness (whether the desired state is always reached), and fairness (whether certain operations are not delayed indefinitely). These properties are verified using model checking tools (such as SPIN and NuSMV) or theorem provers (such as Coq and Isabelle). For example, verify that the compensation script truly achieves idempotence, verify whether the execution path is at risk of deadlock, or confirm that resources are correctly released on all execution paths. Verification results include proof that the properties are satisfied or counterexamples. The counterexamples are converted back into the script context to indicate the specific problem location and remediation suggestions.
[0122] When assembling validated script code and idempotent compensation scripts into a deployable execution script package based on the script execution dependency graph, the script organization is first determined based on the topology of the dependency graph. For simple linear processes, a single main script with submodules may be used; for complex parallel processes, distributed execution units managed by a workflow engine may be used. The assembly process includes generating a master control script, which is responsible for calling each step script in the order of dependencies, managing execution status, and handling errors. A configuration file is also created, containing configurable parameters such as environment variables, API keys, and resource paths. To improve reliability, a checkpoint mechanism is implemented to periodically save execution status and support recovery from failures. Furthermore, monitoring and logging components are integrated to record key events and performance metrics during execution. Finally, the package is packaged in a standard format (such as a Docker container, ZIP package, or installer), containing all script files, dependent libraries, configuration files, documentation, and deployment instructions, forming a complete, deployable execution unit.
[0123] The present invention also discloses a decision generation and execution system based on an AI agent, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the decision generation and execution method based on the AI agent as described in any one of the above embodiments.
[0124] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0125] Among them, the memory can be an internal storage unit of a computer device, such as a hard disk or memory of a computer device, or an external storage device of a computer device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD) or flash memory card (FC) equipped on the computer device. In addition, the memory can also be a combination of an internal storage unit and an external storage device of a computer device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data that has been output or is to be output. This application does not impose any restrictions on this.
[0126] The present invention also discloses a computer-readable storage medium, which stores instructions. When the instructions are executed by a processor, the processor is configured to execute the decision-making generation execution method based on the AI agent described in any of the above embodiments.
[0127] Among them, the computer program can be stored in a machine-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The machine-readable medium includes any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the machine-readable medium includes but is not limited to the above-mentioned components.
[0128] Among them, through this computer-readable storage medium, the decision-making generation execution method based on the AI intelligent agent in the above embodiment is stored in the computer-readable storage medium, and is loaded and executed on the processor to facilitate the storage and application of the above method.
[0129] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0130] The one or more embodiments of this application are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this application should be included in the scope of protection of this application.
Claims
1. A decision generation and execution method based on AI agent, characterized in that: The steps include: Use natural language processing technology to parse the user-entered requirement documents and build a structured prompt word project based on the key requirement information and constraints extracted from the analysis; Input the prompt word project into the private domain AI agent with the big model as the underlying engine. The private domain AI agent generates a preliminary decision plan by combining it with the professional domain database corresponding to the requirement document. Generate a set of adversarial introspection probe prompts based on the preliminary decision plan. The probe prompts are used to guide the private domain AI agent to evaluate the internal consistency, potential risks or constraint compliance of the preliminary decision plan; Input the probe prompt word into the private domain AI agent and obtain the private domain AI agent's feedback response to the preliminary decision plan; Analyze feedback responses using a pre-trained graph neural network and assess the confidence score of the initial decision solution; When the confidence score meets the preset threshold, the execution script is automatically generated based on the preset script template and the preliminary decision plan or the decision plan revised based on the feedback response; By executing the script and calling the preset application programming interface, the corresponding target software or system automatically operates to execute the decision plan and generate a decision execution document.
2. The decision-making execution method based on AI agent according to claim 1, characterized in that: The method of using natural language processing technology to parse the requirement document input by the user and constructing a structured prompt word project based on the key requirement information and constraint conditions extracted from the parsing includes the following steps: Receive a requirement document containing a natural language description through a preset user interaction interface; Perform natural language processing on the requirements document to identify key entities in the requirements document and the relationships between key entities. Natural language processing includes performing word segmentation, part-of-speech tagging, named entity recognition, and relationship extraction. Identify the user's core needs and intentions based on the results of natural language processing, and fill in the predefined slot information associated with the core needs and intentions; Extract the constraints and pre-conditions for decision execution from the requirements document explicitly or implicitly; Combining core demand intent with predefined slot information and based on preset prompt word templates, a structured prompt word project containing constraints and pre-rules is constructed.
3. The decision-making execution method based on AI agent according to claim 1, characterized in that: The process of inputting the prompt word project into a private domain AI agent based on a large model as the underlying engine, and generating a preliminary decision plan through the private domain AI agent in combination with the professional domain database corresponding to the requirements document, includes the following steps: Dynamically determine the retrieval strategy based on the task complexity and domain specificity of the prompt word project; Perform multi-stage search in the professional domain database corresponding to the requirement document according to the search strategy to obtain multiple knowledge fragments; All knowledge fragments are confidence-weighted and fused. The weights are calculated based on the reliability of the source, timeliness, and relevance of the knowledge fragments to the current task. The weighted fused knowledge content is then injected into the prompt word project. The enhanced prompt word engineering containing weighted fusion knowledge is input into the private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan containing steps, dependencies, expected intermediate states, required resources and preliminary risk assessment, and outputs the preliminary decision plan in a graphical or semi-structured format.
4. The decision-making execution method based on AI agent according to claim 3 is characterized in that: The step of generating a set of adversarial introspection probe prompt words based on the preliminary decision plan includes the following steps: Construct decision logic diagrams by parsing graphical or semi-structured data of preliminary decision solutions; Identify the topological structure of the decision logic diagram and the key decision nodes in the topological structure; The probe generator is trained based on a generative adversarial network and generates adversarial introspection probe prompts for private domain AI agents according to the topological structure and key decision nodes.
5. The decision-making execution method based on AI agent according to claim 4 is characterized in that: The probe prompt word types include causal chain tracing probes, resource conflict detection probes, secondary effect prediction probes, model vulnerability detection probes and ethics and compliance boundary probes.
6. The decision-making execution method based on AI agent according to claim 4 is characterized in that: The method of analyzing the feedback responses using a pre-trained graph neural network and evaluating the confidence score of the preliminary decision solution includes the following steps: The cross-response attention model is used to analyze the mutual confirmation or contradiction between the feedback responses corresponding to each probe prompt word to obtain the hidden logic evaluation results; Use a Transformer-based natural language inference model to identify the relationship between feedback responses and preliminary decision plans; Quantify risk indicators and uncertainty expressions in feedback responses into risk levels; The decision logic diagram, feedback response, hidden logic evaluation results, correlation relationships and risk levels are input into a pre-trained graph neural network, and the confidence score of the preliminary decision plan is output through the graph neural network.
7. The decision-making execution method based on AI agent according to claim 6, characterized in that: The method further comprises the steps of: When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence in the decision logic diagram is located based on the hidden logic evaluation results and association relationships; Generate structured remediation recommendations with guided remediation directions for root cause nodes; Integrate structured correction suggestions into the prompt word project and adjust the reasoning parameters of the private domain AI agent according to the structured correction suggestions; The probe prompt word generation step, feedback response acquisition step and confidence evaluation step are repeatedly executed, and the preliminary decision plan is continuously revised using an iterative optimization process based on Monte Carlo tree search until the confidence score of the preliminary decision plan meets the preset threshold.
8. The decision-making execution method based on AI agent according to claim 1, characterized in that: The method of automatically generating an execution script by referring to a preset script template and based on a preliminary decision plan or a decision plan revised based on feedback responses includes the following steps: Generate a script execution dependency graph based on the step dependencies and data flows in the preliminary decision plan or the revised decision plan; Generate script code using program synthesis technology combined with a preset script template library and the semantic description of the decision-making plan; Based on the potential risks assessed by the probe prompt words, dynamic assertions are injected into the generated script code to verify the execution status in real time during script execution; Generate the corresponding idempotent compensation script for the step that defines the compensation operation, and associate the idempotent compensation script with the main execution script in the script code; Use formal methods to statically verify the script properties of script code and idempotent compensation scripts; Assemble the verified script code and idempotent compensation script into a deployable execution script package according to the script execution dependency graph.
9. A decision generation and execution system based on an AI agent, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the decision generation and execution method based on the AI agent as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the decision-making generation and execution method based on the AI agent according to any one of claims 1 to 8.
Citation Information
Patent Citations
Document generation system, method and equipment based on knowledge base and large model and medium
CN117556010A
Design method of finite-state machine system driven by natural language dynamic probe
CN118626176A
Intelligent agent language ability automatic testing method based on multi-language model self-evolution
CN119357069A
Private domain live broadcast peak hot spot prediction and content scheduling method based on deep learning
CN119450099A
Document generation method and device based on artificial intelligence
CN119719354A
Cited By
Multi-agent linkage scheduling method and system applied to cross-domain information processing
CN120723419A
Large language model MCP enabled RPA service automation method
CN120746505A
Intelligent modeling method for combinatorial optimization problem
CN120806282A
A Smart Modeling Method for Combinatorial Optimization Problems
CN120806282B
AI agent distribution and authority control method and system
CN120850274A
