Error tracing method, device and equipment, storage medium and computer program product

By generating and calling causal graphs and using large language models for error recognition, the problem of automated error traceability and analysis in the HAI system is solved, and efficient error traceability and system security and trustworthiness are achieved.

CN119645696APending Publication Date: 2025-03-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411612860.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing technology is difficult to realize automated error traceability and analysis, resulting in the security and trustworthiness of HAI systems during closed-loop optimization.

Method used

By obtaining the atomized model call order of the HAI system, a call causal graph is generated, and error recognition and analysis is used to use the large language model to control the HAI system to re-execute tasks to update the error causal graph and cause set.

Benefits of technology

It realizes automated error traceability in the application process of dynamic changes in HAI system, simplifies the error traceability process, improves the error traceability efficiency, and enhances the system's security and trustworthiness guarantee.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645696A_ABST
    Figure CN119645696A_ABST
Patent Text Reader

Abstract

The invention discloses an error tracing method, which comprises the following steps of: if a first output result of executing a target task by a first systematic artificial intelligence (HAI) system is different from a preset output result, acquiring a first calling sequence of an atomization model called by the first HAI system; wherein the atomization model is used for realizing a business application function; generating a first calling causal graph based on the first calling sequence; wherein each node in the first calling causal graph is the output content of the called atomization model; and controlling the first HAI system to re-execute the target task according to the first calling sequence based on an identification result of error identification of the first calling causal graph, and updating a first error causal graph set and a first error cause set. The invention further discloses an error tracing device and equipment, a storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an error tracing method, apparatus, device, storage medium and computer program product. Background Art

[0002] With the rapid development of artificial intelligence technology, in order to provide end-to-end artificial intelligence services, a new artificial intelligence technology framework has been proposed, specifically called Holistic Artificial Intelligence (HAI). The implementation basis of HAI is an atomic model that focuses on completing a task with high reuse, that is, the artificial intelligence services required by users are disassembled and reconstructed into multiple atomic models, such as capabilities such as perception and / or prediction, data such as voice, image, text and / or structured data, and application scenarios such as indoor and outdoor dimensions. A series of special capabilities are abstracted and corresponding atomic models are constructed, and then cascaded according to actual needs to obtain HAI.

[0003] Since HAI provides AI services in an end-to-end manner, this process includes closed-loop optimization of cascaded atomic models. During the closed-loop optimization process, the types and order of atomic models called by HAI may be dynamically modified. When some call errors occur during this process, HAI call errors are usually handled manually. How to automate the end-to-end error tracing and analysis of the HAI system has become an urgent problem to be solved in the current HAI atomic model closed-loop optimization security and trustworthiness assurance process.

[0004] Application Contents

[0005] In order to solve the above technical problems, the present application hopes to provide an error tracing method, device, equipment, storage medium and computer program product, which solves the problem that automatic error tracing and analysis cannot be achieved in the current HAI system application process, and proposes an error tracing method to realize error tracing in the dynamically changing application process of the HAI system, simplify the error tracing process, and improve the error tracing efficiency.

[0006] The technical solution of this application is implemented as follows:

[0007] The present application provides an error tracing method, the method comprising:

[0008] If the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result, obtaining a first calling sequence of the atomic model called by the first HAI system; wherein the atomic model is used to implement a business application function;

[0009] Based on the first calling sequence, a first calling causal graph is generated; wherein each node in the first calling causal graph is the output content of the atomic model of the call;

[0010] Based on the recognition result of the error recognition of the first call causal graph, the first HAI system is controlled to re-execute the target task according to the first call sequence, and the first error causal graph set and the first error cause set are updated.

[0011] In the above scheme, based on the recognition result of the error recognition of the first call causal graph, controlling the first HAI system to re-execute the target task according to the first call sequence, and updating the first error causal graph set and the first error cause set, includes:

[0012] Get the trained large language model;

[0013] Inputting first text information, node content corresponding to a node in the first call causal graph, and corresponding second text information into the large language model to obtain a recognition result;

[0014] Define the do operator node as the first target node indicated in the recognition result and located at the front of the error in the first call causal graph;

[0015] Based on the do operator node and the expected output content corresponding to the first target node included in the recognition result, the first HAI system is controlled to re-execute the target task according to the first calling order, and the first error causal graph set and the first error cause set are updated.

[0016] In the above scheme, based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, controlling the first HAI system to re-execute the target task according to the first calling sequence, and updating the first error causal graph set and the first error cause set, includes:

[0017] Controlling the first HAI system to re-execute the target task according to the first calling sequence, and when executing to the do operator node, modifying the output content of the do operator node to the expected output content and continuing to execute until a second output result is obtained;

[0018] If the second output result is the same as the preset output result, based on the first calling sequence, generating a second calling causal graph including an output content of the do operator node as the expected output content;

[0019] Determine all paths starting from the do operator node from the second call causal graph;

[0020] Updating all paths starting from the do operator node as an error causal graph to the first error causal graph set;

[0021] Obtaining an error analysis reason for the do operator node included in the recognition result;

[0022] The error analysis cause is updated to the first error cause set.

[0023] In the above scheme, the method further includes:

[0024] If the second output result is different from the preset output result, after updating the first call causal graph to the second call causal graph, the execution step is based on the recognition result of error recognition of the first call causal graph, controlling the first HAI system to re-execute the target task according to the first call sequence, and updating the first error causal graph set and the first error cause set.

[0025] In the above scheme, the method further includes:

[0026] If a second HAI system obtained by optimizing the first HAI system is detected, controlling the second HAI system to perform the target task to obtain a third output result;

[0027] If the third output result is different from the preset output result, after the first HAI system is updated to the second HAI system, a step is performed to obtain a first calling sequence of the atomic model called by the first HAI system.

