Customer service response method and device
By segmenting and calculating the similarity of dialogues from intelligent voice robots, and combining this with training factors to optimize the response model, the problem of inaccurate responses from large language models has been solved, resulting in more accurate customer service responses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-14
AI Technical Summary
Existing intelligent voice robots are easily influenced by the 'illusion' of large language models when generating response statements, resulting in inaccurate responses.
By using the last user response of the current dialogue as the endpoint, the dialogue is sliced using a sliding window of variable size. The similarity between the slice and historical slices in the database is calculated to obtain similar historical response statements. The trained response model is then used to determine the customer service response statements. The response model is trained by combining round-related factors, user feedback factors, and semantic related factors.
It improves the accuracy of customer service responses, solves the problem of inaccurate response expressions generated by large language models, and provides a rich and reasonable corpus to ensure that responses meet the dialogue objectives.
Smart Images

Figure CN121858700A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a customer service response method and apparatus. Background Technology
[0002] Intelligent voice robots offer automated outbound calling and natural responses, helping businesses reduce labor costs and improve outbound calling efficiency. In terms of technology, intelligent voice robots integrate speech recognition, natural language processing, and speech synthesis modules. The dialogue process begins with the speech recognition module converting the user's voice into text. The natural language processing module then parses the text and predicts and generates responses. The speech synthesis module converts the responses into speech, and finally, the speech is transmitted to the user via a connection, completing one round of dialogue.
[0003] Natural language processing (NLP) is the most complex component in a voice robot. Current technologies train large language models using massive amounts of training data. A well-trained NLP model can generate appropriate responses based on the current dialogue. However, the generated responses may be limited by the "illusion" effect of the large language model, resulting in inaccurate responses. Summary of the Invention
[0004] This application provides a customer service response method and apparatus to improve the accuracy of customer service responses.
[0005] In a first aspect, embodiments of this application provide a customer service response method, which can be executed by a customer service response device. The method includes: taking the last user response of the current dialogue as the endpoint, slicing the current dialogue according to M variable-size sliding windows to obtain M slices, wherein the last sentence of each of the M slices is the last user response; M is a positive integer; calculating the similarity between the M slices and multiple historical slices in a database, determining N historical slices similar to the M slices, and N historical response statements of the N historical slices; the historical slices are obtained by slicing according to a variable-size sliding window, with any user response in the historical dialogue as the endpoint; N is an integer greater than or equal to M; and determining a customer service response statement that enables the current dialogue to achieve its dialogue objective based on the N historical response statements.
[0006] Using the above method, by calculating at least one similar historical slice for each slice of the current dialogue, the next historical response statement for each similar historical slice can be obtained. These historical responses provide a rich and reasonable corpus for the next customer service response in the current dialogue. The customer service response statement determined based on the obtained corpus has high accuracy.
[0007] In one possible implementation, the multiple historical slices are stored in the database in the form of multiple groups, and each historical slice in a group includes the same number of user responses and customer service responses; calculating the similarity between the M slices and multiple historical slices in the database, and determining N historical slices similar to the M slices, includes: for the i-th slice among the M slices, calculating the similarity between the i-th slice and each historical slice in the q-th group, and determining at least one historical slice similar to the i-th slice; the i-th slice and each historical slice in the q-th group include the same number of user responses and customer service responses; q is a positive integer.
[0008] In one possible implementation, determining the customer service response statement that enables the current dialogue to achieve its dialogue objective based on the N historical response statements includes: identifying N candidate dialogues by using the N historical response statements as candidate response statements for the current dialogue; obtaining a predicted label for each of the N candidate dialogues using a trained response model; the response model is trained using historical dialogues and the results of historical dialogues achieving their dialogue objectives; and determining the candidate response statements of candidate dialogues whose predicted labels meet set requirements as the customer service response statements.
[0009] In one possible implementation, the response model is trained using historical dialogues and the results of those dialogues achieving the dialogue objective. This includes: for any one of the multiple historical dialogues, acquiring multiple training data points from that dialogue; the multiple training data points with the same customer service response having different numbers of dialogue rounds; inputting the multiple training data points from the multiple historical dialogues into the response model to determine the predicted label for each training data point; calculating the loss value of the response model based on the predicted label and the true label for each training data point; the true label for each training data point characterizes the impact of each training data point on the achievement of the dialogue objective of the historical dialogue; and performing the next round of training on the response model based on the loss value.
[0010] In one possible implementation, the true label of any training data is determined based on at least one of the round-related factor, user feedback factor, and semantic related factor of the training data; the round-related factor characterizes the influence of the round of the training data on the achievement of the dialogue objective of the historical dialogue; the user feedback factor characterizes the influence of the user response corresponding to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue; and the semantic related factor characterizes the influence of the semantic information related to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue.
[0011] In one possible implementation, if the outcome of the historical dialogue is that the dialogue goal is achieved, the round-related factor increases as the number of dialogue rounds corresponding to the training data increases; if the outcome of the historical dialogue is that the dialogue goal is not achieved, the round-related factor decreases as the number of dialogue rounds corresponding to the training data increases.
[0012] In one possible implementation, the user feedback factor is related to at least one of the following: the emotional information of the user response corresponding to the last customer service response in the training data, and the behavioral information of the last user response in the training data.
[0013] In one possible implementation, the semantic information related to the last customer service response in the training data includes at least one of the following: the closeness of the last customer service response in the training data to the preceding dialogue, the logical consistency with the preceding dialogue, the fluency with the preceding dialogue, the usefulness of the last customer service response in the training data to the dialogue objective, and the content security of the last customer service response in the training data.
[0014] In one possible implementation, each piece of training data also includes the user's attribute information and the user's recent behavior information.
[0015] Secondly, embodiments of this application provide a customer service response device, the device comprising: a slicing module, configured to slice the current dialogue using M variable-size sliding windows, with the last user response of the current dialogue as the endpoint, to obtain M slices, wherein the last sentence of each of the M slices is the last user response; M is a positive integer; a determining module, configured to calculate the similarity between the M slices and multiple historical slices in a database, determine N historical slices similar to the M slices, and N historical response statements of the N historical slices; the historical slices are obtained by slicing using a variable-size sliding window with any user response in a historical dialogue as the endpoint; N is an integer greater than or equal to M; and determine a customer service response statement that enables the current dialogue to achieve its dialogue objective based on the N historical response statements.
[0016] In one possible implementation, the multiple historical slices are stored in the database in the form of multiple groups, and each historical slice in a group includes the same number of user responses and customer service responses; the determining module is specifically used to calculate the similarity between the i-th slice and each historical slice in the q-th group for the i-th slice among the M slices, and determine at least one historical slice similar to the i-th slice; the i-th slice and each historical slice in the q-th group include the same number of user responses and customer service responses; q is a positive integer.
[0017] In one possible implementation, the determining module is further specifically used to: determine N candidate dialogues by using the N historical response statements as candidate response statements for the current dialogue; obtain a predicted label for each of the N candidate dialogues through a trained response model; the response model is trained using historical dialogues and the results of historical dialogues in achieving the dialogue objective; and determine the candidate response statements of candidate dialogues whose predicted labels meet the set requirements as the customer service response statements.
[0018] In one possible implementation, the apparatus further includes an acquisition module, which is used to acquire multiple training data points included in any one of the multiple historical dialogues; the multiple training data points with the same customer service response include different numbers of dialogue rounds; the apparatus further includes a training module, which is used to input the multiple training data points of the multiple historical dialogues into the response model, determine the predicted label corresponding to each training data point; calculate the loss value of the response model based on the predicted label and the true label corresponding to each training data point; the true label of each training data point characterizes the impact of each training data point on the achievement result of the dialogue objective of the historical dialogue; and perform the next round of training on the response model based on the loss value.
[0019] In one possible implementation, the true label of any training data is determined based on at least one of the round-related factor, user feedback factor, and semantic related factor of the training data; the round-related factor characterizes the influence of the round of the training data on the achievement of the dialogue objective of the historical dialogue; the user feedback factor characterizes the influence of the user response corresponding to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue; and the semantic related factor characterizes the influence of the semantic information related to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue.
[0020] In one possible implementation, if the outcome of the historical dialogue is that the dialogue goal is achieved, the round-related factor increases as the number of dialogue rounds corresponding to the training data increases; if the outcome of the historical dialogue is that the dialogue goal is not achieved, the round-related factor decreases as the number of dialogue rounds corresponding to the training data increases.
[0021] In one possible implementation, the user feedback factor is related to at least one of the following: the emotional information of the user response corresponding to the last customer service response in the training data, and the behavioral information of the last user response in the training data.
[0022] In one possible implementation, the semantic information related to the last customer service response in the training data includes at least one of the following: the closeness of the last customer service response in the training data to the preceding dialogue, the logical consistency with the preceding dialogue, the fluency with the preceding dialogue, the usefulness of the last customer service response in the training data to the dialogue objective, and the content security of the last customer service response in the training data.
[0023] In one possible implementation, each piece of training data also includes the user's attribute information and the user's recent behavior information.
[0024] Thirdly, embodiments of this application also provide a customer service response device, which includes a memory and a processor. The memory is used to store computer programs or instructions; the processor is used to call the computer programs or instructions stored in the memory to execute the method as described in any possible implementation of the first aspect.
[0025] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when read and executed by a computer, cause the computer to perform a method as described in any possible implementation of the first aspect.
[0026] Fifthly, embodiments of this application provide a computer program product storing instructions that, when read and executed by a computer, cause the computer to perform the method in any possible implementation of the first aspect described above. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0028] Figure 1 This is a flowchart illustrating a customer service response method provided in an embodiment of this application. Figure 2 This is a schematic diagram illustrating a method for obtaining slices according to an embodiment of this application; Figure 3 This is a schematic diagram corresponding to a response model training method provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating a method for acquiring training data provided in an embodiment of this application; Figure 5 This application provides a schematic diagram of the internal modules of a customer service response device. Figure 6 This is a schematic diagram of the structure of a customer service response device provided in an embodiment of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] Intelligent voice robots offer automatic outbound calling and natural response capabilities. Technically, these robots convert received user speech into text, parse the text, predict responses, and then convert those responses back into speech for dialogue with the user. Predicting the response is the most complex part of this process. Currently, large language models possess powerful contextual understanding and natural language generation capabilities.
[0031] Using large language models, prompt words adapted to business scenarios can be used to respond to received text. However, the method of using prompt word engineering is limited by the level of prompt word writing. Different large language models may express different prediction effects under the same prompt word. Furthermore, it is limited by the "illusion" effect of the generation of large language models. In the process of engineering implementation, additional rule checks need to be performed on the output of large language models to ensure the business compliance of the output.
[0032] Based on this, this application provides a customer service response method to improve the accuracy of customer service responses.
[0033] Figure 1 This is a flowchart illustrating a customer service response method provided in an embodiment of this application. The flowchart can be executed by a customer service response device, which is the aforementioned intelligent voice robot. Figure 1 As shown, the process includes the following steps: Step 101: Using the last user response of the current dialogue as the endpoint, slice the current dialogue using M sliding windows of variable size to obtain M slices.
[0034] Specifically, in some application scenarios, intelligent voice robots can automatically make outbound calls to target users. For example, in marketing scenarios, intelligent voice robots can promote financial products to users; in debt collection scenarios, intelligent voice robots can urge users who have borrowed money but have not repaid the principal and interest on time to make repayments. In conversations with users, intelligent voice robots can be referred to as customer service representatives, and will be collectively referred to as customer service representatives below.
[0035] In one possible example, the current dialogue involves a customer service representative first posing a question and answer to the user, who then responds based on the representative's response. The customer service representative then responds to the user's response with another question and answer. This dialogue can potentially involve multiple rounds of conversation between the customer service representative and the user. Of course, the current dialogue could also begin with the user speaking first, such as "Hello, who are you?" Taking the example of the customer service representative posing a question and answer to the user, for instance... Customer service: "Hello sir, we noticed you recently downloaded the app. Do you have any loan needs?" User: "Oh, I'll download it and take a look." Customer service: "Okay, could you tell me where you're having trouble? I can help you." User: "How do I get a credit limit?" If r represents a response from the customer service representative and u represents a response from the user, the current dialogue described above can be represented as follows: It is understandable that sometimes customer service representatives or users may speak several sentences in a row. In such cases, the sentences spoken by the customer service representative or user should be treated as a single response.
[0036] Because this application aims to determine the customer service response statements that enable the current dialogue to achieve its objectives, the last response in the current dialogue is the user's response. (Based on the current dialogue...) For example, taking the last user response... With the endpoint being M, the current dialogue is sliced using M sliding windows of variable size, resulting in M slices. The last sentence of each of the M slices is the last user response. Figure 2 This is a schematic diagram illustrating a method for obtaining slices according to an embodiment of this application. Figure 2 As shown, the first slide window processes the current dialog slice to obtain the first slice. The second sliding window processes the current dialog slice to obtain the second slice. The third sliding window processes the current dialog slice to obtain the third slice. And so on, the Mth sliding window processes the current dialogue slice to obtain the Mth slice, which will not be elaborated upon in this application. If one response from the agent and one response from the user are considered as one round, then M is determined based on the minimum value between the maximum preset sliding window and the current dialogue round, that is, M = ,in, represents the maximum preset sliding window, and j represents the current dialogue turn. Dividing the current dialogue into multiple slices including the last user's response allows for the creation of multiple slices with different contexts for the last user's response, enriching the semantic fragments including the last user's response.
[0037] Step 102: Calculate the similarity between the M slices and multiple historical slices in the database, identify the N historical slices similar to the M slices, and the N historical response statements of the N historical slices.
[0038] Specifically, the database stores multiple historical slices. Each historical slice is obtained by slicing a user response from a historical dialogue into a variable-size sliding window. In the application scenario, there are multiple historical dialogues between customer service representatives and users. Each historical dialogue includes multiple rounds of user and customer service responses. Based on a single user response from a historical dialogue, multiple historical slices can be obtained, using the same method as in step 101. It's important to note that in step 101, the M slices of the current dialogue are obtained by slicing a user response from the last sentence of the current dialogue into a variable-size sliding window, while in step 102, the historical slices are obtained by slicing a user response from a historical dialogue into a variable-size sliding window.
[0039] For example, using historical dialogue For example, by taking the user response in the first round as the endpoint, a historical slice can be obtained. Using the user response in the second round as the endpoint, two historical slices can be obtained. , Using the user response in the third round as the endpoint, three historical slices can be obtained. , , And so on, which will not be elaborated upon further in this application.
[0040] In one possible implementation, multiple historical slices obtained from multi-call historical dialogues are stored in a database in the form of multiple groups, where each historical slice in a group includes the same number of user responses and customer service responses. That is, slice 1 from the multi-call historical dialogues... Store in the first group, which contains slice 2 from the multi-channel history dialogue. Store in the second group, which will contain slices 3 from the multi-channel history dialogue. The historical slices are stored in the third group. Each historical slice in the first group includes one user response, each historical slice in the second group includes two user responses and one customer service response, and each historical slice in the third group includes three user responses and two customer service responses. Furthermore, the responses from customers and users within each slice are consecutive. It's understandable that grouping and storing multiple historical slices in the database can be achieved by first vectorizing the historical slices and then storing them in the database. Using the above method to slice historical dialogues yields rich historical slices; the same user response can exist in multiple historical slices, providing a fine-grained storage method. This means each round of dialogue can be stored multiple times, encompassing different dialogue topics.
[0041] Calculate the similarity between M slices and multiple historical slices in the database, and determine N historical slices that are similar to the M slices, including: for the i-th slice among the M slices, calculate the similarity between the i-th slice and each historical slice in the q-th group, and determine at least one historical slice that is similar to the i-th slice, wherein the i-th slice and each historical slice in the q-th group include the same number of user responses and customer service responses.
[0042] Specifically, the similarity between each of the M slices in the current dialogue and the historical slices stored in the database is calculated to find N historical slices similar to the M slices. Taking the i-th slice as an example, the similarity between the i-th slice and each historical slice in the q-th group can be calculated. Of course, before calculating the similarity, the i-th slice needs to be converted into a vector so that the similarity between vectors can be calculated. If the i-th slice includes 3 user responses and 2 customer service responses, then each historical slice in the q-th group includes 3 user responses and 2 customer service responses. The i-th slice does not need to calculate the similarity with historical slices in other groups, thus saving computational costs. For the i-th slice, the top k historical slices with high similarity in the q-th group can be obtained. The i-th slice is any one of the M slices. In this way, N historical slices similar to the M slices can be obtained, where N is a positive integer greater than M.
[0043] Since each historical slice is part of the historical dialogue, after obtaining N historical slices similar to M slices, we can also obtain N historical response statements for those N historical slices. These historical response statements represent the next customer service response for each historical slice. Thus, by calculating at least one similar historical slice for each slice of the current dialogue, we can obtain the next historical response statement for each similar historical slice. These historical responses provide a rich and reasonable corpus for the next customer service response in the current dialogue.
[0044] Step 103: Based on N historical response statements, determine the customer service response statement that enables the current dialogue to achieve its dialogue objective.
[0045] Based on N historical response statements, the customer service response statement that enables the current dialogue to achieve its goal can be determined. For example, the customer service representative can filter out multiple historical response statements that achieve the goal based on whether the historical dialogues containing these N statements achieved the goal, and then select one from these selected statements as the customer service response statement for the current dialogue. Customer service response statements determined using the acquired corpus are more accurate and also solve the problem of "illusions" generated by large language models.
[0046] In one possible implementation, N historical response statements are used as candidate response statements for the current dialogue. N candidate dialogues are identified, and a predicted label is obtained for each of the N candidate dialogues using a trained response model. The candidate response statements of the candidate dialogues whose predicted labels meet the set requirements are then identified as customer service response statements. It should be noted that candidate dialogues can include all dialogues in the current call and historical response statements. If the current call is long, parts of the dialogue irrelevant to the topic can be discarded.
[0047] Optionally, the selected candidate response statements can be rationally adjusted and used as customer service response statements.
[0048] Specifically, N historical response statements are used as candidate response statements for the current dialogue, resulting in N candidate dialogues. These N candidate dialogues are then input into a trained response model, which outputs labels for each of the N candidate dialogues. In one possible example, the labels could be "Poor," "Pass," "Good," or "Excellent." The requirements could be meeting "Good" or "Excellent." One of the historical response statements that meets the requirements is selected as the customer service response statement. The response model is trained using historical dialogues and their outcomes in achieving the dialogue objectives.
[0049] In one possible example, the label can also be a specific numerical value, such as a value between 0 and 1. A larger value indicates a higher probability that the candidate dialogue will achieve its goal; a smaller value indicates a lower probability. After determining the predicted labels for N candidate dialogues, the response model selects candidate dialogues that meet set requirements. These requirements could be candidate dialogues with label values above 0.8, or the candidate dialogue with the highest label value. This determines the customer service response that enables the current dialogue to achieve its goal. Determining the customer service response based on the labels of the candidate dialogues predicted by the response model makes the determined response more accurate and reasonable. The following describes in detail how this response model is trained.
[0050] Figure 3 This is a schematic diagram corresponding to a response model training method provided in an embodiment of this application, as shown below. Figure 3 As shown, it includes the following steps: Step 301: For any one of the multiple historical dialogues, obtain multiple training data points included in the historical dialogue.
[0051] Step 302: Input multiple training data points from multiple historical dialogues into the response model and determine the predicted label corresponding to each training data point.
[0052] Step 303: Calculate the loss value of the response model based on the predicted label and the true label corresponding to each training data point.
[0053] Step 304: Based on the loss value, conduct the next round of training on the response model.
[0054] Specifically, multiple training data points are obtained from any one of the multiple historical dialogues, where the number of dialogue rounds included in the multiple training data points containing the same customer service response varies. Optionally, multiple training data points with different numbers of dialogue rounds including any one customer service response can be obtained, for example, based on... Based on this customer service response, we obtained the dialogue data from the first 10 rounds and the last 10 rounds of the 20th round, and obtained... As a training data point, it can also be used as Based on this customer service response, we obtained the dialogue data from the first 8 rounds and the last 8 rounds of dialogue in round 20. As another piece of training data.
[0055] Preferably, based on the first customer service response, multiple training data points with different dialogue rounds, including the first customer service response, can be obtained, and one of these historical dialogues can be used as the basis. For example, Figure 4 This is a schematic diagram illustrating a method for acquiring training data provided in an embodiment of this application, such as... Figure 4 As shown, the first training data is The second training data is { }, and so on, the third training data is { The forty-ninth training data is { }
[0056] Optionally, if a historical dialogue has a particularly long number of rounds, training data may not need to start from the first round. For example, if the sixtieth training data point were extracted from the first round, it would include 60 rounds of dialogue data plus the last customer service response, resulting in a long training data set. In this case, the 50 rounds of dialogue data preceding the last customer service response can be obtained. The method of obtaining training data described above can be adjusted according to actual needs. The true label of each training data point represents its impact on the achievement of the dialogue objective of the historical dialogue. That is, if the dialogue objective of the historical dialogue is to successfully market a loan product, then the true label of each training data point represents its impact on the successful marketing of a loan product in that historical dialogue.
[0057] The generated training data is represented in an unstructured form and input into the response model. The response model predicts the label for each training data point. Based on the predicted and true labels of each training data point, the loss value of the response model is calculated. The loss value is then used to determine if the training stopping condition is met. If it is, the training of the response model stops; otherwise, the next round of training continues. The loss function that satisfies the loss value can be composed of smoothing L1 loss and ranking augmentation loss, which will not be elaborated upon further in this application.
[0058] The true label of any training data is determined based on at least one of the following factors: training round relevance factor, user feedback factor, and semantic relevance factor.
[0059] In existing technologies, staff label training data as "good" or "bad" based on customer service responses. This method is susceptible to the subjective bias of the staff, leading to inaccurate labels and consequently affecting the accuracy of the large language model's training, resulting in inaccurate response predictions. Furthermore, labeling the training data by staff is labor-intensive and is also susceptible to the "illusion" effect of the large language model's generation. In this application, the labels on the training data are calculated based on the same computational logic, are not influenced by the staff's subjective bias, and save significant manpower.
[0060] The round-related factor characterizes the impact of the rounds in the training data on the achievement of the dialogue objective in the historical dialogue. Specifically, if the historical dialogue achieves the dialogue objective, the round-related factor increases with the increase of the dialogue round corresponding to the training data; if the historical dialogue does not achieve the dialogue objective, the round-related factor decreases with the increase of the dialogue round corresponding to the training data. For example, if the historical dialogue achieves the dialogue objective, the value of the round-related factor satisfies Formula 1, as described below: Formula 1 in, This represents the round-related factor, where j represents the round number of the last customer service response in the training data. This indicates the total number of dialogue rounds included in the historical dialogue to which this training data belongs.
[0061] The outcome of the historical dialogue was that the dialogue objective was not achieved, and the values of the round-related factors satisfy Formula 2, as follows: .Formula 2 The meaning of each parameter in Formula 2 is the same as that of each parameter in Formula 1, and will not be repeated here. Based on the above method of obtaining round-related factors, a number between 0 and 1 can be obtained to represent the round-related factors. This takes into account two dimensions: whether the historical dialogue achieved the dialogue goal and the number of dialogue rounds in the training data. It can accurately obtain the impact of the number of rounds in the training data on the achievement of the dialogue goal in the historical dialogue.
[0062] The user feedback factor characterizes the impact of the user response corresponding to the last customer service response in the training data on the achievement of the dialogue objectives in the historical dialogue. Specifically, the user feedback factor is related to at least one of the following: the emotional information of the user response corresponding to the last customer service response in the training data, and the behavioral information of the user response corresponding to the last customer service response in the training data. For example, the last customer service response in the training data is... Then the last customer service response will be obtained as follows: Corresponding user response Emotional and behavioral information.
[0063] Emotional information can include positive, neutral, and negative emotions. A positive emotion in a user's response can be represented by a value of 1; a neutral emotion by a value of 0.5; and a negative emotion by a value of 0.0. Specifically, the intelligent voice robot includes a response model, which can call a large language model to determine the emotional information in the user's response. For example, a prompt to the large language model could be: "You are an emotion analysis expert; please determine the overall emotional tendency of the user based on their expression."
[0064] Emotional categories are defined as follows: Positive: Expressing positive emotions such as satisfaction, joy, anticipation, gratitude, and praise. Negative: Expressing negative emotions such as dissatisfaction, anger, disappointment, anxiety, complaints, and sadness.
[0065] Neutral: stating facts, asking questions, without obvious emotional coloring, or with ambiguous emotions that are difficult to judge.
[0066] Output requirements: Strictly adhere to the following JSON format, without including any additional content, comments, or explanations. The value of the "Mood" field must be one of the following three strings: "Positive", "Negative", or "Neutral".
[0067] Output format: {"Emotion": "Positive|Negative|Neutral"}. Thus, the score corresponding to the emotion information is determined based on the emotion information output by the large language model.
[0068] Behavioral information can include relevant and irrelevant behaviors. Relevant behaviors indicate that the user's response shows a tendency towards related actions, such as inquiring about operation methods in a marketing scenario to express an intention to perform the action, or inquiring about repayment methods in a debt collection scenario to express a willingness to repay. If the user expresses a relevant behavior, it can be represented by a value of 1; if the user does not express a relevant behavior, it can be represented by a value of 0. Similarly, intelligent voice robots can call upon large language models to determine the behavioral information of user responses. For example, in a marketing scenario, the prompt for the large language model could be: "You are a marketing behavior analysis expert. Please determine whether the user has shown a specific behavioral intention related to the marketing objective based on the content of their expression."
[0069] Examples of behavioral intentions (meeting any one of these conditions constitutes "having"): Ask clearly how to complete a certain operation (e.g., "How do I do it?", "Where can I download the app?", "How do I get a credit limit?").
[0070] Directly express your willingness / intention / interest in doing something (e.g., "I'll try it in a bit," or "I'll do it later.").
[0071] Proactively request further information, steps, or assistance to advance the process. (For example, "Could you tell me about the interest rate?")
[0072] Examples of non-behavioral intentions: Expressing only emotions (such as "I understand." or "Okay.").
[0073] Simply state facts or make small talk (such as "I saw your ad yesterday.").
[0074] Ask only general questions without going into details (such as "Where is your company located?").
[0075] Output requirements: Strictly adhere to the following JSON format, without including any extra content, explanations, or punctuation. The value of the "Related Behavior" field must be a boolean: true indicates an intention to engage in related behavior, and false indicates no intention to engage in related behavior.
[0076] Output format: {"Relevant behavior exists": true|false}. Thus, the response model determines the score corresponding to the behavior information based on the behavior information output by the large language model.
[0077] The value of the user feedback factor satisfies Formula 3, as follows: Formula 3 in, Indicates user feedback factor, Indicates the value of emotional information. This represents the behavioral information value.
[0078] Semantic relevance factors characterize the impact of the semantic information of the last customer service response in the training data on the achievement of the dialogue goals in historical dialogues. Specifically, the semantic information of the last customer service response in the training data includes at least one of the following: the closeness of the last customer service response to the preceding dialogue, its logical consistency with the preceding dialogue, its fluency with the preceding dialogue, its usefulness to the dialogue goals, and its content security. Specifically, the intelligent voice robot can invoke a large language model to determine the semantic information of the customer service response. For example, the prompt word for the large language model could be: "You are a dialogue quality assessment expert. Please evaluate the quality of the last customer service response from the following six dimensions based on the context of the last customer service response."
[0079] Evaluation Dimension Explanation: Relevance: Whether the response is closely related to the current conversation context and the user's latest question.
[0080] Consistency: Whether the response is logically consistent with the conversation history and does not contradict itself.
[0081] Helpfulness: Does the response provide useful, specific, and valuable information or assistance?
[0082] Fluency: Whether the language is natural, fluent, and free of grammatical errors or grammatical mistakes.
[0083] Safety: Whether the content is harmless, unbiased, and free of offensive or inappropriate information.
[0084] Overall comment: A brief summary of the strengths and weaknesses of the response to the evaluation based on the context of the dialogue.
[0085] Scoring rules: Each dimension is scored from 1 to 5, with 5 being the best. (5 represents excellent; 4 represents good; 3 represents average; 2 represents poor; 1 represents very poor)
[0086] The overall evaluation is limited to 30 characters.
[0087] Output requirements: Strictly adhere to the following JSON format and do not include any additional content, comments, or explanations.
[0088] Output format: { "relevance": an integer, "consistency": Integer, "helpfulness": Integer, "fluency": an integer "safety": Integer, "overall_comment": "A brief summary" } Based on the output of the large language model, the values of the semantic relevance factor satisfy Formula 4:
[0089] in, Indicates semantically relevant factors, Indicates the relevance score. Indicates the consistency score. Indicates the usefulness score. The score represents the fluency score. This represents the security score. Thus, based on the semantic relevance information output by the large language model, the response model can accurately determine the scores corresponding to semantically relevant information. Furthermore, in the process of scoring the semantic relevance of customer service responses, the large language model also provides an overall rating, i.e., a commentary on the scores of the above five dimensions, preventing the large model from arbitrarily assigning scores.
[0090] After obtaining the round-related factors, user feedback factors, and semantic related factors, the true labels of the training data are determined. The true labels satisfy Formula 5: Formula 5 in, For hyperparameters, such as in marketing scenarios The values of the three hyperparameters can be adjusted in different business scenarios.
[0091] Using the above method, the true labels of the training data can be determined based on the dimensions of dialogue turns, customer service semantic information, and user response feedback. The true labels of the training data characterize the impact of the training data on the achievement of the dialogue goals in historical dialogues. Thus, compared to manually labeling the training data, this method saves manpower and improves the accuracy of labeling.
[0092] In one possible implementation, each training dataset may also include user attribute information and recent user behavior information. User attribute information could include the user's age, gender, and residential address, while recent user behavior information could include installing apps or browsing product interfaces. This recent user behavior information can be business-scenario related, and the required recent behavior information varies depending on the business scenario. When the training data includes user attribute information and recent user behavior information, the response model should also incorporate these user attribute information and recent behavior information into the candidate dialogues when predicting labels for them.
[0093] In one possible implementation, the recent user behavior in the training data also includes the time information corresponding to the recent behavior. For example, the time of installing the app is "2025-07-01 09:30:25", and the time of browsing the product interface is "2025-07-01 10:20:56". After obtaining the training data, before inputting it into the response model, the absolute time data of the user's recent behavior information can be converted into relative time. Absolute time is meaningless for training the response model, but converting it to relative time can reflect the relative time between the customer service representative's dialogue with the user and the user's recent behavior. In this way, the training process of the response model not only includes the user's attribute information and recent behavior information, but also the relative time of the recent behavior information, so that when determining the user feedback factors and semantic relevance factors of the training data, relevant information other than the dialogue can be referenced.
[0094] Figure 5 This is a schematic diagram of the internal modules of a customer service response device provided in an embodiment of this application, such as... Figure 5 As shown, the device may include: a slicing module 501, used to slice the current dialogue using M variable-size sliding windows, with the last user response of the current dialogue as the endpoint, to obtain M slices, wherein the last sentence of each of the M slices is the last user response; M is a positive integer; a determining module 502, used to calculate the similarity between the M slices and multiple historical slices in the database, to determine N historical slices similar to the M slices, and N historical response statements of the N historical slices; the historical slices are obtained by slicing using a variable-size sliding window with any user response in the historical dialogue as the endpoint; N is an integer greater than or equal to M; and based on the N historical response statements, to determine a customer service response statement that enables the current dialogue to achieve its dialogue goal.
[0095] In one possible implementation, the multiple historical slices are stored in the database in the form of multiple groups, and each historical slice in a group includes the same number of user responses and customer service responses; the determining module 502 is specifically used to calculate the similarity between the i-th slice and each historical slice in the q-th group for the i-th slice among the M slices, and determine at least one historical slice similar to the i-th slice; the i-th slice and each historical slice in the q-th group include the same number of user responses and customer service responses; q is a positive integer.
[0096] In one possible implementation, the determining module 502 is further specifically used to: determine N candidate dialogues by using the N historical response statements as candidate response statements for the current dialogue; obtain a predicted label for each of the N candidate dialogues through a trained response model; the response model is trained using historical dialogues and the results of historical dialogues in achieving the dialogue objective; and determine the candidate response statements of candidate dialogues whose predicted labels meet the set requirements as the customer service response statements.
[0097] In one possible implementation, the device further includes an acquisition module 503, which is used to acquire multiple training data points included in any one of the multiple historical dialogues; the multiple training data points with the same customer service response include different numbers of dialogue rounds; the device further includes a training module 504, which is used to input the multiple training data points of the multiple historical dialogues into the response model, determine the predicted label corresponding to each training data point; calculate the loss value of the response model based on the predicted label and the true label corresponding to each training data point; the true label of each training data point characterizes the impact of each training data point on the achievement result of the dialogue goal of the historical dialogue; and perform the next round of training on the response model based on the loss value.
[0098] In one possible implementation, the true label of any training data is determined based on at least one of the round-related factor, user feedback factor, and semantic related factor of the training data; the round-related factor characterizes the influence of the round of the training data on the achievement of the dialogue objective of the historical dialogue; the user feedback factor characterizes the influence of the user response corresponding to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue; and the semantic related factor characterizes the influence of the semantic information related to the last customer service response in the training data on the achievement of the dialogue objective of the historical dialogue.
[0099] In one possible implementation, if the outcome of the historical dialogue is that the dialogue goal is achieved, the round-related factor increases as the number of dialogue rounds corresponding to the training data increases; if the outcome of the historical dialogue is that the dialogue goal is not achieved, the round-related factor decreases as the number of dialogue rounds corresponding to the training data increases.
[0100] In one possible implementation, the user feedback factor is related to at least one of the following: the emotional information of the user response corresponding to the last customer service response in the training data, and the behavioral information of the last user response in the training data.
[0101] In one possible implementation, the semantic information related to the last customer service response in the training data includes at least one of the following: the closeness of the last customer service response in the training data to the preceding dialogue, the logical consistency with the preceding dialogue, the fluency with the preceding dialogue, the usefulness of the last customer service response in the training data to the dialogue objective, and the content security of the last customer service response in the training data.
[0102] In one possible implementation, each piece of training data also includes the user's attribute information and the user's recent behavior information.
[0103] Figure 6 This is a schematic diagram of the structure of a customer service response device provided in an embodiment of this application. Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to at least one processor 601. In this embodiment, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 Taking the connection between the processor 601 and the memory 602 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.
[0104] In this embodiment of the application, the memory 602 stores instructions that can be executed by at least one processor 601. By executing the instructions stored in the memory 602, the at least one processor 601 can implement the steps of the above-mentioned customer service response method.
[0105] The processor 601 is the control center of the computer device, capable of connecting various parts of the computer device via various interfaces and lines. It performs resource configuration by running or executing instructions stored in the memory 602 and accessing data stored in the memory 602. Optionally, the processor 601 may include one or more processing units. The processor 601 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.
[0106] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0107] Memory 602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 602 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 602 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0112] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A customer service response method, characterized in that, The method includes: Using the last user response of the current dialogue as the endpoint, the current dialogue is sliced using M sliding windows of variable size to obtain M slices, where the last sentence of each of the M slices is the last user response; M is a positive integer; Calculate the similarity between the M slices and multiple historical slices in the database, determine N historical slices similar to the M slices, and N historical response statements for the N historical slices; the historical slices are obtained by slicing with a sliding window of variable size, with any user response in the historical dialogue as the endpoint; N is an integer greater than or equal to M. Based on the N historical response statements, determine the customer service response statement that enables the current dialogue to achieve its dialogue objective.
2. The method according to claim 1, characterized in that, The multiple historical slices are stored in the database in the form of multiple groups, and each historical slice in a group includes the same number of user responses and customer service responses; Calculate the similarity between the M slices and multiple historical slices in the database, and determine N historical slices similar to the M slices, including: For the i-th slice among the M slices, calculate the similarity between the i-th slice and each historical slice in the q-th group, and determine at least one historical slice similar to the i-th slice; the i-th slice and each historical slice in the q-th group include the same number of user responses and customer service responses; q is a positive integer.
3. The method according to claim 1, characterized in that, Based on the N historical response statements, determine the customer service response statement that enables the current dialogue to achieve its dialogue objective, including: The N historical response statements are used as candidate response statements for the current dialogue to determine N candidate dialogues; The predicted label for each of the N candidate dialogues is obtained by training the response model; the response model is trained by using historical dialogues and the results of historical dialogues in achieving the dialogue objectives. The candidate response statements of the candidate dialogues that meet the set requirements based on the predicted tags are determined as the customer service response statements.
4. The method according to claim 3, characterized in that, The response model is trained using historical dialogues and the results of those dialogues in achieving the dialogue objectives, including: For any one of the multiple historical dialogues, obtain multiple training data points included in that historical dialogue; the number of dialogue rounds included in the multiple training data points with the same customer service response may differ. Input multiple training data points from the multi-channel historical dialogues into the response model to determine the predicted label corresponding to each training data point; The loss value of the response model is calculated based on the predicted label and the true label corresponding to each training data point; the true label of each training data point represents the impact of each training data point on the achievement of the dialogue objective of the historical dialogue. Based on the loss value, the response model is trained for the next round.
5. The method according to claim 4, characterized in that, The true label of any training data is determined based on at least one of the round-related factor, user feedback factor, and semantic related factor of the training data; the round-related factor characterizes the influence of the round of the training data on the achievement of the dialogue goal of the historical dialogue; the user feedback factor characterizes the influence of the user response corresponding to the last customer service response in the training data on the achievement of the dialogue goal of the historical dialogue; and the semantic related factor characterizes the influence of the semantic information related to the last customer service response in the training data on the achievement of the dialogue goal of the historical dialogue.
6. The method according to claim 5, characterized in that, If the outcome of the historical dialogue is that the dialogue objective is achieved, the round-related factor increases as the number of dialogue rounds corresponding to the training data increases; if the outcome of the historical dialogue is that the dialogue objective is not achieved, the round-related factor decreases as the number of dialogue rounds corresponding to the training data increases.
7. The method according to claim 5, characterized in that, The user feedback factor is related to at least one of the following: the emotional information of the user response corresponding to the last customer service response in the training data, and the behavioral information of the user response corresponding to the last customer service response in the training data.
8. The method according to claim 5, characterized in that, The semantic information related to the last customer service response in the training data includes at least one of the following: the closeness of the last customer service response in the training data to the preceding dialogue, the logical consistency with the preceding dialogue, the fluency with the preceding dialogue, the usefulness of the last customer service response in the training data to the dialogue objective, and the content security of the last customer service response in the training data.
9. The method according to any one of claims 4 to 8, characterized in that, Each training data set also includes the user's attribute information and the user's recent behavior information.
10. A customer service response device, characterized in that, include: The slicing module is used to slice the current dialogue into M slices based on the last user response of the current dialogue as the endpoint, according to M sliding windows of variable size. The last sentence of each of the M slices is the last user response; M is a positive integer. The determination module is used to calculate the similarity between the M slices and multiple historical slices in the database, determine N historical slices similar to the M slices, and N historical response statements for the N historical slices; the historical slices are obtained by slicing with a sliding window of variable size, with any user response in the historical dialogue as the endpoint; N is an integer greater than or equal to M; based on the N historical response statements, the customer service response statement that enables the current dialogue to achieve the dialogue goal is determined.
11. A customer service response device, characterized in that, include: Memory is used to store computer programs or instructions; A processor is configured to invoke a computer program or instructions stored in the memory to perform the method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when read and executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product stores instructions that, when read and executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 9.