Decision generation execution method and system based on AI agent

By employing an AI-based decision generation method that utilizes natural language processing and adversarial introspection probes to assess the confidence level of decision-making schemes, the problem of ensuring decision quality in traditional systems is solved. This enables an intelligent decision-making ecosystem that is self-learning and self-verifying, thereby improving the accuracy and efficiency of decision-making.

CN120524939BActive Publication Date: 2026-02-24DEEP PERCEPTION (WUHAN) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510610130.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2026-02-24
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

Traditional decision support systems cannot autonomously assess the quality of decisions after understanding user needs, and lack a deep understanding of the rationality of decisions, resulting in low automation and difficulty in guaranteeing decision quality, especially in high-risk areas where there is a risk of making wrong decisions.

Method used

An AI-based decision generation method is adopted, which analyzes user needs through natural language processing, constructs a structured prompt word project, generates preliminary decision schemes by combining professional domain databases, evaluates the confidence of decision schemes by using adversarial introspection probes and graph neural networks, and finally automatically generates execution scripts.

Benefits of technology

It has realized an intelligent decision-making ecosystem that enables autonomous learning and self-verification, improving the accuracy and efficiency of decision-making, reducing the risk of erroneous decisions, and providing quality assurance throughout the entire process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524939B_ABST
    Figure CN120524939B_ABST
Patent Text Reader

Abstract

The application provides an AI agent-based decision generation and execution method and system. The method uses natural language processing technology to analyze user requirement documents, extracts key information to construct structured prompt words; then inputs the prompt words into a private domain AI agent based on a large model, combines a professional field database to generate a preliminary decision scheme; automatically generates an adversarial self-reflection probe prompt word to guide the AI agent to evaluate the consistency, risk and constraint compliance of the preliminary scheme; the system collects the feedback response of the AI agent and analyzes the feedback through a pre-trained graph neural network to calculate the confidence score of the decision scheme; when the confidence reaches a preset threshold, an execution script is automatically generated according to the decision scheme; the execution script automatically operates the target system through a preset API and generates an execution document. The whole process realizes a closed-loop intelligent decision-making process from requirement understanding to scheme generation, self-verification and automatic execution, significantly improving the decision-making efficiency and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a decision generation and execution method and system based on AI intelligent agents. Background Technology

[0002] Traditional decision support systems often suffer from an "understanding-execution" gap. This means the system may understand user needs but cannot autonomously assess the quality of their decisions, or it may be able to execute operations but lack a deep understanding of the decision's rationale. This leads to a high demand for human intervention in the decision-making process, low automation, and difficulty in guaranteeing decision quality. Particularly in high-risk areas, such as financial, medical, or industrial control systems, erroneous decisions can have serious consequences, and traditional systems cannot provide sufficient mechanisms to ensure decision reliability. Furthermore, existing systems typically lack self-assessment and reflection capabilities, failing to comprehensively verify decisions before execution, making it difficult to identify and address blind spots and risks in the decision-making process in a timely manner. This problem of end-to-end automation and quality assurance from needs understanding to final execution has always been a core challenge in the field of intelligent decision systems, directly impacting the availability and reliability of automated decision systems in critical business scenarios. Summary of the Invention

[0003] This invention provides a decision generation and execution method and system based on AI intelligent agents to solve the problem of poor reliability of decision schemes automatically generated by intelligent decision-making 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] Natural language processing technology is used to parse user-input requirement documents, and a structured prompt word project is constructed based on the key requirement information and constraints extracted from the parsing.

[0006] The prompt words are input into a private domain AI agent with a large model as the underlying engine. The private domain AI agent, combined with the professional domain database corresponding to the requirements document, generates a preliminary decision-making solution.

[0007] Based on the initial decision-making plan, a set of adversarial introspective probe prompts are generated. These probe prompts are used to guide the private domain AI agent to evaluate the internal consistency, potential risks, or constraint compliance of the initial decision-making plan.

[0008] Input probe prompts into the private domain AI agent and obtain feedback from the private domain AI agent on the preliminary decision-making plan;

[0009] The feedback response is analyzed using a pre-trained graph neural network to evaluate and derive a confidence score for the preliminary decision-making scheme.

[0010] When the confidence score meets the preset threshold, the execution script is automatically generated by referring to the preset script template and based on the preliminary decision plan or the decision plan revised based on the feedback response.

[0011] By executing scripts, the corresponding target software or system is automatically operated to execute decision-making schemes by calling preset application programming interfaces, and decision execution documents are generated.