[0028] In the above scheme, the method further includes:

[0029] If a second HAI system obtained by optimizing the first HAI system is detected, controlling the second HAI system to perform the target task to obtain a third output result;

[0030] If the third output result is different from the preset output result, obtaining a second calling sequence of the second HAI system;

[0031] Based on the second calling sequence, generating a third calling causal graph;

[0032] Compare the third call causal graph with the first call causal graph in the calling order, and determine the first second target node in the third call causal graph that has different node content from that in the first call causal graph;

[0033] The execution step controls the first HAI system to re-execute the target task according to the first calling sequence based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, and updates the second error cause-effect graph set and the second error cause set.

[0034] In the above scheme, the method further includes:

[0035] From the first error causal graph set, obtain an error causal graph whose starting point is before the second target node to obtain the second error causal graph set;

[0036] From the first error cause set, the error analysis causes corresponding to the error causal graph whose starting point is located before the second target node are obtained to obtain the second error cause set.

[0037] In the above scheme, the method further includes:

[0038] If the analysis time of the cyclic error tracing analysis for the first HAI system is greater than or equal to the preset time, a prompt message is generated; wherein the prompt message is used to prompt that the error analysis for the first HAI system cannot be implemented.

[0039] In the above solution, the prompt information at least further includes: the set of error cause-effect graphs and the set of error causes associated with the first HAI system within the preset time period.

[0040] The present application provides an error tracing device, the device comprising: an acquisition unit, a generation unit and a control unit; wherein:

[0041] The acquisition unit is used to acquire a first calling sequence of the atomic model called by the first HAI system if the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result; wherein the atomic model is used to implement a business application function;

[0042] The generating unit is used to generate a first calling causal graph based on the first calling sequence; wherein each node in the first calling causal graph is the output content of the atomic model of the call;

[0043] The control unit is used to control the first HAI system to re-execute the target task according to the first calling sequence based on the identification result of the error identification of the first calling causal graph, and update the first error causal graph set and the first error cause set.

[0044] The present application provides an electronic device, the device comprising: a communication interface, a memory, a processor and a communication bus; wherein:

[0045] A memory for storing executable information;

[0046] A communication bus, used to realize the communication connection between the communication interface, the processor and the memory;

[0047] The processor is used to execute the error tracing program stored in the memory to implement the steps in the error tracing method as described in any one of the above items.

[0048] The present application provides a storage medium, on which an error tracing program is stored. When the error tracing program is executed, it is used to implement the steps of the error tracing method as described in any one of the above items.

[0049] The present application provides a computer program product, including a computer program, which implements the steps of the error tracing method as described in any one of the above when executed by a processor.

[0050] The embodiment of the present application provides an error tracing method, apparatus, device, storage medium and computer program product. If the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result, the electronic device obtains the first call sequence of the atomized model called by the first HAI system, and then generates a first call causal graph based on the first call sequence. Finally, based on the recognition result of the error recognition of the first call causal graph, the electronic device controls the first HAI system to re-execute the target task according to the first call sequence, and updates the first error causal graph set and the first error cause set. In this way, when the first output result of the first HAI system executing the target task is different from the preset output result, the electronic device obtains the recognition result by performing error recognition on the generated first call causal graph, and controls the first HAI system to re-execute the target task according to the first call sequence according to the recognition result, and sequentially determines the first error causal graph set and the first error cause set whose first output result is different from the preset output result, which solves the problem that the automatic error tracing and analysis cannot be realized in the current HAI system application process, and proposes an error tracing method to realize error tracing in the dynamic change application process of the HAI system, simplify the error tracing process, and improve the error tracing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A data generation cause-and-effect diagram provided in an embodiment of the present application;

[0052] Figure 2 An error tracing method provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of a do operator application process provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of an error tracing device provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0057] In order to better explain the embodiments of the present application, some terminology explanations are first provided here.

[0058] Holistic AI (HAI) is a new artificial intelligence technology framework, and the atomic model is the basis for the realization of holistic artificial intelligence. An atomic model is generally a small or medium-sized model that focuses on completing a task with high reuse. HAI disassembles and reconstructs the artificial intelligence services required by users into the product of cascading multiple atomic models. Specifically, from the dimensions of capabilities (such as perception, prediction), data (such as voice, image, text, structured data), and application scenarios (such as indoors and outdoors), a series of special capabilities are abstracted and corresponding atomic models are constructed. HAI aims to provide artificial intelligence services in an end-to-end manner, including closed-loop optimization of cascaded atomic models. During the closed-loop optimization process, the types and order of atomic models called by the HAI system may be continuously and dynamically modified.

[0059] A large language model (LLM) refers to a deep learning model that can handle a variety of natural language tasks (such as text classification, question answering, conversation, etc.) and has a large number of parameters.

[0060] Causal graphs and do operators are important tools for causal inference research. Causal graphs are directed acyclic graphs (DAGs) that can represent causal relationships. Each node in the DAG represents a variable, and the node from which each directed edge starts is called the parent node of the node it arrives at, and the node it arrives at is called the child node of the node it starts at. In the DAG representing the causal graph, each node is the direct cause of its child node, and the parent node of the node is the indirect cause of the child node of the node. The causal graph can be regarded as a conditional independence model, that is, when the values ​​of all the parent nodes of a node in the causal graph are given, the node and its non-descendant nodes are considered to be independent of each other, that is, the descendant nodes refer to all the nodes reached by traversing along the directed edge direction from the node. Using P(.) to represent the probability density function of continuous variables and the probability function of discrete variables, the joint distribution of variables xi (i=1,2,…,n) in the causal graph can be decomposed as follows: Where fi represents the set of parent nodes of xi. For example, Figure 1 The joint distribution of the causal graph example diagram shown can be decomposed into: P(x1,x2,x3,x4,x5)=P(x1)P(x2|x1)P(x3|x1)P(x4|x2,x3)P(x5|x4).

