Chatbot intelligent debugging system and method

By integrating a predictive prompting engine and enhanced root cause analysis services, the intelligent chatbot debugging system solves the problems of low debugging efficiency, difficulty in error localization, and insufficient test coverage of existing platforms, enabling efficient and in-depth chatbot development and debugging, and lowering the technical threshold.

CN120994531BActive Publication Date: 2025-12-23BEISEN CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511536192.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2025-12-23
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing intelligent conversational AI platforms suffer from problems such as low debugging efficiency, difficulty in error localization, lack of in-depth insight, insufficient test coverage, and delayed problem discovery during chatbot debugging, resulting in low development efficiency and high operational risks.

Method used

This paper presents an intelligent chatbot debugging system that integrates a predictive prompting engine, natural language understanding service, and enhanced root cause analysis service. Through visual process setup and an integrated testing interface, combined with predictive error discovery, interpretable model diagnosis, and automated test coverage evaluation, it improves debugging efficiency and accuracy.

Benefits of technology

It significantly improves the quality and efficiency of chatbot development, lowers the technical threshold, enables proactive prediction of potential problems, in-depth insights, and comprehensive testing, and reduces rework and operational risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994531B_ABST
    Figure CN120994531B_ABST
Patent Text Reader

Abstract

The application provides a chat robot intelligent debugging system and method, and relates to the technical fields of artificial intelligence and natural language processing, wherein the chat robot intelligent debugging system is further integrated with a predictive prompt engine, a natural language understanding service and an enhanced root cause analysis service on the basis of providing a visual process building and an integrated test debugging interface, the engines / services work in cooperation with process services and dialogue management services, and the chat robot intelligent debugging system provides more intelligent, more in-depth and more comprehensive support in the whole life cycle of the design, test and debugging of the chat robot, significantly improves the quality and efficiency of chat robot development, and reduces the technical threshold.
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 and natural language processing, and in particular to a chat robot intelligent debugging system and method. BACKGROUND

[0002] Currently, there are various intelligent conversational AI platforms available for development and operation personnel to use. These platforms usually provide visual operation interfaces (such as drag-and-drop components) to build chat robots. Such platforms are generally equipped with basic function modules, including "word slot collection modules", "interface calling modules" and "dialogue response modules", for building complete dialogue interaction processes. After the system is deployed, the user needs to simulate a dialogue with the robot through a special test interface to verify the logical accuracy and process integrity of each function module.

[0003] However, through analysis, it is found that the above intelligent conversational AI platforms have the following five problems:

[0004] 1. Low debugging efficiency and passivity:

[0005] The current solution mainly relies on problem discovery in the testing phase, which has significant limitations. Specifically, when the user encounters an error (such as process interruption, intent recognition error or word slot not correctly filled) in the test, they usually need to interrupt the test and return to the complex build interface for troubleshooting and modification. Since such operations need to be performed repeatedly, the entire process is time-consuming and inefficient.

[0006] 2. Difficulty in error positioning:

[0007] Error information is often presented in the form of simple error prompts or JSON code that requires professional knowledge to interpret, which poses a significant obstacle for non-technical background users. They have difficulty quickly and accurately locating the specific error link in the process and its root cause.

[0008] 3. Lack of deep insight:

[0009] Although some improved solutions have provided the ability to convert JSON into "natural language" analysis, the function is still relatively shallow, mainly limited to showing "what happened" (for example, which intent was recognized), without being able to explain "why it happened" (for example, why the model made that judgment and what it was based on). This limitation makes it difficult to optimize for deep-seated problems.

[0010] 4. Insufficient test coverage:

[0011] Manual testing methods are difficult to fully cover all possible paths and boundary conditions in complex dialogue processes, which may result in unexpected errors after the system goes online.

[0012] 5. Problem discovery lags:

[0013] There may be some potential logical defects (such as dead loops, unreachable nodes or intent conflicts) in the process design, which are usually discovered in the later stage of testing or even after the system goes online. This not only increases the repair cost, but also brings high operation risk. SUMMARY

[0014] The purpose of the present application is to provide a chat robot intelligent debugging system and method to at least solve one of the above problems.

[0015] In a first aspect, the present application provides a chat robot intelligent debugging system, comprising a front-end application module and a back-end service cluster connected in communication;

[0016] The front-end application module comprises a process editor and a test panel, and the test panel comprises a dialogue interaction area, a predictive prompt display area, a natural language state analysis area and an enhanced root cause analysis display area;

[0017] The back-end service cluster comprises a process service, a natural language understanding service, a dialogue management service, a debugging service and an enhanced root cause analysis service, and the debugging service comprises a state parser and a predictive prompt engine;

[0018] The process editor is used to provide a visual canvas, and the visual canvas is used for the user to design a visual chat robot dialogue process; the process service is used to store and manage the dialogue process graph in the visual canvas, and when a process analysis event is triggered, the dialogue process graph is sent to the predictive prompt engine of the debugging service; the predictive prompt engine is used to detect defects of the dialogue process graph, and the detected defect information is displayed in the predictive prompt display area;

[0019] The dialogue interaction area is used for the user to input a sentence for testing the chat robot; the natural language understanding service and the dialogue management service are respectively used for intent recognition and dialogue state management of the sentence to be tested; the state parser of the debugging service is used to convert the state of the natural language understanding service and the dialogue management service into a natural language description, and is displayed in the natural language state analysis area;

[0020] The natural language understanding service or the dialogue management service is also used to generate an explainable decision basis by calling the enhanced root cause analysis service when a viewing analysis request is obtained for the natural language state analysis area, and is displayed in the enhanced root cause analysis display area.

[0021] In an optional embodiment, the test panel further comprises a simulator control and coverage visualization area, and the back-end service cluster further comprises a test service, and the debugging service further comprises a simulated execution engine;

[0022] The simulator control and coverage visualization area is configured to enable a user to initiate a multi-turn dialogue simulation for the chat robot based on a preset test case or a defined test target; the test service is configured to, upon receiving a multi-turn dialogue simulation request from the simulator control and coverage visualization area, drive the simulation execution engine to perform the multi-turn dialogue simulation according to the defined multi-turn user interaction path or the user behavior model, and, upon completion of the simulation, analyze the simulation trace by the coverage calculator to calculate the test coverage, and display the test coverage on the simulator control and coverage visualization area.

[0023] In an optional implementation, the test panel further comprises a context debugging tool area, and the debugging service further comprises a context editor interface;

[0024] The context debugging tool area and the natural language state analysis area are both configured to enable a user to perform intent correction and / or question-answer pair editing; the context editor interface is configured to, upon receiving an editing request from the context debugging tool area or the natural language state analysis area, update corresponding data, the corresponding data comprising the question-answer configuration in the flow service and / or the sample data of the natural language understanding service.

[0025] In an optional implementation, the predictive prompt engine is configured to perform one or more of reachability analysis, loop detection, intent conflict detection, and rule checking on the dialogue flowchart to obtain defect information;