[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 extracted key requirement information and constraints includes the following steps:

[0013] Receive a requirements document containing natural language descriptions through a pre-defined user interface;

[0014] Natural language processing is performed on the requirements document to identify key entities and the relationships between them. Natural language processing includes word segmentation, part-of-speech tagging, named entity recognition, and relation extraction.

[0015] Based on the processing results of natural language processing, the core needs and intentions of users are identified, and predefined slot information associated with the core needs and intentions is filled in;

[0016] Extract the constraints and prerequisite rules for decision execution explicitly or implicitly from the requirements document;

[0017] By combining core requirements and predefined slot information with preset prompt word templates, a structured prompt word project containing constraints and prerequisite rules is constructed.

[0018] Optionally, the step of inputting the prompt words into a private domain AI agent with a large model as its underlying engine, and generating a preliminary decision-making scheme through the private domain AI agent and the professional domain database corresponding to the requirements document, includes the following steps:

[0019] The retrieval strategy is dynamically determined based on the task complexity and domain specificity of the prompt word project.

[0020] According to the retrieval strategy, a multi-stage retrieval is performed in the professional field database corresponding to the requirement document to obtain multiple knowledge fragments;

[0021] All knowledge fragments are weighted and fused based on confidence level. The weights of the knowledge fragments are calculated according to their source reliability, timeliness, and relevance to the current task. The weighted and fused knowledge content is then injected into the prompt word project.

[0022] The enhanced prompt words containing weighted fusion knowledge are fed into a private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan that includes 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 introspective probe cue words based on the preliminary decision-making scheme includes the following steps:

[0024] Decision logic diagrams are constructed by analyzing graphical or semi-structured data of preliminary decision-making schemes;

[0025] Identify the topology of the decision logic graph and the key decision nodes within it;

[0026] A probe generator trained on a generative adversarial network generates adversarial introspection probe prompts for private domain AI agents based on the topology 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, the step of using a pre-trained graph neural network to analyze the feedback response and evaluate the confidence score of the preliminary decision scheme includes the following steps:

[0029] By using a cross-response attention model to analyze the mutual corroboration or contradiction between the feedback responses corresponding to each probe cue word, the hidden logic evaluation results are obtained.

[0030] A Transformer-based natural language inference model is used to identify the relationship between feedback responses and preliminary decision-making schemes;

[0031] Quantify the risk indicators and uncertainties expressed in feedback responses into risk levels;

[0032] The decision logic diagram, feedback response, hidden logic evaluation results, correlation and risk level are input into a pre-trained graph neural network, and the graph neural network outputs the confidence score of the preliminary decision scheme.

[0033] Optionally, the method further includes the following steps:

[0034] When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence is located in the decision logic graph based on the hidden logic evaluation results and correlation relationships.

[0035] Generate structured remediation suggestions, including guiding repair directions, for the root cause node;

[0036] The structured correction suggestions were integrated into the prompt word project, and the inference parameters of the private domain AI agent were adjusted according to the structured correction suggestions.

[0037] Repeat the steps of generating probe prompts, obtaining feedback responses, and evaluating confidence. Employ an iterative optimization process based on Monte Carlo tree search to continuously refine the initial decision scheme until the confidence score of the initial decision scheme meets the preset threshold.

[0038] Optionally, the step of automatically generating the execution script by referring to a preset script template and based on the preliminary decision-making plan or the decision-making 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 or revised decision scheme;

[0040] Script code is generated by using program synthesis technology and combining a pre-set script template library with the semantic description of the decision-making scheme;

[0041] Based on the potential risks assessed by the probe prompts, dynamic assertions are injected into the generated script code for real-time verification of the execution status during script execution.

[0042] To define the steps of the compensation operation, generate the corresponding idempotent compensation script and associate the idempotent compensation script with the main execution script in the script code;

[0043] Static verification of script properties is performed on the script code and idempotent compensation script using formal methods;

[0044] The validated script code and idempotent compensation script are assembled into a deployable executable 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, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the decision generation and execution method based on an AI agent as described in the first aspect.

[0046] Thirdly, the present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the decision generation and execution method based on an AI agent as described in the first aspect.

[0047] The beneficial effects of this invention are:

[0048] This invention utilizes structured prompt engineering technology to effectively solve the problem of transforming unstructured requirements into precise instructions, significantly improving the accuracy of requirement understanding. By introducing an adversarial introspective probe mechanism, the system can proactively discover potential defects and risks in decision-making schemes, achieving self-verification of decision quality—something almost impossible in traditional systems. Furthermore, a confidence assessment mechanism based on graph neural networks provides quantitative assurance of decision reliability, enabling the system to objectively evaluate the quality of decision schemes and decide whether to execute them, significantly reducing the risk of erroneous decisions. This invention achieves seamless automation from decision generation to script execution, greatly reducing manual intervention and improving decision execution efficiency. Through deep integration with domain-specific databases, this invention can provide more professional and accurate decision support in specific domains, overcoming the knowledge limitations of general systems. In summary, this invention constructs an intelligent decision-making ecosystem that is self-learning, self-verifying, and automatically executing, not only significantly improving decision efficiency and accuracy but also reducing decision risk through built-in quality assurance mechanisms, providing a new technical path for intelligent decision-making in complex environments. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating one embodiment of the decision generation and execution method based on an AI agent in this application.

[0050] Figure 2 This is a schematic diagram illustrating the framework of the decision generation and execution process based on an AI agent in one embodiment of this application. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0052] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0053] Figure 1This is a flowchart illustrating 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 sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps. For example Figure 1 As shown, the decision generation and execution method based on AI intelligent agents disclosed in this invention specifically includes the following steps:

[0054] S101. Use natural language processing technology to parse the user-input requirement document, and construct a structured prompt word project based on the key requirement information and constraints extracted from the parsing.

[0055] Among them, reference Figure 2 First, word segmentation techniques are used to break the text down into its smallest semantic units, such as using Conditional Random Fields (CRF) or BERT-based word segmentation models. Next, part-of-speech tagging is performed to identify nouns, verbs, adjectives, etc., using Hidden Markov Models (HMMs) or Recurrent Neural Networks (RNNs). Then, named entity recognition is performed to mark key entities in the document, such as names, organizations, dates, and numbers, typically using BiLSTM-CRF or BERT-NER models. Relation extraction identifies semantic connections between entities, such as the time constraint in "task B needs to be completed before time A," which can be achieved using dependency parsing or deep learning models based on attention mechanisms. Building on this, intent classification algorithms (such as Support Vector Machines or Transformer-based classifiers) identify core demand intents, such as "optimize inventory" or "improve sales conversion rate," and populate predefined slot information, such as "target value: increase by 20%" or "time range: next quarter." Simultaneously, constraints and preconditions are extracted explicitly or implicitly, such as "budget not exceeding 100,000 yuan." Finally, based on the preset prompt template (such as the "task type-goal-constraints-resources-deadline" structure), this information is organized into a structured prompt engineering, forming a formatted prompt such as "Please design a solution based on [domain knowledge] that can achieve the [specific goal] within the [time range], while satisfying [constraints], and the available resources include [available resources]", providing a clear and explicit input framework for subsequent AI decision-making.

[0056] S102. Input the prompt words into the private domain AI agent with the large model as the underlying engine, and generate a preliminary decision-making scheme through the private domain AI agent and the professional domain database corresponding to the requirements document.

