Customer service dialogue generation method and device, electronic equipment and storage medium
By identifying target process nodes in preset process information and generating customer service dialogues using preset language models, the high cost of data annotation and the lack of model universality in existing technologies are solved, achieving highly accurate customer service dialogue generation in multiple fields.
Patent Information
- Application Number
- CN202511067521.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, natural language processing models trained on labeled question-and-answer data suffer from high data labeling costs and are difficult to apply across multiple domains when generating customer service dialogues, thus failing to guarantee generation quality.
By acquiring the preset process information corresponding to the business scenario, the target process node is determined in the preset process information based on the contextual dialogue information and question intent of the input question, and a customer service dialogue is generated based on the response strategy of the process node using a preset language model.
It improves the accuracy of customer service dialogue generation in various business scenarios, reduces data annotation costs, and makes the model more versatile in multiple fields.
Smart Images

Figure CN120952177A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for generating customer service dialogues, an electronic device, and a storage medium. Background Technology
[0002] In predefined domains such as finance and automotive, there is a need to generate corresponding customer service dialogues for user-submitted questions. Related technologies typically train a natural language processing model based on labeled question-and-answer data specific to that domain. This model then understands user needs and generates appropriate responses. However, the data labeling costs associated with this approach are high, and it's difficult to apply across multiple domains, thus compromising the quality of the generated customer service dialogues. Summary of the Invention
[0003] This disclosure provides a method and apparatus for generating customer service dialogues, an electronic device, and a computer-readable storage medium.
[0004] In a first aspect, this disclosure provides a method for generating customer service dialogues. The method includes: obtaining preset process information corresponding to a business scenario based on an input question, the preset process information including multiple process nodes; the multiple process nodes corresponding to multiple response strategies; determining a target process node corresponding to the input question from the multiple process nodes based on contextual dialogue information corresponding to the input question and the question intent corresponding to the input question; constructing prompt information based on the target process node and the input question; and inputting the prompt information into a preset language model so that the preset language model generates a customer service dialogue for the input question based on the response strategy of the target process node.
[0005] Secondly, this disclosure provides a customer service dialogue generation device, which includes: an acquisition module, configured to acquire preset process information corresponding to the business scenario corresponding to the input question, the preset process information including multiple process nodes; the multiple process nodes corresponding to multiple response strategies; a determination module, configured to determine a target process node corresponding to the input question from the multiple process nodes based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question; and a generation module, configured to construct prompt information based on the target process node and the input question, and input the prompt information into a preset language model, so that the preset language model generates a customer service dialogue for the input question according to the response strategy of the target process node.
[0006] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described method for generating customer service dialogues.
[0007] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method for generating customer service dialogues.
[0008] The customer service dialogue generation method provided in this disclosure first obtains preset process information corresponding to the business scenario corresponding to the input question, which includes multiple process nodes; each process node corresponds to a multiple response strategy. Second, based on the contextual dialogue information and the question intent of the input question, a target process node corresponding to the input question is determined from the multiple process nodes. Finally, a prompt message is constructed based on the target process node and the input question, and this prompt message is input into a preset language model, enabling the preset language model to generate a customer service dialogue for the input question according to the response strategy of the target process node. This disclosure eliminates the need to train a natural language model based on labeled data. Instead, it directly determines the process node corresponding to the input question from the preset process information using the contextual dialogue information and the question intent of the input question. Based on the guidance of the process node, the preset language model can directly generate a customer service dialogue for the input question according to the response strategy of that process node, improving the accuracy of customer service dialogue generation in various business scenarios.
[0009] 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
[0010] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:
[0011] Figure 1 An application scenario diagram of the customer service dialogue generation method and apparatus provided in the embodiments of this disclosure;
[0012] Figure 2A flowchart illustrating a method for generating customer service dialogues as provided in this embodiment of the disclosure;
[0013] Figure 3 A flowchart illustrating the process of generating customer service dialogues in related technologies;
[0014] Figure 4 A flowchart illustrating a method for generating customer service dialogues, as provided in this example;
[0015] Figure 5 This example illustrates the application of a method for generating customer service dialogues.
[0016] Figure 6 A block diagram of a customer service dialogue generation apparatus provided in this disclosure embodiment;
[0017] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should 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 conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0020] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0023] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example, appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely identifying specific individuals.
[0024] In related technologies, natural language processing models are typically trained based on labeled question-and-answer data corresponding to the target domain. These models then understand user needs and generate appropriate responses. However, this approach involves high data labeling costs, and the trained models are only suitable for the specific consultation scenario they were trained on, making it difficult to generalize across multiple consultation scenarios. Furthermore, it requires maintaining a complex knowledge base and dialogue tasks to generate customer service dialogues, resulting in high training and maintenance costs, and also failing to guarantee the quality of the generated dialogues.
[0025] In view of this, this disclosure provides a method for generating customer service dialogues. First, based on the business scenario corresponding to the input question, preset process information corresponding to the business scenario is obtained. This preset process information includes multiple process nodes; the multiple process nodes correspond to multiple response strategies. Second, based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question, a target process node corresponding to the input question is determined from the multiple process nodes. Finally, based on the target process node and the input question, prompt information is constructed and input into a preset language model, so that the preset language model generates a customer service dialogue for the input question according to the response strategy of the target process node. This disclosure does not require training a natural language model based on labeled data. Instead, it directly determines the process node corresponding to the input question from the preset process information through the contextual dialogue information and the question intent corresponding to the input question. Thus, based on the guidance of the process node, the preset language model can directly generate a customer service dialogue for the input question according to the response strategy of the process node, improving the accuracy of customer service dialogue generation in various business scenarios.
[0026] Figure 1This diagram illustrates an application scenario of the customer service dialogue generation method and apparatus provided in the embodiments of this disclosure.
[0027] like Figure 1 As shown, the application scenario of this disclosure embodiment may include terminal device 101, network 103, and server 102. Network 103 is used as a medium to provide a communication link between terminal device 101 and server 102. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0028] Users can use terminal device 101 to interact with server 102 via network 103 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0029] Terminal device 101 can be various electronic devices with a display screen and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0030] Server 102 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal device 101 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0031] It should be noted that the customer service dialogue generation method and apparatus provided in this disclosure embodiment can be executed by server 102. Accordingly, the customer service dialogue generation method and apparatus provided in this disclosure embodiment can be located in server 102. Alternatively, the customer service dialogue generation method and apparatus provided in this disclosure embodiment can be executed by a server or server cluster that is different from server 102 and capable of communicating with terminal device 101 and / or server 102. Accordingly, the customer service dialogue generation method and apparatus provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 102 and capable of communicating with terminal device 101 and / or server 102.
[0032] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0033] Figure 2 A flowchart illustrating a method for generating customer service dialogues according to an embodiment of this disclosure. (Refer to...) Figure 2 The method includes:
[0034] Step S210: Based on the business scenario corresponding to the input question, obtain the preset process information corresponding to the business scenario. The preset process information includes multiple process nodes; multiple process nodes correspond to multiple response strategies.
[0035] The business scenario corresponding to the input question refers to the specific business category or service scenario to which the input question belongs. Specifically, the business scenario corresponding to the input question can be determined based on keywords in the input question or the context information corresponding to the input question. Furthermore, the specific division of business scenarios can be adaptively set according to the actual business needs of each application field, and this embodiment of the disclosure does not impose any restrictions on this. For example, the business scenarios corresponding to the e-commerce field can be various business scenarios such as product consultation, order processing, and feedback, and this embodiment of the disclosure does not impose any restrictions on this.
[0036] Furthermore, each business scenario has its corresponding preset process information. This preset process information can also be called a Standard Operating Procedure (SOP). The preset process information for a business scenario describes the standardized steps, rules, or operational guidelines pre-defined for the dialogue process within that scenario. This preset process information includes multiple process nodes. These nodes must be arranged in a preset order, allowing them to be executed sequentially. For example, the preset process information for business scenario A includes sequentially arranged process nodes 1 and 2. Therefore, for the dialogue process in business scenario A, a customer service dialogue must first be generated around process node 1, and then the dialogue process corresponding to process node 2 will proceed.
[0037] One process node is used to represent a dialogue session, which is specifically centered around a dialogue topic.
[0038] For example, the pre-set process information includes sequentially arranged opening inquiry nodes, identity identification nodes, marketing intent nodes, customer question answering nodes, and marketing result confirmation nodes. The conversation topic differs at each process node, and correspondingly, each node has its own appropriate response strategy.
[0039] The response strategy corresponding to each process node can be adaptively determined based on the dialogue topic of that process node. For any given process node, the response strategy for that process node is used to characterize the verbal logic and / or information generation method involved in generating a customer service dialogue in response to the input question under that process node.
[0040] The "dialogue logic" represents the pre-defined dialogue flow that a customer service conversation must include. The "information generation method" represents the pre-defined method by which the dialogue content is generated when the pre-defined language model generates the customer service conversation. For example, the information generation method could be that the pre-defined language model generates the customer service conversation by calling a query tool and based on the tool's response. Another example is that the information generation method could be that the pre-defined language model directly generates a customer service conversation that conforms to the dialogue logic based on reference information such as a built-in knowledge base.
[0041] For example, when the process node is a marketing intent node, the corresponding response strategy is a marketing recommendation strategy based on the input question, i.e., information recommendation. The wording logic in this response strategy describes the wording flow when making marketing recommendations. For example, the wording flow is: first, a first wording response to the user's inquiry is generated based on the input question; then, a second wording for information recommendation is generated based on the inquiry; second, a third wording emphasizing the suitability of the recommended content is generated; and finally, a fourth wording indicating whether the user accepts the marketing recommendation is generated. The information generation method in this response strategy can be that a preset language model directly generates customer service dialogue based on reference information such as a built-in knowledge base.
[0042] Step S220: Based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question, determine the target process node corresponding to the input question from multiple process nodes.
[0043] The target process node corresponding to the input question refers to the process node that needs to be referenced when generating the customer service dialogue corresponding to the input question. The response strategy of this target process node enables the preset language model to generate the customer service dialogue corresponding to the input question.
[0044] The target process node can be determined based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question.
[0045] In one alternative implementation, preset process information, contextual dialogue information corresponding to the input question, and question intent corresponding to the input question can be input into a preset language model. This allows the preset language model to determine the target process node corresponding to the input question from the preset process information by analyzing the dialogue content of the contextual dialogue information and the question intent corresponding to the current input question.
[0046] In one alternative implementation, to improve the accuracy of determining the target process node, a first process node related to the question intent and a second process node related to the contextual dialogue information can be determined from the preset process information. Based on the correlation between the first process node and the second process node, the target process node is determined, thereby determining whether to continue maintaining the process segment to which the previous round of dialogue belongs or to start the next dialogue process.
[0047] Accordingly, based on the contextual dialogue information and the question intent corresponding to the input question, the target process node corresponding to the input question is determined from multiple process nodes, including: determining a first process node related to the question intent and a second process node related to the contextual dialogue information from multiple process nodes; determining the process relevance between the first process node and the second process node based on the node order of the first process node and the second process node; and determining the target process node from the first process node and the second process node based on the process relevance.
[0048] This involves matching the intent of the input question with the target of the corresponding process node, thereby determining the first process node based on the matching results. For example, if the intent of the input question is "order query," then the intent can be matched with the target of the corresponding process node based on similarity, and the process node with the highest similarity can be selected as the first process node. For instance, the target of the first process node related to the intent might be "order processing."
[0049] Specifically, when determining the second process node related to the contextual dialogue information, the first N rounds of dialogue information corresponding to the input question can be selected from the contextual dialogue information, the dialogue requirements corresponding to the first N rounds of dialogue information can be extracted, and the dialogue requirements can be matched with the node targets of each process node to obtain the second process node, where N is a natural number.
[0050] For example, the second process node is a process node related to the previous round of dialogue information of the input question. When there is a large amount of contextual dialogue information, determining the process node by selecting only the previous N rounds of dialogue information corresponding to the input question is beneficial for accurately analyzing the flow coherence between the contextual dialogue information and the input question through the first and second process nodes, making the determined target process nodes more accurate.
[0051] Since the multiple process nodes in the preset process information are arranged in a preset node order, the process relevance between the first process node and the second process node can be determined based on the node order of the first process node and the second process node.
[0052] Specifically, the order difference between the first node order of the first process node and the second node order of the second process node can be calculated. The process relevance between the first and second process nodes can be determined based on this order difference. The smaller the order difference, the greater the process relevance between the first and second process nodes, indicating a closer connection in node order between them.
[0053] In one alternative implementation, if the first process node and the second process node have a high degree of process correlation, it indicates that the process coherence between the input question and the context dialogue information is strong, and thus the first process node can be directly used as the target process node.
[0054] Accordingly, based on the process relevance, the target process node is determined from the first process node and the second process node, including: if the process relevance is not less than a preset relevance threshold, the target process node is determined based on the first process node.
[0055] The threshold value of the preset relevant threshold can be adaptively set according to actual needs, and this embodiment does not impose any limitations on it. When the process relevance is not less than the preset relevant threshold, it indicates that the information coherence between the input question and the context dialogue information is stronger. Accordingly, in order to make the generated customer dialogue more consistent with the user's input question intent, the first process node related to the question intent can be directly determined as the target process node, so that the preset language model can generate customer service dialogue according to the response strategy of the first process node.
[0056] In one alternative implementation, if the correlation between the first and second process nodes is low, it indicates poor flow between the input question and the contextual dialogue information, meaning the user may have asked an input question unrelated to the contextual dialogue information. In this case, to ensure the generated customer service dialogue better meets the user's needs, the target process node can be determined by analyzing the user's preferred interaction behavior.
[0057] Accordingly, based on the process relevance, the target process node is determined from the first process node and the second process node, including: when the process relevance is less than a preset relevance threshold, determining the user's preferred interaction behavior for the input question based on the user's interaction behavior information; determining the node priority of the first process node, the second process node, and the third process node whose node order is after the second process node based on the preferred interaction behavior; and determining the target process node based on the process node with the highest node priority.
[0058] User interaction behavior information refers to recordable behavioral data generated by users during their interactions with pre-set systems (intelligent customer service systems, business platforms). This information can include user-initiated actions and records of conversations. In other words, user interaction behavior information includes user action information and / or historical conversation information, such as historical purchase records, triggering actions taken when asking questions, and historical consultation records.
[0059] Preference interaction behavior can include a user's preferred consultation habits and / or their preferred consultation intent. Specifically, a user's preferred consultation habits can be extracted from historical dialogue information in the interaction behavior data. A user's preferred consultation habits characterize the coherence of the questions they ask. For example, if a user frequently asks questions that are not coherent with their previous questions, it indicates poor coherence in their consultations. A user's preferred consultation intent characterizes the type of questions they prefer to ask. For example, a user frequently inquires about the logistics progress after placing an order, indicating a preference for order processing-related questions.
[0060] In one optional implementation, a user's preference consultation intent can be the preference consultation intent corresponding to the user's recent operational behavior. Specifically, by analyzing the information correlation between operational information and historical dialogue information, the user's preference consultation intent for different operational behaviors can be extracted, and thus, the preference consultation intent corresponding to recent operational behaviors can be determined. For example, if a user purchased a certain product two days ago, their preference consultation intent might be an order processing consultation intent.
[0061] Accordingly, after determining the user's preferred interaction behavior, it is possible to determine the node priorities of the first process node, the second process node, and the third process node whose node order is after the second process node.
[0062] The third process node is one or more process nodes in the preset process information whose node order is after the second process node.
[0063] In one alternative implementation, when determining the node priority of each process node, the first priority score of the first process node, the second process node, and the third process node can be determined based on the preference consultation habits in the preference interaction behavior; the second priority score of the first process node, the second process node, and the third process node can be determined based on the preference consultation intent in the preference interaction behavior; and the node priority of the first process node, the second process node, and the third process node can be determined based on the first priority score and the second priority score.
[0064] The first priority score for each process node is related to the coherence of the questions represented by preference consultation habits. For example, when the coherence of the consultation questions represented by preference consultation habits is poor, the first priority score of the first process node is the highest, and the first priority score of the third process node is the lowest. When the coherence of the consultation questions represented by preference consultation habits is good, the first priority score of the second process node is the highest, and the first priority score of the first process node is the lowest.
[0065] The second priority scores of the first, second, and third process nodes are calculated based on the correlation between the node's objective and the intention to seek preference advice. The higher the correlation between the node's objective and the intention to seek preference advice, the higher the node's second priority score.
[0066] After determining the first and second priority scores for each node, corresponding weight values can be assigned to these scores to calculate the total priority score for each process node. The node priority is then determined based on this total priority score. A higher total priority score indicates a higher node priority. Finally, the process node with the highest priority is selected as the target process node.
[0067] In this embodiment of the disclosure, the node priorities of the first process node, the second process node, and the third process node are determined by combining the user's preferred consultation habits and preferred consultation intentions, and the process node with the highest node priority is selected as the target process node. This makes the selected target process node more in line with the user's interaction needs when the flow between the input question and the context dialogue information is poor.
[0068] Step S230: Construct prompt information based on the target process node and the input question, and input the prompt information into the preset language model so that the preset language model can generate a customer service dialogue for the input question according to the response strategy of the target process node.
[0069] For example, prompt information can be constructed based on the target process node, preset process information, contextual dialogue information corresponding to the input question, and the target process node corresponding to the input question. The prompt information is then input into a preset language model, which generates a customer service dialogue for the input question based on the prompt information.
[0070] Specifically, the response strategy corresponding to the target process node can be pre-stored in the preset process information, so that the preset language model can generate a customer service dialogue for the input question based on the response strategy of the target process node. Alternatively, the response strategy corresponding to the target process node can be included as a sub-prompt information in the prompt information, so that the prompt information is input into the preset language model, and the preset language model can generate a customer service dialogue for the input question based on the response strategy of the target node.
[0071] This disclosure provides a method for generating customer service dialogues. First, based on the business scenario corresponding to the input question, preset process information corresponding to the business scenario is obtained. This preset process information includes multiple process nodes; each process node corresponds to a multiple response strategy. Second, based on the contextual dialogue information corresponding to the input question and the question intent, a target process node corresponding to the input question is determined from the multiple process nodes. Finally, prompt information is constructed based on the target process node and the input question, and this prompt information is input into a preset language model, enabling the preset language model to generate a customer service dialogue for the input question based on the response strategy of the target process node. This disclosure eliminates the need to train a natural language model based on labeled data. Instead, it directly determines the process node corresponding to the input question from the preset process information using the contextual dialogue information and the question intent. Based on the guidance of the process node, the preset language model can directly generate a customer service dialogue for the input question according to the response strategy of that process node, improving the accuracy of customer service dialogue generation in various business scenarios.
[0072] The method for generating customer service dialogues according to embodiments of this disclosure will now be described in detail.
[0073] In one alternative implementation, effective actions (i.e., actions with positive feedback) can be selected from the user's feedback status to the customer service actions in the scenario dialogue information to construct process nodes in the preset process information. This avoids interfering or redundant process nodes in the preset process information and improves the accuracy of the preset process information construction.
[0074] Accordingly, the preset process information corresponding to the business scenario is constructed in the following way: obtain the scenario dialogue information corresponding to the business scenario; extract multiple execution actions of the customer service role and the feedback status of the user role for each execution action in the scenario dialogue information; the feedback status is used to characterize the user role's satisfaction with the execution action; determine the execution action with a positive feedback status as the target execution action; construct the preset process nodes in the preset process information based on the target execution action, wherein the node order of the preset process nodes is determined according to the order of appearance of the target execution action in the scenario dialogue information.
[0075] The scenario dialogue information corresponding to the business scenario can be extracted from the historical dialogue information corresponding to the business scenario. For example, the scenario dialogue information can be the dialogue information in the historical dialogue information corresponding to the business scenario whose dialogue score is higher than a preset score threshold.
[0076] The scene dialogue information includes dialogue information for two roles: customer service and user. The actions to be performed by the customer service role can be extracted from their dialogue information across different rounds. For example, if the customer service role's dialogue information in a particular round is "Let me help you check the refund progress based on the provided order number," then the corresponding action would be either order processing or refund progress inquiry.
[0077] Correspondingly, the feedback status of a user's response to an action performed by a customer service representative can be determined, i.e., the user's satisfaction with that action. For example, tone keywords can be extracted from the response dialogue, and the user's satisfaction with the action can be determined based on the feedback type corresponding to the tone keywords, such as positive, negative, or neutral feedback. The more positive the feedback type, the higher the satisfaction level.
[0078] For example, keywords indicating positive feedback can be "okay" or "thank you," keywords indicating negative feedback can be "no need" or "refuse," and keywords indicating neutral feedback can be neutral statements such as "I understand."
[0079] In this context, a positive feedback state indicates that the user's satisfaction with the executed action is higher than a preset satisfaction threshold. Therefore, by identifying the executed action with a positive feedback state as the target executed action, preset process nodes in the preset process information can be constructed based on the target executed action. This ensures that all preset process nodes represent process nodes with high user satisfaction, thereby avoiding interfering or redundant process nodes in the preset process information.
[0080] The order of the preset process nodes is determined based on the order in which the target action appears in the scenario dialogue information. For example, in the scenario dialogue information, the customer service representative's actions are to first conduct an opening inquiry and then process the order; the corresponding preset process nodes could be the opening inquiry node and the order processing node.
[0081] In one alternative implementation, to further improve the accuracy of the generated customer service dialogue, the input question can be matched with a preset question vector in a preset question-answer library. Then, a first customer service dialogue is generated based on the preset answer vector corresponding to the preset question vector with a matching degree greater than a preset matching threshold. The initial customer service dialogue generated by the preset language model is then adjusted based on the first customer service dialogue to obtain the target customer service dialogue for output.
[0082] Accordingly, the preset language model generates a customer service dialogue for the input question based on the response strategy of the target process node, including: the preset language model generates an initial customer service dialogue for the input question based on the response strategy of the target process node; the question vector of the input question is matched with multiple preset question vectors in a preset question-answer library; if the matching degree between the question vector and any preset question vector is greater than a preset matching threshold, a first customer service dialogue is generated based on the preset answer vector corresponding to the preset question vector; the initial customer service dialogue is adjusted based on the first customer service dialogue to determine the target customer service dialogue for output.
[0083] This involves constructing prompts for extracting preset question-answer pairs, inputting these prompts along with a preset document into a large language model to extract question-answer pairs, and then importing the extracted question-answer pairs into a vector library to obtain a preset question-answer library. The prompts for extracting preset question-answer pairs can be:
[0084] You are a question-and-answer pair extraction expert. Your goal is to extract possible questions and answers (QA pairs) from the current input. Please extract according to the following requirements:
[0085] Task requirements: Your questions and answers must be based on user input; you need to consider the beginning, middle, and end of the input when extracting information.
[0086] Extraction steps: Step 1: Extract QA pairs from the input. Step 2: Compare with the user input to determine if the QA pairs meet the task requirements. If they do, output them; otherwise, extract them again.
[0087] Output requirements: Q: The extracted question statement; A: The extracted answer statement.
[0088] Therefore, by performing semantic retrieval on the question vector of the input question in a preset question-and-answer database, that is, matching the question vector with multiple preset question vectors in the preset question-and-answer database, the retrieval score represents the matching degree between the input question vector and the preset question vectors in the preset question-and-answer database. If the matching degree between the question vector and any preset question vector is greater than a preset matching threshold, such as 0.98, then the first customer service dialogue is generated based on the preset answer vector corresponding to that preset question vector.
[0089] In other words, the first customer service dialogue is generated based on the preset answer vectors corresponding to the input question in the preset question and answer database.
[0090] Correspondingly, the initial customer service dialogue generated by the preset language model after inputting prompts can be further adjusted through the first customer service dialogue. For example, the dialogue content of the first customer service dialogue can be added to the initial customer service dialogue. Or, if there is dialogue content in the initial customer service dialogue that is semantically opposite to that of the first customer service dialogue, the corresponding dialogue content in the initial customer service dialogue can be updated based on the first customer service dialogue, thereby obtaining the target customer service dialogue. The target customer service dialogue is the final customer service dialogue output to the user.
[0091] In one alternative implementation, the response strategy for the target process node can be determined based on the node type corresponding to the target process node, so as to adapt the selection of the corresponding response strategy for the target process node.
[0092] The response strategy for the target process node is determined based on the node type corresponding to the target process node: when the node type of the target process node is the first type, the response strategy is the first response strategy of calling the query tool based on the input question; when the node type of the target process node is the second type, the response strategy is the second response strategy of clarifying the intent based on the input question; when the node type of the target process node is the third type, the response strategy is the third response strategy of recommending information based on the input question.
[0093] Among them, the node type corresponding to the process node is used to characterize the node dialogue target, i.e., the dialogue topic, of the dialogue link corresponding to the process node.
[0094] When the node type is Type 1, it indicates that the corresponding dialogue segment involves data processing, querying, and calculation. Therefore, to improve the accuracy of the generated customer service dialogue, a response strategy that calls a query tool can be adopted, i.e., the first response strategy. For example, if a user needs to query an address, the preset language model calls the address query interface, thereby generating a customer service dialogue based on the query result. Correspondingly, Type 1 can be a data processing node type, such as a data query node, a data verification node, or a data calculation node.
[0095] When the node type is Type II, it indicates that the user's intent needs further clarification in the corresponding dialogue. Therefore, to improve the accuracy of the generated customer service dialogue, a response strategy based on clarifying the intent of the input question can be adopted, i.e., the second response strategy. For example, if the user's input question is unclear, the preset language model generates a customer service dialogue to follow up on the intent. Similarly, if the user frequently switches intents, such as stating they wanted to buy a product in the previous round but not in the current round, the preset language model can generate a customer service dialogue to confirm the user's intent. Furthermore, if the user changes the input information, such as modifying previously provided address information, the preset language model can generate a customer service dialogue to confirm the correction and correct the information after user confirmation. Correspondingly, Type II can be information clarification node types, such as nodes clarifying needs, nodes supplementing missing information, information modification nodes, and nodes correcting ambiguous expressions.
[0096] When the node type is the third type, it indicates that the corresponding dialogue segment requires information recommendations to the user, such as product recommendations. Therefore, to improve the accuracy of generating customer service dialogues, a response strategy based on input questions can be adopted, i.e., the third response strategy. For example, if the user's input question indicates that the user is in the demand decision-making stage, a pre-set language model can generate corresponding recommendation information to help the user optimize their decision, such as choosing a suitable product to purchase. Correspondingly, the third type can be a demand recommendation node type, such as decision-making assistance nodes, demand association nodes, and discount information recommendation nodes.
[0097] To facilitate understanding, the specific implementation details of the above implementation method are described below with an example:
[0098] In related technologies, when generating customer service dialogues based on natural language processing technology, the dialogues are typically generated in the following ways. Figure 3 This is a flowchart illustrating the process of generating customer service dialogues in related technologies, referencing... Figure 3 :
[0099] I. Data Preparation and Preprocessing. Natural language dialogue data, such as customer service dialogue text data and question text data, are collected and prepared, and text preprocessing is performed, such as word segmentation, stop word removal, and part-of-speech tagging.
[0100] II. Model Training Based on Processed Data. A machine learning framework is used to train the model, and a test set is used to verify its correctness. This involves testing and analyzing generated incorrect customer service dialogues or misidentified user intents, and adjusting the model's training parameters. A customer service robot is then built based on the trained natural language processing model to improve its accuracy.
[0101] III. Intent Recognition. A trained natural language processing model is used to identify customer intent, which is then matched against a knowledge base for identification, such as order inquiries, technical support requests, and account management.
[0102] 4. Slot Filling. Extract key information from user input and fill it into a predefined template, such as the order number.
[0103] V. Dialogue Management. Responsible for status tracking, strategy selection, and invoking backend services. By recording the user's current request progress and determining the next action based on the dialogue status and the user's request, such as continuing the inquiry via the chatbot, providing answers, or transferring the user to a human agent.
[0104] VI. Natural Language Generation (NLG). After understanding the user's intent and needs, the intelligent customer service system can generate corresponding customer service dialogues and use natural language generation technology to convert the information inside the machine into natural language text or speech and output it to the user.
[0105] The above method of generating customer service dialogues has the following drawbacks:
[0106] 1. High data annotation costs: Data annotation requires labeling data for multiple tasks and training multiple models, including intent recognition models, knowledge base matching models, and ranking models. The cost of data annotation is excessively high. For example, in fields such as finance and automotive, multiple types of data need to be labeled for user intent recognition, user intent matching, and user knowledge base ranking.
[0107] 2. Lack of model versatility: Small models are only suitable for scenarios where data has been trained, making them difficult to apply across multiple scenarios. For example, a task-oriented customer service model in the financial field is difficult to use in the automotive field.
[0108] 3. High maintenance costs: Multiple knowledge bases and complex dialogue tasks need to be maintained to enable dialogue, resulting in huge maintenance costs. For example, in the financial field, different knowledge bases and dialogue tasks need to be maintained for different business scenarios.
[0109] This example provides a method for generating customer service dialogues. It does not require training a natural language model based on labeled data. Instead, it directly determines the process node corresponding to the input question from the contextual dialogue information and the question intent. Based on the process node guidance, the preset language model can directly generate the customer service dialogue for the input question according to the response strategy of that process node, thereby improving the accuracy of customer service dialogue generation in various business scenarios.
[0110] Figure 4 This example provides a flowchart illustrating a method for generating customer service dialogues. (Refer to...) Figure 4 The method includes:
[0111] Step S401: Match the question vector of the input question with multiple preset question vectors in the preset question-and-answer database.
[0112] Step S402: If the matching degree between the question vector and any preset question vector is greater than the preset matching threshold, generate the first customer service dialogue according to the preset answer vector corresponding to the preset question vector.
[0113] To improve the efficiency of generating customer service dialogues, if the matching degree between the question vector and any preset question vector is greater than a preset matching threshold, the first customer service dialogue can be directly used as the target customer service dialogue for output. If the question vector does not match multiple preset question vectors in the preset question-and-answer library, the following steps for generating customer service dialogues from a preset language model are continued.
[0114] Figure 5 This example provides an application diagram illustrating a method for generating customer service dialogues. (Refer to...) Figure 5 For a user's input question query, it is retrieved from a preset question-and-answer library, i.e., a FAQ vector library. Based on the matching score obtained from the retrieval, a judgment is made. If the matching score is greater than a preset matching threshold, the first customer service dialogue is generated and output directly based on the preset answer vector corresponding to the matched preset question vector. If the matching score is less than the preset matching threshold, the step of generating a customer service dialogue by a preset language model, such as a large language model LLM, is continued.
[0115] Step S403: Based on the business scenario corresponding to the input question, obtain the preset process information corresponding to the business scenario. The preset process information includes multiple process nodes; multiple process nodes correspond to multiple response strategies.
[0116] in, Figure 5 The SOP configuration module is used to configure preset process information corresponding to business scenarios. The preset process information corresponding to a business scenario, i.e., the SOP, can be configured manually or extracted from the scenario dialogue information by a preset language model. For example, the preset process information includes: opening inquiry node, identity declaration node, marketing intent node, answering customer questions node, marketing result confirmation node, and ending dialogue node.
[0117] Step S404: Based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question, determine the target process node corresponding to the input question from multiple process nodes.
[0118] Continue to refer to Figure 5 In this step, the planning module can determine the target process node from the preset process information (SOP) corresponding to the business scenario based on the memory information stored in the memory module.
[0119] The memory module can consist of long-term memory and short-term memory. Long-term memory can be stored in a database or business system and may include user interaction information (business data), contextual information of input questions (case trajectory), customer service case data, etc. Short-term memory can be the current dialogue record, which may include the input question of the current dialogue, or it may be a temporary memory update of the customer service dialogue generated by the model for that input question. For example, long-term memory could contain the user's previous purchase records, while short-term memory could contain the input question and the generated customer service dialogue for the current dialogue.
[0120] For example, the process nodes in the preset process information SOP include the identity inquiry node and the intent inquiry node. Once the identity has been identified from the memory module, the planning module guides the next step, which is to determine the target process node as the intent inquiry node.
[0121] Step S405: Construct prompt information based on the target process node and the input question, and input the prompt information into the preset language model so that the preset language model generates the initial customer service dialogue for the input question according to the response strategy of the target process node.
[0122] Reference Figure 5 The prompt module constructs a user prompt by combining the preset process information (SOP), the target process node's name (next_step), the context dialogue information (history), and the input question (query). For example, the prompt could be:
[0123] "{{SOP}}"
[0124] Next step name: {{next_step}}
[0125] Historical Dialogue: {{history}}
[0126] ---------------------
[0127] Input question: {{query}}
[0128] return:
[0129] Furthermore, by passing the prompts to the pre-defined Language Model (LLM), an initial customer service dialogue is generated based on the input question. The LLM's functions include: tool invocation, follow-up clarification, intent switching, and information modification.
[0130] Step S406: Adjust the initial customer service dialogue based on the first customer service dialogue, and determine the target customer service dialogue to be output.
[0131] Reference Figure 5To improve the efficiency of generating customer service dialogues, this step can directly use the initial customer service dialogue generated by the preset language model as the target customer service dialogue output. Alternatively, the initial customer service dialogue can be adjusted based on the first customer service dialogue to obtain the final target customer service dialogue for output.
[0132] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0133] In addition, this disclosure also provides a customer service dialogue generation device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the customer service dialogue generation methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding descriptions in the method section, and will not be repeated here.
[0134] Figure 6 A block diagram of a customer service dialogue generation apparatus provided in an embodiment of this disclosure.
[0135] Reference Figure 6 This disclosure provides an apparatus for generating customer service dialogues, which includes:
[0136] The acquisition module 61 is used to acquire preset process information corresponding to the business scenario based on the business scenario corresponding to the input question. The preset process information includes multiple process nodes; the multiple process nodes correspond to multiple response strategies.
[0137] The determining module 62 is used to determine the target process node corresponding to the input question from the plurality of process nodes based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question;
[0138] The generation module 63 is used to construct prompt information based on the target process node and the input question, and input the prompt information into a preset language model so that the preset language model generates a customer service dialogue for the input question according to the response strategy of the target process node.
[0139] In one optional implementation, the plurality of process nodes are arranged in a preset node order; determining the target process node corresponding to the input question from the plurality of process nodes based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question includes: determining a first process node related to the question intent and a second process node related to the contextual dialogue information from the plurality of process nodes; determining the process relevance between the first process node and the second process node based on the node order of the first process node and the second process node; and determining the target process node from the first process node and the second process node based on the process relevance.
[0140] In one optional implementation, determining the target process node from the first process node and the second process node based on the process relevance includes: when the process relevance is less than a preset relevance threshold, determining the user's preferred interaction behavior corresponding to the input question based on the user's interaction behavior information corresponding to the input question; determining the node priorities of the first process node, the second process node, and the third process node whose node order is after the second process node based on the preferred interaction behavior; and determining the target process node based on the process node with the highest node priority.
[0141] In an optional implementation, the device is further configured to: determine the target process node based on the first process node, provided that the process relevance is not less than a preset relevance threshold.
[0142] In one optional implementation, the preset process information corresponding to the business scenario is constructed in the following way: obtaining scenario dialogue information corresponding to the business scenario; extracting multiple execution actions of the customer service role and the feedback status of the user role for each execution action in the scenario dialogue information; the feedback status is used to characterize the user role's satisfaction with the execution action; determining the execution action with a positive feedback status as the target execution action; and constructing preset process nodes in the preset process information based on the target execution action, wherein the node order of the preset process nodes is determined according to the order in which the target execution action appears in the scenario dialogue information.
[0143] In one optional implementation, the preset language model generates a customer service dialogue for the input question based on the response strategy of the target process node, including: the preset language model generating an initial customer service dialogue for the input question based on the response strategy of the target process node; matching the question vector of the input question with multiple preset question vectors in a preset question-answer library; if the matching degree between the question vector and any preset question vector is greater than a preset matching threshold, generating a first customer service dialogue based on the preset answer vector corresponding to the preset question vector; adjusting the initial customer service dialogue based on the first customer service dialogue to determine the target customer service dialogue for output.
[0144] In one optional implementation, the response strategy for the target process node is determined based on the node type corresponding to the target process node: if the node type of the target process node is a first type, the response strategy is a first response strategy that invokes a query tool based on the input question; if the node type of the target process node is a second type, the response strategy is a second response strategy that clarifies the intent based on the input question; and if the node type of the target process node is a third type, the response strategy is a third response strategy that recommends information based on the input question.
[0145] The modules in the aforementioned customer service dialogue generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0146] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0147] Reference Figure 7 This disclosure provides an electronic device, which includes: at least one processor 701; at least one memory 702; and one or more I / O interfaces 703 connected between the processor 701 and the memory 702; wherein the memory 702 stores one or more computer programs that can be executed by the at least one processor 701, and the one or more computer programs are executed by the at least one processor 701 to enable the at least one processor 701 to perform the above-described customer service dialogue generation method.
[0148] The modules in the aforementioned electronic devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0149] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the aforementioned customer service dialogue generation method. The computer-readable storage medium may be volatile or non-volatile.
[0150] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-described customer service dialogue generation method.
[0151] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0152] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0153] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0154] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0155] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0156] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. 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-readable program instructions.
[0157] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0158] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0160] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A method for generating customer service dialogues, characterized in that, include: Based on the business scenario corresponding to the input question, obtain the preset process information corresponding to the business scenario, the preset process information including multiple process nodes; The multiple process nodes correspond to multiple response strategies; Based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question, the target process node corresponding to the input question is determined from the plurality of process nodes; Based on the target process node and the input question, a prompt message is constructed, and the prompt message is input into a preset language model so that the preset language model generates a customer service dialogue for the input question according to the response strategy of the target process node.
2. The method according to claim 1, characterized in that, The plurality of process nodes are arranged in a preset node order; determining the target process node corresponding to the input question from the plurality of process nodes based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question includes: From the plurality of process nodes, determine a first process node related to the question intent and a second process node related to the contextual dialogue information; Based on the node order of the first process node and the second process node, determine the process relevance between the first process node and the second process node; The target process node is determined from the first process node and the second process node based on the process relevance.
3. The method according to claim 2, characterized in that, Determining the target process node from the first process node and the second process node based on the process relevance includes: If the process relevance is less than a preset relevance threshold, the user's preferred interaction behavior corresponding to the input question is determined based on the user's interaction behavior information corresponding to the input question. Based on the preferred interaction behavior, determine the node priorities of the first process node, the second process node, and the third process node whose node order is after the second process node; The target process node is determined based on the process node with the highest node priority.
4. The method according to claim 3, characterized in that, The method further includes: If the process relevance is not less than a preset relevance threshold, the target process node is determined based on the first process node.
5. The method according to claim 1, characterized in that, The preset process information corresponding to the business scenario is constructed in the following way: Obtain the scene dialogue information corresponding to the business scenario; Extract multiple actions of the customer service role and the feedback status of the user role for each action from the scenario dialogue information; the feedback status is used to characterize the user role's satisfaction with the action. The action with a positive feedback state is identified as the target action. Based on the target action, a preset process node is constructed in the preset process information. The node order of the preset process node is determined according to the order in which the target action appears in the scene dialogue information.
6. The method according to claim 1, characterized in that, The preset language model generates a customer service dialogue for the input question based on the response strategy of the target process node, including: The preset language model generates an initial customer service dialogue for the input question based on the response strategy of the target process node; The question vector of the input question is matched with multiple preset question vectors in a preset question-and-answer database; If the matching degree between the question vector and any preset question vector is greater than a preset matching threshold, a first customer service dialogue is generated based on the preset answer vector corresponding to the preset question vector. Adjust the initial customer service dialogue based on the first customer service dialogue, and determine the target customer service dialogue to be output.
7. The method according to claim 1, characterized in that, The response strategy for the target process node is determined based on the node type corresponding to the target process node: When the node type of the target process node is the first type, the response strategy is the first response strategy of calling the query tool based on the input question; When the node type of the target process node is the second type, the response strategy is a second response strategy that clarifies the intent based on the input question; When the node type of the target process node is the third type, the response strategy is a third response strategy that recommends information based on the input question.
8. A device for generating customer service dialogues, characterized in that, include: The acquisition module is used to acquire preset process information corresponding to the business scenario based on the business scenario corresponding to the input question. The preset process information includes multiple process nodes. The multiple process nodes correspond to multiple response strategies; The determining module is used to determine the target process node corresponding to the input question from the plurality of process nodes based on the contextual dialogue information corresponding to the input question and the question intent corresponding to the input question; The generation module is used to construct prompt information based on the target process node and the input question, and input the prompt information into a preset language model so that the preset language model generates a customer service dialogue for the input question according to the response strategy of the target process node.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the customer service dialogue generation method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating customer service dialogues as described in any one of claims 1-7.
Citation Information
Cited By
Customer service session method and device, computer equipment, storage medium and program product
CN121388125A