[0026] The reachability analysis comprises traversing the dialogue flowchart from a starting node to identify a first node that cannot be reached, and traversing the dialogue flowchart in reverse from all ending nodes to identify a second node that cannot reach any ending node;

[0027] The intent conflict detection comprises, for a third node in the dialogue flowchart for which intent recognition is configured, obtaining the intents associated with the third node and their training samples, and determining an intent conflict risk according to the similarity between the samples under different intents;

[0028] The rule checking comprises scanning and matching the dialogue flowchart based on a predefined rule set to obtain a rule matching result.

[0029] In an optional implementation, the enhanced root cause analysis service is configured to, upon receiving a calling request of the natural language understanding service, obtain model information, input features, and a prediction result in the calling request; calculate a contribution degree of each input feature to the predicted intent, and return the calculated contribution degree data to the natural language understanding service; the natural language understanding service is configured to send the contribution degree data to the front-end application module; and the front-end application module is configured to, in an enhanced root cause analysis display area, render the input text according to the contribution degree data to distinguishively display the contribution degree of different words in the input text to the current prediction result.

[0030] In an optional embodiment, the test service is configured to obtain a test target defined by the user in the simulator control and coverage visualization area, obtain a starting statement according to the test target, and drive the simulation execution engine to start a dialogue simulation from the starting statement;

[0031] The simulation execution engine is configured to start from the starting statement, process the simulated user input according to the current state of the maintained dialogue state machine and the flow definition of the chat robot, obtain the response and state transition of the chat robot by calling the natural language understanding service and the dialogue management service, and generate the next user input according to the multi-round user interaction path or the user behavior model to perform multi-round dialogue simulation, and record all the passed nodes and edges during the simulation to form a simulation trajectory; after the simulation is completed, the coverage calculator reads the simulation trajectory, counts the number of unique nodes and edges that have been accessed, obtains a statistical result, and calculates the test coverage including the node coverage and the edge coverage according to the statistical result and the total number of nodes and edges in the dialogue flowchart of the chat robot; when receiving a coverage acquisition request from the front-end application module, one or more of the accessed node list, the accessed edge list and the test coverage are returned to distinguish the accessed and unaccessed nodes and / or edges in the flow editor or to display the test coverage in the simulator control and coverage visualization area.

[0032] In an optional embodiment, the front-end application module and the back-end service cluster communicate through an API gateway.

[0033] In a second aspect, the present application provides a chat robot intelligent debugging method applied to the chat robot intelligent debugging system of any one of the preceding embodiments; the chat robot intelligent debugging method comprises:

[0034] In response to a flow analysis event triggered during the dialogue flow design process of the chat robot, the predictive prompt engine performs defect detection on the dialogue flowchart, and displays the detected defect information in the predictive prompt display area;

[0035] In response to a statement test request, the natural language understanding service and the dialogue management service perform intent recognition and dialogue state management on the statement to be tested, respectively; the state parser of the debugging service converts the states of the natural language understanding service and the dialogue management service into natural language descriptions, and displays them in the natural language state analysis area;

[0036] In response to a viewing analysis request for the natural language state analysis area, the natural language understanding service or the dialogue management service calls the enhanced root cause analysis service to generate an explainable decision basis, and displays it in the enhanced root cause analysis display area.

[0037] In an optional embodiment, the test panel further comprises a simulator control and coverage visualization area, the backend service cluster further comprises a test service, and the debugging service further comprises a simulation execution engine; the chatbot intelligent debugging method further comprises:

[0038] In response to a multi-round dialogue simulation request based on a preset test case or a defined test target from the simulator control and coverage visualization area, the test service drives the simulation execution engine to perform multi-round dialogue simulation according to a defined multi-round user interaction path or a user behavior model, and after the simulation is completed, analyzes the simulation track through a coverage calculator to calculate a test coverage, and displays the test coverage on the simulator control and coverage visualization area.

[0039] In an optional embodiment, the test panel further comprises a context debugging tool area, and the debugging service further comprises a context editor interface; the chatbot intelligent debugging method further comprises:

[0040] In response to an editing request from the context debugging tool area or the natural language state analysis area, the context editor interface updates corresponding data, and the corresponding data includes question and answer configurations in the flow service and / or sample data of the natural language understanding service.

[0041] The chatbot intelligent debugging system and method provided by the application further integrate a predictive prompt engine, a natural language understanding service and an enhanced root cause analysis service on the basis of providing a visual flow building and an integrated test and debugging interface, and these engines / services work in cooperation with a flow service and a dialogue management service to provide more intelligent, more in-depth and more comprehensive support in the whole life cycle of chatbot design, testing and debugging, significantly improving the quality and efficiency of chatbot development and reducing the technical threshold. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the application, the drawings needed in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0043] Figure 1 A structural schematic diagram of a chatbot intelligent debugging system provided by an embodiment of the application;

[0044] Figure 2 An application scenario schematic diagram of a chatbot intelligent debugging system provided by an embodiment of the application;

[0045] Figure 3A flowchart of a chat robot intelligent debugging method provided by an embodiment of the present application is shown in the figure.

[0046] Figure 4 A flowchart of another chat robot intelligent debugging method provided by an embodiment of the present application is shown in the figure.

[0047] Icon: 100 - front-end application module; 110 - flow editor; 120 - test panel; 121 - dialogue interaction area; 122 - predictive prompt display area; 123 - natural language state analysis area; 124 - enhanced root cause analysis display area; 125 - simulator control and coverage visualization area; 126 - context debugging tool area; 200 - back-end service cluster; 210 - flow service; 220 - natural language understanding service; 230 - dialogue management service; 240 - debugging service; 241 - state analyzer; 242 - predictive prompt engine; 243 - simulated execution engine; 244 - context editor interface; 250 - enhanced root cause analysis service; 260 - test service; 270 - API gateway; 300 - data storage layer; 310 - flow database; 320 - model library; 330 - test database. DETAILED DESCRIPTION

[0048] The technical solutions of the present application will be described in detail below in conjunction with embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0049] By analyzing the prior art, it is found that the following user needs exist at present:

[0050] Basic needs: non-technical background operation / business personnel hope to build and debug chat robots with low threshold, and can intuitively understand the robot running process, quickly locate and repair errors.

[0051] Advanced needs: ①Find problems in advance: users want to get hints about potential problems during the building process, rather than discovering them in the testing phase, reducing rework; ②Understand decision reasons: when the chat robot does not perform as expected (such as intent recognition error, irrelevant answer), users want to understand the specific reasons for the system's decision, so as to optimize more accurately; ③Comprehensive testing guarantee: users want to ensure that all branches and key paths of the dialogue flow are fully tested to avoid unexpected situations after going online; ④Efficiency optimization: users are concerned about the response efficiency of the robot and the API (Application Programming Interface, application programming interface) call cost, and hope to find potential performance bottlenecks in the debugging stage.