[0057] The retrieval strategy is dynamically determined based on task complexity and domain specificity. For simple tasks, keyword matching based on TF-IDF or BM25 may be used; for complex tasks, semantic retrieval based on vector similarity is employed, such as using models like Sentence-BERT to convert prompts into high-dimensional vectors (typically 768 or 1024 dimensions) and calculating the cosine similarity with documents in the knowledge base. The retrieval strategy also adjusts 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 search to obtain relevant documents; the second stage performs a fine-grained search to locate specific knowledge fragments; and a third stage, cross-document reasoning retrieval, may be performed if necessary, integrating information from multiple sources. The obtained knowledge fragments are fused using a confidence-weighted fusion method, where the weight is calculated using the formula: W. i =α·R i +β·T i +γ·S i , where R i Indicates source reliability (0-1 points), T i Indicates timeliness (based on a decay function of publication time, such as...) ), S i The relevance to the current task is represented by the vector similarity score, while α, β, and γ are adjustable hyperparameters that sum to 1. The fused knowledge is injected into the cue word engineering, forming enhanced cue words, which are then input into the private domain AI agent. Based on the injected domain knowledge, the agent, through the reasoning capabilities of the large model, generates a decision-making scheme containing explicit steps, dependencies, expected intermediate states, required resources, and a preliminary risk assessment. This scheme is output graphically (e.g., decision trees, flowcharts) or in semi-structured formats (e.g., JSON, YAML) for easy subsequent processing and analysis.

[0058] S103. Generate a set of adversarial introspective probe prompts based on the preliminary decision-making scheme. 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-making scheme.

[0059] The process involves using a parser to convert graphical or semi-structured data (such as JSON, YAML, or GraphML formats) of decision-making schemes into a computer-processable decision logic graph. This graph employs a directed acyclic graph (DAG) structure, where nodes represent decision points or actions, and edges represent causal relationships or temporal dependencies. The graph is formally represented as G = (V, E), where V is the set of nodes and E is the set of edges. Next, graph theory algorithms are used to analyze the topological structure of this decision logic graph, including calculating the in-degree and out-degree of nodes, identifying critical paths, and discovering strongly connected components. The identification of critical decision nodes uses a centrality metric, such as betweenness centrality. Where σ st The number of shortest paths from s to t, σ st (v) represents the number of shortest paths from s to t passing through node v. Nodes with high betweenness centrality are often key points in the decision-making process, and probing them can effectively verify the robustness of the decision scheme. Subsequently, a probe generator based on a pre-trained generative adversarial network (GAN) creates probe cues. This generator consists of a generator network G and a discriminator network D; G is responsible for creating probe cues, and D evaluates the effectiveness of the probes. The training objective is to minimize the function:

[0060]

[0061] The generated probe prompts are designed for different types of decision nodes, and questions that can test their inherent consistency, potential risks, or constraint compliance, such as "If step A fails, how will the critical path of the entire solution be affected?" and "If resource X only reaches 80% of the expected level, can the solution still achieve its goal?", thus forming a comprehensive set of adversarial introspective probe prompts.

[0062] S104. Input the probe prompts into the private domain AI agent and obtain the feedback response from the private domain AI agent to the preliminary decision-making plan.

[0063] Each probe prompt is structured and encapsulated to ensure it accurately triggers the AI ​​agent's specific cognitive path. The encapsulation format typically includes three parts: contextual information (key elements of the initial decision-making process), the core probe question, and the expected response format. For example, for a resource conflict detection probe, a possible encapsulation format is: "Considering that steps A and B in the decision-making process both require the use of resource X, please analyze whether a resource contention problem will occur when the capacity of resource X is [currently set value]? If a problem exists, please specify the possible conflict scenarios, the degree of impact (level 1-5), and possible solutions." The encapsulated probe prompt is input to the private domain AI agent via API or direct interaction. The parameters include a temperature value (usually set low, such as 0.1-0.3, to obtain a highly deterministic response), a top_p value (usually set above 0.9), and a maximum number of tokens (set according to the expected response complexity, usually 1000-2000), etc.

[0064] Upon receiving probe prompts, the private domain AI agent generates analytical responses to preliminary decision-making options based on its trained large-scale language model and injected domain knowledge. These responses typically include multi-dimensional assessments, such as logical consistency scores (1-10 points), a list of potential risk points, constraint compliance analysis, and identification of sources of uncertainty. The responses are stored in a structured format, usually JSON or similar, to facilitate subsequent automated processing and analysis. For example, for the probe "If customer requirements change midway through the project, is the current decision path sufficiently adaptable?", the agent might return a structured response including an adaptability score, possible adjustment points, and estimated adjustment costs.

[0065] S105. Analyze the feedback response using a pre-trained graph neural network to evaluate and derive a confidence score for the preliminary decision-making scheme.

[0066] Among them, a cross-response attention model was used to analyze the interrelationships between the responses corresponding to each probe cue word. This model is based on a multi-head self-attention mechanism, and the calculation formula is as follows: Where Q, K, and V are the query, key, and value matrices, respectively, and d k The key dimension is used. In this way, the model can identify mutually corroborating or contradictory relationships between feedbacks. For example, the response of probe A indicates that the solution may fail under high load, while the response of probe B indicates that the system is under-resourced during peak periods. Then, a Transformer-based natural language inference model (such as RoBERTa or DeBERTa) is used to identify the association between feedback responses and the initial decision solution, classifying the relationship as supportive, neutral, or opposing.

[0067] Simultaneously, through sentiment analysis and keyword extraction techniques, risk indicators and uncertainty expressions in feedback responses are quantified into risk levels using a 5-level scale (level 1 for negligible risk, level 5 for severe risk). Subsequently, the decision logic graph is converted into an adjacency matrix and node feature matrix that can be processed by a graph neural network. The node features include information such as decision point type, resource requirements, and time constraints. The graph neural network employs 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 outputs a confidence score between 0 and 1, representing the reliability of the decision scheme. For example, 0.85 indicates a high reliability, while 0.45 indicates a significant problem requiring correction.

[0068] S106. When the confidence score meets the preset threshold, the execution script is automatically generated by referring to the preset script template and based on the preliminary decision plan or the decision plan revised based on the feedback response.

