Conversation processing method and device of virtual seat and electronic equipment
By combining a virtual agent network model and a large language model, the problems of anthropomorphism and limitations of knowledge base algorithms in intelligent customer service systems have been solved, resulting in more natural and accurate dialogue responses, improving user experience and the level of system intelligence.
Patent Information
- Application Number
- CN202411633401.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2026-05-15
AI Technical Summary
Existing intelligent customer service systems lack human-like qualities, have limited knowledge base algorithm performance, and users can easily identify them as robots. Their responses are often inaccurate or incomplete, and they cannot flexibly handle complex dialogue situations.
A virtual agent network model is used for dialogue reasoning, and a large language model is used to generate responses. Through the dialogue context feature set and the virtual agent reasoning results, Bayesian networks and large language models are used for knowledge representation and multi-turn dialogue state management. Confidence assessment is used to determine whether to switch to human operation.
It improves the human-like performance of the intelligent customer service system, enhances the accuracy and flexibility of responses, reduces the risk of misperception, and improves user experience and service quality.
Smart Images

Figure CN122048370A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and electronic device for processing dialogues with a virtual agent. Background Technology
[0002] Traditional intelligent customer service refers to customer service systems based on rules, fixed dialogue flows, and simple matching algorithms. These systems typically use predefined rules and information databases to answer user questions without involving complex machine learning or artificial intelligence technologies. Because they rely on pre-set rules and fixed dialogue flows, traditional intelligent customer service systems cannot flexibly adapt to diverse user needs. With the continuous advancement of artificial intelligence technology, traditional intelligent customer service systems are gradually evolving towards greater intelligence, personalization, and flexibility to provide a better user experience and service quality.
[0003] However, current intelligent customer service systems still suffer from the problem of being too human-like, as users can still recognize them as robots in most cases. In addition, there are limitations in knowledge base and algorithm performance, and the capabilities of intelligent customer service systems are still limited by the knowledge base and algorithm performance on which they rely. Summary of the Invention
[0004] One objective of this application is to provide a solution to the technical problems of low anthropomorphism and limited performance of knowledge base algorithms in current intelligent customer service systems.
[0005] To address the aforementioned technical problems, one technical solution adopted in this application is to provide a dialogue processing method for a virtual agent, comprising: receiving dialogue content input by a user; reasoning about the dialogue content to obtain a virtual agent reasoning result; obtaining a dialogue context feature set corresponding to the dialogue content based on the dialogue content; inputting the virtual agent reasoning result and the dialogue context feature set into a preset large language model, generating a result corresponding to the dialogue content through the large language model; and providing feedback to the user with the result corresponding to the dialogue content through a virtual agent. This method, by utilizing the dialogue context feature set and the virtual agent reasoning result, allows the system to better understand the background and context of the dialogue, thereby generating more natural and fluent responses that conform to the context, enhancing the system's human-like performance. By reasoning about the dialogue content through a virtual agent network, the system can provide more accurate results, thereby enhancing the system's understanding and application capabilities of the knowledge base, further improving the system's intelligence level. The large language model performs excellently in text generation, helping the system to more flexibly respond to various dialogue scenarios, improving the system's knowledge expression and response efficiency. By combining virtual agent reasoning and large language model generation, the system can surpass the limitations of traditional knowledge base algorithms and provide more intelligent and user-relevant responses, thus solving the problem of performance limitations of knowledge base algorithms.
[0006] Optionally, the step of reasoning about the dialogue content to obtain the virtual agent reasoning result is performed by a preset virtual agent network model; the method further includes: defining multiple nodes related to the virtual agent dialogue, the multiple nodes including fault phenomena, troubleshooting plans, solutions, and whether to transfer to human agent; collecting batches of training samples related to the multiple nodes, each training sample including a probability distribution corresponding to each node; determining the dependencies between the multiple nodes to construct a virtual agent network model to be trained; inputting the training samples into the virtual agent network model to be trained to output the prediction results corresponding to the multiple nodes; constraining the relationship between the prediction results and the probability distributions corresponding to the nodes in the training samples according to a loss function, so that the prediction results output by the virtual agent network model to be trained are close to the probability distributions; and selecting the virtual agent network model whose output prediction results are closest to the probability distributions as the trained virtual agent network model. Here, specific nodes are defined to represent different aspects of the virtual agent dialogue, and this node design allows the virtual agent network model to better understand and process the dialogue content.
[0007] Optionally, obtaining the dialogue context feature set corresponding to the dialogue content includes: obtaining the dialogue context feature set based on the dialogue content, wherein the dialogue context feature set includes a user request summary, a dialogue phase summary, product information, dialogue rounds, agent names, and user waiting time. By using a dialogue context feature set comprising multiple elements such as user request summary, dialogue phase summary, product information, dialogue rounds, agent names, and user waiting time, the system can more comprehensively understand the background and context of the dialogue, helping to improve the accuracy and relevance of dialogue processing.
[0008] Optionally, the method further includes: acquiring the large language model; acquiring the large language model includes: acquiring training samples, the training samples including batch dialogue data; labeling the batch dialogue data according to preset labels to obtain labeled training samples, the preset labels including user dialogue content and the corresponding results of the user dialogue content; performing feature extraction on the labeled training samples to obtain virtual agent inference results and dialogue context feature sets corresponding to the labeled training samples; inputting the virtual agent inference results and dialogue context feature sets into the large language model to be trained to output the results corresponding to the user dialogue content of the training samples; constraining the relationship between the results corresponding to the user dialogue content of the training samples and the preset labels according to a loss function, so that the results corresponding to the user dialogue content output by the large language model to be trained are close to the preset labels; and selecting the large language model to be trained whose output results corresponding to the user dialogue content are closest to the preset labels as the trained large language model. Here, the large language model is fine-tuned using labeled data to better adapt to specific dialogue tasks or domains, providing a guarantee for subsequent dialogue between virtual agents and users.
[0009] Optionally, after performing the step of receiving user-input dialogue content, the method further includes: obtaining a confidence value corresponding to the user-input dialogue content; when the confidence value is less than a preset threshold, switching to manual operation instead of responding to the user-input dialogue content through a virtual agent; when the confidence value is greater than or equal to the preset threshold, performing the step of reasoning on the dialogue content to obtain a virtual agent reasoning result, obtaining a dialogue context feature set corresponding to the dialogue content based on the dialogue content, and inputting the virtual agent reasoning result and the dialogue context feature set into a preset large language model to generate a result corresponding to the dialogue content through the large language model. The mechanism of switching to manual operation based on the confidence value can effectively improve the system's accuracy, user satisfaction, and service quality, while saving resources and time, providing users with a higher quality and more reliable service experience.
[0010] Optionally, obtaining the confidence value corresponding to the user-input dialogue content includes: setting a preset number of different virtual agents; obtaining the dialogue context, which includes the user-input dialogue content and the responses from the preset number of different virtual agents to the dialogue content; generating multiple candidate responses based on the dialogue context and obtaining the probability value of each candidate response; normalizing the probability value of each candidate response; performing cluster analysis on the normalized probability value of each candidate response to obtain a category probability; calculating the information entropy corresponding to the category probability; and normalizing the information entropy to obtain a confidence value. This provides a specific method for calculating the confidence value. The purpose of this method is to more accurately determine whether the system's response to user input is accurate, so that manual intervention can be introduced when necessary. The mechanism of transferring manual intervention based on the confidence value can effectively improve the system's accuracy, user satisfaction, and service quality, while saving resources and time, providing users with a higher quality and more reliable service experience.
[0011] Optionally, when the confidence value is greater than or equal to a preset threshold, the method further includes: detecting whether there are conditions in the result corresponding to the dialogue content that further trigger a transfer to a human agent; if so, performing a transfer to a human agent; if not, executing the step of providing feedback to the user with the result corresponding to the dialogue content through a virtual agent. By detecting the result to be replied to by the virtual agent to determine whether to transfer to a human agent, the system can intelligently determine when a transfer to a human agent is needed based on preset conditions, improving the system's ability to handle complex dialogues and enhancing the user's dialogue experience and problem-solving efficiency.
[0012] To address the aforementioned technical problems, one technical solution adopted in this application is: providing a dialogue processing device for a virtual agent, comprising: a dialogue content receiving module for receiving dialogue content input by a user; a virtual agent reasoning module for reasoning about the dialogue content to obtain a virtual agent reasoning result; a dialogue context feature set acquisition module for obtaining a dialogue context feature set corresponding to the dialogue content based on the dialogue content; a response result generation module for inputting the virtual agent reasoning result and the dialogue context feature set into a preset large language model, and generating a result corresponding to the dialogue content through the large language model; and a result feedback module for providing feedback to the user through the virtual agent on the result corresponding to the dialogue content.
[0013] To solve the above-mentioned technical problems, one technical solution adopted in this application is: to provide an electronic device, including: a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, wherein when the processor executes the one or more computer programs, the electronic device implements a dialogue processing method for a virtual agent applied to the electronic device.
[0014] To solve the above-mentioned technical problems, one technical solution adopted in this application is to provide a non-volatile computer-readable storage medium that stores computer-executable instructions. When the computer-executable instructions are executed by an electronic device, the electronic device performs a dialogue processing method for a virtual agent.
[0015] The virtual agent's dialogue processing device, electronic device, and non-volatile computer-readable storage medium have the beneficial effects corresponding to the aforementioned virtual agent's dialogue processing method. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a dialogue processing method for a virtual agent provided in an embodiment of this application;
[0018] Figure 2 This is a flowchart of a dialogue processing method for a virtual agent provided in another embodiment of this application;
[0019] Figure 3 This is a schematic diagram of the structure of a dialogue processing device for a virtual agent provided in an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of the structure of an electronic device 40 provided in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0022] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. It should also be noted that in the following embodiments, there is no necessarily a specific order between the following steps. Those skilled in the art will understand from the description of the embodiments of this application that the following steps can have different execution orders in different embodiments; that is, they can be executed in parallel, or they can be executed alternately, etc.
[0023] A customer service system is a software system used to manage and process customer service requests, typically for organizing, tracking, and resolving customer problems and needs. Virtual agents are an artificial intelligence technology within customer service systems that uses natural language processing and machine learning to simulate the conversational abilities of human customer service representatives, providing real-time automated service to customers. The introduction of virtual agents can improve the efficiency and scalability of customer service systems, reduce the workload of customer service personnel, and provide customers with immediate responses and a personalized service experience.
[0024] Current intelligent customer service systems are transitioning from traditional intelligent customer service to model-based intelligent customer service. These models primarily employ an LLM (Large Language Models) + RAG (Retrieval-Augmented Generation) + knowledge base approach. They retrieve relevant information from the knowledge base and then integrate it using a large language model to generate answers. However, this approach still has some problems: insufficient anthropomorphism. Although model-based intelligent customer service systems improve anthropomorphism, in most cases, users can still quickly identify it as a robot rather than a real person, which may affect user trust and the user experience. Limited by the knowledge base and algorithm performance, the performance of intelligent customer service systems is still constrained by the knowledge base they rely on. If the information in the knowledge base is incomplete or outdated, the system's generated answers may not be accurate or comprehensive enough. Furthermore, the performance of the RAG algorithm, a key component in retrieval and answer generation, directly impacts the system's performance. However, the inherent contradiction between large models and the high-precision knowledge requirements of customer service scenarios may lead to difficulties and limitations.
[0025] Therefore, this application provides a virtual agent dialogue processing method and apparatus. The virtual agent, as a solution to the problems faced by current intelligent customer service systems, employs a series of technologies and strategies aimed at improving the system's human-like characteristics, response accuracy, and reducing the risk of illusion. In this embodiment, the virtual agent dialogue processing method is mainly implemented through three parts: using a virtual agent network model (such as a Bayesian network) for knowledge representation and multi-turn dialogue state management; outputting the results corresponding to the dialogue content based on seven set features and a fine-tuned large language model; and determining when to switch to human intervention based on the confidence level of the generated model. Specifically, the virtual agent network model can better understand complex dialogue contexts and reasoning logic, and effectively manage multi-turn dialogue states, enabling the system to better track user intent and context, improving the coherence and personalization of the dialogue; by fine-tuning the large language model, the system can better adapt to the needs of specific industries or domains, improving the accuracy and relevance of generated answers; and by combining human-machine collaboration with confidence assessment technology and human review, the accuracy and credibility of responses can be improved, and the risk of illusion caused by the large language model can be mitigated. In summary, the solutions presented in this application improve the human-likeness and response accuracy of the intelligent customer service system, while reducing the risk of misperception, thereby effectively enhancing the quality of user experience. The methods presented in this application are expected to achieve better results and have greater application prospects in the field of intelligent customer service.
[0026] Please see Figure 1 , Figure 1 This is a flowchart illustrating a dialogue processing method for a virtual agent provided in an embodiment of this application. The method includes the following steps:
[0027] S101, Receive the dialogue content input by the user.
[0028] Dedicated customer service system software can receive user-input dialogue content. This software includes interface elements such as user input boxes, dialogue history, and interactive buttons for users to interact with virtual agents. Users can also communicate with virtual agents through web interfaces, which can include text input boxes, buttons, and dialog boxes, allowing users to enter and submit dialogue content. Virtual agents can also be implemented through mobile applications, allowing users to communicate with virtual agents, input dialogue content, and receive feedback through the application interface on their mobile phones or tablets. Mini-programs can also serve as one of the platforms for receiving user-input dialogue content, allowing users to interact with virtual agents through their mini-program interfaces. Therefore, users can interact with virtual agents through various forms of interfaces, including dedicated customer service system software, web interfaces, mobile applications, mini-programs, or instant messaging tools. These interfaces are designed to facilitate user input of dialogue content and communication with virtual agents.
[0029] Dialogue content refers to the verbal, written, or other information exchanged between a user and customer service representatives during communication or dialogue. In a dialogue system, dialogue content may include questions, requests, statements, or any form of interactive information raised by the user. Dialogue content can be presented as text, voice, images, or other forms of information.
[0030] S102. Reason about the dialogue content to obtain the reasoning result of the virtual agent.
[0031] In this context, a virtual agent refers to a system capable of processing user dialogues and making inferences, predictions, and decisions. A virtual agent can simulate the interaction style of a human customer service representative, communicating with users through dialogue and providing assistance or solutions. The virtual agent network model is the system used to train and infer the virtual agent. In this embodiment, the virtual agent network model is a model used to process dialogue content, inference results, and dialogue context feature sets. Through training and learning, this model can understand the information input by the user and make corresponding inferences and decisions.
[0032] In this embodiment, a virtual agent network model can be used to infer the dialogue content input by the user, thereby outputting a virtual agent inference result. This process can involve passing the processed and feature-extracted dialogue content to a trained virtual agent network model for inference and prediction. The virtual agent network model performs calculations and inferences based on the input dialogue content, ultimately outputting a virtual agent inference result, which may include suggestions, answers to user questions, solutions, etc., depending on the specific application.
[0033] In this embodiment, four categories of random variables are defined: fault symptoms, troubleshooting plans, solutions, and whether to transfer to human intervention. For example: fault symptoms (black screen, no touch, no signal, etc.), troubleshooting plans (backlight status, checking display issues in the central control menu, cross-testing for no PC signal, etc.), solutions (system restore, TV reset, restart, etc.), and whether to transfer to human intervention. A virtual agent network model is trained based on these four categories of random variables. The training process includes: defining multiple nodes related to the virtual agent dialogue, including fault symptoms, troubleshooting plans, solutions, and whether to transfer to human intervention; collecting batches of training samples related to these nodes, with each training sample including the probability distribution corresponding to each node; determining the dependencies between the nodes to construct the virtual agent network model to be trained; inputting the training samples into the virtual agent network model to output prediction results for each node; constraining the relationship between the prediction results and the probability distributions of the nodes in the training samples according to the loss function, so that the prediction results output by the virtual agent network model to be trained are close to the probability distributions; and selecting the virtual agent network model whose output prediction results are closest to the probability distributions as the trained virtual agent network model. The loss function measures the difference between the model's prediction results and the true values, helping the model learn how to adjust parameters to minimize this difference. The loss function can be a cross-entropy loss function, etc.
[0034] In the process of training the virtual agent network model described above, multiple nodes were explicitly defined, including fault phenomena, troubleshooting plans, solutions, and whether to transfer to a human agent. These nodes represent different aspects of the dialogue, enabling the virtual agent network model to gain a more detailed and comprehensive understanding of user input. The probability distribution includes events and event probabilities. Specifically, for each node (such as fault phenomena, troubleshooting plans, solutions, and whether to transfer to a human agent), different events can be defined, and each event can be assigned a probability, representing the likelihood of the event occurring. For example, for the node "fault phenomena," possible events include "black screen," "no touch," and "no signal," each with a corresponding probability, representing the likelihood of the fault phenomenon occurring under given conditions. Similarly, similar events and probability distributions can be defined for other nodes. These probability distributions help the training model better understand the importance and likelihood of each node, thereby enabling more accurate prediction and decision-making during the reasoning process.
[0035] The virtual agent network model can employ a Bayesian network model. Bayesian networks can be used to model the dependencies and probability distributions between different dialogue nodes (such as fault symptoms, troubleshooting plans, solutions, and whether to transfer to a human agent). By defining nodes, events, event probabilities, and the dependencies between nodes, a Bayesian network model can be constructed to infer various aspects of the user dialogue. Besides Bayesian networks, other types of models can also be used, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and attention mechanisms.
[0036] In this context, the virtual agent's reasoning result refers to the conclusion or decision reached through a reasoning process based on the dialogue content and model. With four nodes defined—fault phenomenon, troubleshooting plan, solution, and whether to transfer to human intervention—the virtual agent's reasoning result refers to the optimal solution or suggestion for fault handling derived by the system after reasoning and decision-making based on the information provided by the user and the dialogue content. Specifically, the virtual agent system can infer possible troubleshooting plans and solutions based on the fault phenomenon described by the user, and ultimately decide whether to transfer the dialogue to human intervention. For example, the reasoning result may include the following: Troubleshooting plan recommendation: Based on the information of the fault phenomenon node, the system infers possible fault troubleshooting plans to help the user identify the root cause of the problem or take initial countermeasures; Solution provision: Based on the results of the troubleshooting plan and further reasoning, the system can provide solution suggestions for specific faults to help users solve problems or restore normal operation; Recommendation for transferring to human intervention: If the virtual agent system cannot provide a solution that meets the user's needs, or if human expertise is required to handle the problem, the system can infer whether to transfer the dialogue to human intervention to ensure that the problem is handled correctly. In this embodiment, the goal of the virtual agent's reasoning results is to provide users with the best troubleshooting solution through reasoning and decision-making processes based on the dialogue content and the defined relationships between nodes. This reasoning result can help users resolve problems more quickly and accurately, improving user experience and troubleshooting efficiency.
[0037] S103. Based on the dialogue content, obtain the dialogue context feature set corresponding to the dialogue content.
[0038] In this embodiment, the dialogue context feature set includes a user request summary, a dialogue phase summary, product information, dialogue rounds, agent names, and user waiting time. The user request summary can be a summary of the information from the first two rounds of the dialogue, helping the system better understand the user's needs and intentions, thus providing more personalized and accurate responses. The dialogue phase summary can be a summary of the entire dialogue divided into multiple segments, which helps the system organize and understand the content at different stages of the dialogue, improving the coherence and efficiency of the dialogue. Product information enriches and improves the product information involved in the dialogue, allowing the system to provide more specific and professional support to help users solve product-related problems or needs. The dialogue rounds indicate the current round of the dialogue; a question-and-answer session between the user and the agent represents one round. Dialogue round information helps the system track the development and progress of the dialogue, inferring and generating responses based on the context information of different rounds, achieving more coherent and natural dialogue interaction. The agent names are included because different agents may have different chatting styles and characteristics; therefore, adding agent names helps the system generate responses based on the specific agent's style, improving the personalization and adaptability of the dialogue. User wait time affects the language and manner of agent responses. Therefore, the system can adjust the response speed and content based on the length of the user's wait time to provide a better user experience and service quality.
[0039] Extract the six features mentioned above from the user's input dialogue content, for example:
[0040] User request summary: Text summary generation of user-input dialogue content can be achieved using a model structure similar to GPT-2 (Generative Pre-trained Transformer 2). The information from the first two rounds of dialogue is input into the summary generation model to obtain a summary of the user's request.
[0041] Dialogue Phase Summary: The entire dialogue content is divided into multiple segments using a sliding window, and then a text summary is generated for each segment to obtain a phase summary of the dialogue.
[0042] Product Information: Entity recognition or keyword extraction is performed on the dialogue content input by the user. If specific information such as product serial number appears, the corresponding product information can be retrieved through the business system.
[0043] Dialogue rounds: Track the interaction process of the dialogue, record each round of questions and answers between the user and the system to determine which round the current dialogue is in, thereby obtaining dialogue round information.
[0044] Agent Name: Extract the agent's name at the start of the conversation or through user input to determine who the agent is in the current conversation, thereby recording or inferring the agent's name information.
[0045] User waiting time: Record the timestamp of each message sent by the user to calculate the user waiting time. Based on the difference in responses during different waiting time periods, infer the impact of user waiting time on system responses.
[0046] The six features obtained above constitute the dialogue context feature set, which is input into the preset large language model in subsequent steps. Among them, the user request summary and the dialogue stage summary can help the model better understand the user's needs and intentions in the dialogue, thereby generating more personalized and relevant responses. Product information, dialogue rounds, and agent names can help the model better understand the dialogue context, making the dialogue more coherent and avoiding information duplication or inaccurate interpretation. By enriching the product information and recording the agent names, the model can provide more professional and accurate support and answers, enhancing the professionalism of the dialogue system in specific fields. Finally, the consideration of dialogue rounds and user waiting time can enable the model to generate more natural and fluent dialogues, and considering the user's waiting time, the response is more timely, improving the user experience.
[0047] S104. Input the virtual agent reasoning results and the dialogue context feature set into the preset large language model, and generate the results corresponding to the dialogue content through the large language model.
[0048] The dialogue content refers to the dialogue content generated by a pre-defined large language model based on the virtual agent's inference results and the dialogue context feature set. This content may include answers to user questions or the provision of relevant information. This result is natural language text generated by the large language model based on the input information and context.
[0049] Large language models can learn from large amounts of text data to generate natural and fluent responses, thus providing a more accurate and natural conversational experience.
[0050] S105. Provide the user with feedback on the results corresponding to the dialogue content through a virtual agent.
[0051] The virtual agent dialogue processing method provided in this application, by utilizing dialogue context feature sets and virtual agent inference results, can better understand the background and context of the dialogue, thereby generating more natural and fluent responses that conform to the context, enhancing the system's human-like performance. Inference of dialogue content through a virtual agent network can provide more accurate results, thereby enhancing the system's understanding and application of the knowledge base, further improving the system's intelligence level. Large language models perform excellently in text generation, helping the system to more flexibly respond to various dialogue scenarios, improving the system's knowledge expression and response efficiency. By combining virtual agent inference and large language model generation, the system can transcend the limitations of traditional knowledge base algorithms, providing more intelligent and user-responsive responses, thus solving the problem of performance limitations in knowledge base algorithms.
[0052] Please see Figure 2 , Figure 2 This is a flowchart illustrating a dialogue processing method for a virtual agent according to another embodiment of this application. The method includes the following steps:
[0053] S201. Obtain the preset Bayesian network model.
[0054] In this embodiment, a pre-defined and trained Bayesian network model is obtained. This model is constructed to solve a specific problem and is mainly used for reasoning and decision support regarding fault phenomena. The process of training this Bayesian network model can refer to the above embodiment.
[0055] As we know, a Bayesian network is a graphical model composed of nodes and edges. Each node represents a random variable, and the edges represent the conditional dependencies between these variables. In this embodiment, four types of random variables are defined:
[0056] Fault symptoms: such as "black screen", "no touch", "no signal", etc.
[0057] Troubleshooting plan: including "backlight status", "central control menu display issues", and "PC no signal cross-testing", etc.
[0058] Solutions include: "System Restore", "TV Reset", "Reboot", etc.
[0059] Whether to transfer to a human: This refers to deciding whether to transfer the user's request to a human customer service representative.
[0060] Each type of random variable has its specific range of values, for example:
[0061] Fault phenomenon: The node has two possible values, such as "black screen" which has the value range of {"appeared", "not mentioned"}.
[0062] Troubleshooting plan: Nodes should have at least three possible values, such as the "backlight status" value range being {"backlight present", "no backlight", "not mentioned"}.
[0063] Solution: The node has three possible values. For example, the value range for "Restore System" is {"Restore System Invalid", "Restore System Successful", "Not Mentioned"}.
[0064] Whether to switch to manual intervention: The node has two possible values: {"Do not upgrade to manual intervention", "Upgrade to manual intervention"}.
[0065] For each random variable, the Bayesian network also includes a conditional probability table, which describes the probability of each event occurring under specific conditions. The obtained Bayesian network model is used for subsequent dialogue reasoning and decision-making processes. It can infer corresponding investigation plans and solutions based on the user's input dialogue content, and determine whether it needs to be transferred to human customer service. For example, as shown in Table 1 below:
[0066] Table 1
[0067]
[0068] S202. Fine-tune the preset large language model to obtain the fine-tuned large language model.
[0069] The pre-defined large language model (such as open-source large language models like GPT2-Large) can be fine-tuned according to specific tasks or data to improve its performance in specific application scenarios. This involves using labeled datasets to train the model, making it better adaptable to user needs and context. Specifically, training samples are obtained, including batch dialogue data; the batch dialogue data is labeled according to pre-defined labels to obtain labeled training samples, where the pre-defined labels include user dialogue content and the corresponding results; features are extracted from the labeled training samples to obtain the virtual agent inference results and dialogue context feature sets corresponding to the labeled training samples; the virtual agent inference results and dialogue context feature sets are input into the large language model to be trained to output the results corresponding to the user dialogue content of the training samples; the relationship between the results corresponding to the user dialogue content of the training samples and the pre-defined labels is constrained according to the loss function to make the results corresponding to the user dialogue content output by the large language model to be trained close to the pre-defined labels; the large language model whose output results corresponding to the user dialogue content are closest to the pre-defined labels is taken as the trained large language model.
[0070] S203. Receive the dialogue content input by the user.
[0071] S204. Obtain the confidence value corresponding to the dialogue content input by the user.
[0072] The process of obtaining the confidence value corresponding to the user-input dialogue content includes: setting a preset number of different virtual agents; obtaining the dialogue context, which includes the user-input dialogue content and the responses from the preset number of different virtual agents to the dialogue content; generating multiple candidate responses based on the dialogue context and obtaining the probability value of each candidate response; normalizing the probability value of each candidate response; performing cluster analysis on the normalized probability values of each candidate response to obtain the category probability; calculating the information entropy corresponding to the category probability; and normalizing the information entropy to obtain the confidence value. The preset number of different virtual agents, each with a different response style or strategy, allows for different responses from each virtual agent to the user-input dialogue content. This is especially important when the user-input dialogue content is complex, as the responses from multiple different virtual agents may differ, thus making the dialogue content more diverse. The dialogue context includes the user-input dialogue content and the responses from the preset number of different virtual agents, therefore including a preset number of dialogue contexts. Based on the dialogue context, the model generates multiple candidate responses. For each input dialogue context, since it includes both user input and virtual agent response, a sampling method can be chosen to obtain two sentences corresponding to one dialogue context. If multiple dialogue contexts exist, multiple candidate responses can be obtained. For each candidate response, the probability value provided by the model is obtained, representing the likelihood of that response. The probability values of each candidate response are normalized so that the sum of all probabilities is 1. Cluster analysis is performed on the normalized results to identify which results are more common in specific situations. The final generated confidence score serves as a quantitative indicator; a higher value indicates more credible generated content and a higher degree of understanding of user input by the system; a lower value indicates insufficient understanding of the content by the system, potentially requiring referral to human customer service.
[0073] The purpose of clustering the normalized candidate response probability values is to identify which results are more common in specific situations. Clustering analysis can uncover potential patterns and structures, thus helping to understand the probability distribution of the generated responses in this embodiment. This helps determine which responses are more common or have similar probability distributions, thereby affecting the calculation of the confidence score. Information entropy is used to measure the degree of uncertainty of the category probabilities obtained after clustering analysis. The normalized information entropy is used as part of the confidence score to represent the system's credibility with the generated content.
[0074] When the confidence value is less than the preset threshold, proceed to step S205. When the confidence value is greater than or equal to the preset threshold, proceed to steps S206 to S209. The preset threshold can be set by comprehensively considering factors such as historical data, user feedback, and scenario characteristics, and the optimal threshold can be found through experimentation and iteration.
[0075] S205. Transfer to a live customer service representative to receive the dialogue content entered by the user. Transferring to a live customer service representative ensures that the user receives a more accurate and satisfactory answer.
[0076] S206. Use a Bayesian network model to infer the content of the dialogue and obtain the Bayesian inference result.
[0077] S207. Based on the dialogue content, extract the dialogue context features, which include user request summary, dialogue phase summary, product information, dialogue rounds, agent name, and user waiting time.
[0078] S208. Input the Bayesian inference results and dialogue context features into the fine-tuned large language model, and generate results corresponding to the dialogue content through this large language model. By inputting the extracted features and Bayesian inference results into the fine-tuned large language model, the system generates appropriate response content based on this information, enabling the system to provide more targeted and context-sensitive answers.
[0079] S209. Detect whether there are any conditions in the results corresponding to the dialogue content that would trigger a manual operation.
[0080] Step S205 above triggers a manual intervention when the confidence value is less than a preset threshold. In this embodiment, the results corresponding to the dialogue content generated by the large language model are further analyzed to detect again whether there are conditions that would trigger a manual intervention.
[0081] The system can determine whether to transfer user input to a human agent based on the following conditions: For example, it can use a sentiment analysis model to categorize the results of the dialogue content, determining whether the sentiment is positive, neutral, or negative. If the sentiment analysis shows that the user's emotions are negative, such as expressing dissatisfaction, anger, or disappointment, the system will trigger a transfer to a human agent. This is because negative emotions may indicate that the user is dissatisfied with the automated response and requires human intervention to provide better support. Another example is the system analyzing the results of the dialogue content to determine if there are situations requiring on-site dispatch. For instance, if a user reports an equipment malfunction and the system identifies a high level of complexity, the system will transfer the case to a human agent for a final decision on whether to dispatch the order, ensuring service accuracy and meeting user needs. Yet another example is the system's dictionary containing specific keywords, such as "complaint," "activation code," and "contract," which are related to users' urgent needs or special requests. If a user's question or the system's generated response contains one or more keywords from this dictionary, the system will trigger a transfer to a human agent, ensuring timely response to user needs in these special cases.
[0082] If the conditions for triggering a manual operation exist, then proceed to step S205 above; if the conditions for triggering a manual operation do not exist, then proceed to step S210 below.
[0083] S210. Provide the user with feedback on the results corresponding to the dialogue content through a virtual agent.
[0084] The virtual agent dialogue processing method of this application combines Bayesian inference and a large language model, enabling rapid processing of user input, reducing response time, and improving dialogue fluency. By fine-tuning the large language model and Bayesian network, the system can continuously learn and adapt to new dialogue patterns, improving the accuracy and relevance of responses. The solution also supports multi-turn dialogue state management, enabling better tracking of user needs and context, and improving the coherence and naturalness of the dialogue. Finally, through human-computer collaboration, the system can transfer users to human customer service when needed, ensuring that users receive personalized service at critical moments. This method is highly adaptable and can be flexibly adjusted according to different scenarios and user needs to meet diverse service requirements.
[0085] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a virtual agent dialogue processing device provided in an embodiment of this application. The virtual agent dialogue processing device 30 includes:
[0086] The system includes a dialogue content receiving module 31 for receiving dialogue content input by the user; a virtual agent reasoning module 32 for reasoning about the dialogue content to obtain a virtual agent reasoning result; a dialogue context feature set acquisition module 33 for obtaining a dialogue context feature set corresponding to the dialogue content; a response result generation module 34 for inputting the virtual agent reasoning result and the dialogue context feature set into a preset large language model to generate a result corresponding to the dialogue content through the large language model; and a result feedback module 35 for providing feedback on the result corresponding to the dialogue content to the user through the virtual agent.
[0087] The virtual agent dialogue processing device 30 can be a software module, which includes several instructions stored in a memory. The processor can access the memory, call the instructions to execute them, and complete the virtual agent dialogue processing method described in the above embodiments.
[0088] In some embodiments, the virtual agent dialogue processing device 30 can also be constructed from hardware devices. For example, the virtual agent dialogue processing device 30 can be constructed from one or more chips, which can work in coordination to complete the virtual agent dialogue processing method described in the various embodiments above. As another example, the virtual agent dialogue processing device 30 can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0089] It should be noted that the virtual agent dialogue processing device 30 described above can execute the virtual agent dialogue processing method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the embodiments of the virtual agent dialogue processing device 30 can be found in the virtual agent dialogue processing scheme provided in the embodiments of this application.
[0090] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device 40 provided in an embodiment of this application. The electronic device includes one or more processors 41 and a memory 42. The memory 42 is connected to one or more processors, for example, connected to the processor 41 via a bus.
[0091] Processor 41 is configured to support the electronic device 40 in performing the corresponding functions in the methods described in the above method embodiments. Processor 41 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0092] Memory 42 is used to store program code, etc. Memory 42 may include volatile memory (VM), such as random access memory (RAM); memory may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 42 may also include combinations of the above types of memory.
[0093] The memory 42 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the virtual agent dialogue processing method in the embodiments of this application. The processor 41 executes various functional applications and data processing of the virtual agent dialogue processing method and the virtual agent dialogue processing device by running the non-volatile software programs, instructions, and modules stored in the memory 42, that is, it realizes the functions of each module or unit of the virtual agent dialogue processing method and the virtual agent dialogue processing device provided in the above method embodiments.
[0094] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function. The data storage area may store data created based on the use of the virtual agent's dialogue processing device. In some embodiments, the memory 42 may include memory remotely located relative to the processor 41, and this remote memory may be connected to the virtual agent's dialogue processing device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0095] The one or more modules are stored in the memory 42. When executed by the one or more processors 41, they perform the virtual agent dialogue processing method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0096] The electronic device in this application embodiment may specifically be an ultra-mobile personal computer device, a smartphone, a server or server cluster, etc.
[0097] This application provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 4 The processor 41 shown enables one or more of the processors to execute the virtual agent dialogue processing method in any of the above method embodiments, for example, to execute the method steps described in the above method embodiments and to implement the functions of the modules described in the above device embodiments.
[0098] This application provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions, which, when executed by the electronic device, enable the electronic device to perform the virtual agent dialogue processing method in any of the above method embodiments. For example, it executes the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0099] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0100] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A dialogue processing method for a virtual agent, characterized in that, include: Receive user-input dialogue content; The dialogue content is inferred to obtain the virtual agent inference result; Based on the dialogue content, obtain the dialogue context feature set corresponding to the dialogue content; The virtual agent reasoning result and the dialogue context feature set are input into a preset large language model, and the result corresponding to the dialogue content is generated through the large language model. The virtual agent provides feedback to the user regarding the results of the conversation.
2. The method according to claim 1, characterized in that, The step of reasoning about the dialogue content to obtain the virtual agent reasoning result is executed by a preset virtual agent network model; The method further includes: Define multiple nodes related to the virtual agent dialogue, including fault symptoms, troubleshooting plans, solutions, and whether to transfer to a human agent; Collect batches of training samples associated with the plurality of nodes, each training sample including the probability distribution corresponding to each node; Determine the dependencies between the multiple nodes to construct the virtual agent network model to be trained; The training samples are input into the virtual agent network model to be trained, so as to output the prediction results corresponding to the multiple nodes; The relationship between the prediction result and the probability distribution corresponding to the nodes in the training samples is constrained by the loss function so that the prediction result output by the virtual agent network model to be trained is close to the probability distribution. The virtual agent network model whose output prediction result is closest to the probability distribution is used as the trained virtual agent network model.
3. The method according to claim 1, characterized in that, The step of obtaining the dialogue context feature set corresponding to the dialogue content includes: Based on the dialogue content, a dialogue context feature set is obtained, which includes a summary of user requests, a summary of dialogue stages, product information, dialogue rounds, agent names, and user waiting time.
4. The method according to claim 1, characterized in that, The method further includes: obtaining the large language model; The process of obtaining the large language model includes: Obtain training samples, which include batch dialogue data; The batch dialogue data is labeled according to preset tags to obtain labeled training samples. The preset tags include user dialogue content and the results corresponding to the user dialogue content. Feature extraction is performed on the labeled training samples to obtain the virtual agent reasoning results and dialogue context feature sets corresponding to the labeled training samples; The virtual agent reasoning results and the dialogue context feature set are input into the large language model to be trained, so as to output the results corresponding to the user dialogue content of the training samples. The relationship between the results of user dialogue content in the training samples and the preset labels is constrained by the loss function, so that the results of user dialogue content output by the large language model to be trained are close to the preset labels. The large language model to be trained is the one whose output of the user dialogue content is closest to the preset label.
5. The method according to any one of claims 1 to 4, characterized in that, After performing the step of receiving user input dialogue content, the method further includes: Obtain the confidence value corresponding to the dialogue content input by the user; When the confidence level is less than a preset threshold, the system will switch to manual operation instead of responding to the user's input dialogue content through a virtual agent. When the confidence value is greater than or equal to a preset threshold, the following steps are performed: reasoning about the dialogue content to obtain a virtual agent reasoning result; obtaining a dialogue context feature set corresponding to the dialogue content based on the dialogue content; and inputting the virtual agent reasoning result and the dialogue context feature set into a preset large language model to generate the result corresponding to the dialogue content through the large language model.
6. The method according to claim 5, characterized in that, The step of obtaining the confidence value corresponding to the user-input dialogue content includes: Set a preset number of different virtual seats; Obtain the context of the conversation, which includes the conversation content input by the user and the responses from a preset number of different virtual agents to the conversation content. Multiple candidate responses are generated based on the context of the dialogue, and the probability value of each candidate response is obtained. The probability value of each candidate response is normalized. Cluster analysis is performed on the probability values of each candidate response after normalization to obtain the category probability; Calculate the information entropy corresponding to the category probability; The information entropy is normalized to obtain the confidence value.
7. The method according to claim 5, characterized in that, When the confidence value is greater than or equal to a preset threshold, the method further includes: The system checks whether there are any conditions in the results corresponding to the dialogue content that would trigger a further manual intervention. If it exists, then proceed to manual processing; If it does not exist, then the step of providing feedback to the user via a virtual agent on the result corresponding to the dialogue content is performed.
8. A dialogue processing device for a virtual agent, characterized in that, include: The dialogue content receiving module is used to receive dialogue content input by the user. The virtual agent reasoning module is used to reason about the dialogue content and obtain the virtual agent reasoning result; The dialogue context feature set acquisition module is used to obtain the dialogue context feature set corresponding to the dialogue content based on the dialogue content. The response result generation module is used to input the virtual agent's reasoning result and the dialogue context feature set into a preset large language model, and generate the result corresponding to the dialogue content through the large language model. The result feedback module is used to provide feedback to the user on the results corresponding to the dialogue content through a virtual agent.
9. An electronic device, characterized in that, include: A memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the electronic device to perform the method as described in any one of claims 1-7 when executing the one or more computer programs.
10. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions that, when executed by an electronic device, cause the electronic device to perform the method described in any one of claims 1-7.