[0061] In causal inference, when the value of a variable X1 can change with the change of the value of another variable X2, variable X2 can be called the cause of variable X1, and variable X1 can be called the result of variable X2.

[0062] The do operator is an analytical tool used to confirm whether a DAG is a causal graph based on observed data. The meaning of do can be understood as intervention. In DAG, the do operator is used for the variable Xi, which can be expressed as: do(Xi) = x'i, which represents the operation of cutting off all directed edges pointing to Xi in the DAG and fixing the value of Xi to x'i. In this way, after performing this operation, the joint probability distribution of the new DAG obtained can be recorded as P(x1, x2, ..., xn|do(Xi) = x'i). In this way, according to the definition of causal effects by the do operator, it is determined whether the directed edges in the DAG can correctly represent the causal relationship. For example, when X1 is a discrete variable that can only take the value 1 or 0, and X2 is a continuous variable, the average causal effect ACE(X1→X2) of X1 on X2 can be defined as: ACE(X1→X2) = E(X2│do(X1) = 1)-E(X2│do(X1) = 0), where E(.) represents the mathematical expectation. When the average causal effect of X1 on X2 is not zero, it means that the distribution of X2 will change when the value of X1 is intervened. At this time, it can be determined that a causal relationship exists with X1 as the cause and X2 as the result.

[0063] The embodiment of the present application provides an error tracing method, referring to Figure 2 As shown, the method is applied to an electronic device, and the method comprises the following steps:

[0064] Step 101: If a first output result of the first systematic artificial intelligence HAI system executing a target task is different from a preset output result, a first calling sequence of an atomic model called by the first HAI system is obtained.

[0065] Among them, the atomic model is used to implement a business application function.

[0066] In an embodiment of the present application, the first HAI system is created in advance according to demand, and an end-to-end prediction model system is implemented by calling the corresponding atomization model to realize complex tasks. The target task is a task to be executed with a preset output result. After the target task is input into the input end of the first HAI system, the first HAI system executes the target task, and then the output end of the first HAI system outputs the first output result, obtains the first output result output by the first HAI system, and compares and analyzes the first output result with the preset output result to obtain an analysis result. When the analysis result is that the first output result is different from the preset output result, it indicates that there may be an error in the end-to-end implementation process. Therefore, at this time, error tracing processing is required. The specific error tracing processing process is: when the first HAI system executes the target task and obtains the first output result, it usually records the first call sequence of the first HAI system calling the corresponding atomization model to realize the target task in the process of the first HAI system executing the target task to obtain the first output result.

[0067] Step 102: Generate a first call causal graph based on the first call sequence.

[0068] Among them, each node in the first call causal graph is the output content of the called atomic model.

[0069] In the embodiment of the present application, according to the first calling sequence of the first HAI system calling the atomic model, the output contents of the called atomic model are used as nodes in turn to generate a calling causal graph to obtain a first calling causal graph.

[0070] Step 103: Based on the recognition result of the error recognition of the first call causal graph, control the first HAI system to re-execute the target task according to the first call sequence, and update the first error causal graph set and the first error cause set.

[0071] In an embodiment of the present application, an error identification is performed on the first call causal graph to obtain an identification result. Based on the identification result, the first HAI system is controlled to re-execute the target task according to the first call sequence, thereby updating the corresponding first error causal graph set and the first error cause set. The first error causal graph set includes the first node with an error and all the paths included in the subsequent call causal graphs. The first error cause set is the cause of the error analysis of the error occurring in the first node with an error. The first error causal graph set includes the error causal graph determined in the process of repeating steps 101 to 103 for the first HAI system multiple times. Similarly, the first error cause set includes the error analysis causes obtained by multiple analyses.

[0072] Based on the foregoing embodiment, in other embodiments of the present application, step 103 may be implemented by the following steps:

[0073] Get the trained large language model;

[0074] Inputting the first text information, the node content corresponding to the node in the first call causal graph, and the corresponding second text information into the large language model to obtain a recognition result;

[0075] Define the do operator node as the first target node indicated in the recognition result and located at the front of the error in the first call causal graph;

[0076] Based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, the first HAI system is controlled to re-execute the target task according to the first calling sequence, and the first error causal graph set and the first error cause set are updated.

[0077] In an embodiment of the present application, the large language model is a pre-trained model for identifying errors. The first text information is irrelevant to the target task, and is a model input and output example used to input into the large language model, which is text information generated in advance. The node content corresponding to the node in the first call causal graph is the input content and output content of the node. The second text information is the functional description text information of the node in the first call causal graph corresponding to the target task. The recognition result is the node information of the node with errors in the first call causal graph, for example, it can be node identification information, such as node number, node name, etc.

[0078] The first text information, the node content corresponding to the node in the first call causal graph and the corresponding second text information are input to the input layer of the large language model. The large language model refers to the template provided by the first text information, identifies and analyzes the node content corresponding to the node in the first call causal graph and the corresponding second text information, and outputs the recognition result; the first target node where the error occurs and is located at the front of the first call causal graph is determined from the recognition result; then, based on the do operator node and the expected output content corresponding to the first target node included in the recognition result, the first HAI system is controlled to re-execute the target task according to the first call sequence, determine the new error causal graph and the error cause, store them in the first error causal graph set and the first error cause set, and realize the update of the first error causal graph set and the first error cause set.

[0079] Based on the foregoing embodiment, in other embodiments of the present application, the steps are based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, controlling the first HAI system to re-execute the target task according to the first calling sequence, and updating the first error causal graph set and the first error cause set, which can be implemented by the following steps:

[0080] Control the first HAI system to re-execute the target task according to the first calling sequence, and when executing to the do operator node, modify the output content of the do operator node to the expected output content and continue to execute until the second output result is obtained;

[0081] If the second output result is the same as the preset output result, based on the first calling sequence, a second calling causal graph including the output content of the do operator node as the expected output content is generated;

[0082] From the second call causal graph, determine all paths starting from the do operator node;

[0083] Update all paths starting from the do operator node as an error causal graph to the first error causal graph set;

[0084] Obtain the error analysis cause for the do operator node included in the recognition result;

[0085] Update the error analysis cause to the first error cause set.

[0086] In an embodiment of the present application, when the first HAI system is controlled to re-execute the target task according to the first calling sequence, if the first HAI system executes the atomization model corresponding to the do operator node, the output content of the corresponding atomization model is modified to the expected output content, and the corresponding operation is continued to be performed according to the first calling sequence until the second output result is output; when the second output result is the same as the preset output result, a second calling causal graph including updating the output content of the do operator node to the expected output content is generated according to the first calling sequence, and then all paths starting from the do operator node are determined from the second calling causal graph, and all paths starting from the do operator node are stored as an error causal graph in the first error causal graph set, and the error analysis cause for the do operator node is obtained from the corresponding recognition result and stored in the first error cause set.

[0087] Based on the foregoing embodiment, in other embodiments of the present application, the method further includes the following execution steps:

[0088] If the second output result is different from the preset output result, after updating the first call causal graph to the second call causal graph, the execution step is based on the recognition result of error recognition of the first call causal graph, controlling the first HAI system to re-execute the target task according to the first call sequence, and updating the first error causal graph set and the first error cause set.

[0089] In the embodiment of the present application, when the second output result is different from the preset output result, the first call causal graph is updated to the second call causal graph, and then step 103 is repeated. At this time, the corresponding recognition result of incorrectly recognizing the first call causal graph is actually a recognition demerit of incorrectly recognizing the second call causal graph. In this way, it is repeated until the final output result is the same as the preset output result, and then the corresponding operation is terminated.

[0090] Based on the foregoing embodiment, in other embodiments of the present application, the method further includes the following execution steps:

[0091] If a second HAI system obtained by optimizing the first HAI system is detected, the second HAI system is controlled to perform a target task to obtain a third output result;

[0092] If the third output result is different from the preset output result, after the first HAI system is updated to the second HAI system, a step is executed to obtain a first calling sequence of the atomic model called by the first HAI system.

[0093] In the embodiment of the present application, each time after the first error cause-effect graph set and the second error cause set are updated, the corresponding first HAI system is optimized by a system optimization method to obtain a second HAI system, and the second HAI system is controlled to execute the target task to obtain a third output result. When the third output result is different from the preset output result, after the first HAI system is updated to the second HAI system, the corresponding contents corresponding to "obtaining the first call sequence of the atomic model called by the first HAI system" in step 101 to step 103 are executed.

[0094] Based on the foregoing embodiment, in other embodiments of the present application, the method further includes the following execution steps:

[0095] If a second HAI system obtained by optimizing the first HAI system is detected, the second HAI system is controlled to perform a target task to obtain a third output result;

[0096] If the third output result is different from the preset output result, obtaining a second calling sequence of the second HAI system;

[0097] Based on the second calling sequence, generating a third calling causal graph;

[0098] Compare the third call causal graph with the first call causal graph in the calling order, and determine the first second target node in the third call causal graph that has different node content from that in the first call causal graph;

[0099] The execution step controls the first HAI system to re-execute the target task according to the first calling sequence based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, and updates the second error cause and effect graph set and the second error cause set.

[0100] Based on the foregoing embodiment, in other embodiments of the present application, the method further includes the following execution steps:

[0101] From the first error causal graph set, obtain an error causal graph whose starting node is before the second target node to obtain a second error causal graph set;

[0102] From the first error cause set, the error analysis causes corresponding to the error causal graph whose starting node is located before the second target node are obtained to obtain a second error cause set.

[0103] Based on the foregoing embodiment, in other embodiments of the present application, the method further includes the following execution steps:

[0104] If the analysis time of the cyclic error tracing analysis for the first HAI system is greater than or equal to the preset time, a prompt message is generated; wherein the prompt message is used to prompt that the error analysis for the first HAI system cannot be implemented.

[0105] In the embodiment of the present application, the preset duration can be an empirical duration obtained from a large number of experiments, or an empirical duration set according to actual needs, and can be adjusted according to actual conditions. When the analysis duration of the entire cycle error analysis for the first HAI system including the system optimization is greater than or equal to the preset duration, a prompt message is generated to prompt the user that the error analysis for the first HAI system cannot be completed.

[0106] Based on the foregoing embodiment, in other embodiments of the present application, the prompt information further includes at least: a set of error cause-effect graphs and a set of error causes associated with the first HAI system within a preset time period.

[0107] In the embodiment of the present application, the error causal graph set and the error cause set associated with the first HAI system within the preset time length are all the error causal graph sets and the error cause sets obtained within the preset time length.

[0108] Based on the foregoing embodiments, the embodiments of the present application provide an error tracing method, which mainly relies on the systematic artificial intelligence error tracing and analysis technology of causal inference and large language models, constructs a data generation causal graph according to the calling sequence of the atomic model, and uses the large language model to determine the application nodes of the do operator and its intervention method on the variable, so as to search and locate the causal graph where the error occurs in the subgraph of the data generation causal graph, and provide corresponding explanations, thereby realizing end-to-end error tracing of multiple cascaded atomic models, efficiently adapting to the dynamic system in the closed-loop optimization process, and ensuring that the relevant processes are easy for humans to understand and trace.

[0109] This error tracing method can be applied to application scenarios when the HAI system copes with complex tasks. For example, in the scenario of automatic reply to multi-language and multi-intent product reviews based on sentiment analysis for the target task, the HAI system usually calls at least 7 atomization models. The 7 atomization models include: a language category detection atomization model for detecting and classifying the language categories of user product reviews; a machine translation atomization model for translating product reviews into a certain language, such as Chinese; an intent recognition atomization model for identifying which system-preset intents are contained in product reviews, such as the customer's mood, the quality of the service, the quality of the food, etc.; an intent recognition atomization model for classifying each type of intent contained in the product review into sentiments, such as "positive", "neutral", etc. Atomization model for sentiment classification such as "positive" and "negative"; used to convert the result of sentiment classification into prompt text. For example, when the customer's mood is classified as "negative", the text generated by the atomization model can be used to generate an atomization model for the prompt "the customer is in a bad mood"; in some fields, the response results of the model are highly reusable, so the historical responses are stored in a database. When used again, the text retrieval technology can be used to retrieve the relevant historical responses in the database. Atomization model for historical data retrieval of evaluation responses; Atomization model for generating evaluation responses for product evaluations based on prompt text. When an error occurs in the final response of calling the atomization model based on the above complex task scenario, it is necessary to confirm which atomization model the error comes from. The specific implementation steps of the calling process can be as follows:

[0110] Step 1: Obtain the data of the target task to be executed, including the task description that the HAI system needs to complete and the expected end-to-end output when it is input into the HAI system; input the data of the target task into the HAI system, and the HAI system calls the required atomic model to execute the target task and obtains the output result of the HAI system; when the output result of the HAI system, that is, the actual end-to-end output of the HAI system output is different from the expected end-to-end output, obtain the order in which the HAI system calls the atomic model, the input, output and functional description of each atomic model called, and then execute step 2; otherwise, change the target task and re-execute step 1.

[0111] The method of obtaining the expected end-to-end output may vary depending on the task, and the methods that can be used include manual labeling, or obtaining it using certain models that are manually determined to be used.

[0112] An atomized model is a model that performs a specific function, and its structure or parameters may not be public or adjustable.

[0113] In addition, each callable atomic model in the HAI system is equipped with its functional description, so during the application process, the functional description of each atomic model can be directly obtained.

[0114] Step 2: Construct a data generation causal graph according to the order in which the HAI system calls the atomic model in step 1. In the constructed data generation causal graph, each node represents the output of a corresponding call to the atomic model, which is a variable. Every two nodes corresponding to the atomic model calls with information transmission are connected to each other by a solid line, and the direction of the information transmission is indicated by the arrow direction. The node number in the data generation causal graph is the same as the order in which the corresponding atomic model calls occur. At the same time, the relative size of the corresponding node number of the atomic model call can be determined by the alphabetical order of the atomic model name or randomly determined.

[0115] For example, assuming Figure 1 Generate a causal graph for the data generated in this step. The data-generated causal graph describes the causal relationship in the process of the HAI system calling the atomic model to generate end-to-end output for a given task. The graph is a directed acyclic graph, in which the corresponding output of the node pointed by the arrow between every two connected nodes will change as the corresponding output of the node from which the arrow starts changes, that is, there is a causal relationship between the two connected nodes.

[0116] It should be emphasized that each node in the data generation causal graph represents the output of a single call to an atomized model. If the same atomized model is called multiple times, its corresponding output will be described as multiple nodes in the graph, that is, there is a one-to-one correspondence between the output of a single call of the atomized model and a single node.

[0117] The connection direction is consistent with the information transmission direction, which means that the arrow direction of the connection starts from the atomic model calling the corresponding node that outputs the information and points to the atomic model calling the corresponding node that receives the information.

[0118] In the data generation causal graph, the nodes are numbered as consecutive integers starting from 1.

[0119] The atomized model name may come from the functional description of the atomized model.

[0120] Step 3: Use the large language model to define the application nodes of the do operator and its intervention mode on the variables. Among them, the large language model is used to search for the error occurrence causal graph from the subgraph of the data generation causal graph. In the implementation process, the task description example, as well as the input and output of the atomization model corresponding to each node of the data generation causal graph and the functional description of the corresponding atomization model are input into the large language model, so that the large language model identifies whether there is an error in the corresponding output of each node; if the large language model does not identify the error, it returns relevant information to the user, indicating that the error cause of the HAI system is not identified, and no subsequent steps are executed; if the language model identifies the existing error, the output result of the large language model points out the node with the smallest number among the nodes with errors, determines the cause of the error, and the corrected output, and adds the possible cause of the node with the smallest number to the candidate cause set, and then executes step 4; among them, the node with the smallest number determined is used as the node for the application of the do operator, and the corrected output is used as the intervention mode for the do operator variable, that is, the corresponding expected output content.

[0121] Among them, if the task description example, each atomized model input and output, and the functional description of the atomized model are not or are not completely text, they can be converted into text in numerical form. For example, data such as scalars, vectors, or elements in tensors can be directly determined as text in numerical form. For the task description example and the atomized model functional description, non-text data can also be automatically converted into text according to its modality. For example, for voice data, it can be converted into text using a voice-to-text model.

[0122] The functional description of the atomic model may include the name, function, characteristics, input and output forms such as "word", "300-dimensional vector" and other information of the atomic model.

[0123] The node numbering sequence refers to the sequence from small to large numbers.

[0124] In the process of using the large language model, the information input into the large language model can adopt a fixed template, and the template content at least includes: fixed text for explanation, examples of error tracing and analysis or information related to the task to be performed for error tracing and analysis, and supplementary explanations for the template. Exemplarily, in a provided template: the beginning of the template is a plurality of examples of error tracing and analysis, the main function of these examples is to guide the large language model to generate output data similar to the format in the example when encountering input data similar to the format in the example, and the end of the template is information related to the task to be performed for error tracing and analysis.

[0125] When this step is executed for the first time, a new empty set of candidate cause sets can be created as the initial state of the set; when this step is executed again, the existing set can be directly used.

[0126] It should be noted that during the application of the large language model, if the recognition rate of errors in the output of certain atomic model calls is low, or the correction effect is poor, the relevant data can be used to train and adjust the structure of the large language model to improve the relevant accuracy or correction effect.

[0127] Step 4: For the same task, according to the node numbering order in the data generation causal graph, that is, the calling order of the atomic models, the HAI system is controlled to call each atomic model again to execute the same target application. When the do operator defined in step 3 is executed during the calling process, the directed edge pointing to the node of the do operator application in the data generation causal graph is truncated, and the corresponding output of the node is modified to the corrected output; at the same time, the node of the do operator application and all paths starting from the node of the do operator application in the data generation causal graph and pointing to the actual end-to-end output node of the HAI system output are combined into a subgraph and added to the candidate graph set; and it is judged whether the actual end-to-end output of the HAI system at this time is the same as the expected end-to-end output. If they are the same, the candidate graph set is defined as the error occurrence causal graph set, and the candidate cause set obtained in step 3 is defined as the error occurrence cause set, and then step 5 is executed. If they are different, step 3 is executed again based on the data generation causal graph after the node of the do operator application intervenes in step 4.

[0128] Among them, Figure 3 Shown is based on Figure 1 The data shown in the causal graph determines the application process of the node where the do operator is applied, that is, assuming Figure 1 When the X3 node in is the node to which the do operator is applied, the data is truncated to generate a directed edge pointing to the do operator application node in the causal graph, and the corresponding output of the node is modified to the data x3 corrected by the large language model.

[0129] Step 5: Return the HAI system error tracing and analysis information to the user end, including a set of error causal graphs and a set of error causes; subsequently, if the user uses the HAI closed-loop optimization technology to optimize the HAI system by the type and order of the called atomic models, and finds that the actual end-to-end output of the HAI system is still different from the expected end-to-end output, step 6 can be executed to continue error tracing and analysis, otherwise, stop error tracing and analysis.

[0130] Among them, in order to facilitate the user to match the causal graph in the error occurrence causal graph set with the causes in the error occurrence cause set one by one, before adding the corresponding elements to the set in steps three and four, the causal graph or cause can be combined with the order number in which it enters the set, and then the causal graph or cause with the order number can be added to the corresponding set; the causal graph and cause with the same order number can be regarded as one-to-one correspondence by the user.

[0131] The HAI closed-loop optimization technology in this embodiment can be implemented based on the HAI system error tracing and analysis information returned to the user in this step, and the method used by the technology is not specifically limited.

[0132] Step 6: Based on the optimized HAI system, re-execute the corresponding operation of step 2 to obtain the optimized data generation causal graph; compare the data generation causal graphs before and after optimization according to the node numbers in sequence. When encountering nodes with different numbers, record the node numbers and stop comparing; add the error generation causal subgraphs with the smallest node number less than the node number in the error generation causal graph set before optimization to the optimized candidate graph set, add the corresponding error occurrence causes to the optimized candidate cause set, and use the corresponding do operator to intervene in the optimized data generation causal graph; on this basis, execute step 3 again. In this way, until the actual end-to-end output of the final HAI system is the same as the expected end-to-end output, or the time taken by the large language model to trace and analyze the HAI system using the above method exceeds the time threshold set by the user, the error tracing and analysis process can be interrupted, and the relevant information can be directly returned to the user, indicating that the error tracing and analysis cannot be achieved; further, the relevant information can also include the candidate graph set and candidate cause set obtained up to that time.

[0133] Among them, when realizing the comparison process of generating a causal graph of the data before and after optimization and comparing them in sequence according to the node numbers, it can be achieved by comparing one or more of the names of the atomic models corresponding to the nodes, the inputs and outputs of the atomic models, and the input sources.

[0134] In this way, HAI error tracing and analysis technology can be efficiently and flexibly applied to various complex task scenarios, and can meet the needs of dynamic closed-loop optimization of multiple cascaded atomic models called by the HAI system, making the HAI closed-loop optimization process easy for humans to understand and trace, and improving the safety and reliability of the optimization process. And through the organic combination of large language models with causal graphs and causal inference concepts / tools such as do operators, HAI error tracing and analysis technology is realized, filling the gap in the existing large language model-related technologies in this direction, providing causal inference evidence support for error tracing and analysis results, and using a visual graph structure to clearly present the path and cause of the error.

[0135] The error tracing method provided in the embodiment of the present application is that if the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result, the electronic device obtains the first calling sequence of the atomized model called by the first HAI system, and then generates the first calling causal graph based on the first calling sequence, and finally controls the first HAI system to re-execute the target task according to the first calling sequence based on the recognition result of the error recognition of the first calling causal graph, and updates the first error causal graph set and the first error cause set. In this way, when the first output result of the first HAI system executing the target task is different from the preset output result, the electronic device obtains the recognition result by performing error recognition on the generated first calling causal graph, and controls the first HAI system to re-execute the target task according to the first calling sequence according to the recognition result, and sequentially determines the first error causal graph set and the first error cause set in which the first output result is different from the preset output result, which solves the problem that the automatic error tracing and analysis cannot be realized in the current HAI system application process, and proposes an error tracing method to realize error tracing in the dynamically changing application process of the HAI system, simplify the error tracing process, and improve the error tracing efficiency.

[0136] Based on the above embodiments, the embodiments of the present application provide an error tracing device, which can be applied to Figure 1 In the error tracing method provided in the corresponding embodiment, refer to Figure 4 As shown, the error tracing device 2 may include: an acquisition unit 21, a generation unit 22 and a control unit 23; wherein:

[0137] The acquisition unit 21 is used to acquire a first calling sequence of the atomic model called by the first HAI system if the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result; wherein the atomic model is used to implement a business application function;

[0138] A generating unit 22 is used to generate a first call causal graph based on the first call sequence, wherein each node in the first call causal graph is the output content of the atomic model of the call;

[0139] The control unit 23 is used to control the first HAI system to re-execute the target task according to the first calling sequence based on the recognition result of the error recognition of the first calling cause-effect graph, and update the first error cause-effect graph set and the first error cause set.

[0140] In other embodiments of the present application, the control unit includes: an acquisition module, an identification module, a definition module and a control module; wherein:

[0141] The acquisition module is used to obtain the trained large language model;

[0142] A recognition module, used for inputting the first text information, the node content corresponding to the node in the first call causal graph and the corresponding second text information into the large language model to obtain a recognition result;

[0143] A definition module, used to define the do operator node as the first target node indicated in the recognition result and located at the front of the error in the first call causal graph;

[0144] A control module is used to control the first HAI system to re-execute the target task according to the first calling sequence based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, and to update the first error causal graph set and the first error cause set.

[0145] In other embodiments of the present application, the control module is specifically used to implement the following steps:

[0146] Control the first HAI system to re-execute the target task according to the first calling sequence, and when executing to the do operator node, modify the output content of the do operator node to the expected output content and continue to execute until the second output result is obtained;

[0147] If the second output result is the same as the preset output result, based on the first calling sequence, a second calling causal graph including the output content of the do operator node as the expected output content is generated;

[0148] From the second call causal graph, determine all paths starting from the do operator node;

[0149] Update all paths starting from the do operator node as an error causal graph to the first error causal graph set;

[0150] Obtain the error analysis cause for the do operator node included in the recognition result;

[0151] Update the error analysis cause to the first error cause set.

[0152] In other embodiments of the present application, the control module is further configured to perform the following steps:

[0153] If the second output result is different from the preset output result, after updating the first call causal graph to the second call causal graph, the execution step is based on the recognition result of error recognition of the first call causal graph, controlling the first HAI system to re-execute the target task according to the first call sequence, and updating the first error causal graph set and the first error cause set.

[0154] In other embodiments of the present application, the control unit further includes: an update module; wherein:

[0155] The control module is further configured to, if a second HAI system obtained by optimizing the first HAI system is detected, control the second HAI system to perform a target task and obtain a third output result;

[0156] The updating module is used for, if the third output result is different from the preset output result, updating the first HAI system to the second HAI system, and then executing the step of acquiring the first calling sequence of the atomic model called by the first HAI system.

[0157] In other embodiments of the present application, the control unit further includes: a generating module, a determining module and an executing module; wherein:

[0158] A control module, configured to control the second HAI system to perform a target task and obtain a third output result if a second HAI system obtained by optimizing the first HAI system is detected;

[0159] an acquisition module, configured to acquire a second calling sequence of a second HAI system if the third output result is different from the preset output result;

[0160] A generating module, used for generating a third calling causal graph based on the second calling sequence;

[0161] A determination module is used to compare the third call causal graph with the first call causal graph in the calling order, and determine the first second target node in the third call causal graph that has different node content from the first call causal graph; an execution module is used to execute the steps based on the expected output content corresponding to the first target node included in the do operator node and the identification result, control the first HAI system to re-execute the target task in the first calling order, and update the second error causal graph set and the second error cause set.

[0162] In other embodiments of the present application, the acquisition module is further used to acquire an error causal graph whose start node is located before the second target node from the first error causal graph set, to obtain a second error causal graph set;

[0163] The acquisition module is also used to acquire the error analysis causes corresponding to the error causal graph whose starting point is located before the second target node from the first error cause set, so as to obtain the second error cause set.

[0164] In other embodiments of the present application, the error tracing device further includes: a generating unit; wherein:

[0165] The generating unit is used to generate a prompt message if the analysis time of the cyclic error tracing analysis for the first HAI system is greater than or equal to the preset time; wherein the prompt message is used to prompt that the error analysis for the first HAI system cannot be implemented.

[0166] In other embodiments of the present application, the prompt information further includes at least: a set of error cause-effect graphs and a set of error causes associated with the first HAI system within a preset time period.

[0167] It should be noted that the process of information interaction between the units and modules in this embodiment can refer to the description in other embodiments and will not be repeated here.

[0168] The error tracing device provided in the embodiment of the present application, if the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result, the electronic device obtains the first call sequence of the atomized model called by the first HAI system, and then generates the first call causal graph based on the first call sequence, and finally controls the first HAI system to re-execute the target task according to the first call sequence based on the recognition result of the error recognition of the first call causal graph, and updates the first error causal graph set and the first error cause set. In this way, when the first output result of the first HAI system executing the target task is different from the preset output result, the electronic device obtains the recognition result by performing error recognition on the generated first call causal graph, and controls the first HAI system to re-execute the target task according to the first call sequence according to the recognition result, and sequentially determines the first error causal graph set and the first error cause set whose first output result is different from the preset output result, which solves the problem that the automatic error tracing and analysis cannot be realized in the current HAI system application process, and proposes an error tracing method to realize error tracing in the dynamic change application process of the HAI system, simplify the error tracing process, and improve the error tracing efficiency.

[0169] Based on the above embodiments, the embodiments of the present application provide an electronic device, which can be applied to Figure 1 In the error tracing method provided in the corresponding embodiment, refer to Figure 5 As shown, the electronic device 3 may include: a communication interface 31, a memory 32, a processor 33 and a communication bus 34; wherein:

[0170] A memory 32, for storing executable information;

[0171] A communication bus 34, used to realize communication connection among the communication interface 31, the processor 33 and the memory 32;

[0172] The processor 33 is used to execute the error tracing program stored in the memory 32 to implement the following Figure 1 The implementation process of the error tracing method provided in the corresponding embodiment will not be repeated here.

[0173] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement reference Figure 1 The implementation process of the error tracing method provided in the corresponding embodiment will not be repeated here.

[0174] Based on the foregoing embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which can be executed by the processor 33 of the electronic device 3 to complete any of the foregoing method steps.

[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0176] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0179] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. An error tracing method, characterized in that: The method comprises: If the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result, obtaining a first calling sequence of the atomic model called by the first HAI system; wherein the atomic model is used to implement a business application function; Based on the first calling sequence, a first calling causal graph is generated; wherein each node in the first calling causal graph is the output content of the atomic model of the call; Based on the recognition result of the error recognition of the first call causal graph, the first HAI system is controlled to re-execute the target task according to the first call sequence, and the first error causal graph set and the first error cause set are updated.