[0069] The process involves generating a script execution dependency graph based on the step dependencies and data flow in the decision-making scheme. This graph is represented by a Directed Acyclic Graph (DAG), where nodes represent execution steps and edges represent dependencies or data flow directions. The dependency graph construction algorithm analyzes semantic markers such as "preconditions" and "subsequent operations" in the decision-making scheme and determines the execution order through topological sorting. Next, program synthesis technology is used to generate script code by combining a pre-defined script template library with the semantic description of the decision-making scheme. Program synthesis employs a neural network-based code generation model (such as CodeT5 or GPT-Codex) to convert the natural language description of the decision-making steps into structured script code. For example, the step in the decision-making scheme, "retrieves sales data from the past 30 days from the database and calculates the average," will be converted into a corresponding SQL query or data processing script.

[0070] Dynamic assertions, such as "assertresponse_time<5000, 'API response time exceeds threshold'", can be injected into the generated script code based on potential risks assessed by probe prompts to verify the execution status in real time. For steps with defined compensation operations (such as database transactions and resource allocation), corresponding idempotent compensation scripts are generated to ensure safe rollback in case of operation failure. The compensation script design follows the idempotency principle, meaning that multiple executions have the same effect as a single execution. Subsequently, formal methods (such as model checking and symbolic execution) are used to perform static verification on the script code and compensation scripts to check for deadlocks, resource leaks, invalid states, and other issues. Finally, the verified script code and compensation scripts 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. By executing a script, the system calls a preset application programming interface to automatically operate the corresponding target software or system to execute the decision-making scheme and generates a decision execution document.

[0072] First, a secure API connection channel is established, employing authentication mechanisms such as OAuth 2.0 or API keys to ensure authorized access. Once the connection is established, the execution script sequentially calls the target system's APIs according to the dependency graph, executing each step of the decision-making scheme. API calls are asynchronous, using technologies such as Promise (JavaScript) or asyncio (Python) to handle concurrent requests and improve execution efficiency. Each API call has a timeout mechanism and retry strategy, such as an exponential backoff algorithm (initial wait time is 100ms, doubling after each failure, with a maximum of 3 retries). Key metrics, such as API response time, resource utilization, and error rate, are monitored in real time during execution, triggering an alert mechanism when metrics exceed preset thresholds. Simultaneously, the execution script maintains a state machine, recording the execution status of each step (not started, in progress, completed, failed) and key output data. When a step fails, the script determines whether to retry, skip, or execute a compensation script based on the failure type. Upon completion, a decision execution document is automatically generated, including an execution summary (overall success rate, time taken, and achievement of key performance indicators), a detailed execution log (inputs, outputs, time taken, and status of each step), anomaly analysis (if any), and follow-up recommendations. The document is stored in a structured format (such as HTML, PDF, or Markdown) and can be selectively sent to relevant stakeholders, such as via email, internal corporate communication tools, or stored in a document management system, ensuring transparency and traceability of the decision execution process.

[0073] In one implementation, the process of parsing the user-inputted requirement document using natural language processing technology and constructing a structured prompt word project based on the extracted key requirement information and constraints includes the following steps:

[0074] Receive a requirements document containing natural language descriptions through a pre-defined user interface;

[0075] Natural language processing is performed on the requirements document to identify key entities and the relationships between them. Natural language processing includes word segmentation, part-of-speech tagging, named entity recognition, and relation extraction.

[0076] Based on the processing results of natural language processing, the core needs and intentions of users are identified, and predefined slot information associated with the core needs and intentions is filled in;

[0077] Extract the constraints and prerequisite rules for decision execution explicitly or implicitly from the requirements document;

[0078] By combining core requirements and predefined slot information with preset prompt word templates, a structured prompt word project containing constraints and prerequisite rules is constructed.

[0079] In this implementation, when receiving a requirement document containing natural language descriptions through a pre-defined user interface, a multimodal interaction entry point is designed, including web forms, mobile application interfaces, and an internal enterprise portal. The interface adopts a responsive design, automatically adapting to different device screen sizes. Users can directly input requirement descriptions through text boxes or upload documents in Word, PDF, and other formats; the system will automatically extract the text content. To enhance user experience, the interface also provides voice input functionality, using real-time speech recognition technology to convert spoken requirements into text. After input, the system displays a document preview, allowing users to confirm the accuracy of the content. Simultaneously, the interface records document metadata, such as submission time, user identity, and document source; this information will serve as context aids for subsequent processing. When performing natural language processing on the requirement document, word segmentation technology is first used to break the text down into the smallest semantic units. Chinese text uses a character-level BiLSTM-based word segmentation model with an accuracy rate exceeding 95%; English text uses a rule-based word segmenter. Next, part-of-speech tagging is performed, using a Hidden Markov Model to assign part-of-speech tags (such as nouns, verbs, adjectives, etc.) to each word. Then, named entity recognition is performed, using the BiLSTM-CRF model to identify proper nouns, temporal expressions, and quantitative 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", thus constructing a preliminary semantic network graph.

[0080] When identifying core user intents based on natural language processing results, a multi-level classification strategy is employed. First, an intent classifier (a BERT-based fine-tuned classification model) categorizes the intents 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 intent graph. Subsequently, for the identified primary intent, the corresponding slot-filling model is activated. This model, based on sequence labeling technology, maps key information in the text to predefined slots. For example, for the "resource allocation" intent, relevant slots include "resource type," "allocation target," "time window," and "priority," thus forming a structured representation of the intent. When extracting constraints and prerequisite rules for decision execution from the requirement document, both explicit and implicit extraction methods are combined. Explicit extraction uses keyword matching and syntactic pattern recognition to capture expressions containing explicit constraint words such as "must," "must not," "at least," and "at most." For example, the numerical constraint "the budget shall not exceed 1 million yuan" is identified. Implicit extraction uses semantic-based reasoning methods to infer implicit constraints through contextual analysis. For instance, a human resource constraint is 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 structured prompts by combining core requirement intents and predefined slot information, the first step is to select the prompt template that best matches the current requirement intent from a pre-set template library. The template library contains standardized structures for different decision types, such as "[Task Type] Decision Template" and "[Resource Allocation] Optimization Template." After selecting a template, the filled slot information is inserted according to the placeholder positions in the template to form preliminary prompts. Then, the extracted constraints and preconditions are converted into standardized expressions and added to the corresponding parts of the prompts. Finally, prompt enhancement techniques are applied, such as adding examples and clarifying output format requirements, to improve the accuracy of subsequent AI processing. The final generated structured prompts retain the semantic integrity of the original requirement while presenting it in a format that AI can efficiently process.