[0052] Based on this, the embodiment of the present application provides a chat robot intelligent debugging system and method, which combines predictive error finding, interpretable model diagnosis and automated test coverage evaluation, and is suitable for low-threshold dialogue system optimization used by non-technical users. The embodiment of the present application aims to solve the technical problems of passive debugging, low efficiency, difficult error positioning, lack of deep insight, incomplete test coverage and problem finding lag in the existing chat robot debugging method, and provides an intelligent debugging system and method integrating predictive analysis, interpretable insight and simulation testing, to significantly improve the quality and efficiency of chat robot development and reduce the technical threshold.

[0053] In order to facilitate the understanding of the present embodiment, first of all, a chat robot intelligent debugging system disclosed by the present embodiment is introduced in detail.

[0054] The chat robot intelligent debugging system provided by the embodiment of the present application is an intelligent and integrated chat robot design, debugging and optimization platform integrating predictive analysis, deep interpretability and full path simulation. It not only simplifies the debugging process, but also helps users to build and iterate chat robots with higher quality, higher efficiency and lower risk through active prediction, deep insight and comprehensive testing.

[0055] As shown in Figure 1 The chat robot intelligent debugging system includes a front-end application module 100 and a back-end service cluster 200 connected in communication;

[0056] The front-end application module 100 includes a flow editor 110 and a test panel 120, and the test panel 120 includes a dialogue interaction area 121, a predictive prompt display area 122, a natural language state analysis area 123 and an enhanced root cause analysis display area 124;

[0057] The back-end service cluster 200 includes a flow service 210, a natural language understanding service 220, a dialogue management service 230, a debugging service 240 and an enhanced root cause analysis service 250, and the debugging service 240 includes a state parser 241 and a predictive prompt engine 242;

[0058] The flow editor 110 is used to provide a visual canvas, and the visual canvas is used for the user to design a visual chat robot dialogue flow; the flow service 210 is used to store and manage the dialogue flowchart in the visual canvas, and when a flow analysis event is triggered, the dialogue flowchart is sent to the predictive prompt engine 242 of the debugging service 240; the predictive prompt engine 242 is used to detect defects of the dialogue flowchart, and the detected defect information is displayed in the predictive prompt display area 122;

[0059] The dialogue interaction area 121 is used for the user to input a sentence for testing the chat robot; the natural language understanding service 220 and the dialogue management service 230 are respectively used for intent recognition and dialogue state management on the sentence to be tested; the state parser 241 of the debugging service 240 is used for converting the states of the natural language understanding service 220 and the dialogue management service 230 into natural language descriptions, and displaying in the natural language state parsing area 123.

[0060] The natural language understanding service 220 or the dialogue management service 230 is also used to call the enhanced root cause analysis service 250 to generate an explainable decision basis when a viewing analysis request for the natural language state parsing area 123 is obtained, and display in the enhanced root cause analysis display area 124.

[0061] In the embodiment, the front-end application module 100 is used to provide a user interaction interface, the flow editor 110 is used for the user to configure a flow in a visual manner by dragging nodes, and the test panel 120 is an integrated test and debugging panel, which can perform dialogue testing and result analysis in the same interface. When the user clicks an analysis control or a save control on the test panel 120, a flow analysis event is triggered.

[0062] In the back-end service cluster 200, the flow service 210 is responsible for the creation, storage and version management of the dialogue flowchart. The natural language understanding service 220 is responsible for intent recognition and slot extraction, and integrates the calling capability of the interface of the enhanced root cause analysis service 250, which can display the internal state (intent, slot, action) of the chat robot in an understandable language. The dialogue management service 230 is responsible for dialogue state management and flow jump, and integrates the calling capability of the interface of the enhanced root cause analysis service 250. The state parser 241 is used to convert the runtime state of the natural language understanding service 220 / dialogue management service 230 into a natural language description. The predictive prompt engine 242 is used to analyze the flow definition, detect potential structure, logic and efficiency problems, and automatically detect and prompt potential problems in the building canvas or test results, such as isolated nodes, infinite loops, unhandled user branches, intent conflicts / incomplete coverage, inefficient API calls, etc. For example, based on the breakpoint detection of the dialogue flowchart structure, the user is prompted. The enhanced root cause analysis service 250 is used to provide model explanation capability, receives a request from the natural language understanding service 220 / dialogue management service 230, returns an explanation result (such as feature importance, decision path, etc.), and can generate a misjudgment reason graph based on semantic similarity calculation and training sample analysis. The enhanced root cause analysis service 250 can provide explainable analysis for the natural language understanding service 220 / dialogue management service 230, such as displaying key trigger words, confidence scores, similar intent comparison, decision path visualization, etc.

[0063] The chat robot intelligent debugging system can adopt a front-end and back-end separation architecture based on microservices. The microservices are easy to independently develop, deploy and extend each functional module (such as an enhanced root cause analysis service, a debugging service, a test service and the like), and the selection of a technology stack is more flexible, so that faults can be isolated. Under the front-end and back-end separation, responsibilities are clear, parallel development and independent iteration are facilitated, and better user experience is provided.

[0064] The chat robot intelligent debugging system provided in the embodiments of the present application further integrates a predictive prompt engine, a natural language understanding service and an enhanced root cause analysis service on the basis of providing a visual process building interface and an integrated test and debugging interface. These engines / services work in cooperation with process services and dialogue management services to provide more intelligent, more in-depth and more comprehensive support in the whole life cycle of design, test and debugging of a chat robot, significantly improving the quality and efficiency of chat robot development and reducing the technical threshold.

[0065] Further optionally, as shown in Figure 1 The test panel 120 further includes a simulator control and coverage visualization area 125, and the back-end service cluster 200 further includes a test service 260. The debugging service 240 further includes a simulated execution engine 243.

[0066] The simulator control and coverage visualization area 125 is configured to allow a user to start multi-turn dialogue simulation for a chat robot based on a preset test case or a defined test target. The test service 260 is configured to drive the simulated execution engine 243 to perform multi-turn dialogue simulation according to a defined multi-turn user interaction path or user behavior model after receiving a multi-turn dialogue simulation request from the simulator control and coverage visualization area 125, and analyze a simulation trajectory by a coverage calculator to calculate test coverage and display the test coverage on the simulator control and coverage visualization area 125 after the simulation is completed.

[0067] In the embodiments, the simulated execution engine 243 is configured to perform multi-turn dialogue simulation. The test service 260 is configured to manage test cases, drive the simulated execution engine 243 and include a coverage calculator configured to analyze a simulation trajectory and calculate test coverage. The simulated execution engine 243 can allow a user to define or automatically generate a typical multi-turn user interaction path, simulate execution and display state changes of a complete process. Test coverage visualization can be implemented, that is, nodes and paths that have been tested and nodes and paths that have not been tested are highlighted on a dialogue flowchart, and coverage is counted.

[0068] Further optionally, as shown in Figure 1 The test panel 120 further includes a context debugging tool area 126, and the debugging service 240 further includes a context editor interface 244.

[0069] The context debugging tool area 126 and the natural language state analysis area 123 are used for the user to make intention modification and / or question and answer pair editing; the context editor interface 244 is used to update the corresponding data including the question and answer configuration in the flow service 210 and / or the sample data of the natural language understanding service 220 when receiving an editing request from the context debugging tool area 126 or the natural language state analysis area 123.

