Intelligent customer service reply generation method and device, electronic equipment, medium and product
By selecting semantically matching and valid dialogue samples from historical dialogue logs as reference examples, enhanced prompt words are generated, solving the problem of optimizing the response mode of the intelligent customer service system and improving the accuracy of responses and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-12
AI Technical Summary
Existing intelligent customer service systems struggle to effectively improve the matching degree between response patterns and user query needs, resulting in a poor user experience.
By extracting and filtering dialogue samples with high semantic matching and effective responses from historical dialogue logs, these samples are added to the prompt word template as reference examples to generate enhanced prompt words, thereby improving the accuracy and contextual adaptability of intelligent customer service responses.
It significantly improved the matching degree and interaction efficiency between intelligent customer service responses and user query needs, realized the adaptive and iterative optimization of intelligent customer service, and improved the user experience.
Smart Images

Figure CN122019725A_ABST
Abstract
Description
Technical Field
[0001] This relates to the field of artificial intelligence technology, particularly to the fields of intelligent customer service, natural language processing, data mining, and information retrieval. Specifically, it relates to an intelligent customer service response generation method, device, electronic device, medium, and product. Background Technology
[0002] Intelligent customer service is an automated customer service system based on artificial intelligence technology. It can interact with users through natural language, answering questions or guiding them through business processes. Its core capabilities largely depend on the response patterns used. Efficient response patterns can effectively improve the matching degree between intelligent customer service responses and user query needs, thereby enhancing the user experience. Therefore, continuous optimization of dialogue scripts is of significant necessity. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, medium, and product for generating intelligent customer service responses.
[0004] According to one aspect of this disclosure, an intelligent customer service response generation method is provided, the method comprising: Obtain the current query request and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted; Based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, and the validity of the customer service response in the predetermined dialogue sample, the target dialogue sample is determined from the predetermined dialogue sample. The target dialogue sample is added as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words.
[0005] According to another aspect of this disclosure, an intelligent customer service response generation device is provided, the device comprising: The query requirement acquisition module is used to acquire the current query requirement and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted. The target sample determination module is used to determine the target dialogue sample from the predetermined dialogue sample based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, as well as the response validity of the customer service replies in the predetermined dialogue sample. The reference example addition module is used to add the target dialogue sample as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words.
[0006] According to another aspect of this disclosure, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the intelligent customer service response generation method according to any embodiment of this disclosure.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the intelligent customer service response generation method described in any embodiment of this disclosure.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the intelligent customer service response generation method described in any embodiment of this disclosure.
[0009] This disclosure improves the matching degree and interaction efficiency between intelligent customer service responses and user query needs, thereby enhancing the user experience.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a flowchart of an intelligent customer service response generation method provided according to an embodiment of the present disclosure; Figure 2 This is a flowchart of another intelligent customer service response generation method provided according to an embodiment of this disclosure; Figure 3 This is a flowchart of yet another intelligent customer service response generation method provided according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of an intelligent customer service response generation device according to an embodiment of the present disclosure; Figure 5 A block diagram of an electronic device used to implement an intelligent customer service response generation method according to an embodiment of the present disclosure. Detailed Implementation
[0012] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0013] Figure 1 This is a flowchart illustrating an intelligent customer service response generation method according to an embodiment of this disclosure. This embodiment is applicable to intelligent dialogue systems with conversion as a core objective, such as e-commerce pre-sales consultation, B2B customer lead acquisition, and online course sales. The method can be executed by an intelligent customer service response generation device, which can be implemented in hardware and / or software and can be configured in an electronic device. (Reference) Figure 1 The method specifically includes the following: S101. Obtain the current query request and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted; S102. Based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, and the response validity of the customer service replies in the predetermined dialogue sample, determine the target dialogue sample from the predetermined dialogue sample. S103. The target dialogue sample is added as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a reply to the current query request based on the enhanced prompt words.
[0014] The current query request refers to the question or request that a user immediately raises to the intelligent customer service system. Intelligent customer service refers to a customer service system based on artificial intelligence technology that can automatically process user queries and generate responses. The planned dialogue sample refers to a dialogue record extracted from historical dialogue logs and marked as a successful conversion. A successful conversion means that the dialogue record ultimately achieved a preset business goal, such as obtaining a valid customer lead or successful payment. The current query request and the planned dialogue sample are the input basis for script optimization.
[0015] The pre-defined dialogue sample corresponds to a complete user-AI customer service interaction session, including historical query requests and corresponding customer service responses. Historical query requests refer to the questions or requests the user initially raised with the AI customer service, and the corresponding customer service responses are the AI customer service's answers to those questions or requests. The semantic matching degree between the current query request and historical query requests in the pre-defined dialogue sample is used to measure the contextual relevance between the two. Optionally, the semantic matching degree includes intent similarity and textual similarity, quantifying the degree of association between user intent and textual expression, respectively.
[0016] Response effectiveness measures the expected efficiency of customer service responses in meeting query needs and achieving business goals. Optionally, response effectiveness is obtained by weighted fusion of conversion efficiency, information density, and content coverage of customer service responses in a predetermined dialogue sample. Conversion efficiency refers to the speed and directness with which customer service responses guide users to achieve business goals, determined by the total number of question-and-answer rounds in a single conversation. Information density refers to the sufficiency and conciseness of the information conveyed in the customer service response, determined by the number of characters or words in the response in a single conversation. Content coverage is determined by judging whether the types of keywords included in the response content cover the preset functional dimensions of interactive guidance, business explanation, and relationship maintenance in professional communication.
[0017] The target dialogue sample is selected from the predefined dialogue samples based on two dimensions: semantic matching degree and response validity. The target dialogue sample is a dialogue record within the predefined dialogue samples that is relevant to the current query requirement and has a proven track record of validity. The target dialogue sample is added as a reference example to the prompt word template used by the intelligent customer service system to obtain enhanced prompt words. The prompt word template is a pre-defined text framework used to construct input instructions for the intelligent customer service system, standardizing and constructing the instruction format input to the intelligent customer service system. The enhanced prompt words are the prompt text generated by filling the example placeholders in the prompt word template with the target dialogue sample as a reference example; the enhanced prompt words incorporate successful experiences.
[0018] The target dialogue sample serves as a reference example to help the intelligent customer service system better understand the current task context and expected output format. When generating responses based on enhanced prompts, the intelligent customer service system can directly reference the efficient response patterns in the reference example, thereby providing more accurate and professional responses to the current query.
[0019] This disclosed technical solution extracts predetermined dialogue samples from historical dialogue logs and selects target dialogue samples based on the semantic matching degree between the current query and the historical query in the predetermined dialogue samples, as well as the effectiveness of customer service responses in the predetermined dialogue samples. This ensures that the selected reference examples possess both high contextual relevance and verified response efficiency. Furthermore, the target dialogue samples are added to the prompt word template as reference examples to form enhanced prompt words, allowing the intelligent customer service to directly reference verified efficient response patterns when generating responses, thereby significantly improving the accuracy and contextual adaptability of intelligent customer service responses. More importantly, this disclosed technical solution successfully processes the high-quality responses and dialogue records generated after the current query, and these dialogue records can be supplemented into predetermined dialogue samples, thus constructing a data-driven closed loop from sample selection to prompt enhancement, response generation, and finally sample expansion. This not only achieves adaptive and iterative optimization of intelligent customer service but also ensures continuous improvement in customer service response quality and problem-solving efficiency through a closed-loop feedback mechanism, ultimately effectively improving the matching degree and interaction efficiency between intelligent customer service responses and user query needs, and enhancing the user experience.
[0020] In an optional embodiment, the step of adding the target dialogue sample as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words, includes: inputting the target dialogue sample into the prompt word constructor; filling the example placeholder in the prompt word template with the target dialogue sample through the prompt word constructor; and outputting the enhanced prompt words with the target dialogue sample as a reference example through the prompt word constructor, so as to provide a response to the current query request based on the enhanced prompt words.
[0021] The prompt template includes fixed instructions and example placeholders. The prompt constructor is a specially designed program module or algorithm component for automatically combining and formatting prompts. The core operation of the prompt constructor is to populate the example placeholders in the prompt template with the target dialogue sample. Example placeholders are reserved identifiers in the prompt template for inserting specific dialogue example text. By setting example placeholders in the prompt template, the generality of the prompt template and the specificity of the reference examples can be decoupled, allowing the same prompt template to flexibly adapt to different reference examples.
[0022] The template format for the prompt phrase is not limited here; it should be set according to actual business needs. For example, the prompt phrase template format could be: "As the intelligent customer service representative of the e-commerce platform, please reply to user queries and guide users to leave their contact information for further communication. Refer to the following pre-reply examples: Example 1: User query: {query1}, Customer service reply: {reply1} Example 2: User query: {query2}, Customer service reply: {reply2} Example 3: User query: {query3}, Customer service reply: {reply3} Current user query: {current_query}, please generate an appropriate reply." After the reference example is populated, the prompt word constructor outputs enhanced prompt words based on the target dialogue sample. These enhanced prompt words can be directly provided to the intelligent customer service system, allowing it to provide responses to the current query based on these enhanced prompt words.
[0023] The above technical solution generates enhanced prompts using template addition, eliminating the need to train additional models. Only the template parameters in the prompt's constructor need to be modified to quickly adapt to new pre-defined dialogue examples. This significantly reduces computational resource consumption and model update costs, avoiding time delays and operational complexity caused by retraining or fine-tuning models. Simultaneously, it ensures the standardization and consistency of prompt construction, enabling the intelligent customer service system to reliably adopt efficient response patterns. This improves response accuracy while ensuring the flexibility and maintainability of system deployment and iteration.
[0024] In an optional embodiment, determining the target dialogue sample from the predetermined dialogue samples based on the semantic matching degree between the current query request and historical query requests in the predetermined dialogue samples, and the response validity of customer service replies in the predetermined dialogue samples, includes: selecting candidate dialogue samples from the predetermined dialogue samples based on intent similarity in the semantic matching degree; wherein, the intent similarity is obtained by matching the query intent of the current query request with the intent tags of the predetermined dialogue samples; ranking the candidate dialogue samples based on the response validity of customer service replies in the predetermined dialogue samples and text similarity in the semantic matching degree; wherein, the text similarity is obtained by matching the text of the current query request with the historical query requests; and selecting a predetermined number of candidate dialogue samples as the target dialogue sample based on the obtained ranking results.
[0025] Intent similarity is a dimension in semantic matching used to quantify the degree of relevance of user intent. It is obtained by matching the query intent of the current query with the intent tags of a pre-defined dialogue sample. Here, query intent refers to the core purpose or user goal abstracted from the text of the current query, and intent tags are identifiers pre-labeled for historical query requests in the pre-defined dialogue sample, representing their category. Optionally, the query intent of the current query and the intent tags of the pre-defined dialogue sample are determined using the same pre-trained intent recognition model. Optionally, intent tags include: information acquisition, transaction operation, problem / complaint, and relationship clue. Information acquisition refers to users aiming to understand objective details of products, services, or policies. Transaction operation refers to users hoping to complete specific business operations such as purchasing, payment, setup, or account management. Problem / complaint refers to users needing to resolve malfunctions, disputes, or express dissatisfaction encountered during use. Relationship clue refers to users intending to establish contact, schedule an experience, or proactively provide information to guide subsequent conversion.
[0026] Intent matching can quickly and accurately identify a set of candidate dialogue samples that belong to the same business or problem category as the current query requirement from a predefined dialogue sample, thereby significantly narrowing the scope of subsequent fine comparison and improving overall processing efficiency.
[0027] Next, candidate dialogue samples are ranked based on the validity of customer service responses in the predetermined dialogue samples and the text similarity in semantic matching. Text similarity refers to the dimension in semantic matching that quantifies the degree of relevance between the current query and historical queries in their specific textual expressions, calculated through text matching. Optionally, a cosine similarity algorithm is used to calculate the similarity between the text vector representations of the current and historical queries to determine their text similarity. This approach allows for... Figure 1 Based on this, text similarity can be used to further identify the dialogue samples that are closest to the specific wording and details of the current query requirements. At the same time, considering the validity of the response ensures that the customer service response being referenced is valid. Thus, the candidate dialogue samples are comprehensively evaluated and ranked on the two key dimensions of relevance and validity.
[0028] Finally, based on the obtained ranking results, a preset number of candidate dialogue samples are selected as target dialogue samples. Here, the ranking results refer to the order list after the candidate dialogue samples are sorted in descending order according to the effectiveness of the customer service replies and the text similarity. The preset number refers to a value set in advance according to the actual application requirements. The specific value of the preset number is not limited here. For example, the preset number can be 3.
[0029] The target dialogue sample refers to the reference example ultimately selected for subsequent construction of enhanced prompts. This approach intelligently extracts reference examples from the predetermined dialogue samples that are both relevant to the current user's question context and possess excellent response patterns, laying a solid foundation for generating high-quality customer service responses.
[0030] The aforementioned technical solution, by rapidly matching the query intent of the current query with intent tags pre-labeled for predetermined dialogue samples, can efficiently identify candidate dialogue samples with consistent business scope from the predetermined dialogue samples, improving retrieval efficiency and ensuring that subsequent processing focuses on the most relevant areas. Building upon this, the candidate samples are further comprehensively ranked based on the effectiveness of customer service responses and text similarity, thereby further identifying target dialogue samples among the candidate dialogue samples that possess both high conversion potential and detailed matching with the current query intent. The hierarchical screening mechanism adopted by the above technical solution achieves progressive optimization from intent relevance and response effectiveness to text matching degree, enabling the finally selected target dialogue samples to accurately support intelligent customer service in generating responses that are both business-accurate and professionally worded, effectively improving the interactive guidance capability and user experience of the responses.
[0031] In an optional embodiment, the method further includes: acquiring business indicator data corresponding to a first response strategy and a second response strategy based on at least two preset indicator dimensions; comparing the business indicator data of the second response strategy with the business indicator data of the first response strategy for each preset indicator dimension, and determining whether the parameter adjustment conditions are met based on the comparison results; if the parameter adjustment conditions are met, adjusting the preset quantity and parameters used in the response effectiveness evaluation process of the first response strategy; wherein the user traffic distribution served by the first response strategy and the second response strategy is consistent; the first response strategy provides a response based on the enhanced prompt words; the second response strategy provides a response based on the baseline prompt words; the baseline prompt words and the enhanced prompt words use the same prompt word template, but the baseline prompt words do not contain reference examples composed of the target dialogue samples.
[0032] The first response strategy refers to a strategy of providing customer service responses based on enhanced prompt words generated using the technical solution of this disclosure and with the target dialogue sample added as a reference example; the second response strategy refers to a strategy of providing customer service responses based on baseline prompt words; and the baseline prompt word refers to a prompt text that uses the same prompt word template as the enhanced prompt words, but does not contain a reference example composed of the target dialogue sample.
[0033] This is done to conduct A / B testing, scientifically quantifying the pure gain effect brought by introducing historical high-quality examples. To ensure fairness in the comparison, the user traffic distribution served by the first and second response strategies must be consistent. This means that during the test, user query requests are randomly and evenly distributed to both strategies for processing, ensuring that the two sets of experimental data are statistically comparable in terms of user background, query type, and other dimensions. Under this premise, business indicator data generated by the two strategies are collected and analyzed based on at least two preset indicator dimensions. The preset indicator dimensions refer to pre-defined key performance indicators used to quantitatively evaluate the effectiveness of customer service responses, such as conversion success rate, user satisfaction, number of dialogue rounds, and problem resolution rate. Business indicator data refers to the specific numerical values used to measure the performance of each preset indicator dimension. Optionally, business indicator data is collected in real time through customer service system logs and grouped and statistically analyzed according to query intent and the reference examples used.
[0034] The parameter adjustment condition refers to a pre-defined logical rule used to trigger modifications to relevant parameters of the first response strategy. It is typically configured to be triggered when the second response strategy outperforms the first response strategy in at least one preset metric dimension. For example, regarding the problem resolution rate, if the problem resolution rate of the second response strategy is higher than that of the first response strategy, then the parameter adjustment condition is determined to be met.
[0035] If the parameter adjustment conditions are met, it indicates that the current strategy based on enhanced prompts has not achieved the expected advantages. This may be due to an insufficient number of target dialogue samples or the quality assessment criteria failing to accurately identify the optimal sample. Therefore, adjustments need to be made to the preset quantity and the parameters used in the response effectiveness assessment process. The preset quantity refers to the number of candidate dialogue samples selected from the ranking results as target dialogue samples. The parameters used in the response effectiveness assessment process refer to the various weights or thresholds relied upon when calculating response effectiveness.
[0036] If the business metric data of the first response strategy is better than that of the second response strategy, it means that the parameter adjustment conditions are not met, the current configuration of the first response strategy is valid, and it should be retained.
[0037] Optionally, inefficient response samples can be filtered and collected based on business metric data, and the intent recognition model or sample selection rules can be optimized accordingly. Optionally, dialogue records with no successful conversions, low satisfaction, or low resolution rates can be used as inefficient response samples.
[0038] The aforementioned technical solution acquires business indicator data corresponding to a first response strategy based on enhanced prompt words and a second response strategy based on benchmark prompt words, and then makes a fair comparison while ensuring that the user traffic distribution served by both strategies is consistent. This allows for an objective and quantitative assessment of the actual benefits brought by adding historical high-quality dialogue samples. When the business indicator data of the second response strategy is better than that of the first response strategy, adjustments are automatically triggered to the preset quantity and parameters used in the response effectiveness evaluation process. This enables timely identification of deficiencies in the current screening or evaluation criteria and iterative optimization to correct the selection logic of the target dialogue samples. This not only effectively avoids performance bottlenecks or degradation caused by fixed parameters but also establishes a data-driven self-improvement cycle, allowing intelligent customer service to continuously improve the accuracy of responses and interactive guidance capabilities. This, in turn, improves the matching degree and interaction efficiency between intelligent customer service responses and user query needs, thereby enhancing the user experience.
[0039] Figure 2 This is a flowchart of another intelligent customer service response generation method provided according to an embodiment of this disclosure; this embodiment is an optional solution proposed based on the above embodiments.
[0040] See Figure 2 The intelligent customer service response generation method provided in this embodiment includes: S201. Based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue log, perform conversion verification on the historical dialogue log.
[0041] The historical dialogue log records the interaction sequences between users and the intelligent customer service system. These sequences include at least dialogue text, interaction events, and conversion prediction tags. Dialogue text is the textual content of the communication between the user and the intelligent customer service system, semantically determining whether the dialogue content achieved the preset business goals. Interaction events are recordable actions performed by the user on the dialogue interface, such as clicking links and submitting forms. Interaction events directly capture physical evidence of whether the preset business goals were achieved from the user behavior perspective. Conversion prediction tags are output by the pre-trained conversion prediction model based on the user behavior sequence and dialogue context. These tags provide a comprehensive conversion probability judgment from the model's prediction perspective, indicating whether the dialogue content achieved the preset business goals. Optionally, conversion prediction tags include deep conversion and conversion failure.
[0042] Optionally, historical dialogue logs can be parsed using log analysis tools, breaking them down into a series of structured, independent dialogue records. Each dialogue record corresponds to a complete user-intelligent customer service interaction session. Subsequently, for each independent dialogue record, conversion verification is performed based on its own dialogue text, interaction events, and corresponding conversion prediction tags.
[0043] S202. If the conversion verification indicates successful conversion, the dialogue record extracted from the historical dialogue log will be used as the predetermined dialogue sample.
[0044] If a single dialogue record in the historical dialogue log is verified as a successful conversion, its content is extracted and structured into a predefined dialogue sample. Optionally, the key information in this dialogue record is organized into structured data units using a log parsing tool, such as organizing the predefined dialogue sample into a structured quadruple of [intent tag, historical query requirements, customer service response, conversion prediction tag].
[0045] The user intent is obtained by classifying historical query requests in the dialogue record using a pre-trained intent recognition model.
[0046] S203. Based on the dialogue rounds, text length of the customer service reply, and reply content in the dialogue record, determine the validity of the customer service reply in the predetermined dialogue sample.
[0047] In this context, dialogue rounds refer to the total number of question-and-answer exchanges between the user and customer service representative in a single conversation. This reflects conversion efficiency; in conversations that successfully resolve user issues and achieve conversions, excessively high dialogue rounds may indicate low communication efficiency or a failure to quickly pinpoint the problem. The text length of the customer service response refers to the number of characters or words in a single reply message. This quantifies the conciseness and sufficiency of the information conveyed in the response, reflecting information density. The response content refers to the specific semantic information carried in the customer service response, serving as a basis for assessing content coverage.
[0048] Optionally, by combining the quantitative results of the three dimensions of conversion efficiency, information density, and content coverage, the validity of customer service responses in each predetermined dialogue sample can be determined through a weighted or fusion algorithm.
[0049] This disclosed technical solution utilizes a three-source data approach—dialogue text, interaction events, and conversion prediction tags—for conversion verification. This effectively avoids potential misjudgments or delays that may arise from relying on a single data source, thus improving the accuracy of pre-defined dialogue samples. Secondly, when determining the validity of responses to pre-defined dialogue samples, a scientific scoring algorithm is developed that comprehensively considers dialogue rounds, the text length of customer service responses, and the content of the responses. This algorithm encompasses dialogue efficiency, information density, and content coverage, resulting in selected customer service responses that demonstrate superior communication efficiency and guidance capabilities, thereby identifying target dialogue samples with greater conversion potential. This disclosed technical solution automates the entire process from conversion verification and sample extraction to quality assessment, significantly reducing the cost of manual annotation and screening. Furthermore, the process design inherently supports periodic incremental processing of newly added historical dialogue logs, enabling the dynamic discovery and absorption of new, efficient response patterns. This ensures that pre-defined dialogue samples keep pace with business development and practical changes, achieving continuous updates to the pre-defined dialogue sample library and the self-evolution of intelligent customer service. Ultimately, this drives intelligent customer service to continuously improve the timeliness, accuracy, and adaptability to new business scenarios through iterative iteration.
[0050] In an optional embodiment, the conversion verification of the historical dialogue log based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue log includes: performing text analysis on the dialogue text to determine whether the dialogue text includes key conversion elements; identifying whether the interaction events include control triggering operations that act on the conversion guidance control; if any one of the following is satisfied: the dialogue text includes key conversion elements, the interaction events include control triggering operations that act on the guidance control, and the conversion prediction tag is a deep conversion, then the historical dialogue log is determined to be a successful conversion; wherein, the conversion prediction tag is output by a pre-trained conversion prediction model based on user behavior and dialogue context.
[0051] Text analysis refers to the process of extracting key conversion elements from dialogue text using natural language processing techniques. Optionally, regular expressions are applied to match predefined string patterns to extract key conversion elements from the dialogue text. Key conversion elements are semantic units that appear in the dialogue text and directly represent the user's expressed clear intention to convert. If the dialogue text includes key conversion elements, it indicates that the conversation has semantically decisive content that leads to conversion; conversely, if it does not include them, it indicates a lack of direct conversion support at the textual level.
[0052] Interaction events are identified and analyzed to determine whether they contain control-triggered actions that affect conversion guidance controls. These control-triggered actions are specific graphical user interface components pre-designed and programmed to explicitly guide, accept, or complete a conversion goal on intelligent customer service or business application interfaces. A control-triggered action refers to a specific activation behavior performed by the user on the conversion guidance control during interaction with the system interface, which can be logged by the system. If the interaction event includes a control-triggered action acting on the guidance control, it indicates that the user ultimately performed a clear conversion action at the behavioral level; otherwise, there is a lack of evidence of behavioral completion.
[0053] A conversion prediction label is introduced, generated by a pre-trained conversion prediction model based on the complete user behavior and dialogue context of the current session. The conversion prediction label is a classification result output by the conversion prediction model after comprehensive analysis of the current dialogue session, with possible categories including deep conversion. If the classification result is deep conversion, it indicates that the conversion prediction model considers the session to have a high conversion tendency; conversely, if it is another category, the conversion prediction model assesses that it does not meet the deep conversion standard.
[0054] A historical dialogue record is considered a successful conversion if any one of the following three conditions is met: "the dialogue text contains key conversion elements", "the interactive event includes a control-triggered operation that acts on the guide control", or "the conversion prediction label is deep conversion".
[0055] The above technical solution defines the verification conditions for successful conversion from the semantic level of the dialogue text, the behavioral level of the interaction event, and the intelligent evaluation level of the conversion prediction model by setting three parallel evidence paths. It can comprehensively cover various conversion facts generated in different scenarios and interaction modes, thereby greatly improving the recognition and recall rate of successful conversion while ensuring the accuracy of the judgment, and providing a solid data foundation for the subsequent construction of a rich and comprehensive pre-defined dialogue sample library.
[0056] Figure 3 This is a flowchart of another intelligent customer service response generation method provided according to an embodiment of the present disclosure; this embodiment is an optional solution proposed based on the above embodiments.
[0057] See Figure 3 The intelligent customer service response generation method provided in this embodiment includes: S301. Based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue log, perform conversion verification on the historical dialogue log.
[0058] S302. If the conversion verification indicates successful conversion, the dialogue record extracted from the historical dialogue log will be used as the predetermined dialogue sample.
[0059] S303. The dialogue rounds in the dialogue record are processed using a round decay function to obtain the conversion efficiency of the customer service response; wherein, the round decay function defines a negative correlation between the conversion efficiency and the dialogue rounds.
[0060] Conversion efficiency objectively measures the speed and directness with which customer service responses guide users to achieve their business goals within a single conversation. The number of dialogue rounds serves as the input parameter to the round decay function, which yields an efficiency score. The round decay function defines a negative correlation between conversion efficiency and the number of dialogue rounds. Theoretically, fewer interaction rounds mean that intelligent customer service can understand user needs more quickly and accurately and provide effective solutions, thereby guiding users more efficiently to the conversion endpoint.
[0061] Optionally, f(turn) = 1 – w1×(turn-1) can be used as the turn decay function. Here, w1 is the decay weight, turn is the dialogue turn, and turn≥1. The value of the decay weight is not limited here; for example, w1=0.1.
[0062] S304. Determine the information density of the customer service reply based on the positional relationship between the text length of the customer service reply and the preset length range.
[0063] The information density of customer service responses reflects the amount of effective information carried per unit text length. Ideally, it should avoid omissions due to overly concise information (too short text) or inefficiency due to overly redundant information (too long text).
[0064] The preset length range is a predefined numerical range that represents the ideal length of a response. Based on the positional relationship between the text length and the preset length range, it can be determined whether the text length of the customer service response is within the ideal range, and thus assess whether the customer service response avoids the problems of information overload or incomplete expression.
[0065] S305. Determine the keyword types included in the response content, and determine the content coverage of the customer service response based on the keyword types.
[0066] The content coverage of customer service responses refers to the completeness of the intelligent customer service's response content in covering preset functional dimensions. Essentially, it reflects whether the content accurately and effectively utilizes language elements specific to a particular domain. The content coverage of intelligent customer service is determined by judging whether the keyword types included in the response content cover the core functional dimensions of professional communication scripts, such as interactive guidance, business explanation, and relationship maintenance. Optionally, the keyword types included in the response content can be matched with the key types corresponding to preset functional dimensions, and then the content coverage of the customer service response can be determined based on the matching results.
[0067] S306. Based on the conversion efficiency, the information density, and the content coverage, determine the validity of the customer service response.
[0068] Optionally, conversion efficiency, information density, and content coverage can be weighted and integrated to determine the overall score as the effectiveness of customer service responses.
[0069] This disclosed technical solution transforms dialogue rounds into conversion efficiency through a round decay function, objectively quantifying the speed and directness with which customer service responses guide users to achieve business goals. It determines information density by analyzing the deviation of text length from a preset range, quantifying the conciseness and sufficiency of the response. Furthermore, it determines content coverage by analyzing keyword types within the response content, quantifying the professionalism of the customer service response in terms of interactive guidance, business explanation, and relationship maintenance. Finally, it determines response effectiveness by comprehensively considering conversion efficiency, information density, and content coverage. This not only fundamentally shifts the evaluation of customer service response effectiveness from subjective experience-based judgment to objective data-driven assessment, improving the consistency and fairness of the evaluation, but also provides precise data and decision support for accurately identifying efficient dialogue patterns and optimizing intelligent customer service generation strategies.
[0070] In an optional embodiment, determining the keyword types included in the response content and determining the content coverage of the customer service response based on the keyword types includes: obtaining a pre-built keyword library and performing keyword matching between the response content and the keyword library; wherein, the keyword library includes at least one type of keywords among: conversion guidance, business description, and emotional reassurance; if at least one keyword under a certain category is matched in the response content, a preset score corresponding to that keyword is obtained; and the content coverage of the customer service response is determined based on the preset scores corresponding to the various types of keywords matched in the response content.
[0071] The keyword library refers to a collection of standard terms or phrases predefined and categorized for specific business scenarios. It contains multiple categories of keywords divided according to preset functional dimensions, primarily including: conversion guidance, business description, and emotional reassurance. Conversion guidance keywords directly encourage or guide users to complete preset business goals, such as "Buy Now" or "Click to Register." Business description keywords refer to professional terms that accurately describe product features, service processes, or technical parameters. Emotional reassurance keywords refer to communication language used to understand user emotions, build trust, or alleviate anxiety.
[0072] The responses to be analyzed are compared with entries in the keyword database to identify and determine the keyword types included in the responses. When a match is successful, the preset score corresponding to that keyword type is obtained. The preset score is a pre-set numerical value representing the weight of each keyword type in terms of its contribution to the professional level of that category. The specific values of the preset scores for each keyword type are determined based on actual business needs and are not limited here. Optionally, the preset score for conversion-oriented keywords is the highest, followed by business description keywords, and the preset score for emotional reassurance keywords is the lowest. For example, the preset scores for conversion-oriented, business description, and emotional reassurance keywords are 0.25, 0.15, and 0.1, respectively.
[0073] Optionally, based on the preset scores corresponding to various keywords matched by the response content, the content coverage of the customer service response can be determined by calculation methods such as summation or weighted average to comprehensively reflect the professional performance of the customer service response in terms of interactive guidance, business explanation and relationship maintenance.
[0074] The aforementioned technical solution concretizes the abstract concept of content coverage into the identification and quantification of semantic categories of keywords such as conversion guidance, business description, and emotional reassurance. This establishes an objective and unified professional script evaluation standard, effectively eliminating the subjectivity and inconsistency inherent in traditional manual evaluation. By pre-setting scores for each keyword category and performing weighted calculations based on matching results, it achieves refined and automated measurement of customer service responses' professional capabilities across multiple dimensions, including interactive guidance, business explanation, and relationship maintenance. This not only significantly reduces the cost of manual review but also provides a stable and reliable input basis for subsequent comprehensive calculation of response effectiveness and selection of pre-defined dialogue samples, thereby systematically improving the professionalism and measurability of intelligent customer service.
[0075] In an optional embodiment, determining the information density of the customer service response based on the positional relationship between the text length of the customer service response and a preset length range includes: determining the degree of deviation between the text length and the endpoints of the range based on the positional relationship between the text length of the customer service response and the preset length range; determining the attenuation ratio of the initial density score based on the degree of deviation; processing the initial density score using the attenuation ratio; and determining the information density of the customer service response based on the obtained processing result.
[0076] The preset length range is defined by an upper limit and a lower limit. The positional relationship between the length of the customer service reply text and the preset length range refers to the relative position of the text length value falling within the preset length range, being less than the lower limit, or being greater than the upper limit.
[0077] This positional relationship is used to calculate the degree of deviation between the text length and the endpoints of the interval. The degree of deviation refers to the absolute or standardized distance of the text length value from the nearest endpoint of the preset length interval. The degree of deviation is used to calculate the attenuation ratio. The attenuation ratio is a coefficient between 0 and 1, representing the proportion of the base score that should be reduced due to deviation from the ideal length. The degree of deviation and the attenuation ratio are positively correlated; the greater the deviation, the higher the attenuation ratio.
[0078] Subsequently, this attenuation ratio is applied to an initial density score, and the information density of the customer service response is determined based on this result. The initial density score refers to a baseline score or benchmark score assigned under the assumption of an ideal response length. The processing result is the final score after attenuation adjustment. Optionally, the obtained processing result is used as the information density of the customer service response.
[0079] Optionally, [a1, a2] can be used to represent the preset length interval. a1 and a2, as the interval endpoints, refer to the lower and upper limits of the interval, respectively. The information density of the customer service response is calculated using g(length) = V1 - max(0, length-a2) / (a2-a1) - max(0, a1-length) / a1. Here, length refers to the text length of the customer service response, and V1 is the initial density score. The specific values of the initial density score and the preset length interval are determined according to actual business needs and are not limited here. For example, the initial density score can be 1, and the preset length interval can be [50, 150].
[0080] The above technical solution establishes a dynamic penalty mechanism, transforming the concept of information density from a simple binary judgment of whether it is within the range into a continuous score that is negatively correlated with the degree of deviation from the ideal state. This enables the evaluation to reflect the communication efficiency at the textual level more precisely and reasonably, providing a stable and objective key dimension for the overall quantitative evaluation of response effectiveness.
[0081] Figure 4 This is a schematic diagram of an intelligent customer service response generation device according to an embodiment of this disclosure. This disclosure is applicable to intelligent dialogue systems with conversion as a core objective, such as e-commerce pre-sales consultation, B2B customer lead acquisition, and online course sales. The device can be implemented using software and / or hardware, and can implement the intelligent customer service response generation method described in any embodiment of this disclosure.
[0082] like Figure 4 As shown, the intelligent customer service response generation device 400 includes: The query requirement acquisition module 401 is used to acquire the current query requirement and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted. The target sample determination module 402 is used to determine a target dialogue sample from the predetermined dialogue sample based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, as well as the response validity of the customer service replies in the predetermined dialogue sample. The reference example adding module 403 is used to add the target dialogue sample as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words.
[0083] This disclosed technical solution extracts predetermined dialogue samples from historical dialogue logs and selects target dialogue samples based on the semantic matching degree between the current query and the historical query in the predetermined dialogue samples, as well as the effectiveness of customer service responses in the predetermined dialogue samples. This ensures that the selected reference examples possess both high contextual relevance and verified response efficiency. Furthermore, the target dialogue samples are added to the prompt word template as reference examples to form enhanced prompt words, allowing the intelligent customer service to directly reference verified efficient response patterns when generating responses, thereby significantly improving the accuracy and conversion guidance capabilities of intelligent customer service responses. More importantly, this disclosed technical solution successfully processes high-quality responses and their dialogue records generated after the current query, and these dialogue records can be supplemented into predetermined dialogue samples, thus constructing a data-driven closed loop from sample selection to prompt enhancement, response generation, and finally sample expansion. This not only achieves adaptive and iterative optimization of intelligent customer service but also ensures continuous improvement in customer service response quality and problem-solving efficiency through a closed-loop feedback mechanism, ultimately effectively improving the matching degree and interaction efficiency between intelligent customer service responses and user query needs, and enhancing the user experience.
[0084] Optionally, the device further includes: a conversion verification module, used to perform conversion verification on the historical dialogue log based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue log; a record extraction module, used to extract dialogue records from the historical dialogue log as the predetermined dialogue sample if the conversion verification indicates successful conversion; and a quality determination module, used to determine the validity of the customer service replies in the predetermined dialogue sample based on the dialogue rounds, text length of the customer service replies, and reply content in the dialogue records.
[0085] Optionally, the quality determination module includes: a conversion efficiency determination submodule, used to process the dialogue rounds in the dialogue record using a round decay function to obtain the conversion efficiency of the customer service response; wherein the round decay function defines a negative correlation between conversion efficiency and the dialogue rounds; an information density determination submodule, used to determine the information density of the customer service response based on the positional relationship between the text length of the customer service response and a preset length range; a coverage determination submodule, used to determine the keyword types included in the response content and determine the content coverage of the customer service response based on the keyword types; and an effectiveness determination submodule, used to determine the effectiveness of the customer service response based on the conversion efficiency, the information density, and the content coverage.
[0086] Optionally, the coverage determination submodule includes: a keyword matching unit, used to obtain a pre-built keyword library and match the response content with the keyword library; wherein, the keyword library includes at least one type of keyword among: conversion guidance, business description, and emotional reassurance; a preset score acquisition unit, used to obtain a preset score corresponding to a certain keyword if the response content matches at least one keyword of a certain category; and a coverage determination unit, used to determine the content coverage of the customer service response based on the preset scores corresponding to the various types of keywords matched by the response content.
[0087] Optionally, the information density determination submodule includes: a deviation degree determination unit, used to determine the deviation degree between the text length and the endpoint of the interval based on the positional relationship between the text length of the customer service reply and the preset length interval; an attenuation ratio determination unit, used to determine the attenuation ratio of the initial density score based on the deviation degree; and an information density determination unit, used to process the initial density score using the attenuation ratio, and determine the information density of the customer service reply based on the obtained processing result.
[0088] Optionally, the conversion verification module includes: a first verification submodule, used to perform text analysis on the dialogue text to determine whether the dialogue text includes key conversion elements; a second verification submodule, used to identify whether the interaction event includes a control trigger operation acting on the conversion guidance control; the conversion verification submodule is used to determine that the historical dialogue log is a successful conversion if any one of the following is satisfied: the dialogue text includes key conversion elements, the interaction event includes a control trigger operation acting on the guidance control, and the conversion prediction label is a deep conversion; wherein the conversion prediction label is output by a pre-trained conversion prediction model based on user behavior and dialogue context.
[0089] Optionally, the reference example adding module 403 includes: a sample input submodule, used to input the target dialogue sample into the prompt word constructor; a sample filling submodule, used to fill the target dialogue sample into the example placeholder in the prompt word template through the prompt word constructor; and a prompt word output submodule, used to output enhanced prompt words with the target dialogue sample as a reference example through the prompt word constructor, so as to provide a response to the current query request based on the enhanced prompt words.
[0090] Optionally, the target sample determination module includes: a candidate sample selection submodule, used to select candidate dialogue samples from the predetermined dialogue samples based on the intent similarity in the semantic matching degree; wherein the intent similarity is obtained by matching the query intent of the current query request with the intent tags of the predetermined dialogue samples; a candidate sample ranking submodule, used to rank the candidate dialogue samples based on the response validity of customer service replies in the predetermined dialogue samples and the text similarity in the semantic matching degree; wherein the text similarity is obtained by matching the text of the current query request with the historical query requests; and a target sample determination submodule, used to select a preset number of candidate dialogue samples as the target dialogue samples based on the obtained ranking results.
[0091] Optionally, the device further includes: a data acquisition module, configured to acquire business indicator data corresponding to the first response strategy and the second response strategy based on at least two preset indicator dimensions; and a data comparison module, configured to compare the business indicator data of the second response strategy with the business indicator data of the first response strategy for each of the preset indicator dimensions, and determine whether the parameter adjustment conditions are met based on the obtained comparison results. The parameter adjustment module is used to adjust the preset quantity and parameters used in the response effectiveness evaluation process of the first response strategy if the parameter adjustment conditions are met; wherein, the user traffic distribution served by the first response strategy and the second response strategy is consistent; the first response strategy provides a response based on the enhanced prompt words; the second response strategy provides a response based on the baseline prompt words; the baseline prompt words and the prompt word template used by the enhanced prompt words are the same, but the baseline prompt words do not contain reference examples composed of the target dialogue samples.
[0092] In the technical solution disclosed herein, any type of information involved, such as user personal information, including the collection, storage, use, processing, transmission, provision, and disclosure of current query requests, complies with relevant laws and regulations and does not violate public order and good morals.
[0093] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0094] Figure 5A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0095] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0096] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0097] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the intelligent customer service response generation method. For example, in some embodiments, the intelligent customer service response generation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the intelligent customer service response generation method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the intelligent customer service response generation method by any other suitable means (e.g., by means of firmware).
[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0102] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0103] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem that addresses the management difficulties and weak business scalability inherent in traditional physical hosting and VPS services. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0104] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0105] Cloud computing refers to a technology system that enables access to a shared pool of physical or virtual resources via a network. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as for model training.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for generating intelligent customer service responses, the method comprising: Obtain the current query request and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted; Based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, and the validity of the customer service response in the predetermined dialogue sample, the target dialogue sample is determined from the predetermined dialogue sample. The target dialogue sample is added as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words.
2. The method according to claim 1, further comprising: Based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue logs, the conversion verification of the historical dialogue logs is performed. If the conversion verification indicates that the conversion is successful, the dialogue record extracted from the historical dialogue log will be used as the predetermined dialogue sample. Based on the dialogue rounds, text length of customer service replies, and reply content in the dialogue records, the validity of customer service replies in the predetermined dialogue sample is determined.
3. The method according to claim 2, wherein, The determination of the validity of customer service replies in the predetermined dialogue sample based on the dialogue rounds, text length of customer service replies, and reply content in the dialogue record includes: A round decay function is used to process the dialogue rounds in the dialogue record to obtain the conversion efficiency of the customer service response; wherein, the round decay function defines a negative correlation between the conversion efficiency and the dialogue rounds; The information density of the customer service response is determined based on the positional relationship between the text length of the customer service response and the preset length range; Determine the keyword types included in the response content, and determine the content coverage of the customer service response based on the keyword types; The validity of the customer service response is determined based on the conversion efficiency, the information density, and the content coverage.
4. The method according to claim 3, wherein, The step of determining the keyword types included in the response content and determining the content coverage of the customer service response based on the keyword types includes: Obtain a pre-built keyword library and match the response content with the keyword library; wherein, the keyword library includes at least one type of keyword from the categories of conversion guidance, business description, and emotional reassurance; If the response content matches at least one keyword under a certain category, then the preset score corresponding to that keyword category is obtained; The content coverage of the customer service reply is determined based on the preset scores corresponding to various keywords matched with the reply content.
5. The method according to claim 3, wherein, Determining the information density of the customer service response based on its positional relationship with the text length of the response and a preset length range includes: Based on the positional relationship between the text length of the customer service reply and the preset length range, the degree of deviation between the text length and the endpoint of the range is determined; Based on the degree of deviation, the attenuation ratio of the initial density score is determined; The initial density score is processed using the attenuation ratio, and the information density of the customer service response is determined based on the processing result.
6. The method according to claim 2, wherein, The conversion verification of the historical dialogue logs based on the dialogue text, interaction events, and conversion prediction tags in the historical dialogue logs includes: The dialogue text is analyzed to determine whether it contains key conversion elements. Identify whether the interactive event includes a control trigger operation that acts on the conversion guide control; If any one of the following conditions is met: the dialogue text includes key conversion elements, the interaction event includes a control trigger operation that acts on the guide control, and the conversion prediction label is a deep conversion, then the historical dialogue log is determined to be a successful conversion. The conversion prediction label is output by a pre-trained conversion prediction model based on user behavior and dialogue context.
7. The method according to claim 1, wherein, The step of adding the target dialogue sample as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words, includes: Input the target dialogue sample into the prompt word constructor; The target dialogue sample is filled into the example placeholder in the prompt word template using the prompt word constructor. The prompt word constructor outputs enhanced prompt words with reference to the target dialogue sample, so as to provide a response to the current query request based on the enhanced prompt words.
8. The method according to claim 1, wherein, The step of determining the target dialogue sample from the predetermined dialogue sample based on the semantic matching degree between the current query request and the historical query requests in the predetermined dialogue sample, and the response validity of the customer service replies in the predetermined dialogue sample, includes: Based on the intent similarity in the semantic matching degree, candidate dialogue samples are selected from the predetermined dialogue samples; wherein, the intent similarity is obtained by matching the query intent of the current query request with the intent tags of the predetermined dialogue samples; The candidate dialogue samples are ranked based on the validity of customer service responses in the predetermined dialogue samples and the text similarity in the semantic matching degree; wherein, the text similarity is obtained by matching the current query request with the historical query request. Based on the obtained ranking results, a predetermined number of candidate dialogue samples are selected as the target dialogue samples.
9. The method according to claim 8, further comprising: Based on at least two preset indicator dimensions, obtain the business indicator data corresponding to the first response strategy and the second response strategy respectively; For each of the preset indicator dimensions, the business indicator data of the second response strategy is compared with the business indicator data of the first response strategy, and the parameter adjustment conditions are determined based on the comparison results. If the parameter adjustment conditions are met, the preset quantity and parameters used in the response effectiveness evaluation process in the first response strategy will be adjusted. The first response strategy and the second response strategy serve the same user traffic distribution; the first response strategy provides a response based on the enhanced prompt words; the second response strategy provides a response based on the baseline prompt words. The baseline prompt word uses the same prompt word template as the enhanced prompt word, but the baseline prompt word does not contain a reference example composed of the target dialogue sample.
10. An intelligent customer service response generation device, the device comprising: The query requirement acquisition module is used to acquire the current query requirement and the pre-defined dialogue sample; wherein, the pre-defined dialogue sample includes dialogue records extracted from historical dialogue logs and successfully converted. The target sample determination module is used to determine the target dialogue sample from the predetermined dialogue sample based on the semantic matching degree between the current query requirement and the historical query requirements in the predetermined dialogue sample, as well as the response validity of the customer service replies in the predetermined dialogue sample. The reference example addition module is used to add the target dialogue sample as a reference example to the prompt word template used by the intelligent customer service to obtain enhanced prompt words, so as to provide a response to the current query request based on the enhanced prompt words.
11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the intelligent customer service response generation method according to any one of claims 1-9.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the intelligent customer service response generation method according to any one of claims 1-9.
13. A computer program product comprising a computer program that, when executed by a processor, implements the intelligent customer service response generation method according to any one of claims 1-9.