[0082] In one implementation, the prompt word engineering is input into a private domain AI agent with a large model as its underlying engine. The preliminary decision-making scheme is generated by the private domain AI agent in conjunction with the professional domain database corresponding to the requirements document, including the following steps:

[0083] The retrieval strategy is dynamically determined based on the task complexity and domain specificity of the prompt word project.

[0084] According to the retrieval strategy, a multi-stage retrieval is performed in the professional field database corresponding to the requirement document to obtain multiple knowledge fragments;

[0085] All knowledge fragments are weighted and fused based on confidence level. The weights of the knowledge fragments are calculated according to their source reliability, timeliness, and relevance to the current task. The weighted and fused knowledge content is then injected into the prompt word project.

[0086] The enhanced prompt words containing weighted fusion knowledge are fed into a private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan that includes 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 implementation, 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 words is first analyzed through a complexity assessment module. This module calculates the number of entities, relational complexity, and number of constraints in the prompt words, generating a complexity score (1-10). Simultaneously, the domain identifier determines the professional domain to which the prompt words belong and their degree of specificity by matching similarity with a predefined domain ontology. For example, a risk assessment task in the financial domain has a complexity score of 8 and a specificity score of 9, so a depth-first semantic retrieval strategy is selected; while a general market research task has a complexity score of 4 and a specificity score of 3, so a breadth-first keyword enhancement retrieval is used. Strategy selection also considers timeliness requirements; for urgent tasks, lightweight but efficient retrieval methods are prioritized to ensure sufficient relevant knowledge support is obtained within a limited time. When performing multi-stage retrieval in the professional domain database according to the determined retrieval strategy, the first stage performs a coarse-grained retrieval, converting the prompt words into query vectors (using a domain-adapted Sentence-BERT model), and searching the vector database for the top N documents with the highest similarity (N is typically 50-100). The second stage involves fine-grained retrieval, decomposing the N documents into paragraphs and recalculating their similarity to the query vector to select the M most relevant paragraphs (M is typically 20-30). For complex tasks, a third stage of cross-document reasoning retrieval is performed, constructing a network of relationships between knowledge entities using a graph database to identify indirect but important knowledge fragments. Ultimately, a complete knowledge set containing both direct and indirect relevant information is formed.

[0088] When fusing all knowledge fragments using confidence-weighted fusion, a three-dimensional weight value is first calculated for each fragment. The source reliability weight is determined based on the authority rating 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 three dimensions are weighted and averaged to obtain the final weight. Based on the final weight, the knowledge content is fused, with high-weight content retained in case of conflicts. The fused knowledge is then injected into the prompt word project as inline annotations or additional context. Next, the prompt words need to be formatted to ensure they meet the input requirements of the large model. The input format typically includes four parts: task description, background knowledge, constraints, and expected output format. The private domain AI agent, based on a large language model (such as a fine-tuned version of GPT or LLaMA), combined with domain knowledge enhancement and reasoning capabilities, generates an initial decision-making scheme. The generation process employs chain-of-thought reasoning, first analyzing the essence of the problem and then gradually constructing a solution. The output decision plan includes clearly defined execution steps (typically 5-15 key steps), dependencies between steps (preceding, following, or parallel relationships), 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 (risk identification and mitigation suggestions). The final solution is output in graphical formats (such as BPMN flowcharts or Gantt charts) or semi-structured formats (such as JSON or YAML) for easy subsequent processing and visualization.

[0089] In one implementation, generating a set of adversarial introspective probe cue words based on a preliminary decision-making scheme includes the following steps:

[0090] Decision logic diagrams are constructed by analyzing graphical or semi-structured data of preliminary decision-making schemes;

[0091] Identify the topology of the decision logic graph and the key decision nodes within it;

[0092] A probe generator trained on a generative adversarial network generates adversarial introspection probe prompts for private domain AI agents based on the topology and key decision nodes.

[0093] In this implementation, the probe prompt 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 construct a decision logic graph from the graphical or semi-structured data of the initial decision-making scheme, the appropriate parser must first be selected based on 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), 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 relationships, temporal dependencies, resource flows, etc.) and relationship strength. The completed decision logic graph is stored as an in-memory object for easy subsequent analysis and processing.

[0094] Graph theory algorithms are applied to analyze the overall topological characteristics. Global metrics such as the graph's diameter (length of the longest and shortest paths), average path length, and clustering coefficients are calculated to assess the complexity and tightness of the decision-making process. Next, key decision nodes are identified, primarily using centrality metrics: degree centrality (number of edges to a node) identifies highly connected nodes; betweenness centrality (number of shortest paths through a node) identifies key points controlling the information flow, calculated as 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 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 sub-modules and analyze dependencies between modules.

[0095] Next, a dual-network architecture needs to be constructed: a generator G is responsible for creating probe cue words, and a discriminator D evaluates the effectiveness of the probes. The generator's input includes the topological feature vector of the decision logic graph, key node attributes, and predefined probe templates; the output is structured probe cue words. During training, the generator learns to produce probes that maximize the discriminator's uncertainty, while the discriminator learns to distinguish between effective and ineffective probes, with both sides continuously optimizing through a game-like process. In practical applications, corresponding cue words are generated based on different probe types: causal chain tracing probes such as "If hypothesis X in step A is not true, how will the decision chain be affected?"; resource conflict detection probes such as "When resource R is needed by both steps B and C, how to resolve potential conflicts?"; secondary effect prediction probes such as "What unexpected consequences might executing step D produce?"; model vulnerability detection probes such as "Which external factors are the decision scheme most sensitive to?"; and ethical and compliance boundary probes such as "Does the scheme meet all the requirements of industry standard S?". These probe cue words specifically test the robustness and completeness of the decision scheme.