2. The method according to claim 1, characterized in that The method of controlling the first HAI system to re-execute the target task according to the first calling sequence based on the recognition result of the error recognition of the first calling causal graph, and updating the first error causal graph set and the first error cause set includes: Get the trained large language model; Inputting first text information, node content corresponding to a node in the first call causal graph, and corresponding second text information into the large language model to obtain a recognition result; Define the do operator node as the first target node indicated in the recognition result and located at the front of the error in the first call causal graph; Based on the do operator node and the expected output content corresponding to the first target node included in the recognition result, the first HAI system is controlled to re-execute the target task according to the first calling order, and the first error causal graph set and the first error cause set are updated.

3. The method according to claim 2, characterized in that The controlling the first HAI system to re-execute the target task according to the first calling sequence based on the expected output content corresponding to the first target node included in the do operator node and the recognition result, and updating the first error causal graph set and the first error cause set includes: Controlling the first HAI system to re-execute the target task according to the first calling sequence, and when executing to the do operator node, modifying the output content of the do operator node to the expected output content and continuing to execute until a second output result is obtained; If the second output result is the same as the preset output result, based on the first calling sequence, generating a second calling causal graph including an output content of the do operator node as the expected output content; Determine all paths starting from the do operator node from the second call causal graph; Updating all paths starting from the do operator node as an error causal graph to the first error causal graph set; Obtaining an error analysis reason for the do operator node included in the recognition result; The error analysis cause is updated to the first error cause set.

