An agent-oriented research and development workflow template verification method and system, and an optimization method and system
By constructing multi-dimensional path verification and causal evidence chains, the problems of single verification dimension and uninterpretable results in workflow template verification are solved, realizing automatic and comprehensive verification and optimization of workflow templates, and improving verification accuracy and quality convergence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KEDA ZHILING (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies in workflow template verification suffer from limitations such as a single verification dimension, lack of interpretability of results, inability to form an autonomous closed loop of 'detection-location-repair', and inability to achieve automatic and comprehensive verification and optimization.
A causal evidence chain is generated through multi-dimensional path verification, including syntactic, logical, parameter, and quality verification. The causal evidence chain is then constructed for quality assessment and optimization, forming a closed loop of 'detection-location-repair'.
It enables interpretable and quantifiable location of defects in workflow templates, improves the accuracy of verification and automates the entire process, and achieves automated convergence optimization of workflow template quality.
Smart Images

Figure CN122132269A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of software engineering technology, and in particular to a workflow template verification method and system, and an optimization method and system for agent development. Background Technology
[0002] With the increasing automation of software development, automatically generating workflow templates based on natural language requirements using Large Language Models (LLMs) has become a key technology for improving R&D efficiency. However, workflow templates must undergo rigorous quality verification before being put into practical use to ensure that they have correct syntax, logic, complete parameters, and semantics that conform to business intent.
[0003] The relevant technologies for quality verification of workflow templates mainly employ three methods: The first is through static syntax checking tools, which can only identify formatting errors and cannot determine deeper issues such as task dependencies and parameter logic. The second is based on pre-defined rule-based verification systems, using manually written rule sets for logical checks; however, these pre-defined rules are costly to maintain, lack flexibility, and struggle to cover complex and ever-changing semantic scenarios. The third is based on statistical learning-based quality prediction models, relying on historical data to train and evaluate the "quality" of workflow templates; however, this verification process is uninterpretable, unable to pinpoint specific defects, and cannot trigger automatic repair. These three methods share common problems: limited verification dimensions, lack of interpretability, and a focus solely on problem discovery, failing to form a self-governing "detection-location-repair" closed loop.
[0004] Therefore, how to achieve automatic and comprehensive validation and optimization of workflow templates has become the main problem to be solved.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute related technology known to those skilled in the art. Summary of the Invention
[0006] To overcome the problems existing in related technologies, this disclosure provides a workflow template verification method and system, as well as an optimization method and system, for Agent development.
[0007] According to a first aspect of the present disclosure, a workflow template verification method for Agent development is provided, the method comprising: Get the workflow template; Perform multi-dimensional path validation on the workflow template and generate validation results for each validation path; The various verification results are processed to obtain the causal evidence chain corresponding to the workflow template.
[0008] In one possible design, performing multi-dimensional path validation on the workflow template and generating validation results for each validation path includes: Perform syntax validation on the workflow template and generate validation results for the syntax validation path; Perform logical verification on the workflow template and generate the verification results of the logical verification path; Perform parameter validation on the workflow template and generate validation results for the parameter validation path; Perform quality verification on the workflow template and generate verification results for the quality verification path.
[0009] In one possible design, performing syntax validation on the workflow template and generating validation results for the syntax validation path includes: The workflow template is semantically parsed to obtain the corresponding syntax structure and template format. The syntax structure and template format are validated, and the validation results of the syntax validation path are generated.
[0010] In one possible design, performing logical verification on the workflow template and generating verification results for the logical verification path includes: The workflow template is parsed into a task node diagram; The task node graph is traversed using a depth-first search algorithm. Circular dependencies and isolated nodes in the task node graph are detected and identified to obtain the identification results. Based on the identification results, the verification results of the logical verification path are generated.
[0011] In one possible design, performing parameter validation on the workflow template and generating validation results for the parameter validation path includes: The workflow template is parsed into a task node diagram; Check whether the required parameters of the task nodes in the task node diagram are missing, and obtain the parameter check results; Determine the parameter type corresponding to the parameter value in the workflow template, check whether the parameter type meets the parameter constraint conditions, and obtain the parameter constraint result; Based on the parameter check results and the parameter constraint results, the verification results of the parameter verification path are generated.
[0012] In one possible design, performing quality verification on the workflow template and generating verification results for the quality verification path includes: The workflow template is subjected to multi-dimensional intelligent checks to obtain intelligent check results and optimization suggestion reports; wherein, the intelligent check results include: topology structure check, logical coherence check, semantic consistency check, etc. Based on the intelligent inspection results and the optimization suggestion report, the verification results of the quality verification path are generated.
[0013] In one possible design, the structural unification processing of the various verification results to obtain a causal evidence chain includes: Normalize each verification result to obtain the evidence node corresponding to each verification result; Perform causal analysis on each evidence node to obtain the causal evidence chain corresponding to the workflow template.
[0014] According to a second aspect of the present disclosure, a workflow template optimization method for Agent development is provided, the method comprising: Obtain the causal evidence chain corresponding to the workflow template; Based on the causal evidence chain, calculate the overall quality score of the workflow template; The workflow template is optimized based on the comprehensive quality score to obtain the target workflow template.
[0015] In one possible design, calculating the overall quality score of the workflow template based on the causal chain of evidence includes: Determine the preset weight value corresponding to each verification path of the workflow template; From the causal evidence chain, determine the problem corresponding to each verification result, and determine the problem type and severity corresponding to each problem; The workflow template's overall quality score is obtained by weighting and summing the preset weight values and severity levels corresponding to each problem.
[0016] In one possible design, optimizing the workflow template based on the comprehensive quality score to obtain the target workflow template includes: If the overall quality score is lower than the preset quality threshold, the workflow template is iteratively optimized to obtain the target workflow template. If the overall quality score is not lower than the preset quality threshold, then the workflow template is determined as the target workflow template.
[0017] In one possible design, the iterative optimization of the workflow template to obtain the target workflow template includes: Determine the single-region score for each question and the single-region score threshold for each question from the causal evidence chain; Calculate the score difference between the single-region score and the corresponding single-region score threshold for each of the above questions; Based on the score difference, at least one problem area is identified from the causal evidence chain; The at least one problem area is iteratively optimized to obtain the target workflow template.
[0018] In one possible design, the iterative optimization process for the at least one problem region to obtain the target workflow template includes: Determine the problem type corresponding to the at least one problem area, and generate a targeted repair prompt corresponding to the at least one problem area based on the problem type corresponding to the at least one problem area; the targeted repair prompt is configured to maintain the overall structure of the workflow template unchanged; Based on the at least one fixed-point repair prompt, the workflow template is partially rewritten to obtain the target workflow template.
[0019] In one possible design, after optimizing the workflow template based on the comprehensive quality score to obtain the target workflow template, the process further includes: Determine the target causal evidence chain corresponding to the target workflow template; Based on the target causal evidence chain, calculate the target comprehensive quality score of the target workflow template; The target comprehensive quality score is compared with the preset quality threshold to obtain a comparison result, and a setting operation is performed on the target workflow template based on the comparison result.
[0020] In one possible design, performing a setting operation on the target workflow template based on the comparison result includes: If the target comprehensive quality score is lower than the preset quality threshold, then the number of iterations corresponding to the target workflow template is determined, and different operations are performed on the target workflow template based on the relationship between the number of iterations and the iteration threshold. If the target comprehensive quality score is not lower than the preset quality threshold, then the target workflow template, the target causal evidence chain, and the target comprehensive quality score are stored.
[0021] In one possible design, the step of performing different operations on the target workflow template based on the relationship between the number of iterations and the iteration number threshold includes: If the number of iterations is lower than the iteration threshold, then the target workflow template is iteratively optimized. If the number of iterations is not less than the iteration threshold, the optimization process of the target workflow template is terminated, and the reason for failure is recorded.
[0022] According to a third aspect of the present disclosure, a workflow template verification system for Agent development is provided, comprising: The template acquisition module is used to acquire workflow templates; The multi-dimensional verification module is used to perform multi-dimensional path verification on the workflow template and generate verification results for each verification path. The causal evidence module is used to perform structural unification processing on each verification result to obtain the causal evidence chain corresponding to the workflow template.
[0023] In one possible design, the multidimensional verification module is specifically used to perform syntax verification on the workflow template and generate verification results for the syntax verification path; perform logic verification on the workflow template and generate verification results for the logic verification path; perform parameter verification on the workflow template and generate verification results for the parameter verification path; and perform quality verification on the workflow template and generate verification results for the quality verification path.
[0024] In one possible design, the multidimensional verification module is further configured to perform semantic parsing on the workflow template to obtain the syntax structure and template format corresponding to the workflow template, verify the syntax structure and template format, and generate verification results for the syntax verification path.
[0025] In one possible design, the multidimensional verification module is further configured to parse the workflow template into a task node graph, traverse the task node graph based on a depth-first search algorithm, identify circular dependencies and isolated nodes in the task node graph, obtain identification results, and generate verification results for the logical verification path based on the identification results.
[0026] In one possible design, the multidimensional verification module is further configured to parse the workflow template into a task node diagram, check whether the required parameters of the task nodes in the task node diagram are missing, obtain parameter check results, determine the parameter type corresponding to the parameter value in the workflow template, check whether the parameter type meets the parameter constraint conditions, obtain parameter constraint results, and generate verification results for the parameter verification path based on the parameter check results and the parameter constraint results.
[0027] In one possible design, the multidimensional verification module is further used to perform multidimensional intelligent checks on the workflow template to obtain intelligent check results and optimization suggestion reports. The intelligent check results include topology structure checks, logical coherence checks, semantic consistency checks, etc. Based on the intelligent check results and the optimization suggestion reports, verification results of the quality verification path are generated.
[0028] In one possible design, the causal evidence module is specifically used to normalize each verification result to obtain the evidence node corresponding to each verification result, perform causal analysis on each evidence node, and obtain the causal evidence chain corresponding to the workflow template.
[0029] According to a fourth aspect of the present disclosure, a workflow template optimization system for Agent development is provided, comprising: The causal evidence acquisition module is used to obtain the causal evidence chain corresponding to the workflow template; A quality scoring module is used to calculate the overall quality score of the workflow template based on the causal evidence chain. The template optimization module is used to optimize the workflow template based on the comprehensive quality score to obtain the target workflow template.
[0030] In one possible design, the quality scoring module is specifically used to determine the preset weight value corresponding to each of the verification paths, determine the problem corresponding to each of the verification results from the causal evidence chain, determine the problem type and severity corresponding to each problem, and perform a weighted summation of the preset weight value and severity corresponding to each problem to obtain the comprehensive quality score of the workflow template.
[0031] In one possible design, the template optimization module is specifically used to optimize the workflow template to obtain a target workflow template if the overall quality score is lower than a preset quality threshold, and to determine the workflow template as the target workflow template if the overall quality score is not lower than the preset quality threshold.
[0032] In one possible design, the template optimization module is further configured to determine the single-region score of each problem and the single-region score threshold corresponding to each problem from the causal evidence chain, calculate the score difference between the single-region score of each problem and the corresponding single-region score threshold, determine at least one problem region from the causal evidence chain based on the score difference, optimize the at least one problem region, and obtain the target workflow template.
[0033] In one possible design, the template optimization module is further configured to determine the problem type corresponding to the at least one problem area, and generate a targeted repair prompt corresponding to the at least one problem area based on the problem type corresponding to the at least one problem area; the targeted repair prompt is configured to keep the overall structure of the workflow template unchanged, and to rewrite a local area of the workflow template based on the at least one targeted repair prompt to obtain the target workflow template.
[0034] In one possible design, the template optimization module is further configured to determine the target causal evidence chain corresponding to the target workflow template, calculate the target comprehensive quality score of the target workflow template based on the target causal evidence chain, compare the target comprehensive quality score with the preset quality threshold to obtain a comparison result, and perform setting operations on the target workflow template based on the comparison result.
[0035] In one possible design, the template optimization module is further configured to: if the target overall quality score is lower than the preset quality threshold, determine the number of iterations corresponding to the target workflow template; perform different operations on the target workflow template based on the relationship between the number of iterations and the iteration threshold; and if the target overall quality score is not lower than the preset quality threshold, store the target workflow template, the target causal evidence chain, and the target overall quality score.
[0036] In one possible design, the template optimization module is further configured to perform iterative optimization on the target workflow template if the number of iterations is lower than the number of iterations threshold, and terminate the optimization process of the target workflow template and record the reason for failure if the number of iterations is not lower than the number of iterations threshold.
[0037] According to a fifth aspect of the present disclosure, a computer device is provided, comprising: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the method of the first or second aspect described above.
[0038] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method of the first or second aspect described above is implemented.
[0039] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: In this embodiment of the disclosure, through multi-dimensional verification and the construction of a causal evidence chain, the defects of the workflow template are explained and quantifiable, the accuracy of workflow template verification is achieved, and the entire process of workflow template verification is automated.
[0040] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: In this embodiment of the disclosure, based on causal evidence chain-driven iterative optimization, the automation and convergence of workflow template quality are realized, effectively solving the defects of one-sided verification, black box decision-making and inability to self-repair in related technologies, and realizing automatic and comprehensive optimization of workflow templates.
[0041] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0042] The accompanying drawings, which are incorporated in and form part of this disclosure, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0043] Figure 1 This is a schematic diagram of a system architecture illustrated in an exemplary embodiment of this disclosure; Figure 2 This disclosure is a flowchart illustrating a workflow template verification method for agent-oriented development according to an exemplary embodiment. Figure 3 This disclosure is a flowchart illustrating a workflow template optimization method for agent-oriented development according to an exemplary embodiment. Figure 4 This disclosure illustrates a flowchart of iterative optimization of a workflow template based on a causal evidence chain, according to an exemplary embodiment. Figure 5 This disclosure is a schematic diagram of a knowledge base and retrieval index according to an exemplary embodiment; Figure 6 This is a schematic diagram illustrating the process of validating and optimizing a workflow template according to an exemplary embodiment of this disclosure; Figure 7 This disclosure is a schematic diagram illustrating the structure of a workflow template verification system for agent-oriented development according to an exemplary embodiment; Figure 8 This disclosure is a schematic diagram illustrating the structure of a workflow template optimization system for agent-oriented development according to an exemplary embodiment; Figure 9 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0045] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0046] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0047] In related technologies, static syntax detection tools for workflow template verification can only identify format errors and cannot determine deeper issues such as task dependencies and parameter logic. Verification systems based on preset rules have high maintenance costs, poor flexibility, and are difficult to cover complex and ever-changing semantic scenarios. Validation of workflow templates based on statistical learning quality prediction models is uninterpretable, cannot locate specific defects, and cannot trigger automatic repair. The problems with quality verification of workflow templates are: limited verification dimensions, lack of interpretability of results, and failure to form an autonomous closed loop of "detection-location-repair". Therefore, how to achieve automatic and comprehensive verification and optimization of workflow templates has become the main problem to be solved.
[0048] To address the issues of single verification dimensions, uninterpretable verification results, and the inability to automatically trigger repairs based on verification results in related technologies, this application provides a general post-processing quality governance system decoupled from the generation method. The system receives the generated workflow template. In this application, the workflow template can be manually written or generated by other systems; this is not limited. By performing multi-path, independent verification on the workflow template, a causal evidence chain reflecting the causes and impacts of workflow template defects is constructed. This causal evidence chain serves as the sole basis for subsequent quality assessment and optimization decisions, thus forming a collaborative closed-loop workflow template self-governance mechanism of "detection-location-repair," thereby continuously improving the quality and reliability of workflow templates.
[0049] Unlike existing solutions that focus on the rationality or functionality of workflow template generation, this application focuses on the systematic verification, causal localization, and controllable optimization of the generated workflow template. By constructing a closed loop of "verification-evidence-decision", it solves the problems of interpretability, accurate repair, and convergence control in workflow template quality governance.
[0050] Furthermore, the embodiments of this application and the workflow template generation method form a clear connection between the preceding and following processes. The workflow template generation method solves the problem of how to generate a structurally reasonable workflow template, while the embodiments of this application solve the problem of how to systematically perform quality positioning and achieve sustainable optimization after the workflow template is generated. The combination of the two constitutes a complete technical closed loop from intelligent generation to continuous governance.
[0051] The following will provide a detailed description of the workflow template verification method and the workflow template optimization method for agent-oriented development in this example embodiment.
[0052] To efficiently validate and optimize workflow templates, this application embodiment constructs a collaborative system architecture. A schematic diagram of the system architecture is shown below. Figure 1 As shown, in Figure 1 The system architecture consists of a causal reasoning module, a template synthesis module, a multi-path verification module, an iterative optimization module, and a knowledge base module. These modules collaborate in a closed loop through a unified data flow interface, allowing for deployment on different platforms and model environments.
[0053] Specifically, the causal reasoning module is based on the working corpus as its data support, integrates the contextual information output by the project context analyzer, and then, through the auxiliary grouping module, classifies and organizes the relevant data to conduct causal relationship analysis, thereby accurately locating the logical relationship between parameters and template performance; the template synthesis module provides workflow templates to be verified; the multi-path verification module performs multi-dimensional path verification on the workflow template. When verification fails, the workflow template is iteratively optimized based on the iterative optimization module, and then the iterated target workflow template is input into the multi-path verification module for re-verification; when verification passes, the multi-path verification module inputs the workflow template into the knowledge base module for storage.
[0054] By coordinating multiple functional modules in the system architecture, the problem of workflow templates having a single verification dimension, lacking interpretability of results, and stopping at the point of discovering problems, thus failing to form an autonomous closed loop of "detection-location-repair", is solved.
[0055] like Figure 2 As shown, Figure 2 This disclosure is a flowchart illustrating a workflow template verification method for agent development according to an exemplary embodiment, including the following steps: In step S210, a workflow template is obtained.
[0056] The aforementioned workflow templates can originate from: manually written configurations, outputs generated by other automated tools or systems, or workflow templates generated based on causal graphs. The effectiveness of the embodiments in this application does not depend on the specific generation method of the workflow template. Its core value lies in the ability to generalize the quality management of existing workflow templates.
[0057] For example, in a real-world software development scenario, an LLM model can receive continuous integration (CI) or continuous deployment (CD) requirements described by users in natural language, such as: "Please create a CI process for a Node.js project, including three steps: installing dependencies, running tests, and building the project, using Node.js version 18." Based on the workflow template generation method of agentic artificial intelligence (Agentic AI) causal reasoning, a workflow template corresponding to the CI or CD requirement can be generated.
[0058] It should be noted that the above workflow template can be a data serialization format (YAML Ain't MarkupLanguage, YAML) template, and the LLM model can be replaced with a generative pre-trained transformer (GPT), etc., which will not be discussed in detail here.
[0059] The above methods are used to obtain workflow templates, providing basic data support for subsequent verification and optimization of workflow templates.
[0060] In step S220, multi-dimensional path verification is performed on the workflow template to generate verification results for each verification path.
[0061] The aforementioned multi-dimensional path verification includes four independent verification paths: syntax verification, logic verification, parameter verification, and quality verification. Each verification path is based on different verification rules and is executed without any sequential dependency between them. Each path generates an independent verification result. If any verification path finds an anomaly, it can trigger subsequent causal analysis and optimization processing independently, thereby constructing a multi-source and complementary verification evidence system.
[0062] To achieve a comprehensive review of the workflow template quality, this embodiment of the application initiates multiple independent verification paths in parallel, detecting the workflow template from different dimensions to avoid bias and omissions from a single path. The specific process of verifying the workflow template based on each dimension is as follows: To address the issue of workflow templates failing to be parsed and executed by the system due to format or syntax errors, this application embodiment requires semantic parsing of the workflow templates. This semantic parsing can be implemented based on a YAML parser to obtain the syntax structure and template format of the workflow template, and to verify the syntax structure and template format to obtain the verification result of the syntax verification path.
[0063] Furthermore, the grammatical structure is compared with the set grammatical structure. When the grammatical structure is consistent with the set grammatical structure, it means that the workflow template has no grammatical structure problems, and the grammatical structure verification of the workflow template will be determined to be successful. When the grammatical structure is inconsistent with the set grammatical structure, it means that the workflow template has grammatical structure problems, and the grammatical structure verification of the workflow template will be determined to be unsuccessful.
[0064] The template format is compared with the set template format. When the template format is the same as the set template format, it means that the template format of the workflow template is correct, and the template format verification of the workflow template will be determined to be successful. When the template format is different from the set template format, it means that the template format of the workflow template is abnormal, and the template format verification of the workflow template will be determined to be unsuccessful.
[0065] If either the syntax structure validation or the template format validation of the workflow template fails, the validation result of the syntax validation path will be determined to be unsuccessful, and the specific problem area will be marked in the workflow template. For example, the YAML parser checks whether the indentation, colons, list structure, etc. of the workflow template conform to the specifications. If there are duplicate colons in the workflow template, the colons will be marked.
[0066] Based on the above method, automatic syntax validation of workflow templates is achieved. It can automatically detect syntax errors or template format errors in workflow templates, and ensure the accuracy of workflow templates in terms of syntax.
[0067] To address the logical problem of workflow templates failing to execute correctly due to circular dependencies or isolated nodes, this application embodiment requires performing logical verification on the workflow template. The logical verification requires parsing the workflow template into a task node graph and identifying circular dependencies and isolated nodes in the task node graph based on a depth-first search algorithm. The identification results are then used to generate the verification results of the logical verification path.
[0068] Furthermore, the graph depth-first search algorithm can be the Tarjan algorithm. A cyclic dependency is defined as a cycle formed by nodes in the task node graph, such as a path starting from node A and returning to node A. If the identification result includes task nodes corresponding to each cyclic dependency in the task node graph, and / or isolated nodes, then the verification result of the logical verification path is determined to be failed, and the problem area with logical errors is marked and stored. If the identification result does not contain cyclic dependencies or isolated nodes, then the verification result of the logical verification path is determined to be passed.
[0069] Based on the above method, the workflow template is automatically logically validated, realizing in-depth validation of the logical consistency and executability of the workflow template, which can ensure the accuracy of the workflow template in the logical dimension.
[0070] To address the reliability issue of runtime interruptions caused by missing or mismatched parameters, this application embodiment requires parameter verification of the workflow template. Parameter verification needs to check whether there are any missing required parameters for each task node in the task node diagram of the workflow template, and obtain the parameter check results. If there are task nodes in the task node diagram that are missing required parameters, the task nodes with missing required parameters will be marked and stored in the parameter check results.
[0071] Furthermore, parameter validation also requires determining the parameter type corresponding to the parameter value in the workflow template, checking whether the parameter type meets the parameter constraint conditions, and obtaining the parameter constraint results. The parameter type can be an integer or a string, and the parameter constraint conditions can be a range of values, starting with "USER", etc. Both the parameter type and parameter constraint conditions can be set and adjusted according to the actual software development scenario, which will not be explained in detail here.
[0072] When the parameter type meets the parameter constraint conditions, the parameter constraint result is determined to be passed; when the parameter type does not meet the parameter constraint conditions, the parameter type is marked and stored, and the parameter constraint result is determined to be failed.
[0073] When both the parameter check result and the parameter constraint result are passed, the verification result of the parameter verification path is determined to be passed; when either the parameter check result or the parameter constraint result is failed, the verification result of the parameter verification path is determined to be failed, and the failed task node or parameter type is recorded in the verification result.
[0074] For example, the parameter validation path might recognize that the value "18" of "node-version" is a numeric type, while the parameter constraint is a string type, thus generating a validation result indicating an incorrect parameter type.
[0075] Based on the above method, the parameters of the workflow template are validated, ensuring the completeness of the required parameters and the accuracy of the parameter types.
[0076] To address quality issues such as workflow templates being syntactically correct but semantically redundant, logically incomplete, or not conforming to best practices, this application embodiment requires quality verification of the workflow templates. Quality verification involves performing multi-dimensional intelligent checks on the workflow templates, including topology structure checks, logical coherence checks, and semantic consistency checks. The intelligent check results are then obtained. When the intelligent check result is unsuccessful, the intelligent check result records the errors in the workflow template's topology structure, logical coherence, and semantic consistency, and an optimization suggestion report is generated based on the intelligent check results.
[0077] Furthermore, the aforementioned topology check can be a redundant node check, and the logical coherence check can be a check for missing logic. Based on the intelligent check results and optimization suggestion report, the verification results of the quality verification path are generated. The quality verification can be implemented based on the LLM model, which will not be explained in detail here.
[0078] For example, the intelligent inspection results indicate that the workflow template lacks a clear "test" step, which does not meet user needs. The optimization suggestion report suggests that the step order can be optimized to "install, test, build" to better conform to engineering practice, thereby generating verification results for the quality verification path.
[0079] Based on the above method, the quality verification of workflow templates was realized, the ability to understand the contextual semantics in workflow templates was improved, and thus the quality of workflow templates was ensured.
[0080] Each of the path verification methods in the above multi-dimensional path verification can be added or deleted based on the actual software development scenario, which will not be explained in detail here.
[0081] Using the methods described above, the system establishes four verification paths: syntax, logic, parameters, and semantics. These paths detect and evaluate workflow templates from different dimensions. The verification paths are independent yet cross-validated, ensuring the comprehensiveness and stability of the verification results. Parallel detection is performed on the workflow templates based on each dimension, ensuring the efficiency of workflow template verification and improving the quality of workflow templates.
[0082] In step S230, the structure of each verification result is unified to obtain the causal evidence chain corresponding to the workflow template.
[0083] To address the issues of scattered, difficult-to-associate, and traceable existing verification results, this application embodiment normalizes the verification results generated from the four paths, which have different formats, to obtain evidence nodes corresponding to each verification result. Each evidence node records the problem discovered during verification, the problem description, the source of the problem, the type of the problem, the scope of impact, and confidence information.
[0084] For example, the source of the problem can be a specific YAML node path, and the problem type can be syntax, logic, parameters, quality, etc.
[0085] Subsequently, causal analysis was performed on each evidence node to obtain the causal evidence chain corresponding to the workflow template.
[0086] For example, the logical error "undefined dependency test" and the "missing test step" in the optimization suggestion report are highly related semantically. Linking them together forms a structured and interpretable causal evidence chain. This causal evidence chain clearly shows "what the problem is, where it occurs, why it occurs, and how it is related", providing a unique and clear basis for subsequent quantitative scoring and precise repair.
[0087] By using the methods described above, the verification results of each verification path are integrated into an interpretable causal evidence chain, forming a logical closed loop of "error source - scope of impact - remediation suggestions". This transforms the verification results from simple reports into a traceable and interpretable causal network, providing a clear basis for subsequent optimization and clearly demonstrating the causes, scope of impact, and possible remediation methods for each problem. This enables the system to "explain its own decision-making process", providing structured support for the interpretability of artificial intelligence (AI) generation systems.
[0088] The aforementioned causal evidence chain not only integrates the verification results but also serves as the sole structured basis for all subsequent quality assessments and optimization decisions. The system calculates quality scores, locates problem areas, and generates optimization strategies based on this causal evidence chain, ensuring that every decision is supported by traceable causal logic, thus achieving a closed loop from "identifying the problem – explaining the problem – solving the problem."
[0089] like Figure 3 As shown, Figure 3 This disclosure is a flowchart illustrating a workflow template optimization method for agent development according to an exemplary embodiment, including the following steps: In step S310, the causal evidence chain corresponding to the workflow template is obtained.
[0090] The embodiments of this application can directly obtain the causal evidence chain corresponding to the workflow template from the knowledge base module, or generate the causal evidence chain corresponding to the workflow template based on the above steps S210 to S230.
[0091] In step S320, the overall quality score of the workflow template is calculated based on the causal evidence chain.
[0092] To address the issues of the inability to quantify the quality of workflow templates and the lack of objective measurement standards for the optimization process, this application embodiment requires a quantitative calculation of workflow template quality based on a causal evidence chain. The specific process is as follows: Assign preset weight values to each verification path. For example, assign preset weight values to the four dimensions of syntax, logic, parameters, and quality. Then, extract the problems corresponding to each verification result from the causal evidence chain and determine the problem type and severity of each problem. Next, perform a weighted sum of the preset weight values and severity of each problem to obtain the total score. Then, subtract the total score from the set maximum quality score to obtain the comprehensive quality score of the workflow template. The comprehensive quality score can be a percentage score. The higher the comprehensive quality score, the higher the quality of the workflow template.
[0093] The aforementioned preset quality threshold can be a quantile threshold of the historical distribution, or it can be adjusted by combining a sliding window with statistical methods.
[0094] For example, the average of the comprehensive quality scores from the past 5 normal iterations is determined and set as the preset quality threshold. Subsequently, after each new iteration, the corresponding comprehensive quality score is placed in a fixed-size sliding window. The fixed-size sliding window only retains the data from the most recent 5 iterations, and the preset quality threshold is recalculated based on the data in the fixed-size sliding window, thereby enabling dynamic adjustment of the preset quality threshold.
[0095] Using the methods described above, the system quantifies the results of syntax, logic, parameter and semantic verification into measurable indicators through comprehensive quality scoring. Furthermore, the comprehensive quality score is combined with a dynamic preset quality threshold, which is used to control the iteration convergence progress, so that the quality of the workflow template continues to improve after each optimization.
[0096] In step S330, the workflow template is optimized based on the comprehensive quality score to obtain the target workflow template.
[0097] If the overall quality score is not lower than the preset quality threshold, it means that the workflow template is of qualified quality. The workflow template is then designated as the target workflow template, and the target workflow template, causal evidence chain, and overall quality score are stored. If the overall quality score is lower than the preset quality threshold, the workflow template is iteratively optimized. The specific optimization process is as follows: To achieve efficient and accurate repair and avoid the structural "drift" risk caused by full rewriting, this application embodiment needs to determine the single-region score of each problem and the single-region score threshold corresponding to each problem from the causal evidence chain, and then calculate the score difference between the single-region score of each problem and the corresponding single-region score threshold. The larger the score difference, the more serious the corresponding problem is. Based on the score difference, at least one of the most critical problem regions is selected.
[0098] For example, prioritize handling the "missing test step" problem that causes logical dependency breaks.
[0099] This application embodiment illustrates a targeted repair process for a problem area. The problem type corresponding to the problem area is determined, and a targeted repair prompt corresponding to the problem type is generated. This prompt is precisely configured to only require repair of the problem in the specified area, while keeping the rest of the workflow template unchanged.
[0100] For example, the targeted repair prompt is: "Add a step called Run Tests before the Build Project step to run npm tests to resolve the missing logical dependency issue." Furthermore, based on the targeted repair prompts, local areas of the workflow template are rewritten to generate an optimized target workflow template. The LLM model can be called to rewrite local areas of the workflow template.
[0101] The system performs targeted repairs on problem areas identified by the causal evidence chain, rather than a full rewrite. This local repair mechanism ensures that only the local areas with confirmed causal defects are rewritten, while the rest of the structure remains unchanged. This effectively avoids the risks of structural drift and semantic degradation caused by full generation, and improves the stability and controllability of the optimization process.
[0102] To ensure the accuracy of the target workflow template in each iteration, steps S220 to S230 and steps S310 to S330 need to be re-executed on the optimized target workflow template. This involves multi-dimensional verification, constructing the target causal evidence chain, and calculating the target comprehensive quality score. The specific process is described above and will not be repeated here.
[0103] Subsequently, the target comprehensive quality score is compared with the preset quality threshold to obtain the comparison result, and the setting operation is performed on the target workflow template based on the comparison result.
[0104] Specifically, if the target's overall quality score is not lower than the preset quality threshold, the target workflow template, the target causal evidence chain, and the target's overall quality score will be stored. This will enable the accumulation of high-quality template assets and the formation of a traceable quality evolution history, thereby realizing versioned management and knowledge reuse of workflow templates and providing a high-quality data foundation for the generation or recommendation of similar workflow templates in the future.
[0105] If the target overall quality score is lower than the preset quality threshold, the number of iterations corresponding to the target workflow template is determined. If the number of iterations is lower than the number of iterations threshold, the target workflow template is iteratively optimized until the target overall quality score meets the standard or reaches the number of iterations threshold. The iterative optimization process is the same as the above process and will not be repeated here.
[0106] If the number of iterations is not less than the iteration threshold, the optimization process of the target workflow template is terminated, and the reason for failure is recorded.
[0107] Based on the above method, the system provides clear convergence criteria for the optimization process of workflow templates through the coordinated control of comprehensive quality scoring and preset quality thresholds. This mechanism avoids endless iterative repairs and ensures that the quality of workflow templates reaches the predetermined standard within a finite number of iterations, thereby achieving controllable and efficient evolution of workflow template quality.
[0108] For example, a flowchart illustrating the iterative optimization of the workflow template based on a causal evidence chain is shown in the embodiments of this application. Figure 4 As shown, in Figure 4 In the process, when the overall quality score is lower than the preset quality threshold, the workflow template is optimized. Problems are extracted from the causal evidence chain, including: syntax, logic, parameter, and quality issues. Targeted repair prompts are constructed for the problems. The LLM model is called to rewrite the problem area locally based on the targeted repair prompts and generate the target workflow template. It is then determined whether the target overall quality score is higher than the preset quality threshold. If so, the target workflow template is stored in the knowledge base. If not, it is determined whether the number of iterations is less than the iteration number threshold. If so, the next round of optimization iteration continues. If not, the optimization process of the target workflow template is terminated, and the reason for failure is recorded.
[0109] In this embodiment, the final qualified target workflow template, its corresponding complete causal evidence chain, and the final comprehensive quality score are stored in the knowledge base. The knowledge base supports semantic indexing and quality layering, and can be automatically updated and optimized based on usage feedback, enabling the system to have continuous learning and cross-project migration capabilities.
[0110] For example, the knowledge base and retrieval index diagram in the embodiments of this application is as follows: Figure 5 As shown, in Figure 5 In the process, the knowledge base will respond to the search request and output the search results. The search request can be semantic or tag matching, and the search results can be templates or explanatory summaries.
[0111] The knowledge base stores template metadata, template content, source information, and optional indexes. Template metadata can include template identifier, template purpose, template scenario, template rating, and template feedback. Template content can include YAML original text and structured tree. Source information can include causal graph, causal evidence chain, and iteration trajectory. Optional indexes can include semantic vectors, tags, and technology stack.
[0112] Based on the above, the embodiments of this application can realize the verification and optimization of workflow templates. A flowchart illustrating the verification and optimization process of workflow templates is shown below. Figure 6 As shown, in Figure 6 In this process, the workflow template is a YAML template. Multi-dimensional path validation is performed on the YAML template, which includes semantic validation, logical validation, parameter validation, and quality validation. Validation results for each validation path are generated, and these results are integrated to obtain a causal evidence chain. Then, the overall quality score of the current YAML template is calculated. If the overall quality score is lower than the preset quality threshold, the YAML template is considered substandard and will be iteratively optimized. If the overall quality score is not lower than the preset quality threshold, the YAML template is considered satisfactory and will be stored.
[0113] Based on the above method, the system performs targeted repair according to the feedback of the causal evidence chain, and only repairs the problem area, thereby reducing the risk of parameter drift and accelerating the model convergence speed. The system re-verifies after each round of repair, forming an automatic improvement closed loop of "verification-repair-re-verification", realizing true self-learning and evolution, and quantifying the verification results of multi-dimensional verification into measurable indicators, so that the quality of workflow templates continues to improve after each optimization.
[0114] To verify the multi-dimensional path verification mechanism and causal evidence chain-driven adaptive optimization capability proposed in this application, an initial template containing syntax errors, logical defects, and parameter type anomalies is selected as an example to demonstrate the system's convergence performance during continuous optimization. This example illustrates the application effects of this application in error localization, problem correlation analysis, and automatic template repair, and has engineering verifiability and reproducibility. The specific process is as follows: The initial template undergoes syntax validation, logic validation, parameter validation, and quality validation. After a comprehensive four-path judgment, the system outputs the following issue information: Syntax error: steps is incorrectly indented, some fields are missing colons; Logical error: The build step depends on test, but test is not defined; Parameter error: node-version is set to a number, it should be a string; Quality issue: The steps are not described in a coherent manner and do not reflect the actual execution order by the team.
[0115] The system categorized the above issues into causal evidence chains based on issue type, and calculated a comprehensive quality score of 57 points based on the number of errors, scope of impact, and severity, determining that the template needs further repair.
[0116] First iteration optimization: Based on the causal evidence chain, the system repairs localized areas of the problem without altering the task structure. The repairs include: Fixed YAML indentation and syntax formatting; Complete the missing test steps and improve the dependency chain; Correct node-version to the string "18"; The order of steps was adjusted to install→test→build to align with project practices.
[0117] After repairing the initial template, an optimized initial template was obtained, which was then resubmitted for four-path verification. Syntax and logical errors were completely eliminated, parameter type consistency issues were resolved, and quality verification results showed that the process description conformed to actual engineering conditions. After updating the causal evidence chain, the overall quality score was 92 points, indicating a significant improvement in the quality of the optimized initial template.
[0118] Second iteration optimization: Based on the first iteration optimization, the system continues to enhance parameters and supplement the structure for areas that can be improved, including: adding cache directory configuration to improve build performance; adding a failure retry strategy to improve process stability; and adding a build artifact path field to make the initial template more complete after the second optimization.
[0119] The system performed a four-path verification again, and no new errors were found in any of the paths. The quality verification indicated that the initial template after the second optimization had a clear structure, comprehensive parameter configuration, and a reasonable execution chain. Based on the updated causal evidence chain records, a comprehensive quality score of 99 was calculated, meeting the "excellent" standard. The system determined that this initial template had converged and no further optimization was needed.
[0120] This example demonstrates that the multi-dimensional path verification structure comprised of syntax verification, logic verification, parameter verification, and quality verification in this application embodiment can systematically identify problems in the initial template and aggregate various verification results through causal evidence chains to achieve structured error correlation analysis and automatic repair. The initial template achieved a gradual improvement from 57 points to 99 points in three iterations, reflecting the significant advantages of this application embodiment in automated optimization, stable convergence, and engineering feasibility.
[0121] Through the above methods, by multi-dimensional verification and the construction of causal evidence chains, the defects of workflow templates can be explained and quantified, and iterative optimization driven by causal evidence chains can be achieved. This enables the automation and convergence improvement of workflow template quality, effectively solving the defects of one-sided verification, black box decision-making and inability to self-repair in related technologies, and realizing automatic and comprehensive verification and optimization of workflow templates.
[0122] like Figure 7 The diagram shown is a schematic representation of a workflow template verification system for Agent-oriented development, according to an exemplary embodiment, including the following steps: Template acquisition module 701 is used to acquire workflow templates; The multi-dimensional verification module 702 is used to perform multi-dimensional path verification on the workflow template and generate verification results for each verification path. The causal evidence module 703 is used to perform structural unification processing on each verification result to obtain the causal evidence chain corresponding to the workflow template.
[0123] In one possible design, the multidimensional verification module 702 is specifically used to perform syntax verification on the workflow template and generate verification results for the syntax verification path, perform logic verification on the workflow template and generate verification results for the logic verification path, perform parameter verification on the workflow template and generate verification results for the parameter verification path, and perform quality verification on the workflow template and generate verification results for the quality verification path.
[0124] In one possible design, the multidimensional verification module 702 is further configured to perform semantic parsing on the workflow template to obtain the syntax structure and template format corresponding to the workflow template, verify the syntax structure and template format, and generate a verification result for the syntax verification path.
[0125] In one possible design, the multidimensional verification module 702 is further configured to parse the workflow template into a task node graph, traverse the task node graph based on a depth-first search algorithm, identify circular dependencies and isolated nodes in the task node graph, obtain identification results, and generate verification results for the logical verification path based on the identification results.
[0126] In one possible design, the multidimensional verification module 702 is further configured to parse the workflow template into a task node diagram, check whether the required parameters of the task nodes in the task node diagram are missing, obtain parameter check results, determine the parameter type corresponding to the parameter value in the workflow template, check whether the parameter type meets the parameter constraint conditions, obtain parameter constraint results, and generate verification results for the parameter verification path based on the parameter check results and the parameter constraint results.
[0127] In one possible design, the multidimensional verification module 702 is further configured to perform multidimensional intelligent checks on the workflow template to obtain intelligent check results and optimization suggestion reports. The intelligent check results include topology structure checks, logical coherence checks, semantic consistency checks, etc. Based on the intelligent check results and the optimization suggestion reports, verification results of the quality verification path are generated.
[0128] In one possible design, the causal evidence module 703 is specifically used to normalize each verification result to obtain the evidence node corresponding to each verification result, perform causal analysis on each evidence node, and obtain the causal evidence chain corresponding to the workflow template.
[0129] like Figure 8 The diagram shown is a schematic representation of a workflow template optimization system for agent-oriented development, according to an exemplary embodiment, comprising the following steps: Causality Acquisition Module 801 is used to acquire the causal evidence chain corresponding to the workflow template; The quality scoring module 802 is used to calculate the comprehensive quality score of the workflow template based on the causal evidence chain. The template optimization module 803 is used to optimize the workflow template based on the comprehensive quality score to obtain the target workflow template.
[0130] In one possible design, the quality scoring module 802 is specifically used to determine the preset weight value corresponding to each of the verification paths, determine the problem corresponding to each of the verification results from the causal evidence chain, determine the problem type and severity corresponding to each problem, and perform a weighted summation of the preset weight value and severity corresponding to each problem to obtain the comprehensive quality score of the workflow template.
[0131] In one possible design, the template optimization module 803 is specifically used to optimize the workflow template to obtain a target workflow template if the overall quality score is lower than a preset quality threshold, and to determine the workflow template as the target workflow template if the overall quality score is not lower than the preset quality threshold.
[0132] In one possible design, the template optimization module 803 is further configured to determine the single-region score of each problem and the single-region score threshold corresponding to each problem from the causal evidence chain, calculate the score difference between the single-region score of each problem and the corresponding single-region score threshold, determine at least one problem region from the causal evidence chain based on the score difference, optimize the at least one problem region, and obtain the target workflow template.
[0133] In one possible design, the template optimization module 803 is further configured to determine the problem type corresponding to the at least one problem area, and generate a fixed-point repair prompt corresponding to the at least one problem area based on the problem type corresponding to the at least one problem area; the fixed-point repair prompt is configured to keep the overall structure of the workflow template unchanged, and to rewrite a local area of the workflow template based on the at least one fixed-point repair prompt to obtain the target workflow template.
[0134] In one possible design, the template optimization module 803 is further configured to determine the target causal evidence chain corresponding to the target workflow template, calculate the target comprehensive quality score of the target workflow template based on the target causal evidence chain, compare the target comprehensive quality score with the preset quality threshold to obtain a comparison result, and perform a setting operation on the target workflow template based on the comparison result.
[0135] In one possible design, the template optimization module 803 is further configured to: if the target comprehensive quality score is lower than the preset quality threshold, determine the number of iterations corresponding to the target workflow template; perform different operations on the target workflow template based on the relationship between the number of iterations and the iteration threshold; and if the target comprehensive quality score is not lower than the preset quality threshold, store the target workflow template, the target causal evidence chain, and the target comprehensive quality score.
[0136] In one possible design, the template optimization module 803 is further configured to perform iterative optimization on the target workflow template if the number of iterations is lower than the number of iterations threshold, and terminate the optimization process of the target workflow template and record the reason for failure if the number of iterations is not lower than the number of iterations threshold.
[0137] This disclosure provides a computer device, including: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the method of any of the above embodiments.
[0138] This disclosure discloses an embodiment of a workflow template verification method or an optimization method for agent-oriented workflow template verification, which can be applied to computer devices, such as servers or terminal devices. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by a processor that processes the file to read the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 9 The diagram shown is a structural schematic of a computer device according to an embodiment of this disclosure, except... Figure 9 In addition to the processor 910, memory 930, network interface 920, and non-volatile memory 940 shown, other hardware may also be included depending on the actual function, which will not be described in detail here.
[0139] This disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0140] The aforementioned computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0141] The computer program described above can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer device, partially on the user's device, as a standalone software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0142] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0143] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0144] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A workflow template verification method for agent-oriented development, characterized in that, include: Get the workflow template; Perform multi-dimensional path validation on the workflow template and generate validation results for each validation path; The various verification results are processed to obtain the causal evidence chain corresponding to the workflow template.
2. The method according to claim 1, characterized in that, The step of performing multi-dimensional path validation on the workflow template and generating validation results for each validation path includes: Perform syntax validation on the workflow template and generate validation results for the syntax validation path; Perform logical verification on the workflow template and generate the verification results of the logical verification path; Perform parameter validation on the workflow template and generate validation results for the parameter validation path; Perform quality verification on the workflow template and generate verification results for the quality verification path.
3. The method according to claim 2, characterized in that, The step of performing syntax validation on the workflow template and generating validation results for the syntax validation path includes: The workflow template is semantically parsed to obtain the corresponding syntax structure and template format. The syntax structure and template format are validated, and the validation results of the syntax validation path are generated.
4. The method according to claim 2, characterized in that, The step of performing logical verification on the workflow template and generating verification results for the logical verification path includes: The workflow template is parsed into a task node graph; The task node graph is traversed using a depth-first search algorithm. Circular dependencies and isolated nodes in the task node graph are detected and identified to obtain the identification results. Based on the identification results, the verification results of the logical verification path are generated.
5. The method according to claim 2, characterized in that, The step of performing parameter validation on the workflow template and generating validation results for the parameter validation path includes: The workflow template is parsed into a task node graph; Check whether the required parameters of the task nodes in the task node diagram are missing, and obtain the parameter check results; Determine the parameter type corresponding to the parameter value in the workflow template, check whether the parameter type meets the parameter constraint conditions, and obtain the parameter constraint result; Based on the parameter check results and the parameter constraint results, the verification results of the parameter verification path are generated.
6. The method according to claim 2, characterized in that, The step of performing quality verification on the workflow template and generating verification results for the quality verification path includes: The workflow template is subjected to multi-dimensional intelligent checks to obtain intelligent check results and optimization suggestion reports; wherein, the intelligent check results include: topology structure check, logical coherence check, and semantic consistency check; Based on the intelligent inspection results and the optimization suggestion report, the verification results of the quality verification path are generated.
7. The method according to claim 1, characterized in that, The step of performing structural unification processing on each verification result to obtain the causal evidence chain corresponding to the workflow template includes: Normalize each verification result to obtain the evidence node corresponding to each verification result; Perform causal analysis on each evidence node to obtain the causal evidence chain corresponding to the workflow template.
8. A workflow template optimization method for agent-oriented development, characterized in that, include: Obtain the causal evidence chain corresponding to the workflow template; Based on the causal evidence chain, calculate the overall quality score of the workflow template; The workflow template is optimized based on the comprehensive quality score to obtain the target workflow template.
9. The method according to claim 8, characterized in that, The calculation of the overall quality score of the workflow template based on the causal evidence chain includes: Determine the preset weight value corresponding to each verification path of the workflow template; From the causal evidence chain, determine the problem corresponding to each verification result, and determine the problem type and severity corresponding to each problem; The workflow template's overall quality score is obtained by weighting and summing the preset weight values and severity levels corresponding to each problem.
10. The method according to claim 8, characterized in that, The optimization of the workflow template based on the comprehensive quality score to obtain the target workflow template includes: If the overall quality score is lower than the preset quality threshold, the workflow template is iteratively optimized to obtain the target workflow template. If the overall quality score is not lower than the preset quality threshold, then the workflow template is determined as the target workflow template.
11. The method according to claim 10, characterized in that, The iterative optimization of the workflow template to obtain the target workflow template includes: Determine the single-region score for each question and the single-region score threshold for each question from the causal evidence chain; Calculate the score difference between the single-region score and the corresponding single-region score threshold for each of the above questions; Based on the score difference, at least one problem area is identified from the causal evidence chain; The at least one problem area is iteratively optimized to obtain the target workflow template.
12. The method according to claim 11, characterized in that, The iterative optimization process for the at least one problem region to obtain the target workflow template includes: Determine the problem type corresponding to the at least one problem area, and generate a targeted repair prompt corresponding to the at least one problem area based on the problem type corresponding to the at least one problem area; the targeted repair prompt is configured to maintain the overall structure of the workflow template unchanged; Based on the at least one fixed-point repair prompt, the workflow template is partially rewritten to obtain the target workflow template.
13. The method according to claim 8, characterized in that, After optimizing the workflow template based on the comprehensive quality score to obtain the target workflow template, the process further includes: Determine the target causal evidence chain corresponding to the target workflow template; Based on the target causal evidence chain, calculate the target comprehensive quality score of the target workflow template; The target comprehensive quality score is compared with a preset quality threshold to obtain a comparison result, and a setting operation is performed on the target workflow template based on the comparison result.
14. The method according to claim 13, characterized in that, The step of performing a setting operation on the target workflow template based on the comparison result includes: If the target comprehensive quality score is lower than the preset quality threshold, then the number of iterations corresponding to the target workflow template is determined, and different operations are performed on the target workflow template based on the relationship between the number of iterations and the iteration threshold. If the target comprehensive quality score is not lower than the preset quality threshold, then the target workflow template, the target causal evidence chain, and the target comprehensive quality score are stored.
15. The method according to claim 14, characterized in that, The step of performing different operations on the target workflow template based on the relationship between the number of iterations and the iteration threshold includes: If the number of iterations is lower than the iteration threshold, then the target workflow template is iteratively optimized. If the number of iterations is not less than the iteration threshold, the optimization process of the target workflow template is terminated, and the reason for failure is recorded.
16. A workflow template verification system for agent-oriented development, characterized in that, The system includes: The template acquisition module is used to acquire workflow templates; The multi-dimensional verification module is used to perform multi-dimensional path verification on the workflow template and generate verification results for each verification path. The causal evidence module is used to perform structural unification processing on each verification result to obtain the causal evidence chain corresponding to the workflow template.
17. A workflow template optimization system for agent-oriented development, characterized in that, The system includes: The causal evidence acquisition module is used to obtain the causal evidence chain corresponding to the workflow template; A quality scoring module is used to calculate the overall quality score of the workflow template based on the causal evidence chain. The template optimization module is used to optimize the workflow template based on the comprehensive quality score to obtain the target workflow template.
18. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the workflow template verification method for agent-oriented development as described in any one of claims 1-7 or the workflow template optimization method for agent-oriented development as described in any one of claims 8-15.
19. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the workflow template verification method for agent-oriented development as described in any one of claims 1-7 or the workflow template optimization method for agent-oriented development as described in any one of claims 8-15.