[0096] In one implementation, analyzing feedback responses using a pre-trained graph neural network to evaluate the confidence score of the preliminary decision scheme includes the following steps:

[0097] By using a cross-response attention model to analyze the mutual corroboration or contradiction between the feedback responses corresponding to each probe cue word, the hidden logic evaluation results are obtained.

[0098] A Transformer-based natural language inference model is used to identify the relationship between feedback responses and preliminary decision-making schemes;

[0099] Quantify the risk indicators and uncertainties expressed in feedback responses into risk levels;

[0100] The decision logic diagram, feedback response, hidden logic evaluation results, correlation and risk level are input into a pre-trained graph neural network, and the graph neural network outputs the confidence score of the preliminary decision scheme.

[0101] In this implementation, when analyzing the corroborative or contradictory relationships between feedback responses corresponding to probe prompts using a cross-response attention model, 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 as a high-dimensional vector, and then an attention matrix is ​​constructed to calculate the attention score between each pair of responses. Through a multi-head attention mechanism, semantic connections between responses are captured from different perspectives. For example, when a "resource conflict probe" response indicates resource shortages in the mid-project period, and a "secondary effect probe" response also mentions risks at the same point in time, the model will identify this consistency. Similarly, when a "causal chain probe" response and a "compliance boundary probe" response contradict each other in assessing the consequences of a decision, the model will mark this inconsistency. Finally, a hidden logic evaluation result is generated, containing a structured representation of consistency reinforcement points and logical conflict points.

[0102] When using a Transformer-based natural language inference model to identify the relationship between feedback responses and preliminary decision-making options, each key statement in the decision-making option is taken as a premise, and the evaluation content in the feedback response is taken as a hypothesis, which are then input into a pre-trained NLI (Natural Language Inference) model. This model, based on the Transformer architecture, is typically fine-tuned using pre-trained models such as BERT, RoBERTa, or DeBERTa, and can determine the type of relationship between the hypothesis and premise: implication, contradiction, or neutrality. For example, when the decision-making option states "Supplier A can deliver within 10 days," while the feedback response indicates "Based on historical data, Supplier A's average delivery time is 15 days," the model will identify this as a contradiction. The model outputs the probability distribution of each premise-hypothesis relationship, such as {implication: 0.15, contradiction: 0.75, neutrality: 0.10}, and integrates these relationships into support or skepticism scores for each part of the decision-making option.

[0103] When quantifying risk indicators and uncertainty expressions in feedback responses into risk levels, the process begins by identifying risk-related terms and expressions using a domain-specific vocabulary. These terms are categorized by severity, such as "potential failure" (moderate risk) and "serious consequences" (high risk). Sentiment analysis is then applied to assess the sentiment tendency of risk statements, using a BERT-based sentiment classifier to calculate the intensity of negative sentiment. Simultaneously, uncertainty markers such as "possibly," "perhaps," and "approximately" are identified, and their frequency and manner of use in context are assessed to evaluate the degree of uncertainty. Taking into account the severity of risk terms, sentiment intensity, and degree of uncertainty, a weighted formula is used to calculate a risk score. Finally, the risk score is mapped to a 1-5 risk level, where level 1 represents negligible risk and level 5 represents severe risk. The decision logic graph is then 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 relation matrix A represents the connections between nodes. The semantic representation of the feedback response, the hidden logic evaluation results, the relationships, and the risk level are then used as additional features to expand the node feature matrix. Graph neural networks employ Graph Convolutional Networks (GCNs) or Graph Attention Networks (GATs) architectures, aggregating node information through a message-passing mechanism. After multiple layers of graph convolution, the network aggregates information from the entire graph through global pooling operations. Finally, it outputs a confidence score between 0 and 1 through fully connected layers and a sigmoid activation function, representing the reliability level of the decision scheme.

[0104] In one embodiment, the method further includes the following steps:

[0105] When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence is located in the decision logic graph based on the hidden logic evaluation results and correlation relationships.

[0106] Generate structured remediation suggestions, including guiding repair directions, for the root cause node;

[0107] The structured correction suggestions were integrated into the prompt word project, and the inference parameters of the private domain AI agent were adjusted according to the structured correction suggestions.

[0108] Repeat the steps of generating probe prompts, obtaining feedback responses, and evaluating confidence. Employ an iterative optimization process based on Monte Carlo tree search to continuously refine the initial decision scheme until the confidence score of the initial decision scheme meets the preset threshold.

[0109] In this implementation, when the confidence score is lower than a preset threshold, a reverse tracing algorithm is used to propagate backward along the edges of the decision logic graph, starting from the node with low confidence, 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 influence weight of v on u. Simultaneously, contradictions discovered in the hidden logic evaluation are matched with nodes in the graph to identify sources of logical conflict. Furthermore, the types of contradictions in the relationships are analyzed, such as resource allocation conflicts, temporal dependency violations, and constraint failures. Combining these three aspects, a weighted scoring mechanism is used to determine the root cause node. Next, a corresponding repair template is selected based on the problem type of the root cause node. The repair template library contains standardized repair frameworks for different error types (such as resource conflicts, logical contradictions, constraint violations, etc.). Then, the specific parameters in the template are filled in according to the node attributes and error characteristics. For example, for the problem of resource over-allocation, the remediation suggestion is "adjust the resource allocation ratio, reducing resource A from task X by 20% and reallocating it to task Y." The remediation suggestion uses a structured format, containing four key parts: problem description (clearly stating the nature of the problem), remediation goal (the desired state), specific actions (detailed modification guidelines), and verification methods (how to confirm the effectiveness of the remediation). Each remediation suggestion also includes a confidence estimate, indicating the likely success rate of the remediation plan.

[0110] The proposed corrections are then transformed into enhanced prompts. This involves converting the problem description into background information, the fix into task objectives, and specific actions into guiding prompts. For example, the original correction suggestion "increase resource diversity considerations" is transformed into "please specifically consider at least three different types of resource sources in the solution and analyze their complementarity." Then, based on the nature of the correction suggestion, the AI ​​agent's inference parameters are adjusted. For problems requiring more comprehensive thinking, the inference depth parameter is increased (e.g., increasing the number of thought chain steps); for problems requiring more conservative decision-making, the temperature parameter is decreased (e.g., from 0.7 to 0.4); for problems requiring more diverse thinking, the top_p value is appropriately increased (e.g., from 0.92 to 0.98). These parameter adjustments, along with the enhanced prompts, guide the AI ​​agent to improve its reasoning process in specific directions, generating more suitable decision solutions.