4. The method according to claim 3, characterized in that The method further comprises: If the second output result is different from the preset output result, after updating the first call causal graph to the second call causal graph, the execution step is based on the recognition result of error recognition of the first call causal graph, controlling the first HAI system to re-execute the target task according to the first call sequence, and updating the first error causal graph set and the first error cause set.

5. The method according to claim 2, characterized in that: The method further comprises: If a second HAI system obtained by optimizing the first HAI system is detected, controlling the second HAI system to perform the target task to obtain a third output result; If the third output result is different from the preset output result, after the first HAI system is updated to the second HAI system, a step is performed to obtain a first calling sequence of the atomic model called by the first HAI system.

6. The method according to claim 2, characterized in that The method further comprises: If a second HAI system obtained by optimizing the first HAI system is detected, controlling the second HAI system to perform the target task to obtain a third output result; If the third output result is different from the preset output result, obtaining a second calling sequence of the second HAI system; Based on the second calling sequence, generating a third calling causal graph; Compare the third call causal graph with the first call causal graph in the calling order, and determine the first second target node in the third call causal graph that has different node content from that in the first call causal graph; the execution step is based on the do operator node and the expected output content corresponding to the first target node included in the recognition result, control the first HAI system to re-execute the target task according to the first calling order, and update the second error causal graph set and the second error cause set.