[0070] In the embodiment, the context editor interface 244 is used to process the intention modification request and the question and answer pair editing request from the front-end application module 100, and the intention recognition can be directly modified and the question and answer pair can be edited in the test interface in real time.

[0071] Further optionally, as shown in Figure 1 The back-end service cluster 200 further includes an API gateway 270, and the front-end application module 100 communicates with the back-end service cluster 200 through the API gateway 270. The API gateway 270 is a unified interface entrance.

[0072] Further, as shown in Figure 1 The chat robot intelligent debugging system further includes a data storage layer 300, and the data storage layer 300 includes a flow database 310, a model library 320, and a test database 330; the flow database 310 is used to store the dialogue flowchart saved by the flow service 210, the model library 320 is used to store the related model data of the natural language understanding service 220 and the dialogue management service 230, and the test database 330 is used to store the related test data (such as test cases and user behavior models) of the test service 260.

[0073] Optionally, the predictive prompt engine 242 is used to perform one or more of reachability analysis, cycle detection, intention conflict detection, and rule checking on the dialogue flowchart to obtain defect information.

[0074] The reachability analysis includes traversing the dialogue flowchart from a starting node to identify a first node that cannot be reached, and traversing the dialogue flowchart in reverse from all ending nodes to identify a second node that cannot reach any ending node.

[0075] The intention conflict detection includes, for a third node in the dialogue flowchart for which intention recognition is configured, obtaining an intention associated with the third node and a training sample thereof, and determining an intention conflict risk according to a similarity between samples under different intentions.

[0076] The rule checking includes performing scanning and matching on the dialogue flowchart based on a predefined rule set to obtain a rule matching result.

[0077] The above prediction formula prompt engine 242 can identify structural problems (islands, loops) in the dialogue flowchart, detect intent conflicts (multiple intent samples are highly similar) or coverage deficiencies (some key branches lack trigger conditions), and discover potential inefficient patterns (too many consecutive API calls). The related algorithms can include:

[0078] 1) Structural problem detection:

[0079] Algorithm: graph traversal (depth-first DFS / breadth-first BFS)

[0080] Logical description:

[0081] Perform traversal from "start node", mark all reachable nodes;

[0082] Perform reverse traversal from "end node", find paths that cannot reach the end point;

[0083] Detect if there is a path that returns to itself repeatedly, and determine it as "loop".

[0084] Definition formula:

[0085] ;

[0086] where, is_reachable(v): this function is used to judge whether there is a path from the start node (StartNode) to the node v , it checks whether it can be reached from the start node to the node v . is_orphan(v): this function is used to determine whether the node v is an orphan node, that is, there is no path from the start node to it; according to the definition, if a node is not reachable (i.e. is_reachable(v) returns false), it is orphaned (orphan). has_path_to_end(v): this function is used to check whether there is a path from the node v to the end node (EndNode); this indicates whether it can reach the end point from the node v . is_dead_end(v): this function is used to identify dead-end nodes; a node is considered a dead end when and only when it is reachable (can be reached from the start node), but there is no path from the node to the end point.

[0087] 2) Intent conflict detection:

[0088] Algorithm:

[0089] Text Similarity: TF-IDF + Cosine, Sentence-BERT Embedding + Cosine

[0090] Vector Clustering: K-Means or DBSCAN

[0091] Logic:

[0092] Extract all training samples of intent, calculate their pairwise similarity; if the sample pair has a similarity between different intents higher than a certain threshold (e.g. 0.85), it is determined as "conflict risk".

[0093] Cosine Similarity Formula:

[0094] ;

[0095] Where A, B: are the vector representations of the two input sentences; if Similarity > 0.85 and A, B belong to different intents, prompt semantic conflict.

[0096] 3) Inefficient mode detection:

[0097] Algorithm: Rule-based Pattern Detection

[0098] Rule Examples:

[0099] "Consecutive more than 3 API call nodes";

[0100] "fallback default path without configured conditional branch";

[0101] "jump to end node immediately after user input node", etc.

[0102] In specific implementation, the predictive prompt engine 242 can perform the following checks after receiving the flow definition of the dialog flowchart (which can be represented as a directed graph G=(V, E), V is the node, E is the edge):

[0103] Reachability analysis: use DFS or BFS algorithm to traverse the graph from the start node, mark all reachable nodes; then traverse from all end nodes in reverse, mark all nodes that can reach the end node; thus identify nodes that cannot be reached from the start node (islands) and nodes that cannot reach any end node.

[0104] Cycle detection: in DFS traversal, maintain a stack of current path nodes; if a node is visited that is already in the stack, a cycle is detected. Configurable maximum number of cycles or path length allowed.

[0105] Intent conflict detection: for nodes configured with intent recognition, get their associated intents and training samples; use Sentence-BERT or other models to convert samples into vector embeddings. Calculate the cosine similarity between sample vectors under different intents. If there are a large number of sample pairs between different intents with similarity exceeding a preset threshold (such as 0.85), an "intent conflict risk" warning will be displayed in the prediction prompt display area 122.

[0106] Rule checking: apply a predefined rule set, such as "API call node exceeds 3 in a row", "conditional branch lacks default handling path", etc., to scan and match the dialog flowchart.

[0107] Optionally, when the enhanced root cause analysis service 250 receives a call request to the natural language understanding service 220, it obtains model information, input features, and prediction results in the call request; calculates the contribution of each input feature to the predicted intent, and returns the calculated contribution data to the natural language understanding service 220; the natural language understanding service 220 is configured to send the contribution data to the front-end application module 100; the front-end application module 100 is configured to render the input text according to the contribution data in the enhanced root cause analysis display area 124, to distinguish the contribution of different words in the input text to the current prediction result.

[0108] The enhanced root cause analysis service 250 can explain why the NLU model identifies a certain user input as a specific intent / extracts a specific word slot, and explain why the DM model selects a specific reply or jump path. Related algorithms can include:

[0109] LIME: by generating slight perturbations near the prediction point, a simple, interpretable local proxy model is trained to simulate the behavior of a complex model; suitable for explaining a single prediction;

[0110] SHAP: based on the Shapley value in game theory, calculate the contribution of each feature to the final prediction result; the theoretical basis is stronger, and it can provide global and local explanations;

[0111] Attention Visualization (for Transformer-based NLU models): shows the degree of attention (weight) of each word in the Transformer model, i.e. visualizes which words the model pays more attention to when processing input text.

[0112] Take SHAP as an example, the formula is as follows:

[0113] ;

[0114] Where: represents the SHAP value of feature i ; F represents the set of all features; S represents the subset of features after removing feature i ; f ( S ) represents the predicted value of the model when only inputting the subset S .

[0115] In specific implementation, NLU (Natural Language Understanding) explainability based on SHAP (SHapley Additive exPlanations) can be as follows:

[0116] When the user encounters an unsatisfactory NLU result (such as incorrect intent recognition) in testing, click "View Analysis". The front-end application module 100 sends a request containing the current input text and NLU model identifier to the NLU service.

[0117] The NLU service calls the XAI (eXplainable AI) service to request an explanation of this prediction. The request contains model information, input features (such as Tokenized text), and prediction results.

[0118] The XAI service uses SHAP (e.g. KernelSHAP or a SHAP variant for a specific model structure) to calculate the contribution of each input Token to the predicted intent (Shapley value).

[0119] The XAI service returns the calculated SHAP value array to the NLU service, which is then passed to the front-end application module 100.

[0120] The front-end application module 100 renders the input text in the enhanced root cause analysis display area 124, highlights the words that contribute most to the current prediction result with different colors or backgrounds according to the positive and negative and size of the SHAP value, helping the user understand the model decision basis.

[0121] Optionally, the test service 260 is configured to obtain a test target defined by the user in the simulator control and coverage visualization area 125, obtain a starting statement according to the test target, and drive the simulation execution engine 243 to start dialogue simulation from the starting statement;

[0122] The simulation execution engine 243 is configured to start from the starting statement, obtain the response and state transition of the chat robot by calling the natural language understanding service 220 and the dialogue management service 230 to process the simulated user input according to the current state of the maintained dialogue state machine and the flow definition of the chat robot, and generate the next user input according to the multi-round user interaction path or the user behavior model to perform multi-round dialogue simulation, and record all passed nodes and edges to form a simulation trajectory during the simulation; after the simulation ends, the coverage calculator reads the simulation trajectory, counts the number of unique nodes and edges visited, obtains the statistical result, and calculates the test coverage including the node coverage and the edge coverage according to the statistical result and the total number of nodes and edges in the dialogue flowchart of the chat robot; when receiving the coverage acquisition request of the front-end application module 100, one or more of the visited node list, the visited edge list and the test coverage are returned to display the visited and unvisited nodes and / or edges in the flow editor 110, or display the test coverage in the simulator control and coverage visualization area 125.

[0123] The above multi-round dialogue simulation and coverage analysis can generate realistic multi-round dialogue interaction sequences based on user goals or preset scenarios, track the simulation path on the flowchart, and calculate the coverage of nodes / edges. Related algorithms can include:

[0124] 1) Simulation execution engine:

[0125] Algorithm: state machine simulator + probabilistic user model

[0126] Logic: start from the starting node, generate dialogue trajectory according to the test target; in each round of simulation, call NLU / DM service response to drive state transition; record nodes, paths and response behavior during simulation execution.

[0127] 2) Coverage calculation:

[0128] Algorithm: graph path tracking + statistical analysis

[0129] Logic: Mark all the passed nodes and edges in the simulation process; count the node coverage and path coverage (i.e., edge probability).

[0130] Coverage formula:

[0131] Node coverage = number of visited nodes / total number of nodes; edge coverage = number of visited edges / total number of edges.

[0132] In specific implementation, the state machine-based simulation and coverage calculation can be as follows:

[0133] The user defines a test goal in the simulator control and coverage visualization area 125, for example, "user successfully completes the leave application".

[0134] According to the test goal, the test service 260 can require the user to provide a starting statement, or automatically generate a typical starting statement.

[0135] The test service 260 drives the simulation execution engine 243 to start the simulation. The simulation execution engine 243 maintains a dialog state machine, and according to the current state and flow definition, calls the NLU / DM (Dialog Management) service to process the user input of the simulation, obtains the response and state transition of the robot, and generates the next input according to the user behavior model.

[0136] During the simulation process, all the passed node IDs (Identification, Identification) and edge IDs are recorded to form a simulation track.

[0137] After the simulation ends (reaches the end node or triggers the termination condition), the coverage calculator reads the simulation track, and counts the number of unique nodes and edges visited.

[0138] The front-end application module 100 requests the coverage result, and the test service 260 returns the covered node / edge list or coverage percentage. The front-end application module 100 can highlight the visited nodes / edges with one color (such as green) on the canvas of the flow editor 110, highlight the unvisited nodes / edges with another color (such as red), or display the coverage value in the simulator control and coverage visualization area 125.

[0139] The test service 260 can generate a flow heat map through automated simulation, mark the un-reached nodes, and return the flow heat map to the front-end application module 100; the front-end application module 100 displays the flow heat map in the simulator control and coverage visualization area 125.

[0140] Note that the algorithm employed by the XAI service can be replaced by LIME (Local Interpretable Model-agnostic Explanations) or other model explanation techniques. The predictive hint engine 242 can integrate a machine learning-based model that learns from historical data to predict high-risk design patterns. The user behavior model of the simulator can be replaced from a simple random selection to a more complex behavior model trained based on user profiles or historical conversation data. The coverage calculation can employ more complex criteria such as conditional coverage, path coverage, etc.

[0141] Regarding the predictive hint engine 242, the enhanced root cause analysis service 250, the simulation execution engine 243 described above, the present embodiment also provides a training and evaluation process as follows:

[0142] 1. Data requirements and preparation:

[0143] 1) Predictive hint engine 242:

[0144] Data: flowchart data (nodes, edges, configurations) constructed by users; intent and sample data.

[0145] Source: directly generated by user operations on the platform.

[0146] Preparation: No additional annotation is required, but structured flowchart data and intent data are required.

[0147] 2) Enhanced root cause analysis service 250:

[0148] Data: Access to NLU / DM model itself and its training data (or at least feature space definition); input data for a single prediction to be explained.

[0149] Source: NLU / DM service and input during user testing.

[0150] Preparation: XAI algorithms usually require the ability to call the model for multiple predictions (such as perturbation of LIME / SHAP).

[0151] 3) Simulation execution engine 243:

[0152] Data: flowchart data; optional test case definition (user goals, starting statements); optional user behavior model parameters.

[0153] Source: flowchart constructed by users; test cases defined by users.

[0154] Preparation: Structured flowchart data.

[0155] 2. Training and evaluation:

[0156] 1) Predictive Hint Engine 242:

[0157] If ML (Machine Learning) model is used to predict potential issues (e.g., train a model based on historical data to predict which process designs are prone to errors), the following are needed:

[0158] Training: Supervised learning using a large amount of historical process data with annotations (whether it is a problematic process).

[0159] Evaluation: Accuracy, Precision, Recall, F1 Score, to evaluate the model's ability to find real issues.

[0160] 2) Enhanced Root Cause Analysis Service 250:

[0161] XAI methods themselves usually do not require "training", but need to be configured and applied for specific models. The indicators for evaluating XAI can include:

[0162] Fidelity: The degree of consistency between the explanation and the original model prediction.

[0163] Comprehensibility: The ease of user understanding of the explanation (evaluated through user surveys).

[0164] Usefulness: Whether the explanation is helpful for users to debug or trust the model (evaluated through user surveys).

[0165] 3) Simulation Execution Engine 243:

[0166] If the user behavior model is learned, user interaction data is needed for training. When evaluating the simulation execution engine 243, the distribution characteristics of simulated conversations and real user conversations can be compared (such as conversation turns, intent transfer patterns, etc.).

[0167] For the algorithm integration and service of Predictive Hint Engine 242 and Enhanced Root Cause Analysis Service 250:

[0168] Predictive Hint Engine 242: Can be part of the debugging service or a separate microservice. Provides API to receive process graph data and returns a list of issues. Can be triggered asynchronously when the user saves the process, or called in real-time on the test interface.

[0169] Enhanced Root Cause Analysis Service 250: As a separate microservice. After the NLU / DM service makes a prediction, if explanation is needed, call the API of the XAI service, pass in the model information and input data, and the XAI service returns the explanation result. The debugging service obtains the test results, calls the XAI service to obtain the explanation, and integrates it into the final data returned to the front end.

[0170] In summary, the core idea of ​​this invention is to further integrate a predictive prompt engine, NLU service, XAI service, simulation execution engine, and test service coverage calculation, based on providing a visual process building and integrated test and debugging interface. These engines / services work in conjunction with basic process services, DM services, and other modules to provide more intelligent, in-depth, and comprehensive support throughout the entire lifecycle of chatbot design, testing, and debugging.

[0171] For ease of understanding, please refer to the following: Figure 2 This paper introduces the application scenarios of the intelligent debugging system for chatbots.

[0172] Users enter the front-end application module; process setup: users build / edit the chatbot's dialogue process in the process editor; after users click save or analyze, the predictive prompt engine is invoked to analyze structural problems; when prompting results, structural anomaly prompts are displayed in the predictive prompt display area.

[0173] Dialogue Test: The user inputs simulated utterances on the test panel; the NLU service is invoked to identify intent and entities; the DM service is invoked to determine the response logic; the state parser is invoked to generate readable state explanations; and the parsing results are displayed in the Natural Language State Parsing Area.

[0174] Users click the "View Analysis" button; XAI service: generates explanations for model decisions; displays key features, confidence levels, and attention weights.

[0175] Determine if debugging is complete; if not, re-execute the steps of "Process Setup: Users build / edit the chatbot's dialogue flow in the process editor"; if yes, submit the go-live process or publish the process.

[0176] The user edits the intent / sample / configuration; calls the context debugging interface to update the sample or process; and returns to the test process for verification.

[0177] The user initiates a multi-turn dialogue simulation; the simulation execution engine runs according to the process; the coverage of process nodes / edges is calculated; the coverage is highlighted and visualized on the process canvas.

[0178] For example, the detailed process of the above-mentioned intelligent chatbot debugging system is as follows:

[0179] S1: Process Design and Predictive Analytics.

[0180] The user builds or modifies the dialog flow through the flow editor 110 of the front-end application module 100 (hereinafter referred to as the front-end). When the analysis control or the save control is clicked in the process, the flow service 210 sends the flow definition data (i.e. the dialog flowchart) to the predictive hint engine 242 of the debugging service 240. The predictive hint engine 242 analyzes the flow by using graph algorithms, rule checking, text similarity calculation, etc., and returns the detected potential problems (such as isolated nodes, loops, and intent conflicts) to the front-end through the API gateway 270, which is displayed to the user in the predictive hint display area 122.

[0181] S2: Dialog testing and state analysis.

[0182] The user inputs a sentence in the dialog interaction area 121 of the test panel 120 for testing. The front-end sends the sentence to the back-end service cluster 200 (hereinafter referred to as the back-end) through the API gateway 270. The NLU service and the DM service process the sentence to determine the intent, the word slot, and the next action. The state analyzer 241 of the debugging service 240 obtains the internal state of the NLU / DM and converts it into a natural language description, which is displayed in the natural language state analysis area 123.

[0183] S3: Enhanced root cause analysis (XAI).

[0184] When the user is confused about the results of the NLU / DM (such as incorrect intent recognition), the user can click the "View Analysis" button or the like on the front-end to trigger an analysis request for the results of the NLU / DM. The analysis request triggered by the front-end goes through the API gateway 270 to the NLU / DM service and then to the XAI service, wherein the NLU / DM service calls the XAI service when processing the analysis request. The XAI service analyzes the model decision basis using algorithms such as LIME, SHAP, or Attention mechanism, and returns the explanation results (such as key influence words, confidence comparison, feature contribution, etc.). The explanation results are returned to the front-end through the API gateway 270, and the front-end visualizes these information and presents them to the user in the enhanced root cause analysis display area 124.

[0185] S4: Context debugging.

[0186] The user can directly perform intent correction, edit question-answer pairs, and other operations in the context debugging tool area 126 or the natural language state analysis area 123 of the test panel 120. The editing request goes through the API gateway 270 to the context editor interface 244 of the debugging service 240, which processes these requests and updates the corresponding data (such as the question-answer configuration in the flow service 210 or the sample data of the NLU service). The user can immediately continue the next round of testing in the current interface to verify the modification effect.

[0187] S5: Multi-turn dialogue simulation and coverage analysis.

[0188] The user initiates a multi-turn dialogue simulation through the simulator control and coverage visualization area 125, which can be based on pre-defined test cases or user goals. The multi-turn dialogue simulation request reaches the test service 260 via the API gateway 270, and the test service 260 drives the simulation execution engine 243 of the debugging service 240 to perform a multi-turn dialogue according to the defined multi-turn user interaction path or user behavior model, interacts with the NLU / DM service, and records the simulation trace. After the simulation is completed, the coverage calculator of the test service 260 analyzes the simulation trace, calculates the coverage of nodes and edges, and the coverage result is stored in the test database 330. The coverage result is returned to the front end through the API gateway 270, and the front end highlights the coverage on the simulator control and coverage visualization area 125 or directly on the canvas of the flow editor 110.

[0189] S6: Iterative optimization.

[0190] This is a decision point. The user determines whether further optimization is needed based on predictive prompts, natural language parsing, XAI insights, context debugging results, and simulation coverage reports. If so, depending on the nature of the optimization, the user chooses to return to step S1 (modify flow design) or S4 (adjust data / configuration, such as through context editing) for continuous iterative optimization of the chatbot. If not, the process ends, which may mean that the chatbot has met the requirements and can be prepared for deployment.

[0191] The key technical points of the embodiments of the present application mainly include:

[0192] (1) Predictive prompt engine 242: proactively identify potential issues during the design phase rather than passively waiting for testing to expose them;

[0193] (2) Enhanced root cause analysis service 250: provides explainability of model decisions, enabling deep debugging and optimization;

[0194] (3) Simulation execution engine 243 and coverage calculator: supports automated multi-turn dialogue testing and quantifies the extent of test coverage;

[0195] (4) Systematic integration: seamlessly integrates the above technical points with visualization, integrated testing and debugging interface, natural language state parsing, context editing, and other functions to provide an end-to-end intelligent debugging experience.

[0196] Further optionally, the above chatbot intelligent debugging system can also implement the following functions:

[0197] Performance and cost estimation: simulate API calls to estimate the average response time and potential cost of the dialogue flow;