[0111] Next, a search tree for the decision space needs to be constructed. Each node in the tree represents a possible variant of the decision, and 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 variant solutions based on the revised suggestions. The simulation phase quickly evaluates the potential confidence of the new solutions. The backpropagation phase updates the value estimates of nodes in the search tree. Through multiple iterations (typically 50-100 rounds), the search process gradually converges to the solution with the highest confidence. When the confidence score of the optimal 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 implementation, automatically generating an execution script by referring to a preset script template and based on a preliminary decision-making plan or a decision-making plan revised based on feedback includes the following steps:

[0113] Generate a script execution dependency graph based on the step dependencies and data flows in the preliminary or revised decision scheme;

[0114] Script code is generated by using program synthesis technology and combining a pre-set script template library with the semantic description of the decision-making scheme;

[0115] Based on the potential risks assessed by the probe prompts, dynamic assertions are injected into the generated script code for real-time verification of the execution status during script execution.

[0116] To define the steps of the compensation operation, generate the corresponding idempotent compensation script and associate the idempotent compensation script with the main execution script in the script code;

[0117] Static verification of script properties is performed on the script code and idempotent compensation script using formal methods;

[0118] The validated script code and idempotent compensation script are assembled into a deployable executable script package according to the script execution dependency graph.

[0119] In this implementation, when generating a script execution dependency graph based on the step dependencies and data flows in the decision-making scheme, all execution steps 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 be completed before" (strong dependency), "best completed before" (weak dependency), "data input / output" (data flow), etc. The dependency graph uses a directed acyclic graph (DAG) structure to ensure the rationality of the execution order. The execution sequence of steps is determined using a topological sorting algorithm, and the critical path is calculated to identify key steps affecting the total execution time. The final generated dependency graph is stored in GraphML or JSON format, serving as the basic structure for subsequent script generation. Then, the most matching script template is selected from a template library based on the functional type of the decision steps. The template library contains standardized script fragments for various common operations, such as database operations, API calls, file processing, etc. The selection process uses semantic similarity matching, employing a pre-trained text embedding model (such as BERT or Word2Vec) to calculate the cosine similarity between the decision step description and the template description. After selecting a template, a slot-filling mechanism inserts specific parameters, variable names, and condition values ​​from the decision-making scheme into placeholders within the template. 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] Based on the probe assessment results, high-risk points and their risk characteristics are extracted from the potential risks evaluated by the probe prompts. For each risk point, corresponding assertion logic is designed, including conditional expressions and handling strategies for violations. Assertion types include data validity assertions (checking whether data conforms to the expected format and range), resource status assertions (monitoring system resource usage), business rule assertions (ensuring operations conform to business logic), and performance assertions (monitoring execution time and response speed). For example, for the "API response timeout" risk, an assertion checking API response time is inserted, with a threshold of 3 seconds. The assertion implementation adopts a lightweight design to minimize the impact on execution performance, while configuring behaviors for assertion violations, such as logging warnings, retrying operations, triggering compensation logic, or aborting execution. These assertions act as a safety net, capturing potential problems at runtime and preventing error propagation.

[0121] For each step defining a compensation operation, corresponding compensation logic is designed to ensure a safe rollback to the pre-operation state even after multiple executions. The compensation script design adheres to the idempotency principle, meaning the result state remains the same regardless of whether it is executed once or multiple times. Common techniques for achieving idempotency include using unique identifiers to track operation states, implementing check-execute patterns, and using conditional execution statements. For example, for the "create user account" operation, the compensation script is "check and delete the specified user account"; for the "deduct inventory" operation, the compensation script is "restore a specific amount of inventory". The compensation script is associated with the main execution script via a transaction ID, stored in the compensation registry, and referenced in the main script's try-catch block or error handling logic. This design ensures that the system can recover to a consistent state even when complex operations fail. When performing static verification of script properties using formal methods on the script code and the idempotent compensation script, the script code is first converted into a formal model, such as a state transition system or a process algebra expression. The conversion process uses a domain-specific parser to extract the script's control flow, data dependencies, and resource operations. Then, define the key properties to be verified, including termination (whether the program always terminates), safety (whether it will enter an undesirable state), liveness (whether it will always reach the desired state), and fairness (whether it will not indefinitely delay certain operations). Use model verification tools (such as SPIN, NuSMV) or theorem provers (such as Coq, Isabelle) to verify these properties. For example, verify whether the compensation script truly achieves idempotency, verify whether there is a deadlock risk in the execution path, or confirm that resources are correctly released on all execution paths. Verification results include property satisfaction proofs or counterexamples. Counterexamples are transformed back into the script context, indicating the specific problem location and suggested fixes.

[0122] When assembling validated script code and idempotent compensation scripts into a deployable execution script package according to the script execution dependency graph, the script organization method is first determined based on the topology of the dependency graph. For simple linear processes, a structure of a single main script plus sub-modules may be used; for complex parallel processes, a distributed execution unit managed by a workflow engine may be used. The assembly process includes generating a main control script, which is responsible for calling the scripts of each step in the order of dependencies, managing the execution status, and handling errors. Simultaneously, configuration files are created, containing configurable parameters such as environment variables, API keys, and resource paths. To improve reliability, a checkpoint mechanism is implemented to periodically save the execution status and support recovery from failure points. Furthermore, monitoring and logging components are integrated to record key events and performance metrics during execution. Finally, the package is packaged into a standard format (such as a Docker container, ZIP package, or installer), containing all script files, dependency libraries, configuration files, documentation, and deployment instructions, forming a complete deployable execution unit.

[0123] The present invention also discloses an AI agent-based decision generation and execution system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the AI ​​agent-based decision generation and execution method as described in any of the above embodiments.

[0124] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.

