Customer service verbal skill recommendation method, device and equipment and storage medium
Patent Information
- Application Number
- CN202410718645.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
Due to the limitations of the static vocabulary library and the lack of personalized services, traditional customer service vocabulary recommendation assistants cannot effectively respond to complex and personalized user needs. As a result, service content cannot be updated in a timely manner and cannot provide a deeply personalized interactive experience.
By obtaining the text content of the preset knowledge document for vectorization processing, a vector database is formed, and the vectorization model is used to match user questions. Combined with the user's historical context and reference information, a large language model is used to dynamically generate recommended words to achieve real-time retrieval and personalization. services.
It improves the accuracy and relevance of the customer service platform's answers to user questions, enables it to flexibly respond to changing user inquiries, provides highly personalized services, and improves user satisfaction and service efficiency.
Smart Images

Figure CN118568248A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a customer service speech recommendation method, device, equipment and storage medium. Background Art
[0002] In today's rapidly developing digital age, the interactions between companies and customers are becoming increasingly frequent and complex. High-quality customer service has become the key for companies to enhance their brand image and increase user satisfaction and loyalty. In this context, the optimization and innovation of the customer service recommendation assistant, as an important tool to improve customer service efficiency and service quality, is particularly important.
[0003] Traditional customer service recommendation assistants usually rely on preset scripts and static knowledge bases. This method performs well when dealing with standardized and highly repetitive queries, but it is powerless when faced with complex and personalized user needs. The specific problems are:
[0004] 1. Limitations of static script library
[0005] (1) Limited adaptability: Static script libraries are usually written based on historical data and pre-conceived customer needs. With the rapid changes in the market environment and user needs, these preset scripts are difficult to update in a timely manner to cover new query types, resulting in the service content being unable to keep up with the times.
[0006] (2) Unable to handle complex situations: When customers ask questions that go beyond the scope of the preset script or require the integration of multiple information sources to construct an answer, static script libraries often cannot provide effective solutions. In this case, customer service staff may need to manually search for information or transfer it to more experienced colleagues, which increases response time and workload.
[0007] 2. Lack of personalized service
[0008] (1) Ignoring user history and preferences: Traditional customer service recommendation systems often adopt a unified service approach, ignoring users’ personalized needs, historical interaction information, and preference settings. This approach may not only lead to service content that is inconsistent with user expectations, but may also make users feel that the service lacks care and pertinence.
[0009] (2) Inability to achieve deep personalized interaction: In modern service scenarios, users expect not only answers to their questions, but also suggestions, reminders, and personalized options that are relevant to their own situations. Traditional assistants lack the ability to deeply understand users, so it is difficult for them to actively provide this kind of deeply personalized interactive experience in their services. Summary of the invention
[0010] The purpose of the present invention is to provide a customer service speech recommendation method, device, equipment and storage medium to solve the limitations of the customer service static speech library and the lack of personalized service.
[0011] To achieve the above object, the present invention provides the following technical solution: a customer service speech recommendation method, comprising the following steps:
[0012] Obtain text content in a preset knowledge document, perform vectorization on the text content to obtain a text vector, and store the text vector in a vector database;
[0013] Get user questions input by terminal device;
[0014] Vectorize user questions through the vectorization model to generate question vectors, match the text vector closest to the question vector in the vector database, and generate reference information;
[0015] Based on the formed reference information, the historical context and user questions of the current user terminal device are obtained, and the historical context, user questions and reference information are input into the preset large language model to generate recommended words.
[0016] Preferably, the steps further include:
[0017] The recommendation script is transmitted to the customer service platform, the recommendation script feedback data manually input by the customer service platform is obtained, and the feedback data is stored in the knowledge document.
[0018] Preferably, the process further includes the following steps before vectorizing the text content:
[0019] Get the text content of the knowledge document;
[0020] Identify and segment words in text content according to its characteristics;
[0021] Get the segmented text.
[0022] Preferably, the step of obtaining the text vector includes the following steps:
[0023] Get the segmented text;
[0024] Input the segmented text into the pre-trained vectorization model to convert the segmented text into a high-dimensional space vector to capture the semantic information of the segmented text;
[0025] Get the text vector.
[0026] Preferably, the vectorized user question comprises the following steps:
[0027] Get user questions;
[0028] Input user questions into the vectorization model, convert the segmented text into a high-dimensional space vector, and capture the semantic information of the segmented text;
[0029] Generate a question vector.
[0030] Preferably, matching the text vector closest to the question vector in the vector database comprises the following steps:
[0031] Obtain a question vector, and input the question vector into a vector database;
[0032] Find the text vector in the vector database that is closest to the question vector in the vector space;
[0033] Get the text vector that is most similar to the question vector in semantics;
[0034] Output the text vector to generate reference information.
[0035] A customer service speech recommendation device, comprising:
[0036] A preprocessing module is used to obtain text content in a preset knowledge document, perform vectorization on the text content, obtain text vectors, and store the text vectors in a vector database;
[0037] The human-computer interaction module is used to obtain user questions input by the terminal device and display the content of the human-computer interaction;
[0038] The data processing module is used to vectorize the user's question through the vectorization model, generate the question vector, obtain the vector database in the preprocessing module, match the text vector closest to the question vector in the vector database, and generate reference information;
[0039] A speech generation module is used to obtain the historical context of the current user terminal device and the current user question, input the historical context, user question and reference information into a preset large language model, generate recommended speech, and send the recommended speech to the terminal device;
[0040] The data feedback module is used to transmit the recommendation words to the customer service platform, obtain the recommendation words feedback data manually input by the customer service platform, and store the feedback data in the knowledge document.
[0041] A customer service speech recommendation device includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes a program, and the processor is configured to call the program to execute a customer service speech recommendation method.
[0042] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes a customer service speech recommendation method.
[0043] The technical effects and advantages of the present invention are as follows: the text content of the preset knowledge document is vectorized by the preprocessing module to form a vector database as the basis for matching the question vector, and the knowledge document is retrieved in real time by the data processing module to obtain reference information. Based on the reference information, the large language model is used to dynamically generate recommended speech, which effectively improves the accuracy and relevance of the customer service platform's answers to user questions, can flexibly respond to changing user queries, and achieves the purpose of dynamically generating speech;
[0044] The data processing module matches the most relevant reply text to the user's question as reference information, and the speech generation module generates recommended answers based on the current user question, historical context and reference information, providing highly personalized services and thus improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0046] Figure 2 It is a schematic diagram of the system operation of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The present invention provides Figure 1 , 2 A customer service speech recommendation method, device, equipment and storage medium shown in the figure, the device includes: a preprocessing module, a human-computer interaction module, a data processing module and a speech generation module. The method of the present invention is executed by using the aforementioned modules, and the operating environment can be in Python, including the following steps:
[0049] S1: Obtain the latest text content in the knowledge document through the preprocessing module, vectorize the text content, obtain the text vector, and store the text vector in the vector database. The knowledge document is composed of historical customer and customer service questions and answers. Word segmentation is required before vectorization. The specific steps are: use the Chinese word segmenter to identify and segment the vocabulary of the Chinese text according to the characteristics of the Chinese text, obtain the word segmentation text, and prepare for the subsequent vectorization of the word segmentation text; the steps of text content vectorization are: obtain the word segmentation text, input the word segmentation text into the pre-trained vectorization model, and convert the word segmentation text into a high-dimensional space vector based on large-scale Chinese corpus training to capture the semantic information of the word segmentation text and obtain the text vector;
[0050] S2: Obtain user questions input by the terminal device through the human-computer interaction module;
[0051] S3: vectorize the user question input into the vectorization model through the data processing module to generate a question vector, obtain the vector database in the preprocessing module, match the text vector closest to the question vector in the vector database, and generate reference information; wherein, the vectorization of the user question requires the following operations: obtain the question raised by the current user input into the terminal device as the user question, input the user question into the vectorization model, vectorize the user question through the vectorization model to generate a question vector representing the user question, then obtain the vector database in the preprocessing module, in the vector database, respectively compare the question vector and the text vector to obtain the L2 distance (Euclidean distance) between the two vectors, match the text vector in the vector database that is closest to the question vector in the vector space, generate reference information based on the text vector, and then obtain the text answer that is closest to the semantics of the user question;
[0052] S4: The historical context and user questions of the current user terminal device are obtained through the speech generation module, and the historical context, user questions and reference information are input into the preset large language model to generate recommended speech, and the recommended speech is sent to the terminal device; when the speech generation module processes the reference information, the large language model combines the matched reference message and the historical context input by the terminal device, and transmits the two to the large language model synchronously, so that when the large language model generates an answer, it can better understand the complex language pattern and user intention, and generate a natural, fluent and contextual text in combination with the reference information, which is the recommended speech;
[0053] S5: Transmit the recommended words to the customer service platform, obtain the recommended words manually transmitted by the customer service platform, get the reply content, and transmit the reply content to the terminal device to answer the user's question. Obtain the feedback data of the recommended words manually input by the customer service platform through the data feedback module, and store the feedback data in the knowledge document as reference data for iterative updates to continuously improve the content of the knowledge document.
[0054] The specific implementation of the above method is as follows:
[0055] S1: Input the text content in the knowledge document into the vectorization model. The vectorization model first performs word segmentation on the text content. Taking "How will the weather be tomorrow?" as an example, the vocabulary in the text content is identified and segmented to obtain the word segmentation text ["tomorrow", "weather", "how"]. The word embedding model is used to convert each word segmentation text into a word vector. For example, "tomorrow" is converted into [0.1, 0.2, ...], "weather" is converted into [0.3, 0.4, ...], and "how" is converted into [0.5, 0.6, ...]. The word vectors are combined to generate a sentence vector. For example, the sentence vector [0.3, 0.4, ...] is obtained by taking the average value. The sentence vector is normalized to obtain the normalized vector [0.6, 0.8, ...]. The normalized sentence vector is used as the text vector, and several text vectors are stored in the vector database respectively.
[0056] S2: Get the user's question. Suppose the user's question is "What will the weather be like tomorrow?"
[0057] S3: Input the user question into the vectorization model, and process the user question as in step S1 to obtain a question vector; use the L2 distance to calculate the similarity between the question vector and each text vector in the vector database. The L2 distance calculation formula is: where x i and i are the i-th component of the question vector and the text vector in the vector database, respectively. The HNSW algorithm is used to find the text vector closest to the question vector in the vector database. The matching results are sorted according to the similarity score, and the five with the highest similarity are selected as the final matching results. The text content corresponding to the most similar text vector is returned as reference information.
[0058] S4: Obtain the historical context and user questions of the current user terminal device through the speech generation module, input the historical context, user questions and reference information into the preset large language model, generate recommended speech, and send the recommended speech to the terminal device;
[0059] S5: Transmit the recommended words to the customer service platform, obtain the recommended words manually transmitted by the customer service platform, get the reply content, and transmit the reply content to the terminal device to answer the user's question. Obtain the feedback data of the recommended words manually input by the customer service platform through the data feedback module, and store the feedback data in the knowledge document as reference data for iterative updates to continuously improve the content of the knowledge document.
[0060] In summary, the text content of the preset knowledge document is vectorized through the preprocessing module to form a vector database as the basis for matching the question vector, and the knowledge document is retrieved in real time through the data processing module to obtain reference information. Based on the reference information, the large language model is used to dynamically generate recommended speech, which effectively improves the accuracy and relevance of the customer service platform's answers to user questions, and can flexibly respond to changing user queries to achieve the purpose of dynamically generating speech; and the speech generation module can match the most relevant text answers to user questions as reference information, and generate recommended speech based on the user's questions, historical context and reference information, to provide highly personalized services, thereby improving user satisfaction. The above method not only solves the pain point problem of static speech in traditional customer service, but also provides a new efficient and personalized service solution to improve service efficiency and service experience for users.
[0061] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A customer service speech recommendation method, characterized by: The steps include: Obtain text content in a preset knowledge document, perform vectorization on the text content to obtain a text vector, and store the text vector in a vector database; Get user questions input by terminal device; Vectorize user questions through the vectorization model to generate question vectors, match the text vector closest to the question vector in the vector database, and generate reference information; Based on the formed reference information, the historical context and user questions of the current user terminal device are obtained, and the historical context, user questions and reference information are input into the preset large language model to generate recommended words.
2. A customer service speech recommendation method according to claim 1, characterized in that: The steps also include: The recommendation script is transmitted to the customer service platform, the recommendation script feedback data manually input by the customer service platform is obtained, and the feedback data is stored in the knowledge document.
3. A customer service speech recommendation method according to claim 2, characterized in that: The vectorization process of the text content also includes the following steps: Get the text content of the knowledge document; Identify and segment words in text content according to its characteristics; Get the segmented text.
4. A customer service speech recommendation method according to claim 3, characterized in that: The steps of obtaining the text vector include: Get the segmented text; Input the segmented text into the pre-trained vectorization model to convert the segmented text into a high-dimensional space vector to capture the semantic information of the segmented text; Get the text vector.
5. A customer service speech recommendation method according to claim 2, characterized in that: The vectorized user problem comprises the following steps: Get user questions; Input user questions into the vectorization model, convert the segmented text into a high-dimensional space vector, and capture the semantic information of the segmented text; Generate a question vector.
6. A customer service speech recommendation method according to claim 5, characterized in that: The step of matching the text vector closest to the question vector in the vector database comprises the following steps: Obtain a question vector, and input the question vector into a vector database; Find the text vector in the vector database that is closest to the question vector in the vector space; Get the text vector that is most similar to the question vector in semantics; Output the text vector to generate reference information.
7. A customer service speech recommendation device, characterized in that: include: A preprocessing module is used to obtain text content in a preset knowledge document, perform vectorization on the text content, obtain text vectors, and store the text vectors in a vector database; The human-computer interaction module is used to obtain user questions input by the terminal device and display the content of the human-computer interaction; The data processing module is used to vectorize the user's question through the vectorization model, generate the question vector, obtain the vector database in the preprocessing module, match the text vector closest to the question vector in the vector database, and generate reference information; A speech generation module is used to obtain the historical context and user questions of the current user terminal device, input the historical context, user questions and reference information into a preset large language model, generate recommended speech, and send the recommended speech to the terminal device; The data feedback module is used to transmit the recommendation words to the customer service platform, obtain the recommendation words feedback data manually input by the customer service platform, and store the feedback data in the knowledge document.
8. A customer service speech recommendation device, characterized in that: It includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes a program, and the processor is configured to call the program to execute the customer service speech recommendation method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the customer service speech recommendation method as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and system for optimizing man-machine conversation based on LLM model
CN117271735A
Multi-round dialogue processing method, device and equipment based on RAG
CN117743559A
Intelligent question and answer method and device and computer readable medium
CN117972038A
Knowledge base question and answer construction method and device based on large model
CN118035405A
Cited By
Interactive question-answer system with retrieval-augmented generation for personalized database
WO2026071559A1
Recommendation method and apparatus, and device, medium and product
WO2026137887A1
