Processing method for intelligent customer service dialogue and related product
Patent Information
- Application Number
- CN202311293844.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-10-08
AI Technical Summary
这种方式仅适用于一些固定问题,其在处理复杂问题和实现自然对话方面存在局限性,很难为用户提供及时有效的答复,影响沟通效率
[0022]根据本发明实施方式的用于智能客服对话的处理方法及相关产品,利用预先构建的客户服务领域的问答知识库得到关于用户对话内容的知识库检索结果,并基于大语言模型依据知识库检索结果和提示词来输出对话内容的答案。可以看出,本发明的方案在针对客户服务领域下的用户问询时,可以基于该客户服务领域下的专用问答知识库来提高检索结果的专业性及准确性,并结合提示词和专业性强的知识库检索结果来约束大语言模型,使得大语言模型能够针对具体领域的问题咨询高效地输出准确、专业的答案,提升用户在客服场景下的交互体验。
Smart Images

Figure CN117312521B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence language technology, and more specifically, the embodiments of the present invention relate to a processing method for intelligent customer service dialogue, as well as an electronic device and a computer-readable storage medium for performing the aforementioned processing method. Background Technology
[0002] This section is intended to provide background or context for embodiments of the invention set forth in the claims. The description herein may include concepts that may be explored, but not necessarily concepts that have been previously conceived or explored. Therefore, unless otherwise stated, what is described in this section is not prior art for the purposes of this application's specification and claims, and is not acknowledged as prior art simply by virtue of its inclusion in this section.
[0003] With the rapid development of internet and artificial intelligence technologies, intelligent customer service systems are widely used in various fields to provide more efficient, accurate, and personalized customer service. Currently, most intelligent customer service systems on the market rely on predefined response processes, meaning they pre-set automatic responses for certain questions. This approach is only suitable for a limited number of fixed questions and has limitations in handling complex issues and achieving natural conversations. It is difficult to provide users with timely and effective answers, thus impacting communication efficiency. Summary of the Invention
[0004] The known effectiveness of intelligent dialogue in customer service scenarios is unsatisfactory, which is a very frustrating process.
[0005] Therefore, there is a great need for an improved processing solution for intelligent customer service dialogues, which can provide accurate, professional and efficient answers to user inquiries in customer service scenarios.
[0006] In this context, embodiments of the present invention aim to provide a processing method and related products for intelligent customer service dialogue.
[0007] In a first aspect of the present invention, a processing method for intelligent customer service dialogue is proposed, comprising: in response to obtaining dialogue content of a user in a customer service domain, retrieving the dialogue content in a pre-constructed question-and-answer knowledge base about the customer service domain to obtain knowledge base retrieval results; obtaining prompt words about the customer service domain; and inputting the knowledge base retrieval results and the prompt words into a large language model to output an answer about the dialogue content based on the large language model.
[0008] In one embodiment of the present invention, the pre-built question-and-answer knowledge base regarding the customer service field includes: standard questions and standard answers, wherein the standard questions are associated with the standard answers.
[0009] In another embodiment of the present invention, the standard questions and standard answers are obtained by: obtaining historical dialogue data between users and customer service representatives in the customer service field; obtaining standard questions in the customer service field based on the historical dialogue data; and determining corresponding standard answers based on the standard questions.
[0010] In another embodiment of the present invention, the step of obtaining historical dialogue data between users and customer service representatives in the customer service domain and obtaining standard questions in the customer service domain based on the historical dialogue data includes: performing clustering processing on all the historical dialogue data to obtain different types of actual questions; and generating standard questions corresponding to each type of actual question for each type of actual question.
[0011] In another embodiment of the present invention, determining the corresponding standard answer based on the standard question includes at least one of the following methods: obtaining a standard answer edited based on the standard question; or searching in documents related to business in the customer service field based on the standard question and a semantic similarity algorithm to obtain search results; or generating an original answer based on the standard question using the large language model; and normalizing the search results and / or the original answer to obtain the standard answer.
[0012] In one embodiment of the present invention, retrieving the dialogue content in a pre-built question-and-answer knowledge base concerning the customer service field includes: constructing a conversation between a user and a customer service representative based on the dialogue content, wherein the dialogue content contains multiple user conversations; retrieving standard answers to the multiple user conversations from the question-and-answer knowledge base; storing the standard answers to the multiple user conversations in a knowledge base set corresponding to the conversation, and using the content stored in the knowledge base set as the knowledge base retrieval result.
[0013] In another embodiment of the present invention, constructing a conversation between a user and a customer service representative based on the dialogue content includes: obtaining the timestamp of the dialogue content, the identification information of the user and the customer service representative corresponding to the dialogue content; and constructing the conversation based on the timestamp of the dialogue content, the identification information of the user and the customer service representative, and a pre-set duration.
[0014] In another embodiment of the present invention, retrieving standard answers for the multiple user dialogues in the question-and-answer knowledge base includes: performing semantic similarity retrieval on each user dialogue and standard questions in the question-and-answer knowledge base; retrieving a set of standard questions with semantic similarity values greater than a threshold from the question-and-answer knowledge base; and determining the standard answer for each user dialogue based on the set of standard questions.
[0015] In another embodiment of the present invention, storing the standard answers to the multiple user dialogues into the knowledge base set corresponding to the dialogue includes: synchronously storing the content in the knowledge base set corresponding to the dialogue in memory and in a remote dictionary service.
[0016] In one embodiment of the present invention, obtaining prompt words related to the customer service domain and inputting the knowledge base retrieval results and the prompt words into a large language model includes: generating the prompt words according to the performance requirements of the large language model in the customer service domain; and inputting the knowledge base retrieval results encoded in JSON format along with the prompt words into the large language model.
[0017] In another embodiment of the present invention, generating the prompt word includes: obtaining a pre-set prompt template; obtaining the user's historical dialogue content; and generating the prompt word based on the prompt template, the historical dialogue content, and the knowledge base retrieval results.
[0018] In another embodiment of the present invention, the method further includes: collecting actual questions for which no standard answer can be retrieved from the question-and-answer knowledge base in real time; obtaining the standard question and standard answer corresponding to the collected actual questions; updating the question-and-answer knowledge base based on the standard question and standard answer corresponding to the collected actual questions; and / or obtaining feedback information about the standard answer and updating the question-and-answer knowledge base based on the feedback information.
[0019] In another embodiment of the present invention, the method further includes: performing real-time emotion monitoring on the dialogue content to obtain emotion monitoring results; and selectively activating human assistance based on the emotion monitoring results.
[0020] In a second aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory storing computer instructions for processing intelligent customer service dialogue, wherein when the computer instructions are executed by the processor, the electronic device causes the electronic device to perform the methods described in accordance with the foregoing and the following embodiments.
[0021] In a third aspect of the present invention, a computer-readable storage medium is provided, comprising program instructions for processing intelligent customer service dialogue, which, when executed by a processor, cause the methods described according to the foregoing and the following embodiments to be implemented.
[0022] According to the processing method and related products for intelligent customer service dialogue according to embodiments of the present invention, a pre-built question-and-answer knowledge base in the customer service domain is used to obtain knowledge base retrieval results about the user's dialogue content. Then, based on a large language model, answers to the dialogue content are output according to the knowledge base retrieval results and prompt words. It can be seen that, when dealing with user inquiries in the customer service domain, the solution of the present invention can improve the professionalism and accuracy of the retrieval results based on a dedicated question-and-answer knowledge base in that customer service domain. Furthermore, by combining prompt words and highly professional knowledge base retrieval results, the large language model is constrained, enabling it to efficiently output accurate and professional answers to specific domain-specific inquiries, thereby enhancing the user's interactive experience in customer service scenarios. Attached Figure Description
[0023] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0024] Figure 1 A block diagram schematically illustrates an exemplary computing system 100 suitable for implementing embodiments of the present invention;
[0025] Figure 2 A schematic flowchart of a processing method for intelligent customer service dialogue according to an embodiment of the present invention is shown.
[0026] Figure 3 A schematic flowchart of a processing method for intelligent customer service dialogue according to another embodiment of the present invention is shown.
[0027] Figure 4 A schematic flowchart of a processing method for intelligent customer service dialogue according to yet another embodiment of the present invention is shown.
[0028] Figure 5 A schematic flowchart illustrating a processing method for intelligent customer service dialogue according to another embodiment of the present invention is shown; and
[0029] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown.
[0030] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0031] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0032] Figure 1 A block diagram of an exemplary computing system 100 suitable for implementing embodiments of the present invention is shown. For example... Figure 1 As shown, the computing system 100 may include: a central processing unit (CPU) 101, random access memory (RAM) 102, read-only memory (ROM) 103, a system bus 104, a hard disk controller 105, a keyboard controller 106, a serial interface controller 107, a parallel interface controller 108, a display controller 109, a hard disk 110, a keyboard 111, a serial external device 112, a parallel external device 113, and a display 114. Among these devices, the CPU 101, RAM 102, ROM 103, hard disk controller 105, keyboard controller 106, serial controller 107, parallel controller 108, and display controller 109 are coupled to the system bus 104. The hard disk 110 is coupled to the hard disk controller 105, the keyboard 111 is coupled to the keyboard controller 106, the serial external device 112 is coupled to the serial interface controller 107, the parallel external device 113 is coupled to the parallel interface controller 108, and the display 114 is coupled to the display controller 109. It should be understood that... Figure 1 The structural block diagrams described are for illustrative purposes only and are not intended to limit the scope of the invention. In some cases, certain devices may be added or removed depending on the specific circumstances.
[0033] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," "unit," or "system." Furthermore, in some embodiments, the present invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0034] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0035] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0036] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0037] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed 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 remote computers, the remote computer can 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 it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0038] Embodiments of the present invention will now be described with reference to flowchart illustrations and block diagrams of apparatus (or systems) according to embodiments of the invention. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer 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 that, when executed by the computer or other programmable data processing apparatus, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0039] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0040] Computer 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, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0041] According to embodiments of the present invention, a processing method and related products for intelligent customer service dialogue are proposed. Furthermore, the number of any elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0042] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments. Invention Overview
[0043] The inventors discovered that current intelligent dialogue systems in customer service scenarios are not performing ideally. Traditional intelligent dialogue technologies primarily use predefined response processes to handle user inquiries. Specifically, this technology mainly defines question responses through methods such as collecting nodes, judging nodes, querying nodes, and responding nodes.
[0044] Let's take "answering whether the user is in working hours" as an example to illustrate how to predefine the response process:
[0045] Collection nodes need to be set up for "API returns data", "API returns no data", and "API returns an error". For the "API returns data" node, a judgment node for "whether it is working hours" should be set up, as well as query nodes for "working hours" and "non-working hours". For "working hours", a "transfer to human operator" response node should be set up, and for "non-working hours", a "bot response" response node should be set up. For the "API returns no data" and "API returns an error" collection nodes, a response node for "API returns no data" can be set up.
[0046] Even for simple questions like "Is the user at work?", extensive manual configuration and design are required beforehand to accommodate potential problems and scenarios. This technology relies on technicians creating a separate response process for each possible question and often only handles specific types or a limited range of known questions, making it difficult to adapt to the diverse semantic expressions and rapidly changing nature of new questions. In particular, when user questions contain ambiguity, multiple meanings, unclear or incomplete semantics, it may be impossible to accurately understand the user's precise intent, let alone provide an accurate answer.
[0047] It can be seen that the existing technology has at least the following problems:
[0048] 1) Configuring customized solution processes for different problems requires a significant workload. As the business scope expands and products are updated and iterated, maintenance costs will also increase accordingly, and it will be difficult to meet highly dynamic and personalized needs.
[0049] 2) The inability to achieve intelligent dialogue interaction based on user questions can easily result in stiff and unnatural responses. Furthermore, existing technologies often only output pre-set answers, lacking flexibility and specificity, and are more prone to misleading responses in complex contexts.
[0050] 3) Many customer service scenarios cannot resolve user issues, resulting in a high rate of referrals to human agents. When encountering issues not covered by pre-defined solutions or outside the scope of the response design, it is necessary to transfer the user to a human agent, leading to increased labor costs and reduced processing efficiency.
[0051] With the rapid development of artificial intelligence technology, related technologies have also emerged that utilize large language models to achieve intelligent customer service dialogue. This technology primarily builds upon general-purpose large language models, fine-tuning a pre-trained model using a large amount of customer dialogue data to adapt it to specific customer service scenarios. However, in practical applications, the collection and cleaning of high-quality customer service dialogue data is complex, making it difficult to obtain a large amount of effective data to train the large language model. This makes the training and fine-tuning process challenging to implement. Furthermore, due to the diversity and complexity of questions in customer service scenarios, even a fine-tuned model may not be able to respond flexibly, resulting in a poor user experience.
[0052] In response, the inventors discovered that they could break away from the traditional approach of using predefined dialogue processes and training models with training data to achieve intelligent dialogue. They constructed a dedicated question-and-answer knowledge base and used the retrieval results from this knowledge base and relevant prompts in the customer service domain to constrain the large language model. This enabled the large language model to learn knowledge related to the customer service domain and provide accurate, professional, and efficient answers to user inquiries in customer service scenarios based on the output of the large language model.
[0053] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below. Exemplary methods
[0054] The following is for reference. Figure 2 This section describes a processing method for intelligent customer service dialogue according to an exemplary embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to any applicable scenario.
[0055] Figure 2 A schematic flowchart of a processing method 200 for intelligent customer service dialogue (hereinafter referred to as processing method 200) according to an embodiment of the present invention is shown.
[0056] like Figure 2 As shown, in step S201, in response to obtaining the user's dialogue content in the customer service domain, the dialogue content can be retrieved from a pre-built question-and-answer knowledge base about that customer service domain to obtain the knowledge base retrieval results. The customer service domain here can involve any customer service interaction scenario requiring human-computer dialogue in any field, such as various human-computer dialogue customer service interaction scenarios in finance, healthcare, or other business domains.
[0057] In some embodiments, a question-and-answer knowledge base can be pre-built for different customer service domains within a specific business. In some implementation scenarios, this knowledge base may include a database storing structured or semi-structured knowledge. For example, the knowledge base can store knowledge in structured formats such as tree structures, graph structures, or relational databases, or in a semi-structured format such as documents. It should be noted that the detailed description of the question-and-answer knowledge base here is merely illustrative; the specific storage format of knowledge in the knowledge base can be set and adjusted according to the needs of the business scenario.
[0058] In this embodiment, the question-and-answer knowledge base may include various question-and-answer information related to the customer service field. When the user's dialogue content is obtained, the dialogue content can be searched in the dedicated question-and-answer knowledge base to retrieve content related to the dialogue content as the knowledge base search results.
[0059] In step S202, prompts related to the customer service domain can be obtained. These prompts can include information relevant to the customer service domain and used to guide the large language model to generate specific types or styles of responses. The specific content of the prompts is not limited here and can be set according to business needs.
[0060] In step S203, the aforementioned knowledge base retrieval results and prompt words can be input into the Large Language Model (LLM) to output answers about the dialogue content based on the LLM. The Large Language Model (LLM) can include general-purpose deep learning models with natural language understanding and generation capabilities. For example, the LLM could include chatbot models obtained through pre-training a Transformer model. General-purpose LLMs are only suitable for simple, general question-and-answer dialogues and cannot handle the dialogue needs of specific domains such as customer service. Here, the LLM is constrained by knowledge base retrieval results and prompt words that are highly relevant to specific domains such as customer service, enabling the LLM to effectively learn relevant knowledge in the customer service domain. This allows the LLM to provide accurate, professional, and efficient answers to user inquiries in customer service scenarios based on its output.
[0061] Therefore, when responding to user inquiries in the customer service domain, there's no need to follow a predefined response process or further fine-tune the large language model and use the fine-tuned model to respond. Instead, a dedicated question-and-answer knowledge base is used to obtain highly specialized knowledge retrieval results relevant to the user's dialogue. This, combined with prompts that standardize the response content, constrains the general large language model, enabling it to learn customer service-related knowledge. This ensures that the large language model can efficiently output accurate and professional answers to user inquiries in customer service scenarios. This not only breaks through the traditional mindset of using predefined dialogue processes and training models with training data to achieve intelligent dialogue, providing a new approach to intelligent dialogue implementation, but also demonstrates strong practicality, good implementation results, and significant market potential.
[0062] Figure 3 A schematic flowchart of a processing method 300 for intelligent customer service dialogue (hereinafter referred to as processing method 300) according to another embodiment of the present invention is shown. It is understood that processing method 300 is... Figure 2 Further limitations and / or extensions to the processing method 200. Therefore, the foregoing is combined with Figure 2 The relevant detailed descriptions also apply to the following text.
[0063] In this embodiment, a question-and-answer knowledge base specifically for the customer service domain can be pre-built, and then intelligent customer dialogue processing can be achieved based on this question-and-answer knowledge base combined with a large language model.
[0064] As mentioned earlier, the customer service domain here can encompass any customer service interaction scenario that requires human-computer dialogue. For these different customer service domains, a corresponding question-and-answer knowledge base can be built.
[0065] In this embodiment, the question-and-answer knowledge base may contain standard questions and standard answers related to the customer service field, with the standard questions associated with the standard answers. Due to the diversity of user questions, the semantic relevance between actual user questions and answers may be very low. If the question-and-answer knowledge base is directly constructed based on user questions and answers, the subsequent retrieval performance based on this knowledge base will be poor. After extensive research, it was found that by "standardizing" actual user questions, various questions for a particular answer can be "standardized" into a single standard question. In other words, a set of actual questions for a particular answer can be associated with a standard question, and this standard question can be associated with the standard answer, thereby significantly increasing the semantic relevance between questions and answers.
[0066] The standard questions and answers mentioned above can be obtained in a variety of ways. Figure 3Steps S301 to S303 exemplarily illustrate one specific implementation. For example... Figure 3 As shown, in step S301, historical dialogue data between users and customer service representatives can be obtained. This historical dialogue data can be retrieved from anonymized historical data, or it can be filtered from publicly available data related to customer service. Compared to the filtering of high-quality customer service dialogue data used as training data in related technologies, the process of obtaining historical dialogue data between users and customer service representatives is much easier. For example, common data filtering methods (such as web scraping techniques) can be used to filter historical data to include dialogue records between users and customer service representatives.
[0067] In some embodiments, after obtaining historical dialogue data between users and customer service representatives, this data can be further organized and extracted to obtain more effective historical dialogue data. For example, dialogue records between users and customer service representatives can be extracted from historical data. These dialogue records contain a large number of user questions and customer service responses, which are the foundational data for building a question-and-answer knowledge base. Furthermore, semantic analysis can be performed on keywords, phrases, and questions in the dialogue records to better organize and extract this data. Table 1 below exemplarily shows user questions extracted from historical dialogues: How to log in to the premium course app Where can I buy courses? How to purchase courses Where to register for courses iPad login premium courses How to log in to premium courses on a tablet Table 1
[0068] In step S302, standard questions in the customer service domain can be obtained based on the aforementioned historical dialogue data. In some embodiments, all historical dialogue data can be clustered to obtain different categories of actual questions, and standard questions corresponding to each category of actual questions can be generated. For example, some general semantic similarity algorithms can be used to automatically aggregate similar user questions extracted from historical dialogue data.
[0069] Specifically, semantic similarity between different user queries can be calculated using natural language processing techniques such as word vectors and semantic networks. Then, user queries with high similarity can be grouped into one category (i.e., actual questions) based on a threshold. This threshold can be adjusted according to business needs.
[0070] Table 2 below provides examples of practical and standard questions obtained from automatic clustering of historical dialogue data: How to register for courses Where can I buy courses? How to register for courses How to purchase courses How to register for courses Where to register for courses How to log in to the premium course APP How to log in to the premium course app How to log in to the premium course APP iPad login premium courses How to log in to the premium course APP How to log in to premium courses on a tablet Table 2
[0071] As shown in Table 2, the automatic aggregation of similar user questions can significantly reduce the workload of manual classification and increase the speed of building the question-and-answer knowledge base. Furthermore, it facilitates the discovery of potential hot topics and user concerns, enabling targeted optimization of service strategies. It should be noted that the detailed description of the standard question acquisition process described above is merely illustrative, and the solution of this invention is not limited thereto.
[0072] After obtaining the standard question, in step S303, the corresponding standard answer can be determined based on the standard question. In practical applications, the standard answer corresponding to the standard question can be determined in various ways. For example, in some embodiments, the standard answer edited based on the standard question can be obtained. Specifically, a standard answer editing interface (e.g., a voice information input interface, a text information data interface, etc.) can be provided to collect the standard answer edited by a person for the standard question.
[0073] In other embodiments, the search can be performed on business-related documents in the customer service field based on standard questions and semantic similarity algorithms to obtain search results. The search results can then be normalized to obtain the corresponding standard answers. For example, relevant information can be retrieved from documents such as product manuals, user guides, operation manuals, and FAQs using distance similarity algorithms. The search results can then be normalized manually or by combining predefined processing operations (such as deduplication and typo correction).
[0074] In some other embodiments, for simple or general questions (such as common sense questions), a standard question can be input into a large language model, which will then automatically generate the standard answer. Of course, multiple or all of the above methods can be combined to determine the standard answer.
[0075] Table 3 below provides an example of the standard answers to standard questions: Table 3
[0076] In step S304, a question-and-answer knowledge base for the customer service domain can be constructed based on standard answers and standard questions. As shown in Table 3, the standard answers and standard questions in the question-and-answer knowledge base can be stored in a structured manner. Of course, the specific construction method of the question-and-answer knowledge base is not limited here; it can be designed according to the complexity of the business. For example, different structures such as tree structures, graph structures, and relational databases can be used to construct the question-and-answer knowledge base. The specific structure of the question-and-answer knowledge base can be selected according to the complexity and requirements of the business scenario. For example, for business scenarios involving multi-level relationships, a graph structure question-and-answer knowledge base can be considered. Furthermore, the construction process of the question-and-answer knowledge base can also adopt automated and / or semi-automated construction methods to improve the efficiency and quality of knowledge base construction.
[0077] Furthermore, the aforementioned question-and-answer knowledge base can be updated based on actual needs. In some embodiments, actual questions for which no standard answer can be retrieved from the question-and-answer knowledge base can be collected in real time, and the standard questions and answers corresponding to the collected actual questions can be obtained. Then, the question-and-answer knowledge base is updated based on the standard questions and answers corresponding to the collected actual questions. For example, during the construction of the question-and-answer knowledge base, problems may arise where user questions cannot be matched with answers. For these problems, they can be collected in real time, and similar questions can be pre-aggregated in the manner described in step S302 to supplement the answers.
[0078] In other embodiments, feedback information regarding standard answers in the question-and-answer knowledge base can also be obtained, and the knowledge base can be updated based on this feedback. For example, user feedback and / or customer service evaluations of the standard answers can be obtained, and the standard answers can be optimized based on this feedback to improve their accuracy and usability.
[0079] After the question-and-answer knowledge base is constructed, in step S305, in response to obtaining the dialogue content of users in the customer service field, the dialogue content can be retrieved in the pre-constructed question-and-answer knowledge base about the customer service field to obtain the knowledge base retrieval results.
[0080] In some embodiments, similarity algorithms can be used to search for information related to the dialogue content in a question-and-answer knowledge base. For example, the question-and-answer knowledge base contains a standard set of questions. The user's dialogue (or user questions extracted from the dialogue) can be semantically matched with the standard set of questions. Knowledge base content with a semantic similarity greater than a certain threshold can be retrieved and added to the knowledge base set of the current session. When performing question-and-answer knowledge base retrieval, similarity algorithms such as embedding, Word2Vec, and GloVe (Global Vectors for Word Representation) can be used. Other methods include keyword matching, vector similarity calculation, and deep learning-based retrieval algorithms. These methods can be selected and combined according to actual needs and scenarios to improve retrieval accuracy and practicality.
[0081] It should be noted that the threshold here can be set and adjusted according to actual needs. Generally speaking, for business scenarios that require precise answers to questions, a higher threshold should be set to ensure the accuracy of the corresponding standard answer through the strong correlation between the actual question and the standard question. For some business scenarios that do not require precise answers, the threshold can be lowered, so that a standard question can be associated with more actual questions, and thus a standard answer can be applied to more actual questions.
[0082] In some embodiments, each user's dialogue can trigger a retrieval of the question-and-answer knowledge base. The topics covered in a user's dialogue may jump back and forth; for example, a user might initially ask about product information, then inquire about logistics, and then return to the product topic. In this case, knowledge base content can be layered to better meet the user's cross-topic needs. Based on the layered knowledge base content (i.e., the knowledge base set), a conversation between the user and customer service can be constructed, binding the layered knowledge base content to a single conversation. Subsequently, the knowledge base content relevant to this conversation can be submitted to the large language model. This not only saves the cost of calling the large language model but also improves the accuracy of the large language model's response because the given knowledge base content is highly relevant to the current conversation.
[0083] After obtaining the knowledge base retrieval results, in step S306, the knowledge base retrieval results and prompt words can be input into the large language model to output answers about the dialogue content based on the large language model. Adding prompt words to the input of the large language model allows it to act as an intelligent customer service representative, enabling multi-turn dialogues. Furthermore, adding knowledge base retrieval results to the input allows the large language model to refer to the knowledge base content when generating answers, thereby improving the professionalism and accuracy of the responses.
[0084] Figure 4 A schematic flowchart of a processing method 400 for intelligent customer service dialogue (hereinafter referred to as processing method 400) according to another embodiment of the present invention is shown. It is understood that processing method 400 is... Figure 2 Processing method 200 and Figure 3 Further limitations and / or extensions to the processing method 300. Therefore, the foregoing combined Figure 2 and Figure 3 The relevant detailed descriptions also apply to the following text.
[0085] like Figure 4 As shown, in step S401, a conversation between the user and customer service can be constructed based on the obtained user dialogue content in the customer service domain. This dialogue content contains multiple user conversations, and the topics discussed in these conversations may jump around. At this point, a conversation between the user and customer service can be constructed to bind the relevant search results of these user conversations to the conversation.
[0086] In some embodiments, the timestamp of the conversation content, the identification information of the user and customer service corresponding to the conversation content, can be obtained, and a session can be constructed based on the timestamp of the conversation content, the identification information of the user and customer service, and a pre-set duration. Specifically, the identification information of a session can be constructed based on the timestamp of the conversation content and the identification information of the user and customer service corresponding to the conversation content. For example, the customer service ID, the user ID, and the timestamp can be used as the identifier of a session, and the duration of each session can be controlled to a pre-set duration, that is, a new session is established at each pre-set duration interval. The pre-set duration can be adjusted according to specific business scenarios. For example, the pre-set duration can be determined by combining historical data analysis (e.g., if the average response time between the user and customer service does not exceed a certain duration, the pre-set duration can be determined based on the average response time, etc.). In addition, the identification information of the user and customer service is not limited to ID information, but can also be other information that can distinguish identities.
[0087] In step S402, standard answers to multiple user dialogues can be retrieved from the question-and-answer knowledge base. For details regarding the construction of the question-and-answer knowledge base and related aspects, please refer to the preceding text. Figure 2 and Figure 3The relevant descriptions will not be repeated here. When using this question-and-answer knowledge base for retrieval, each user dialogue can trigger a search of the knowledge base. Specifically, semantic similarity can be performed between each user dialogue and standard questions in the knowledge base. A set of standard questions with semantic similarity values greater than a threshold is retrieved from the knowledge base, and a standard answer for each user dialogue is determined based on this set of standard questions. During semantic similarity retrieval, any or a combination of similarity retrieval methods can be used to ensure the accuracy of the retrieval results.
[0088] In step S403, the standard answers to the aforementioned multiple user dialogues can be stored in the knowledge base set corresponding to the session, and the content stored in the knowledge base set can be used as the knowledge base retrieval results. Each session can be bound to a knowledge base set, and the question-and-answer knowledge base needs to be retrieved based on the user dialogue to store all retrieval results related to this session based on the knowledge base set. Of course, the knowledge base set is not limited to storing standard answers; it can also store corresponding standard questions, etc.
[0089] Furthermore, in some embodiments, the content of the knowledge base set corresponding to the session can be synchronously stored in memory and a remote dictionary service to enable fast retrieval.
[0090] In step S404, prompt words can be generated based on the performance requirements of the large language model in the customer service field, so as to guide the large language model to play the role of intelligent customer service and realize intelligent dialogue.
[0091] In step S405, the knowledge base retrieval results can be encoded in JSON format and input along with prompt words into the large language model. In some embodiments, the knowledge base retrieval results can be encoded in JSON format and input along with user questions, prompt words, etc., into the relevant parameters of the large language model (e.g., user parameters, assistant parameters, etc.) to guide the large language model to output professional and accurate answers. It should be noted that the specific format of the knowledge base retrieval results is not limited here; the format can be adjusted according to the large language model's requirements for the input data format.
[0092] Figure 5 A schematic flowchart of a processing method 500 for intelligent customer service dialogue (hereinafter referred to as processing method 500) according to another embodiment of the present invention is shown. It is understood that method processing 500 is... Figure 2 Processing method 200 Figure 3 Processing method 300, or Figure 4 Further limitations and / or extensions to the processing method 400. Therefore, the foregoing combined Figure 2 , Figure 3and Figure 4 The relevant detailed descriptions also apply to the following text.
[0093] like Figure 5 As shown, in step S501, a question-and-answer knowledge base for the customer service domain can be pre-built, and in step S502, in response to obtaining the dialogue content of users in the customer service domain, the dialogue content can be retrieved from the question-and-answer knowledge base to obtain the knowledge base retrieval results. It should be noted that the specific execution process of steps S501 and S502 can be referred to the preceding text. Figures 2-4 The detailed descriptions of the relevant parts will not be repeated here.
[0094] In addition, this embodiment can also acquire prompts related to customer service. For example, prompts can be generated based on a prompt generation strategy. This strategy may include guiding the large language model to understand user intent, thereby generating responses relevant to user needs. Specifically, this requires guiding the large language model to analyze user queries (e.g., extracting key information such as keywords, entities, and intents). Furthermore, when the information provided by the user is insufficient, the prompts need to guide the large language model to proactively ask the user questions to collect more key information. By proactively asking questions, the large language model can better understand user needs, thereby improving the quality of responses. Moreover, after collecting sufficient user information, the prompts need to guide the large language model to generate responses matching the most relevant answers based on knowledge base retrieval results, resulting in accurate, coherent, and natural responses.
[0095] In practical applications, prompt words can be generated through step S503. Specifically, in step S503, a pre-set prompt template and the user's historical dialogue content can be obtained, and prompt words can be generated based on the prompt template, historical dialogue content, and knowledge base retrieval results. The prompt template can be used to define the layout and format of each part of the prompt words, such as defining which parts are fixed and which parts can be adjusted according to actual needs. In some embodiments, the user's historical dialogue content and knowledge base retrieval results can be added to the prompt template to obtain the prompt words. Based on these prompt words, the large language model can be guided to learn and analyze relevant content in the question-and-answer knowledge base, and can be guided to generate responses of specific types or styles.
[0096] In step S504, the knowledge base retrieval results can be encoded in JSON format and input into the large language model along with prompt words, so as to output a professional and accurate answer about the dialogue content based on the large language model.
[0097] Furthermore, this embodiment can also monitor the user's dialogue content and analyze the user's emotional changes throughout the intelligent dialogue process. Specifically, in step S505, the dialogue content can be monitored for emotions in real time to obtain emotion monitoring results, and human assistance can be selectively activated based on the emotion monitoring results.
[0098] Specifically, user emotions can be determined in real-time through analysis of dialogue content, such as keyword, semantic, and contextual analysis. For example, when a user uses negative vocabulary or expresses dissatisfaction with a question's answer, it can be determined that the user may be in an agitated or dissatisfied emotional state. When user emotional instability is detected, a preset emotion threshold can be used to determine whether to switch the conversation to a human customer service representative. For example, when a user's emotion index exceeds a certain threshold, the user can be automatically connected to a human customer service representative for better problem-solving. In addition, user feedback can also be used to determine their emotions. For example, when a user repeatedly asks the same question or expresses dissatisfaction with the answer, it can be determined that the user may be dissatisfied with the intelligent customer service response, and the user can be prompted to switch to a human customer service representative for more efficient communication. It should be noted that the description of the emotion analysis process for dialogue content here is only an illustrative example. To accurately determine user emotions, one or more of the above analysis methods can be combined, or large language models can be used for emotion analysis.
[0099] As can be seen from the above embodiments, the technical solution of the present invention has the following advantages: 1) It effectively combines intelligent customer service systems with large language models (such as chatbot models), improving the quality of responses and making customer service consultations more accurate, professional, and efficient, thus meeting user needs; 2) It has strong processing capabilities for complex questions and multi-turn dialogue scenarios, effectively improving user experience. Specifically, by combining question-and-answer knowledge bases with large language model technology, the large language model can understand user context, provide personalized services, reduce repetitive questions during consultations, and improve communication efficiency; 3) It can reduce configuration costs and improve system flexibility and scalability. Specifically, the implementation process of the technical solution of this invention can be appropriately adjusted and expanded according to actual business needs to reduce the cost of human resources and hardware investment for enterprises; 4) It can reduce the cost of customer service workers for enterprises, allowing them to reduce their reliance on human customer service, reduce labor costs, and improve customer service efficiency, thereby optimizing the allocation of customer service resources; 5) It can improve customer satisfaction by quickly responding to user needs, reducing user waiting time, and providing timely and accurate solutions, thereby improving customer satisfaction and enhancing the enterprise's brand image; 6) It supports multilingual and multi-channel access, enabling enterprises to better expand their business scope and cover a wider user group, thereby improving market competitiveness; 7) With the continuous updating of question-and-answer knowledge base and large language model technology, the intelligent customer service technology of this invention has the ability to learn and evolve on its own. Over time, its service quality and accuracy will continue to improve, bringing greater value to enterprises. Exemplary device
[0100] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 6 The present invention describes related products for processing intelligent customer service dialogue according to exemplary embodiments of the present invention.
[0101] Figure 6 A schematic block diagram of an electronic device 600 according to an embodiment of the present invention is shown. Figure 6 As shown, the electronic device 600 may include a processor 601 and a memory 602. The memory 602 stores computer instructions for processing intelligent customer service dialogue. When these computer instructions are executed by the processor 601, the electronic device 600 performs actions according to the preceding description. Figures 2-5The described method, for example, in some embodiments, allows the electronic device 600 to construct a question-and-answer knowledge base related to customer service, retrieve dialogue content from the pre-constructed knowledge base, generate prompts, use the knowledge base retrieval results and prompts as input to a large language model, output answers about the dialogue content based on the large language model, and monitor the emotions of the dialogue content, etc. Based on this, the electronic device 600 can break through the traditional approach of using predefined dialogue flows and training models with training data to achieve intelligent dialogue, construct a dedicated question-and-answer knowledge base, and constrain the large language model based on the retrieval results of this knowledge base and prompts related to the customer service domain. This allows the large language model to learn knowledge related to the customer service domain, thereby providing accurate, professional, and efficient answers to user inquiries in customer service scenarios based on the output of the large language model.
[0102] It should be noted that although several devices or sub-devices of the device have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more devices described above can be embodied in one device. Conversely, the features and functions of one device described above can be further divided and embodied by multiple devices.
[0103] The use of the verbs "including" and "contains" and their inflections in the application documents does not preclude the existence of elements or steps other than those described in the application documents. The article "a" or "one" preceding an element does not preclude the existence of multiple such elements.
[0104] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.
Claims
1. A method for processing intelligent customer service dialogues, characterized in that, include: In response to obtaining the dialogue content of users in the customer service field, the dialogue content is retrieved in a pre-built question and answer knowledge base about the customer service field to obtain the knowledge base retrieval results. The question and answer knowledge base includes standard questions and standard answers. The standard questions are associated with the standard answers. The standard questions are generated by clustering historical dialogue data between users and customer service in the customer service field, classifying similar user actual questions, and generating standard questions corresponding to each category of actual questions. Based on the dialogue content, a conversation between the user and customer service is constructed, wherein the dialogue content contains multiple user conversations; and wherein the topics involved in the user conversations jump back and forth; standard answers about the multiple user conversations are retrieved from the question-and-answer knowledge base; and the standard answers about the multiple user conversations are stored in the knowledge base set corresponding to the conversation, and the content stored in the knowledge base set is used as the knowledge base retrieval result; The process of constructing a conversation between a user and a customer service representative based on the dialogue content includes: obtaining the timestamp of the dialogue content, the identification information of the user and the customer service representative corresponding to the dialogue content; and constructing the conversation based on the timestamp of the dialogue content, the identification information of the user and the customer service representative, and a pre-set duration. Obtain prompts related to the customer service domain, wherein the prompts include information relevant to the customer service domain and used to guide the large language model to generate responses of a specific type or style; and The knowledge base retrieval results and the prompt words are input into a large language model to output an answer about the dialogue content based on the large language model. The large language model is a general-purpose large language model that does not require fine-tuning for the customer service domain.
2. The processing method according to claim 1, characterized in that, The standard questions and answers were obtained through the following methods: Obtain historical dialogue data between users and customer service representatives in the aforementioned customer service domain; and Based on the historical dialogue data, standard questions in the customer service domain are obtained; The standard answer is determined based on the standard question.
3. The processing method according to claim 2, characterized in that, Determining the standard answer based on the standard question includes at least one of the following methods: Obtain the standard answer based on the standard question; or Based on the standard question and semantic similarity algorithm, a search is performed on documents related to business in the customer service domain to obtain search results; or The original answer is generated based on the standard question using the large language model. The search results and / or original answers are standardized to obtain the standard answer.
4. The processing method according to claim 1, characterized in that, Retrieving standard answers to the multiple user dialogues from the question-and-answer knowledge base includes: Perform semantic similarity retrieval between each user dialogue and the standard questions in the question-and-answer knowledge base; A set of standard questions with semantic similarity values greater than a threshold is retrieved from the question-and-answer knowledge base, and a standard answer for each user dialogue is determined based on the set of standard questions.
5. The processing method according to claim 1, characterized in that, Storing the standard answers to the multiple user dialogues into the knowledge base set corresponding to the dialogue includes: The content of the knowledge base set corresponding to the session is synchronously stored in memory and a remote dictionary service.
6. The processing method according to claim 1, characterized in that, Obtaining prompts related to the customer service domain, and inputting the knowledge base retrieval results and the prompts into a large language model, including: Based on the performance requirements of the large language model in the customer service domain, the prompt words are generated; and The knowledge base retrieval results are encoded in JSON format and input into the large language model along with the prompt words.
7. The processing method according to claim 6, characterized in that, Generating the prompt words includes: Get the pre-set prompt template; Obtaining the user's historical conversation content; and The prompt words are generated based on the prompt template, the historical dialogue content, and the knowledge base retrieval results.
8. The processing method according to claim 1, characterized in that, The method further includes: Real-time collection of actual questions for which no standard answer can be retrieved from the question-and-answer knowledge base; Obtain the standard questions and standard answers corresponding to the collected actual questions; The question-and-answer knowledge base is updated based on the standard questions and answers corresponding to the collected actual questions; and / or Obtain feedback information regarding the standard answer, and update the question-and-answer knowledge base based on the feedback information.
9. The processing method according to any one of claims 1 to 8, characterized in that, The method further includes: Real-time emotion monitoring of the dialogue content to obtain emotion monitoring results; and Based on the emotion monitoring results, human assistance may be selectively activated.
10. An electronic device, characterized in that, include: processor; as well as A memory storing computer instructions for processing intelligent customer service dialogues, which, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1-9.
11. A computer-readable storage medium, characterized in that, The system includes program instructions for processing intelligent customer service dialogues, which, when executed by a processor, cause the method according to any one of claims 1-9 to be implemented.
Citation Information
Patent Citations
Robot answering method and device based on system function grammar
CN108090174A
Control method and control device of intelligent dialogue system and electronic equipment
CN116521893A