[0125] The memory can be an internal storage unit of a computer device, such as a hard disk or RAM, or an external storage device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) provided on the computer device. Furthermore, the memory can be a combination of internal storage units and external storage devices 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 will be output. This application does not limit this.

[0126] The present invention also discloses a computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to be configured to perform the AI ​​agent-based decision generation and execution method described in any of the above embodiments.

[0127] The computer program can be stored in a machine-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The machine-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the machine-readable medium includes, but is not limited to, the above-mentioned components.

[0128] The AI ​​agent-based decision generation and execution method described in the above embodiments is stored in the computer-readable storage medium and 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 exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.

[0130] One or more embodiments in this application are intended to cover 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 in this application should be included within the protection scope of this application.

Claims

1. A decision generation and execution method based on AI intelligent agents, characterized in that, Includes the following steps: Natural language processing technology is used to parse user-input requirement documents, and a structured prompt word project is constructed based on the key requirement information, constraints and preconditions extracted from the parsing. The prompt words are input into a private domain AI agent with a large model as the underlying engine. The private domain AI agent, combined with the professional domain database corresponding to the requirements document, generates a preliminary decision-making solution. Decision logic diagrams are constructed by analyzing graphical or semi-structured data of preliminary decision-making schemes; Identify the topology of the decision logic graph and the key decision nodes within it; A probe generator trained on a generative adversarial network generates adversarial introspection probe prompts for a private AI agent based on the topology and key decision nodes. The probe prompts are used to guide the private AI agent to evaluate the internal consistency, potential risks, or constraint compliance of the initial decision scheme. Input probe prompts into the private domain AI agent and obtain feedback from the private domain AI agent on the preliminary decision-making plan; By using a cross-response attention model to analyze the mutual corroboration or contradiction between the feedback responses corresponding to each probe cue word, the hidden logic evaluation results are obtained. A Transformer-based natural language inference model is used to identify the relationship between feedback responses and preliminary decision-making schemes; Quantify the risk indicators and uncertainties expressed in feedback responses into risk levels; The decision logic diagram, feedback response, hidden logic evaluation results, correlation and risk level are input into a pre-trained graph neural network, and the graph neural network outputs the confidence score of the preliminary decision scheme. When the confidence score meets the preset threshold, the execution script is automatically generated by referring to the preset script template and based on the preliminary decision plan or the decision plan revised based on the feedback response. By executing scripts, the corresponding target software or system is automatically operated to execute decision-making schemes by calling preset application programming interfaces, and decision execution documents are generated.

2. The decision generation and execution method based on AI intelligent agents according to claim 1, characterized in that, The process of parsing user-inputted requirement documents using natural language processing technology and constructing a structured prompt word project based on the extracted key requirement information, constraints, and preconditions includes the following steps: Receive a requirements document containing natural language descriptions through a pre-defined user interface; Natural language processing is performed on the requirements document to identify key entities and the relationships between them. Natural language processing includes word segmentation, part-of-speech tagging, named entity recognition, and relation extraction. Based on the processing results of natural language processing, the core needs and intentions of users are identified, and predefined slot information associated with the core needs and intentions is filled in; Extract the constraints and prerequisite rules for decision execution explicitly or implicitly from the requirements document; By combining core requirements and predefined slot information with preset prompt word templates, a structured prompt word project containing constraints and prerequisite rules is constructed.

3. The decision generation and execution method based on AI intelligent agents according to claim 1, characterized in that, The process of inputting the prompt words into a private domain AI agent with a large model as its underlying engine, and generating a preliminary decision-making solution through the private domain AI agent and a professional domain database corresponding to the requirements document, includes the following steps: The retrieval strategy is dynamically determined based on the task complexity and domain specificity of the prompt word project. According to the retrieval strategy, a multi-stage retrieval is performed in the professional field database corresponding to the requirement document to obtain multiple knowledge fragments; All knowledge fragments are weighted and fused based on confidence level. The weights of the knowledge fragments are calculated according to their source reliability, timeliness, and relevance to the current task. The weighted and fused knowledge content is then injected into the prompt word project. The enhanced prompt words containing weighted fusion knowledge are fed into a private domain AI agent with a large model as the underlying engine. The private domain AI agent generates a preliminary decision plan that includes 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 generation and execution method based on AI intelligent agents according to claim 1, 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.

5. The decision generation and execution method based on AI intelligent agents according to claim 1, characterized in that, The method further includes the following steps: When the confidence score is lower than the preset threshold, the root cause node causing insufficient confidence is located in the decision logic graph based on the hidden logic evaluation results and correlation relationships. Generate structured remediation suggestions, including guiding repair directions, for the root cause node; The structured correction suggestions were integrated into the prompt word project, and the inference parameters of the private domain AI agent were adjusted according to the structured correction suggestions. Repeat the steps of generating probe prompts, obtaining feedback responses, and evaluating confidence. Employ an iterative optimization process based on Monte Carlo tree search to continuously refine the initial decision scheme until the confidence score of the initial decision scheme meets the preset threshold.

6. The decision generation and execution method based on AI intelligent agents according to claim 1, characterized in that, The automatic generation of the execution script by referring to a preset script template and based on the preliminary decision-making plan or the decision-making plan revised based on feedback includes the following steps: Generate a script execution dependency graph based on the step dependencies and data flows in the preliminary or revised decision scheme; Script code is generated by using program synthesis technology and combining a pre-set script template library with the semantic description of the decision-making scheme; Based on the potential risks assessed by the probe prompts, dynamic assertions are injected into the generated script code for real-time verification of the execution status during script execution. To define the steps of the compensation operation, generate the corresponding idempotent compensation script and associate the idempotent compensation script with the main execution script in the script code; Static verification of script properties is performed on the script code and idempotent compensation script using formal methods; The validated script code and idempotent compensation script are assembled into a deployable executable script package according to the script execution dependency graph.

7. A decision generation and execution system based on an AI intelligent 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, it implements the decision generation and execution method based on an AI agent as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, the instruction causes the processor to be configured to perform the decision generation and execution method based on an AI agent according to any one of claims 1 to 6.

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