[0198] Sentiment / conversation quality analysis: Analyze the sentiment tendency and conversation fluency of chatbot responses in testing;

[0199] A / B testing support: Conveniently compare the effects of different process versions in the debugging environment; A / B testing is used to compare two or more versions of a product to determine which version performs better on a specific metric;

[0200] Batch test case management: Support import / export test cases for regression testing.

[0201] To facilitate understanding, the following provides several specific application scenarios of the above chatbot intelligent debugging system:

[0202] Scenario 1: Predictive prompts during setup.

[0203] User: Operation Xiaoming is setting up a leave process.

[0204] Process: He dragged a "ask for leave type" node, but forgot to connect the subsequent processing node. The system (predictive prompt) highlights the node in real time on the canvas and prompts "the node is missing subsequent process connection, which may cause the conversation to be interrupted". Xiaoming sees the prompt and immediately adds the subsequent node.

[0205] Scenario 2: Root cause analysis during testing.

[0206] User: Product manager Xiaohong is testing the ticket booking robot.

[0207] Process: She inputs "help me book a ticket to Shanghai tomorrow", but the robot recognizes it as "query weather" intent. In the natural language state analysis area, she clicks "view analysis" (enhanced root cause analysis). The system displays: "the word 'ticket' also appears in the training data of the 'query weather' intent (such as 'typhoon ticket'), and the current model has low confidence in extracting the location and time entity of 'tomorrow to Shanghai', leading to misjudgment. The confidence of the 'book ticket' intent is 0.55, and the 'query weather' is 0.62". Xiaohong decides to adjust the training samples or model parameters of the booking intent.

[0208] Scenario 3: Use the simulator for comprehensive testing.

[0209] User: Test engineer Daqiang is responsible for final verification before going online.

[0210] Flow: He inputs several key user goals (e.g. "successfully book a meeting room", "book failed due to insufficient information", "hand over to human in the middle") into the simulator control and coverage visualization area. The simulation execution engine automatically generates and executes multiple dialog paths that cover these goals. After the simulation ends, (test coverage visualization) shows on the flowchart that a node handling exceptional cases has never been triggered. Strong accordingly supplements the targeted test cases.

[0211] Optionally, the performance of the above chat robot intelligent debugging system can be quantitatively evaluated by the following indicators:

[0212] Debugging efficiency: average time consumption of a single debugging task;

[0213] Ease of use score: non-technical user satisfaction score of the platform; such as NPS (Net Promoter Score) / SUS (System Usability Scale);

[0214] Prediction accuracy / recall rate: the proportion of real problems found by predictive prompts;

[0215] Root cause analysis effectiveness: the proportion of users who adopt XAI analysis results for optimization;

[0216] Test coverage: average test coverage after multi-round dialog simulation using the test service;

[0217] On-line failure rate: due to more comprehensive testing, the failure rate caused by flow design in the production environment is reduced.

[0218] The embodiments of the present application have the following remarkable beneficial effects:

[0219] 1. Active prevention, reduce rework cost: through predictive intelligent prompts, potential problems can be found and repaired in the design stage, avoiding high rework cost caused by discovering problems in the late testing or after going online.

[0220] 2. Deep insight, precise optimization: enhanced root cause analysis (XAI) reveals the internal reasons for model decision-making, helping users (even non-experts) understand model behavior, so as to more accurately adjust training data or model parameters, and improve chat robot performance.

[0221] 3. Comprehensive testing, improve quality: multi-round dialog simulation and coverage analysis can systematically test various paths of the dialog flow, quantify the test coverage, significantly reduce online failures caused by insufficient testing, and improve the robustness and reliability of the chat robot.

[0222] 4. Efficiency improvement, cycle shortening: integrating prediction, testing, analysis, interpretation, debugging, simulation verification, etc. in a unified interface, and providing intelligent support, which greatly shortens the development and debugging cycle from design to high-quality online.

[0223] 5. Lower threshold, empower business: through natural language analysis, visual interpretation, context editing and intelligent prompts, the threshold for non-technical background personnel to build and optimize high-quality chat robots is further lowered.

[0224] The embodiment of the application also provides a chat robot intelligent debugging method applied to the chat robot intelligent debugging system. Figure 3 As shown in a flowchart of a chat robot intelligent debugging method, the chat robot intelligent debugging method mainly includes the following steps S310 to S330:

[0225] Step S310, in response to a flow analysis event triggered in the dialogue flow design process of the chat robot, the predictive prompt engine detects defects in the dialogue flowchart, and displays the detected defect information in the predictive prompt display area;

[0226] Step S320, in response to a sentence test request, the natural language understanding service and the dialogue management service perform intent recognition and dialogue state management on the sentence to be tested respectively; the state parser of the debugging service converts the states of the natural language understanding service and the dialogue management service into natural language descriptions, and displays them in the natural language state analysis area;

[0227] Step S330, in response to a viewing and analyzing request for the natural language state analysis area, the natural language understanding service or the dialogue management service calls the enhanced root cause analysis service to generate an interpretable decision basis, and displays it in the enhanced root cause analysis display area.

[0228] Further, the above-mentioned test panel also includes a context debugging tool area, and the debugging service also includes a context editor interface; as shown in Figure 4 The chat robot intelligent debugging method includes:

[0229] Step S410, in response to an editing request from the context debugging tool area or the natural language state analysis area, the context editor interface updates the corresponding data, which includes the question and answer configuration in the flow service and / or the sample data of the natural language understanding service.

[0230] Further, the above-mentioned test panel also includes a simulator control and coverage visualization area, and the backend service cluster also includes a test service, and the debugging service also includes a simulation execution engine; as shown in Figure 4 The chat robot intelligent debugging method includes:

[0231] In step S420, in response to a multi-turn dialogue simulation request based on a preset test case or a defined test target from the simulator control and coverage visualization area, the test service drives the simulation execution engine to perform multi-turn dialogue simulation according to the defined multi-turn user interaction path or user behavior model, and after the simulation is completed, analyzes the simulation track through the coverage calculator to calculate the test coverage, and displays the test coverage on the simulator control and coverage visualization area.

[0232] The implementation principle and the technical effects of the chat robot intelligent debugging device provided in the embodiment are the same as those of the chat robot intelligent debugging method described above. For brevity, the parts of the chat robot intelligent debugging device embodiment not mentioned can be referred to the corresponding contents in the chat robot intelligent debugging method embodiment described above.

[0233] It should be noted that similar reference numerals and letters refer to similar items in the following drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.

[0234] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood in a broad sense, for example, can be fixedly connected, can also be detachably connected, or integrally connected; can be mechanically connected, can also be electrically connected; can be directly connected, can also be indirectly connected through an intermediate medium, can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0235] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance.