7. The method according to claim 6, characterized in that The method further comprises: From the first error causal graph set, obtain an error causal graph whose starting point is before the second target node to obtain the second error causal graph set; From the first error cause set, the error analysis causes corresponding to the error causal graph whose starting point is located before the second target node are obtained to obtain the second error cause set.

8. The method according to any one of claims 1, 5-7, characterized in that: The method further comprises: If the analysis time of the cyclic error tracing analysis for the first HAI system is greater than or equal to the preset time, a prompt message is generated; wherein the prompt message is used to prompt that the error analysis for the first HAI system cannot be implemented.

9. The method according to claim 8, characterized in that The prompt information also includes at least: the set of error cause-effect graphs and the set of error causes associated with the first HAI system within the preset time period.

10. An error tracing device, characterized in that: The device comprises: an acquisition unit, a generation unit and a control unit; wherein: The acquisition unit is used to acquire a first calling sequence of the atomic model called by the first HAI system if the first output result of the first systematic artificial intelligence HAI system executing the target task is different from the preset output result; wherein the atomic model is used to implement a business application function; The generating unit is used to generate a first calling causal graph based on the first calling sequence; wherein each node in the first calling causal graph is the output content of the atomic model of the call; The control unit is used to control the first HAI system to re-execute the target task according to the first calling sequence based on the identification result of the error identification of the first calling causal graph, and update the first error causal graph set and the first error cause set.

11. An electronic device, characterized in that: The device comprises: a communication interface, a memory, a processor and a communication bus; wherein: A memory for storing executable information; A communication bus, used to realize the communication connection between the communication interface, the processor and the memory; A processor is used to execute the error tracing program stored in the memory to implement the steps in the error tracing method as described in any one of claims 1 to 9.

12. A storage medium, characterized in that: An error tracing program is stored on the storage medium, and when the error tracing program is executed, it is used to implement the steps of the error tracing method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the error tracing method according to any one of claims 1 to 9.