[0236] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A chatbot intelligent debugging system, characterized in that, The front-end application module and the back-end service cluster are connected by communication; The front-end application module comprises a flow editor and a test panel, the test panel comprises a dialogue interaction area, a predictive prompt display area, a natural language state analysis area and an enhanced root cause analysis display area; The back-end service cluster comprises a flow service, a natural language understanding service, a dialogue management service, a debugging service and an enhanced root cause analysis service, and the debugging service comprises a state analyzer and a predictive prompt engine; The flow editor is used to provide a visual canvas for a user to design a visual chat robot dialogue flow; the flow service is used to store and manage a dialogue flowchart in the visual canvas, and send the dialogue flowchart to the predictive prompt engine of the debugging service when a flow analysis event is triggered; The predictive prompt engine is used to detect defects in the dialogue flowchart, and display the detected defect information in the predictive prompt display area; The dialogue interaction area is used for a user to input a sentence for testing a chat robot; The natural language understanding service and the dialogue management service are respectively used for intent recognition and dialogue state management of a sentence to be tested; the state analyzer of the debugging service is used to convert states of the natural language understanding service and the dialogue management service into natural language descriptions, and display them in the natural language state analysis area; The natural language understanding service or the dialogue management service is further used to call the enhanced root cause analysis service to generate an explainable decision basis when a viewing analysis request for the natural language state analysis area is obtained, and display it in the enhanced root cause analysis display area.

2. The chatbot intelligent debugging system of claim 1, wherein, The test panel further comprises a simulator control and coverage visualization area, and the back-end service cluster further comprises a test service and the debugging service further comprises a simulation execution engine; The simulator control and coverage visualization area is used for a user to start a multi-turn dialogue simulation for a chat robot based on a preset test case or a defined test target; the test service is used to drive the simulation execution engine to perform a multi-turn dialogue simulation according to a defined multi-turn user interaction path or a user behavior model after receiving a multi-turn dialogue simulation request from the simulator control and coverage visualization area, and analyze the simulation track by a coverage calculator to calculate a test coverage after the simulation is completed, and display the test coverage in the simulator control and coverage visualization area. 3.The chatbot intelligent debugging system according to claim 1 or 2, characterized in that, The test panel further comprises a context debugging tool area, and the debugging service further comprises a context editor interface; The context debugging tool area and the natural language state analysis area are both used for a user to correct an intent and / or edit a question and answer pair; the context editor interface is used to update corresponding data including a question and answer configuration in the flow service and / or sample data of the natural language understanding service when receiving an editing request from the context debugging tool area or the natural language state analysis area.

4. The chatbot intelligent debugging system of claim 1, wherein, The prediction formula prompt engine is configured to perform one or more of reachability analysis, cycle detection, intent conflict detection, and rule checking on the dialogue flowchart to obtain the defect information. The reachability analysis includes traversing the dialogue flowchart from a starting node, identifying a first node that cannot be reached, and traversing the dialogue flowchart in reverse from all ending nodes, identifying a second node that cannot reach any ending node. The intent conflict detection includes, for a third node in the dialogue flowchart for which intent recognition is configured, obtaining intents associated with the third node and training samples thereof, and determining an intent conflict risk based on similarity between samples under different intents. The rule checking includes scanning and matching the dialogue flowchart based on a predefined rule set to obtain a rule matching result. 5.The chatbot intelligent debugging system of claim 1, wherein, The enhanced root cause analysis service is configured to, when receiving a calling request to the natural language understanding service, obtain model information, input features, and a prediction result in the calling request, calculate a contribution degree of each input feature to a predicted intent, and return the calculated contribution degree data to the natural language understanding service. The natural language understanding service is configured to send the contribution degree data to the front-end application module. The front-end application module is configured to render input text in the enhanced root cause analysis display area according to the contribution degree data to distinguishively display contribution degrees of different words in the input text to a current prediction result. 6.The chatbot intelligent debugging system of claim 2, wherein, The test service is configured to obtain a test target defined by a user in the simulator control and coverage visualization area, obtain a starting statement according to the test target, and drive the simulation execution engine to start dialogue simulation from the starting statement. The simulation execution engine is configured to, starting from the starting statement, call the natural language understanding service and the dialogue management service to process simulated user input according to a current state of a maintained dialogue state machine and flowchart definition of the chat robot, obtain a response and state transition of the chat robot, and generate a next user input according to the multi-round user interaction path or the user behavior model to perform multi-round dialogue simulation, and record all passed nodes and edges in the simulation process to form a simulation trajectory. After simulation, a coverage calculator reads the simulation trajectory, counts a number of unique nodes and edges that are accessed, obtains a statistical result, and calculates the test coverage including node coverage and edge coverage according to the statistical result and a total number of nodes and edges in the dialogue flowchart of the chat robot. When receiving a coverage obtaining request of the front-end application module, one or more of a list of accessed nodes, a list of accessed edges, and the test coverage are returned to distinguishively display accessed and unaccessed nodes and / or edges in the flowchart editor or display the test coverage in the simulator control and coverage visualization area.

7. The chatbot intelligent debugging system of claim 1, wherein, The front-end application module and the back-end service cluster communicate through an API gateway.

8. A chatbot intelligent debugging method, characterized in that, The chat robot intelligent debugging system is applied to any one of claims 1-7. The chat robot intelligent debugging system is applied to any one of claims 1-7. The chat robot intelligent debugging method comprises: In response to a flow analysis event triggered in the chat robot dialogue flow design process, the predictive prompt engine performs defect detection on the dialogue flowchart and displays the detected defect information in the predictive prompt display area; In response to a sentence test request, the natural language understanding service and the dialogue management service perform intent recognition and dialogue state management on the sentence to be tested respectively; the state parser of the debugging service converts the states of the natural language understanding service and the dialogue management service into natural language descriptions and displays them in the natural language state analysis area; In response to a viewing analysis request for the natural language state analysis area, the natural language understanding service or the dialogue management service calls the enhanced root cause analysis service to generate an interpretable decision basis and displays it in the enhanced root cause analysis display area. 9.The chatbot intelligent debugging method of claim 8, wherein, The test panel further comprises a simulator control and coverage visualization area, and the backend service cluster further comprises a test service, and the debugging service further comprises a simulation execution engine; the chat robot intelligent debugging method further comprises: In response to a multi-round dialogue simulation request based on a preset test case or a defined test target from the simulator control and coverage visualization area, the test service drives the simulation execution engine to perform multi-round dialogue simulation according to a defined multi-round user interaction path or user behavior model, and after the simulation is completed, analyzes the simulation trajectory through a coverage calculator to calculate the test coverage, and displays the test coverage in the simulator control and coverage visualization area. 10.The chatbot intelligent debugging method of claim 8 or 9, characterized in that, The test panel further comprises a context debugging tool area, and the debugging service further comprises a context editor interface; The chat robot intelligent debugging method further comprises: In response to an editing request from the context debugging tool area or the natural language state analysis area, the context editor interface updates the corresponding data, which includes the question and answer configuration in the flow service and / or the sample data of the natural language understanding service.

Citation Information

Patent Citations

  • Chat bot diagnostic visualization

    CN114008600A

  • Low-code front-end and back-end connection system for chat robot development

    CN118069129A