AI-based customer service information generation method and system
By limiting the number and conditions of the AI model calling the prompt word propt in the intelligent customer service system, the problems of long processing time, high token consumption and low reply quality are solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411541920.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2025-04-11
AI Technical Summary
The intelligent customer service system takes a long time to deal with problems, and the high consumption of model tokens affects the quality of responses. The AI model will reply to users with fabricated or incorrect information, resulting in poor user experience.
By obtaining the conversation information of the user's conversation scenario, using the AI model to identify the user's intent, and limiting the number and conditions of the AI model calling the prompt word propt when the intent is related to the preset transaction information to reduce information overload and token consumption.
It reduces the overload of the AI model processing information, reduces the consumption of model tokens, improves the quality of reply, and improves the user experience.
Smart Images

Figure CN119807331A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a customer service information generation method based on AI, a customer service information generation method based on an e-commerce scenario, a customer service information generation method based on a preset field, and systems corresponding to each method. Background Art
[0002] In the relevant technical solutions, the e-commerce intelligent customer service system uses AI models to process questions raised by users in conversation scenarios, reducing the work cost of manual customer service. However, the above intelligent customer service system has the problem of taking a long time to process questions, high model token consumption affecting the quality of responses, and the AI model will reply to users with fabricated or wrong information, that is, there is a "hallucination" phenomenon, which can easily mislead users and affect the user experience.
[0003] In addition, the AI model of the above-mentioned intelligent customer service system cannot accurately distinguish certain e-commerce scenarios, resulting in the inability to adopt a response strategy that accurately corresponds to the information raised by users, making it difficult to meet user needs.
[0004] In addition, the intelligent customer service system is unable to accurately identify specific types of text questions raised by users, such as questions related to specific fields or specific products, which makes it difficult to match appropriate response strategies, affecting the user experience.
[0005] Other technical issues related to this application will be further described later. The above content is only used to assist in understanding the technical solution of this application, and does not mean that all of the above content is prior art. Summary of the invention
[0006] The main purpose of the present invention is to provide a method and system for generating customer service information based on AI, aiming to improve the user experience by reducing the time required for the intelligent customer service system to handle problems, reducing the model token consumption cost, and improving the quality of responses. The present application also provides a method and system for generating customer service information based on an e-commerce scenario, aiming to improve the accuracy of customer service information corresponding to user needs generated by the AI model of the customer service system of the e-commerce platform; in addition, the present application also provides a method and system for generating customer service information based on a preset field, aiming to optimize the AI model of the intelligent customer service system.
[0007] To achieve the above objectives, the present application proposes an AI-based customer service information generation method and system, wherein the AI-based customer service information generation method includes:
[0008] Step S1: Obtaining the conversation information of the user's conversation scene;
[0009] Step S2: identifying the user intention of the dialogue information based on the AI model prompt word calling method, and if it is identified that the user intention is related to the preset transaction information, obtaining the transaction prompt word according to the information link corresponding to the user;
[0010] Step S3: querying the transaction data corresponding to the transaction prompt word based on the AI model prompt word calling method;
[0011] Step S4: Generate customer service information based on the transaction data.
[0012] Other features and technical effects of this application are described in the following part of the specification. The technical problem solving ideas and related product design solutions of this application are:
[0013] The applicant found that the intelligent customer service system using AI models has the problems of long time required to process problems, high model token consumption affecting the quality of responses, and AI models will reply to users with fabricated or wrong information, that is, there is a "hallucination" phenomenon. The actual reason is that the intelligent customer service system uses AI models inappropriately. In the relevant technical solutions in the field of e-commerce, in order to reduce the labor cost of the customer service system, the intelligent customer service system will process all questions raised by users through AI models such as GPT, calling the prompt word prompt. In this process, basically three prompt word prompt calls are required, and each prompt word prompt call takes a considerable amount of time, resulting in a serious overload of information processed by the AI model, which is unacceptable for customer service scenarios with high real-time requirements; and the model token consumption is high, GPT will forget the information of historical conversations, making it difficult for users to obtain satisfactory answers in the process of continuous inquiries to the customer service system.
[0014] On this basis, this application obtains the conversation information of the conversation scene after the user enters the customer service system, and then calls the AI model to identify the user's intention based on the conversation information. This is the first prompt word call. Then only when the user's intention is related to the preset transaction information, such as when the user inquires about relevant information about a product or order, the information link corresponding to the user in the conversation scene obtains the corresponding transaction prompt word. If the user needs to inquire about the detailed information of the product, the name and number of the product can be preliminarily obtained based on the information link. Then call the AI model to further query the corresponding product details based on the name and number of the product. This is the second prompt word call, and finally the detailed information of the product is fed back to the user as customer service information.
[0015] Compared with existing solutions, this application strictly limits the conditions and number of times the AI model calls the prompt word when the intelligent customer service system is communicating with the user, thereby reducing the probability of the AI model being seriously overloaded with information and consuming too much model tokens, and improving the user's conversation experience when using the intelligent customer service system.
[0016] Furthermore, the present application also provides a method and system for generating customer service information based on an e-commerce scenario. The method for generating customer service information based on an e-commerce scenario includes:
[0017] Step M1: Obtain historical conversation data;
[0018] Step M2: clustering the historical conversation data using a community discovery algorithm to obtain target corpus samples for representing different conversation scenarios;
[0019] Step M3: obtaining a target AI model based on the target corpus sample training;
[0020] Step M4: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0021] Other features and technical effects of this application are described in the following part of the specification. The technical problem solving ideas and related product design solutions of this application are:
[0022] In fact, the applicant found that for e-commerce platforms, when the intelligent customer service system uses AI models to process questions raised by users in conversation scenarios, the responses generated by the AI model often have a low match with user questions. In fact, this is because the scenarios in e-commerce operations are numerous and constantly changing, and the types of goods sold in different sellers' stores are also different. The corpus samples used to train the AI model have not been properly clustered, and the general recognition ability of the AI model is relatively poor, which ultimately leads to the inability of the trained AI model to accurately respond to questions raised by users. In this way, it is necessary to aggregate new scenarios based on different product types and allow the AI model to successfully classify them in order to improve the accuracy of the AI model of the e-commerce ERP system's intelligent customer service in responding to user questions.
[0023] On this basis, this application clusters the corpus samples through the community discovery algorithm, and then trains the AI model based on the clustered corpus samples, so that the AI model can more accurately identify and classify a variety of e-commerce scenarios, thereby improving the accuracy of answering user questions. Specifically, first obtain the historical conversation data stored in the customer service system as the corpus sample for training the AI model, and then cluster the historical conversation data through the community discovery algorithm to obtain the target corpus samples used to characterize different conversation scenarios. Among them, since the community discovery algorithm is based on the clustering principle of the similarity between two vectors, it is more suitable for e-commerce scenarios compared to K-means clustering based on a single benchmark value, so the clustering result is more accurate; then, the target AI model is trained based on the clustered target corpus samples; finally, when the user enters the conversation scene of the customer service system and inputs the conversation information, the customer service system responds to the conversation information input by the user, calls the target AI model to generate customer service information, and replies to the user in the conversation scene.
[0024] In this way, the present application clusters the corpus samples through the community discovery algorithm, so that the clustered corpus can have a higher degree of clustering, which is convenient for matching with existing corpus classifications and reducing the workload of subsequent data labeling; and, based on the clustered corpus samples, the AI model is trained so that the AI model can more accurately identify and classify various e-commerce scenarios, thereby improving the accuracy of answering user questions and improving the user experience.
[0025] Furthermore, the present application also provides a method and system for generating customer service information based on a preset field, wherein the method for generating customer service information based on a preset field includes:
[0026] Step N1: Obtain corpus samples for model training;
[0027] Step N2: determining the corpus to be annotated in the corpus sample based on a preset source hierarchy, wherein the preset source hierarchy represents different levels of acquisition sources of the corpus sample;
[0028] Step N3: performing data annotation on the corpus to be annotated to obtain target annotated corpus;
[0029] Step N4: Obtain a target AI model based on the target annotated corpus training;
[0030] Step N5: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0031] Other features and technical effects of this application are described in the following part of the specification. The technical problem solving ideas and related product design solutions of this application are:
[0032] The applicant found that the intelligent customer service system using AI models cannot accurately identify and respond to specific types of text questions raised by users, such as questions related to specific fields or specific products. This is actually caused by the incomplete corpus samples for training the AI model of the intelligent customer service system and defects in the AI algorithm. For some specific industry fields, the relevant questions raised by users in conversation scenarios are relatively rare and niche, and the corresponding question data volume is relatively small. Therefore, the conversation data is often ignored in the process of collecting and annotating corpus samples, making it impossible for the AI model to be trained for the relevant questions in the above-mentioned specific industry fields. Therefore, there will be situations where user questions cannot be accurately identified, resulting in difficulty in matching appropriate response strategies, and the above situation is quite hidden, that is, it is difficult for managers to perceive the real reason why the AI model cannot respond correctly.
[0033] On this basis, this application obtains the conversation data of the intelligent customer service system as a corpus sample for model training, and then selects the corresponding corpus sample as the corpus to be annotated based on the preset source level, such as a specific user account, a specific store, etc., and then imports the AI model for training after data annotation of the corpus to be annotated, thereby obtaining an optimized target AI model. Among them, since the above-mentioned specific user accounts, specific stores, etc. represent specific fields / industries, the above-mentioned process of selecting corpus samples is actually to screen out specific types of text information. Therefore, after the AI model is trained based on this specific type of text information, it can improve its ability to respond to questions related to the industry field, and accurately identify and respond when users raise questions related to the above-mentioned industry field, thereby improving the user experience.
[0034] Compared with existing solutions, this application obtains specific types of text data based on the preset source hierarchy of corpus samples to train AI models, thereby improving the accuracy of the AI model in identifying and responding to relevant questions in specific industry fields when applied to the customer service system, thereby improving the user experience.
[0035] The present application also provides a corresponding system, which can execute the operating instructions of each method step of the present application.
[0036] The present application also provides a server, which includes a memory and a processor. The system in the present application is stored in the memory, and the processor can run the operating instructions of each method step of the present application.
[0037] The present application also provides a computer device, which includes a memory and a processor. The system in the present application is stored in the memory, and the processor can execute the operating instructions of each method step in the present application.
[0038] English word description:
[0039] (1) AI: Artificial Intelligence;
[0040] (2) prompt: prompt word;
[0041] (3) token: token;
[0042] (4) GPT: Generative Pre-Trained Transformer, a generative pre-trained Transformer model, is a text generation deep learning model based on the Internet and trained with available data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are used to provide further understanding of the present application and do not constitute a limitation of the present application; the contents shown in the accompanying drawings may be real data of the embodiments and belong to the protection scope of the present application.
[0044] Figure 1 This is a flowchart of an AI-based customer service information generation method in one embodiment of the present application.
[0045] Figure 2 This is a logical diagram of the AI model of the intelligent customer service system in one embodiment of the present application.
[0046] Figure 3 This is a schematic block diagram of the structure of an intelligent customer service system in one embodiment of the present application.
[0047] Figure 4 A flow chart of a method for generating customer service information based on an e-commerce scenario in one embodiment of the present application is shown.
[0048] Figure 5 A schematic diagram showing the principle of clustering and labeling historical conversation data in one embodiment of the present application is shown.
[0049] Figure 6 This is a flowchart of a method for generating customer service information based on a preset field in one embodiment of the present application.
[0050] Figure 7 The figure is a flow chart of corpus annotation in one embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of this application more clear, the following is a further detailed description of the embodiments of this application through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.
[0052] Figure 1A flow chart of a method for generating customer service information based on AI in one embodiment of the present application is shown. Figure 1 As shown, the AI-based customer service information generation method mainly includes the following steps S1 to S4.
[0053] Step S1: Obtaining the conversation information of the user's conversation scene;
[0054] Step S2: identifying the user intention of the dialogue information based on the AI model prompt word calling method, and if it is identified that the user intention is related to the preset transaction information, obtaining the transaction prompt word according to the information link corresponding to the user;
[0055] Step S3: querying the transaction data corresponding to the transaction prompt word based on the AI model prompt word calling method;
[0056] Step S4: Generate customer service information based on the transaction data.
[0057] The applicant found that the intelligent customer service system using AI models has the above problems. The actual reason is that the intelligent customer service system uses AI models inappropriately. In the relevant technical solutions in the field of e-commerce, in order to reduce the labor cost of the customer service system, the intelligent customer service system will process all questions raised by users through AI models such as GPT, calling the prompt word prompt. In this process, basically three prompt word prompt calls are required, and each prompt word prompt call takes a considerable amount of time, resulting in a serious overload of information processed by the AI model, which is unacceptable for customer service scenarios with high real-time requirements; and the model token consumption is high, GPT will forget the information of historical conversations, making it difficult for users to obtain satisfactory answers in the process of continuous inquiries to the customer service system.
[0058] On this basis, this application obtains the conversation information of the conversation scene after the user enters the customer service system, and then calls the AI model to identify the user's intention based on the conversation information. This is the first prompt word prompt call. Then, only when the user's intention is related to the preset transaction information, such as when the user inquires about relevant information about the product or order, the information link corresponding to the user in the conversation scene obtains the corresponding transaction prompt word. If the user needs to inquire about the detailed information of the product, the name and number of the product can be preliminarily obtained according to the information link, and then the AI model is called to further query the corresponding product details based on the name and number of the product. This is the second prompt word prompt call, and finally the product details are fed back to the user as customer service information.
[0059] Compared with existing solutions, this application strictly limits the conditions and number of times the AI model calls the prompt word when the intelligent customer service system is communicating with the user, thereby reducing the probability of the AI model being seriously overloaded with information and consuming too much model tokens, and improving the user's conversation experience when using the intelligent customer service system.
[0060] The following is a detailed description of each method step in the AI-based customer service information generation method.
[0061] Step S1: Obtain the conversation information of the user's conversation scene.
[0062] Specifically, when a user enters the customer service system and sends a conversation message, the customer service system automatically obtains the conversation message of the conversation scene that the user is in. The conversation message includes multiple forms such as text and audio, which are not specifically limited here.
[0063] Step S2: Identify the user intention of the dialogue information based on the AI model prompt word calling method. If it is identified that the user intention is related to the preset transaction information, obtain the transaction prompt word according to the information link corresponding to the user.
[0064] Specifically, after obtaining the dialogue information sent by the user after entering the customer service system, the AI model, such as GPT, calls the prompt word to identify the dialogue information to obtain the user's intention to enter the customer service scene for a dialogue, such as wanting to consult information about the product or order, or wanting to return or exchange the product, etc. Among them, when the AI model recognizes that the user's intention is related to the preset transaction information, that is, the demand corresponding to the user's intention meets the specific response strategy of the customer service system, the customer service system obtains the transaction prompt word according to the information link corresponding to the user, so as to execute data query based on the transaction prompt word and generate customer service information for reply.
[0065] Step S3: querying the transaction data corresponding to the transaction prompt word based on the AI model prompt word calling method.
[0066] Specifically, after obtaining the transaction prompt word, the customer service system calls the prompt word through the AI model, and queries the relevant transaction data in the background database connected to the customer service system according to the transaction prompt word.
[0067] Step S4: Generate customer service information based on the transaction data.
[0068] Specifically, after the AI model obtains relevant transaction data in the background database, it can divide and assemble the transaction data, and then generate text information suitable for users to read as customer service information, or it can directly return the transaction data as customer service information to reply to the user.
[0069] Furthermore, in one embodiment, before the above step S1, the method further includes step S5.1 and step S5.2.
[0070] Step S5.1: Obtaining the account transaction information of the user on the e-commerce platform;
[0071] Step S5.2: Generate an information link corresponding to the account transaction information, and set the information link as the initial dialogue information of the conversation scenario.
[0072] Specifically, in order to improve the efficiency and convenience of the conversation between the user and the customer service system, after the user enters the conversation scene of the customer service system, the customer service system will generate corresponding information links based on the user's account transaction information on the e-commerce platform, including the product pages previously viewed by the user, the user's historical orders, etc., and add them to the conversation scene as initial conversation information. In this way, the user does not need to manually quote or elaborate on the product or order-related information he wants to consult during the conversation.
[0073] Furthermore, in one embodiment, the preset transaction information includes product information and order information. If it is recognized in step S2 that the user intention is related to the preset transaction information, a transaction prompt word is obtained according to the information link corresponding to the user, including the following step S2.1.
[0074] Step S2.1: If it is identified that the user's intention includes consulting product information or order information, a product prompt word or order prompt word corresponding to the product is obtained based on the information link corresponding to the user.
[0075] Specifically, in this embodiment, the customer service system obtains the corresponding product prompt words, such as the product name and product number, or order prompt words, such as the order number, only when the user intends to inquire about product information or order information, and then calls the prompt words through the AI model to perform queries based on the product prompt words or order prompt words.
[0076] For example, when a user sends the message "I want to see the detailed parameters of this product" in a conversation scenario in the customer service system, the AI model recognizes that the user intends to inquire about product information, and then obtains the product number corresponding to the product that the user needs to know based on the information link of the conversation scenario, and then queries the background database according to the product number by calling the prompt word to obtain the detailed parameters of the product, and then feeds back the detailed parameters of the product to the user as customer service information.
[0077] For example, when a user sends a message "I want to know the current status of this order" in a conversation scenario in the customer service system, the AI model recognizes that the user intends to inquire about the order status, and then obtains the order number corresponding to the order that the user needs to know based on the information link of the conversation scenario, and then queries the background database according to the order number by calling the prompt word to obtain the status of the order, and then feeds back the order status information to the user as customer service information.
[0078] For example, when a user sends a message in the customer service system saying "I want to know how much inventory of this product is currently available", the AI model recognizes that the user intends to inquire about the product inventory, and then obtains the product number corresponding to the product that the user needs to know based on the information link of the conversation scenario, and then queries the background database according to the product number by calling the prompt word to obtain the current inventory information of the product, and then feeds back the inventory information of the product to the user as customer service information.
[0079] Furthermore, in one embodiment, after identifying the user intention of the dialogue information based on the AI model prompt word calling method in the above step S2, the method also includes the following step S2.2.
[0080] Step S2.2: If it is identified that the user intention is related to the preset service type, second customer service information is generated, and the user corresponding to the user intention is transferred to manual customer service.
[0081] Specifically, for the customer service system of the e-commerce platform, if the needs raised by the user in the conversation scenario involve complex scenarios that are not suitable for automatic judgment by the system or processing by the AI model, it is necessary to transfer to manual customer service for processing. In this embodiment, a specific business type is set in advance as a preset business type that needs to be transferred to manual customer service. When the user's intention involves the preset business type, the customer service system automatically transfers to manual customer service.
[0082] Further, based on the above embodiment, the preset business types include product return and product refund, and the above step S2.2 includes the following step S2.21.
[0083] Step S2.21: If it is identified that the user intention includes product return, a first manual transfer message is generated as customer service information, the first manual transfer message includes process confirmation information, and the user corresponding to the user intention is transferred to manual customer service.
[0084] Specifically, complex scenarios that are not suitable for automatic judgment by the system or processing by AI models include product returns, because product returns involve many subjective reasons. For example, users may want to return products on the surface, but actually want to get more discounts. In addition, since product returns involve specific amounts, there are many processing procedures for merchants, and it is not suitable for AI model processing or automatic system confirmation. Therefore, in this embodiment, if the AI model recognizes that the user's intention includes product returns, the customer service system will not call the AI model prompt word again for processing, but will generate a first manual transfer information as customer service information and send it to the user, and transfer the call to manual customer service for processing. Among them, the first manual transfer information includes process confirmation information, such as "The return of products includes XX process, and it is currently in the manual reply process. Please wait", thereby reflecting that the manual reply process is currently in progress.
[0085] Furthermore, in one embodiment, after identifying the user intention of the dialogue information based on the AI model prompt word calling method in the above step S2, the method also includes the following step S2.3.
[0086] Step S2.3: If it is recognized that the user intention includes a preset emotional feature, a second manual transfer message is generated as customer service information, the second manual transfer message includes an emotional response statement, and the user corresponding to the user intention is transferred to manual customer service.
[0087] Specifically, when the AI model recognizes that the dialogue information sent by the user in the conversation scenario has reflected preset emotional characteristics, such as anger, impatience, etc., it generates a second manual transfer message to provide feedback to the user and transfer the call to manual customer service; wherein, the second manual transfer message includes an emotional response statement corresponding to the user's emotion.
[0088] For example, when a user sends a message in a conversation scenario saying "Can't you be more clear?" or "This is too slow?", the AI model recognizes the user's impatience and generates or calls a second manual transfer message "Don't worry, I'll find someone to answer your question right away" to reply. The second manual transfer message can respond to the customer's emotions in a timely manner, and the customer service system transfers the call to manual customer service.
[0089] Further, in one embodiment, if it is recognized in the above step S2.3 that the user intention includes a preset emotional feature, then generating second manual transfer information as customer service information includes the following step S2.31.
[0090] Step S2.31: If it is identified that the dialogue information includes preset words or preset sentences, and the preset words and the preset sentences can reflect the type and degree of emotion of the user, it is determined that the user intention includes preset emotional characteristics, and a second manual transfer information is generated as customer service information.
[0091] Specifically, this embodiment provides a method for the AI model to recognize preset emotional characteristics presented by users in conversations with the customer service system, that is, when the AI model recognizes that the conversation information sent by the user includes preset words or preset sentences, it can determine that the user's intention includes preset emotional characteristics.
[0092] For example, the user's dialogue information is "I am so angry", "angry" can reflect the user's emotional characteristics; for another example, the user's dialogue information is "The order delivery will arrive the day after tomorrow?", this rhetorical question can reflect the user's emotional characteristics. At this time, the AI model determines that the user's intention includes preset emotional characteristics.
[0093] Furthermore, in one embodiment, the associative ability of the AI model is a minimum threshold, and after identifying the user intention of the dialogue information based on the AI model prompt word calling method in the above step S2, the method also includes the following step S2.4.
[0094] Step S2.4: If the AI model cannot recognize the user's intention, or the user's intention recognized by the AI model cannot achieve a preset match with the preset response strategy, the first preset reply information is retrieved as customer service information.
[0095] Specifically, for AI models, a certain threshold range limit can be set for their associative ability. For example, by adjusting the value of the temperature option of GPT, the associative ability used by GPT when making answers can be affected. In the relevant technical solutions, AI models with certain associative abilities can handle more types of tasks in the customer service system, thereby reducing labor costs. However, this associative ability can also cause the AI model to reply to users with fabricated or erroneous information, that is, there is a "hallucination" phenomenon of the AI model, which misleads users.
[0096] Therefore, in this embodiment, the associative ability of the AI model is the minimum threshold. If the customer service system calls the AI model and cannot recognize the user's intention, or cannot perform the corresponding reply action based on the existing data and the preset reply strategy, the pre-set reply information is retrieved to reply to the customer, such as "Sorry, I don't quite understand, can you change the question?", thereby avoiding the situation where the AI model uses fabricated or erroneous information to reply to the user based on its associative ability.
[0097] Furthermore, in one embodiment, after identifying the user intention of the dialogue information based on the AI model prompt word calling method in the above step S2, the method also includes the following step S2.5.
[0098] Step S2.5: If it is identified that the user's intention includes publishing advertising information, the content of the dialog information containing the advertising information is marked and intercepted, and the second preset reply information is retrieved as customer service information.
[0099] Specifically, when the AI model recognizes that the conversation information sent by the user in the conversation scenario of the customer service system is advertising information, in order to avoid the backend database from receiving / storing redundant information, the customer service system marks and intercepts the content of the conversation information containing advertising information, and retrieves the pre-set reply information to reply to the customer, such as "OK, I already know it." Based on optional implementation methods, when the user sends advertising information for a preset number of times, the user's account can also be marked or intercepted.
[0100] Figure 2 FIG. 1 shows a logical diagram of an AI model of an intelligent customer service system in one embodiment of the present application. Figure 2 As shown in the figure, when the AI model of the intelligent customer service system calls the prompt word for the first time to identify the user's intention, the corresponding routing logic is executed according to the user's intention. Among them, only when the user's intention is to consult the product information, order information, and inventory information, the AI model will process it again by calling the prompt word prompt; for users who show obvious negative emotions, or the user's intention involves complex scenarios such as amount-type business, such as returning or exchanging goods, manual transfer is adopted; in addition, when users send advertising information, or the user's intention cannot match the above routing logic, the AI model will not further identify and analyze the information, but reply with the default information.
[0101] Figure 3The schematic diagram of the structure of the intelligent customer service system in one embodiment of the present application is shown, including an interceptor layer, a memory layer, a state management layer, a command execution layer, a knowledge question and answer layer, and a background service layer. Among them, the interceptor layer is used to implement the filtering function at the platform / user level, that is, to filter users accessing the customer service system, allocate link interfaces for different e-commerce platforms, etc., to ensure that the resources of the customer service system can be allocated on demand; the memory layer includes short-time memory for storing current conversation information and long-time memory for storing historical conversation information; the state management layer includes product ID, order ID, etc. id, etc.; the command execution layer includes the routing logic of various AI model replies, such as product / order consultation, transfer to manual, advertising consultation, publishing marketing information to recommend products, etc.; the knowledge question and answer layer includes knowledge base question and answer and self-learning question and answer. The knowledge base question and answer is used to pre-set the reply script for the AI model, and the self-learning answer is used to train the AI model to reply to existing similar questions when receiving new questions; the background service layer includes self-learning service and intelligent marketing service. The self-learning service provides sample data for training AI models for self-learning question and answer. The intelligent marketing service is used to realize the recommendation function of similar products, which is applied to active / out-of-stock marketing scenarios: that is, when the customer requests to recommend a product, or the product purchased by the customer is out of stock, a certain number of similar products are recommended to the user; the source of the recommended similar products is the product vector generated based on the data of the store's historical products, and the product vector that reaches the preset similarity is selected to determine the similar products for recommendation.
[0102] In one embodiment, reference Figure 4 , the present application also provides a step flow chart of a method for generating customer service information based on an e-commerce scenario, such as Figure 4 As shown, the customer service information generation method based on the e-commerce scenario may mainly include the following steps M1 to M4.
[0103] Step M1: Obtain historical conversation data;
[0104] Step M2: clustering the historical conversation data using a community discovery algorithm to obtain target corpus samples for representing different conversation scenarios;
[0105] Step M3: obtaining a target AI model based on the target corpus sample training;
[0106] Step M4: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0107] This application clusters corpus samples through a community discovery algorithm, and then trains an AI model based on the clustered corpus samples, so that the AI model can more accurately identify and classify a variety of e-commerce scenarios, thereby improving the accuracy of answering user questions. Specifically, first obtain the historical conversation data stored in the customer service system as a corpus sample for training the AI model, and then cluster the historical conversation data through a community discovery algorithm to obtain a target corpus sample for characterizing different conversation scenarios, wherein, since the community discovery algorithm is based on the clustering principle of the similarity between two vectors, it is more suitable for e-commerce scenarios compared to K-means clustering based on a single benchmark value, so the clustering result has a higher accuracy; then, the target AI model is trained based on the clustered target corpus samples; finally, when the user enters the conversation scene of the customer service system and inputs the conversation information, the customer service system responds to the conversation information input by the user, calls the target AI model to generate customer service information, and replies to the user in the conversation scene.
[0108] In this way, the present application clusters the corpus samples through the community discovery algorithm, so that the clustered corpus can have a higher degree of clustering, which is convenient for matching with existing corpus classifications and reducing the workload of subsequent data labeling; and, based on the clustered corpus samples, the AI model is trained so that the AI model can more accurately identify and classify various e-commerce scenarios, thereby improving the accuracy of answering user questions and improving the user experience.
[0109] The following is a detailed description of each method step in the customer service information generation method based on the e-commerce scenario.
[0110] Step M1: Get historical conversation data.
[0111] Specifically, historical conversation data stored in the customer service system is obtained as corpus samples for training the AI model.
[0112] Step M2: clustering the historical conversation data using a community discovery algorithm to obtain target corpus samples for characterizing different conversation scenarios.
[0113] Specifically, the historical conversation data stored in the customer service system obtained above is clustered through a community discovery algorithm, that is, the historical conversation data is converted into standard vectors, and then clustered into a community based on the similarity between each pair of vectors. Finally, multiple communities are obtained, and the multiple communities are the target corpus samples that represent different conversation scenarios.
[0114] It can be understood that since the community discovery algorithm is based on the clustering principle of the similarity between two vectors, it is more suitable for e-commerce scenarios than K-means clustering based on a single benchmark value, so the clustering results are more accurate.
[0115] Step M3: Obtain a target AI model based on the target corpus sample training.
[0116] Specifically, the target corpus samples clustered by the community discovery algorithm are imported into the AI model for training to optimize the recognition and classification capabilities of the AI model for various e-commerce scenarios and obtain the target AI model.
[0117] Step M4: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0118] Specifically, the above-mentioned target AI model is applied to the customer service system of the e-commerce platform. When the user enters a question in the conversation scenario of the customer service system, the customer service system calls the target AI model to generate corresponding reply information based on the user's question, and feeds back the reply information to the user as customer service information.
[0119] Furthermore, in one embodiment, clustering the historical conversation data by using a community discovery algorithm in step M2 includes the following steps M2.1 and M2.2.
[0120] Step M2.1: taking a single piece of conversation data of the historical conversation data as a node, and clustering the node and adjacent nodes into a community;
[0121] Step M2.2: The clustered community is used as a new node to continue clustering with adjacent nodes until a target community is obtained whose modularity contained in the current clustering condition cannot reach the preset threshold, and the target community obtained by the current clustering is used as a target corpus sample to represent the preset dialogue scenario.
[0122] Specifically, this embodiment uses the Louvain algorithm in the community discovery algorithm to cluster the historical conversation data. First, a single conversation data of the historical conversation data is taken as a node, and each node is regarded as a community. The corresponding modularity change when a single node is clustered with the communities of other adjacent nodes is calculated, and the single node is added to the community of the adjacent nodes corresponding to the maximum value of the modularity change, thereby forming a new community, and then the above clustering process is repeated with the new community as a new node until the modularity change in the clustering process cannot reach the preset threshold, which indicates that the current node is a target community that cannot be further clustered, and the target community is used as a target corpus sample to characterize the preset conversation scene.
[0123] It can be understood that community discovery algorithms include Louvain algorithm, GN algorithm, LPA label propagation algorithm and other algorithms. This embodiment uses Louvain algorithm as the clustering algorithm because Louvain algorithm has the following four advantages: 1. It improves the overall modularity score by iteratively optimizing the community structure in the network, and the clustering result is relatively stable; 2. Low computational cost, and out-of-the-box, no data labeling required; 3. Fast computational speed; 4. Applicable to relatively large-scale data networks. Therefore, compared with other community discovery algorithms, Louvain algorithm is more suitable for data clustering processing of AI models of e-commerce customer service systems.
[0124] Furthermore, in one embodiment, the above step M1 includes the following step M1.1.
[0125] Step M1.1: Obtain historical conversation data that has not been added to the target community after at least one clustering, or obtain historical conversation data that fails to achieve a preset matching degree with a preset response strategy in a customer service system conversation scenario.
[0126] Specifically, for e-commerce activities, the volume of historical conversation data stored in the customer service system is too large, and it is necessary to screen the historical conversation data to obtain corpus samples with a high probability of being able to cluster and generate new scenarios, and then train the AI model based on the corpus samples. In this embodiment, historical conversation data that has not been clearly classified into scenarios after corpus annotation in the past, and user conversation data in the customer service system conversation scenario where the AI model cannot use the preset reply strategy to match the reply, or needs to be transferred for manual processing, are obtained, and these two types of historical conversation data are used as corpus samples for training the AI model.
[0127] Further, based on the above embodiment, the above step M2 of clustering the historical conversation data by using a community discovery algorithm includes the following steps M2.3 and M2.4.
[0128] Step M2.3: filtering the historical conversation data based on data type and / or data length;
[0129] Step M2.4: Cluster the filtered historical conversation data using a community discovery algorithm.
[0130] Specifically, in order to improve data validity and reduce the amount of data processing in the process of training AI models, only text data is retained from the historical conversation data obtained in the past, such as data in the form of video and audio, and text data with a character count that is not within the preset threshold range, such as less than 5 characters or greater than 500 characters, is also removed, so as to cluster the filtered historical conversation data.
[0131] Furthermore, in one embodiment, clustering the historical conversation data by using a community discovery algorithm in the above step M2 includes the following steps M2.5 and M2.6.
[0132] Step M2.5: classifying the historical conversation data according to the source object;
[0133] Step M2.6: Cluster the classified historical conversation data using a community discovery algorithm.
[0134] Specifically, in this embodiment, in order to improve the accuracy of scene clustering, the historical conversation data can be classified according to the source object, and the historical conversation data corresponding to one type of source object can be selected for clustering, thereby training the AI model. For example, historical conversation data from a certain store is selected for clustering, so that the clustered corpus samples are more targeted to the store, thereby making the trained AI model more capable of classification and recognition.
[0135] It is understandable that in other implementations, historical conversation data can also be classified based on other objects. For example, after classifying historical conversation data according to product type, the historical conversation data of a certain unpopular product can be clustered to obtain corresponding corpus samples, and then the AI model can be trained.
[0136] In addition, historical conversation data can be classified based on a certain region or time period. This is because e-commerce activities in different countries / regions may be affected by local warehousing or product distribution methods, and merchants may adopt specific marketing strategies during certain special holidays. Therefore, when users ask the customer service system for information related to a specific region or a specific time period, they can be clustered based on this type of conversation data, and then the AI model can be trained.
[0137] And, as a feasible implementation method, after the historical conversation data is classified according to the source object, product type, region or time period, and the historical conversation data of the same category is clustered to obtain the corresponding target corpus sample, the subject word of the target corpus sample is identified, and then the synonym corresponding to the subject word is determined, and then a new corpus sample is generated according to the synonym, so that the sample volume of the target corpus sample can be expanded and the model training effect can be improved. Among them, the above-mentioned subject words can be pre-set words such as product names and feature descriptions, which are not specifically limited here.
[0138] Furthermore, in one embodiment, clustering the historical conversation data by using a community discovery algorithm in the above step M2 includes the following steps M2.7 and M2.8.
[0139] Step M2.7: Cleaning the historical conversation data based on preset keywords or preset sentence patterns;
[0140] Step M2.8: Cluster the cleaned historical conversation data using a community discovery algorithm.
[0141] Specifically, in order to improve data effectiveness and reduce the amount of data processing in the process of training AI models, historical conversation data is cleaned according to pre-set keywords or sentence patterns, such as removing some content that has no real meaning, such as removing some greeting sentences, emotional expressions, etc., so that the historical conversation data used for clustering and training AI models is more refined and pure.
[0142] Furthermore, in one embodiment, the above step M3 includes the following steps M3.1 to M3.3.
[0143] Step M3.1: Visually display the target corpus sample based on a preset page;
[0144] Step M3.2: In response to a preset annotation instruction, data annotation is performed on the target corpus sample;
[0145] Step M3.3: Perform model training based on the target corpus samples that have been data-labeled to obtain the target AI model.
[0146] Specifically, in this embodiment, after the historical conversation data is clustered by the community discovery algorithm, the target corpus samples representing multiple different conversation scenarios obtained by clustering are visualized on the preset page. The administrator can trigger the preset annotation instruction based on the preset page, select one or more types of target corpus samples to annotate the corresponding conversation scenarios, and import the annotated target corpus samples into the AI model for training, optimize the AI model's recognition and classification capabilities for various e-commerce scenarios, and obtain the target AI model.
[0147] Further, based on the above embodiment, the above step M3.1 includes the following step M3.11 and step M3.12.
[0148] Step M3.11: Generate a corpus label based on the target corpus sample;
[0149] Specifically, after clustering the historical conversation data to obtain multiple target corpus samples representing different conversation scenarios, corresponding corpus labels are generated based on the common features of the target corpus samples, such as whether target corpus samples of the same type all involve the same products or the same characteristics. If so, the same products or the same characteristics are used as corpus labels.
[0150] Step M3.12: Displaying the scene names and corpus tags respectively corresponding to the target corpus samples based on the first-level page of the preset page, and displaying the corpus content of the target corpus samples based on the second-level page of the preset page.
[0151] Specifically, the first-level page of the preset page displays the scene name and corpus label corresponding to the target corpus sample, for example, presenting in a table how many types of target corpus samples currently exist, the current scene name or scene number of the target corpus sample of this type, and the corpus label corresponding to the target corpus sample of this type; when the user can select one of the target corpus samples to view, the second-level page of the preset page is entered to display the specific content of the target corpus samples contained in this type of scene.
[0152] It can be understood that in this embodiment, the corpus label and the clustering result are displayed together on the first-level page based on the preset page in order to enable the user to have a preliminary understanding of the target corpus sample after clustering in the future. As a feasible implementation method, after the historical conversation data is clustered by the community discovery algorithm to obtain the target corpus sample, the single-category target corpus sample is subjected to a word segmentation operation to obtain the keywords corresponding to each target corpus sample, for example, the keyword is used to characterize a certain feature or attribute. The keywords of the above-mentioned target corpus sample are converted into a word vector form, and then the keywords are compared with the commodity information of the preset commodity word vector database based on the word vector form for similarity, wherein the commodity word vector database can be constructed after the commodity information stored in the background database of the e-commerce platform is converted into a word vector form; the commodity corresponding to the commodity information vector whose similarity reaches the preset threshold is used as the label content of the target corpus sample of this type. In this way, since the target corpus samples obtained after clustering using the community discovery algorithm have relatively many categories, this will create a large workload / computational load for subsequent data annotation. However, by performing a similarity comparison between the keywords of the target corpus samples and the preset database, such as the product information in the product database of an e-commerce platform, corresponding labels can be generated for this type of target corpus samples based on the existing product information, greatly reducing the difficulty and workload of subsequent data annotation.
[0153] Further, based on the above embodiment, after the above step M3.1, the method also includes the following step M3.4.
[0154] Step M3.4, in response to the scene classification instruction, classify the target corpus sample into the preset scene classification of the database for storage.
[0155] Specifically, after visually displaying the clustered target corpus samples based on a preset page, the administrator can select one or more categories of target corpus samples to classify them into previously existing dialogue scene classifications, or select one or more categories of target corpus samples to add new dialogue scenes.
[0156] Figure 5 FIG. 1 is a schematic diagram showing the principle of clustering and labeling historical conversation data in one embodiment of the present application. Figure 5 As shown in the figure, the data clustering and annotation process includes three parts: data acquisition, new scene clustering platform, and corpus annotation platform.
[0157] First, in the data acquisition part, the administrator can regularly select data for clustering, such as obtaining data from the customer service system for clustering on a weekly basis. If the clustering is successful, the clustering results will be displayed and further processed based on the new scenario clustering platform. If the clustering is unsuccessful, wait for the next regular clustering or manually choose to re-cluster. Then, in the new scenario clustering platform part, the clustering results of the above data are displayed; then the administrator confirms the clustering results on the corpus annotation platform, and then chooses to synchronize the corpus of a specific category to the existing scene on the new scenario clustering platform, or adds a new scene to add the above specific category of corpus, thereby completing the data annotation.
[0158] In one embodiment, reference Figure 6 , the present application also provides a flow chart of a method for generating customer service information based on a preset field, such as Figure 6 As shown, the method for generating customer service information based on a preset field mainly includes the following steps N1 to N5.
[0159] Step N1: Obtain corpus samples for model training;
[0160] Step N2: determining the corpus to be annotated in the corpus sample based on a preset source hierarchy, wherein the preset source hierarchy represents different levels of acquisition sources of the corpus sample;
[0161] Step N3: performing data annotation on the corpus to be annotated to obtain target annotated corpus;
[0162] Step N4: Obtain a target AI model based on the target annotated corpus training;
[0163] Step N5: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0164] The applicant found that for some specific industry fields, the relevant questions raised by users in conversation scenarios are relatively obscure and niche, and the corresponding question data volume is relatively small. Therefore, the conversation data is often ignored in the process of collecting and annotating corpus samples, which makes it impossible for the AI model to be trained on the relevant issues in the above-mentioned specific industry fields. Therefore, there will be a situation where user questions cannot be accurately identified, resulting in difficulty in matching appropriate response strategies, and the above situation is quite hidden, that is, it is difficult for managers to perceive the real reason why the AI model cannot respond correctly.
[0165] On this basis, this application obtains the conversation data of the intelligent customer service system as a corpus sample for model training, and then selects the corresponding corpus sample as the corpus to be annotated based on the preset source level, such as a specific user account, a specific store, etc., and then imports the AI model for training after data annotation of the corpus to be annotated, thereby obtaining an optimized target AI model. Among them, since the above-mentioned specific user accounts, specific stores, etc. represent specific fields / industries, the above-mentioned process of selecting corpus samples is actually to screen out specific types of text information. Therefore, after the AI model is trained based on this specific type of text information, it can improve its ability to respond to questions related to the industry field, and can more accurately identify and respond when users raise questions related to the above-mentioned industry field, thereby improving the user experience.
[0166] Compared with existing solutions, this application obtains specific types of text data based on the preset source hierarchy of corpus samples to train AI models, thereby improving the accuracy of the AI model in identifying and responding to relevant questions in specific industry fields when applied to the customer service system, thereby improving the user experience.
[0167] The following is a detailed description of each method step in the method for generating customer service information based on a preset domain.
[0168] Step N1: Obtain corpus samples for model training.
[0169] Specifically, historical conversation data existing in the customer service system or backend database is obtained, and the historical conversation data is used as corpus samples for subsequent training of the AI model.
[0170] Step N2: determining the corpus to be annotated in the corpus sample based on a preset source hierarchy, wherein the preset source hierarchy represents different levels of acquisition sources of the corpus sample.
[0171] Specifically, the corpus to be annotated for characterizing similar scenarios is obtained by screening according to the different levels of acquisition sources of the corpus samples. For example, the corpus samples of the same user account or the Amazon platform under the same user account are selected as the corpus to be annotated for characterizing similar scenarios. For the cross-border e-commerce customer service system, the conversation data spans multiple types of goods and multiple stores; different stores often have personalized text messages. In the related technology, the text messages of multiple types of goods and multiple stores are mixed and annotated and model training is performed, which will lead to poor model training results, and the trained model still cannot properly respond to personalized user questions. In addition, the e-commerce scenarios of the same user account or the Amazon platform under the same user account usually belong to the same specific field or e-commerce scenario; therefore, in this embodiment, the corpus to be annotated is obtained based on the different levels of acquisition sources. The screening can make the corpus to be annotated more representative and targeted, and the training effect of the model is also better.
[0172] Step N3: perform data annotation on the corpus to be annotated to obtain target annotated corpus.
[0173] Specifically, after obtaining the corpus to be annotated for representing the same type of scenes by screening based on different levels of acquisition sources, the corpus to be annotated is annotated by machine or manually to obtain the target annotated corpus that can be used to train the model.
[0174] Step N4: Obtain a target AI model based on the target annotated corpus training.
[0175] Specifically, the target annotated corpus obtained through data annotation is imported into the AI model for training to obtain an optimized target AI model.
[0176] Step N5: In response to the dialogue information input by the user, the target AI model is called to generate customer service information corresponding to the dialogue information.
[0177] Specifically, the target AI model obtained through the above training is applied to the customer service system. When a user enters the conversation scene of the customer service system and asks a personalized question, the customer service system responds to the conversation information input by the user and calls the target AI model to generate corresponding customer service information for reply.
[0178] Furthermore, in one embodiment, the preset source hierarchy includes user layer, platform layer and store layer in a preset order, and the above step N2 of determining the corpus to be annotated in the corpus sample based on the preset source hierarchy includes the following steps N2.1 and N2.2.
[0179] Step N2.1: Determine at least one of the user layer, platform layer and store layer included in the preset source layer as the target layer based on the preset order;
[0180] Step N2.2: Determine the corpus to be annotated in the corpus sample based on the target level.
[0181] Specifically, the acquisition sources at different levels include at least the user level, the platform level, and the store level in a preset order, such as the order of hierarchical height. For example, the conversation data of the Amazon platform under the A user account can be selected as the corpus to be annotated, or the conversation data of the No. 1 store on the Amazon platform under the A user account can be selected as the corpus to be annotated, that is, the hierarchical dimension of the selected corpus to be annotated can be determined according to actual needs.
[0182] Further, based on the above embodiment, the above step N2.2 includes the following step N2.21.
[0183] Step N2.21: Determine the corpus to be annotated in the corpus sample based on the target level and the preset time period.
[0184] Specifically, on the basis of determining the target level, the corresponding corpus samples can also be selected as the corpus to be annotated in combination with a specific time period. For example, by selecting the customer service system conversation data of the Amazon platform No. 1 store of user A's account for at least one year in November as the corpus to be annotated, this makes the corpus to be annotated more targeted and representative for the e-commerce scene in November.
[0185] Further, based on the above embodiment, the above step N2.21 includes the following step N2.211 and step N2.212.
[0186] Step N2.211: determining a spare corpus to be annotated in the corpus sample based on the target level and the preset time period;
[0187] Step N2.212: Use text data enhancement technology to expand the data volume of the standby corpus to be annotated to obtain the corpus to be annotated.
[0188] Specifically, after the standby corpus to be annotated is determined in the corpus sample according to the target level and the preset time period, since the standby corpus to be annotated is obtained through screening of multiple options, it may cause an impact on the subsequent model training effect due to insufficient sample quantity; therefore, this embodiment expands the data volume of the standby corpus to be annotated through text data enhancement technology, such as increasing the diversity of the standby corpus to be annotated through synonym replacement, or generating new standby corpus to be annotated through data synthesis, or modifying and adding some attributes of the original standby corpus to be annotated through data enhancement, so that the data volume of the standby corpus to be annotated can meet the standard of the training model.
[0189] Furthermore, in one embodiment, the above step N3 includes the following step N3.1 and step N3.2.
[0190] Step N3.1: performing a similarity comparison between the corpus to be annotated and the annotated corpus samples;
[0191] Step N3.2: Annotate the data of the corpus to be annotated whose similarity is lower than a preset threshold to obtain the target annotated corpus.
[0192] Specifically, in order to reduce the workload of the data annotation process, after the corpus to be annotated is determined based on the corpus sample, the corpus to be annotated is converted into vectorization, and the similarity between the corpus to be annotated and the annotated corpus sample is compared based on the vectorization form; the corpus to be annotated with a higher similarity is removed, and the remaining corpus to be annotated with a similarity lower than a preset threshold is retained for data annotation to obtain the target annotated corpus.
[0193] Furthermore, in one embodiment, the above step N3 includes the following step N3.3 and step N3.4.
[0194] Step N3.3: Classify and annotate the corpus to be annotated based on a preset classification model to obtain initial annotated data and corresponding annotation scores;
[0195] Specifically, in order to reduce the workload of manual annotation, the above-mentioned corpus to be annotated is classified and annotated through a preset classification model to obtain multiple categories of initial annotation data and corresponding annotation scores, which represent the confidence / matching degree of the classification and annotation processing of the preset classification model for the initial annotation data of this type. It can be understood that in the cross-border e-commerce scenario, the above-mentioned corpus to be annotated usually has the characteristics of multi-language and large data volume, and the RoBERTa model is used to classify and annotate the corpus to be annotated, which has a relatively good effect.
[0196] It is understandable that in addition to the processing characteristics of multiple languages and large amounts of data, the preset classification model can also be selected based on other characteristics, such as generalization ability. Among them, generalization ability refers to the ability of machine learning algorithms to adapt to fresh samples, adding new data sets to the original data sets, and outputting a reasonable result through training; in other words, the purpose of machine learning is to learn the rules hidden behind the data, and the trained network can also give appropriate outputs for data outside the learning set with the same rules. This ability is called generalization ability.
[0197] For example, publicly labeled customer service conversation data and manually labeled specific scenario data are obtained as basic training samples, and the basic training samples are input into multiple classification models for classification and labeling. The target classification model with the strongest generalization ability is determined based on the output results of each classification model, and the target classification model is applied to the data labeling process of this application.
[0198] Step N3.4: Compare the annotation score with a preset score range. If the annotation score is within the preset score range, determine that the initial annotation data is the target annotation corpus.
[0199] Specifically, the annotation scores of each type of initial annotation data are compared with the preset score range. If the annotation scores are within the preset score range, it is determined that the preset classification model is more suitable for processing this type of initial annotation data and can be directly used as the target annotation corpus for model training.
[0200] For example, the RoBERTa (Robustly optimized BERT approach) model classifies and annotates the data to be annotated: Class A corpus, model score 0.85; Class B corpus, model score 0.87; Class C corpus, model score 0.75. The preset score range is that the model score is greater than or equal to 0.8, then Class A corpus and Class B corpus can be used as target annotated corpus for model training, and Class C corpus needs further processing.
[0201] Further, based on the above embodiment, after comparing the annotation score with the preset score range in the above step N3.4, the method also includes the following steps N3.51 to N3.53.
[0202] Step N3.51: if the annotation score is not within the preset score range, determining the initial annotation data as the annotation corpus to be reviewed;
[0203] Step N3.52: in response to the annotation instruction, performing a review and annotation process on the annotated corpus to be reviewed;
[0204] Step N3.53: Determine that the annotated corpus to be reviewed that has undergone the review and annotation process is the target annotated corpus.
[0205] Specifically, if the annotation score of the initial annotation data is not within the preset score range, that is, the annotation score is low, then the initial annotation data needs to be reviewed. In this embodiment, the review and annotation can be performed based on manual annotation or re-calling the classification model, and the reviewed and annotated corpus to be reviewed is used as the target annotated corpus.
[0206] For example, for the C-type corpus with a score of 0.75 in the above model, after the administrator triggers the annotation instruction, the administrator will review and annotate the C-type corpus in the form of manual review, and use the reviewed and annotated C-type corpus as the target annotated corpus.
[0207] Further, based on the above embodiment, after the above step N3.53, the method also includes the following step N3.6.
[0208] Step N3.6: training the preset classification model based on the annotated corpus to be reviewed that has undergone review and annotation processing.
[0209] Specifically, since the classification and annotation results of the to-be-reviewed annotation corpus are more accurate after the review and annotation process, they can be used as samples to train the above-mentioned preset classification model to optimize the classification and annotation capabilities of the preset classification model.
[0210] Furthermore, based on the above embodiments, the method also includes the following steps N3.71 and N3.72.
[0211] Step N3.71: In response to the classification instruction, generate a new preset scene classification;
[0212] Step N3.72: Divide the initial labeled data into the preset scene categories.
[0213] Specifically, since the preset classification model is based on the existing annotated corpus and e-commerce scenarios to classify the corpus to be annotated, there may be a situation where the corpus to be annotated does not belong to the existing e-commerce scenarios; in this embodiment, the administrator can trigger the classification instruction to generate a new preset scenario classification to directly adjust the corpus to be annotated or the primary annotation data to the preset scenario classification to complete the classification and labeling process.
[0214] Figure 7 FIG. 1 shows a flow chart of a corpus annotation process of the present application. Figure 7 As shown, the corpus annotation process includes the following steps N6.1 to N6.7.
[0215] Step N6.1: Determine the designated range according to the user's store and designated time, and import the buyer information within the designated range in the customer service system into the data annotation platform.
[0216] Step N6.2: For the imported buyer information, remove non-text information and repeated information, and vectorize the buyer information through embedding. Based on the vectorized form, remove the buyer information with a high similarity to the annotated corpus to obtain the corpus to be annotated.
[0217] Step N6.3: Use the RoBERta model to pre-classify and annotate the above corpus to be annotated, and generate corresponding classification scores.
[0218] Step N6.4: For some corpora with classification scores less than 0.8, the classification is retained for review; for some corpora with classification scores greater than 0.8, no further processing is required and the classification is removed.
[0219] Step N6.5: Manually review the classification scores less than 0.8.
[0220] Step N6.6: For some corpora with classification scores less than 0.8, manually correct the inappropriate classifications; if the corpus cannot be matched with the existing classifications, add new classifications.
[0221] Step N6.7: Import the manually reviewed corpus into the RoBERta model for training to optimize the pre-classification capability of the RoBERta model.
[0222] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. All equivalent transformations made by using the contents of the present application specification and drawings under the inventive concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for generating customer service information based on AI, characterized in that: Applied to an e-commerce ERP system, the method includes: Step S1: Obtaining the conversation information of the user's conversation scene; Step S2: identifying the user intention of the dialogue information based on the AI model prompt word calling method, and if it is identified that the user intention is related to the preset transaction information, obtaining the transaction prompt word according to the information link corresponding to the user; Step S3: querying the transaction data corresponding to the transaction prompt word based on the AI model prompt word calling method; Step S4: Generate customer service information based on the transaction data.
2. The AI-based customer service information generation method according to claim 1, characterized in that: Before step S1, the method further includes: Step S5.1: Obtaining the account transaction information of the user on the e-commerce platform; Step S5.2: Generate an information link corresponding to the account transaction information, and set the information link as the initial dialogue information of the conversation scenario.
3. The AI-based customer service information generation method according to claim 1, characterized in that: The preset transaction information includes product information and order information. If it is identified in step S2 that the user intention is related to the preset transaction information, a transaction prompt word is obtained according to the information link corresponding to the user, including: Step S2.1: If it is identified that the user's intention includes consulting product information or order information, a product prompt word or order prompt word corresponding to the product is obtained based on the information link corresponding to the user.
4. The AI-based customer service information generation method according to claim 1, characterized in that: After identifying the user intention of the dialogue information based on the AI model prompt word calling method in step S2, the method further includes: Step S2.2: If it is identified that the user intention is related to the preset service type, second customer service information is generated, and the user corresponding to the user intention is transferred to manual customer service.
5. The method for generating customer service information based on AI according to claim 4, characterized in that: The preset business types include product return and product refund, and step S2.2 includes: Step S2.21: If it is identified that the user intention includes product return, a first manual transfer message is generated as customer service information, the first manual transfer message includes process confirmation information, and the user corresponding to the user intention is transferred to manual customer service.
6. The method for generating customer service information based on AI according to claim 1, characterized in that: After identifying the user intention of the dialogue information based on the AI model prompt word calling method in step S2, the method further includes: Step S2.3: If it is recognized that the user intention includes a preset emotional feature, a second manual transfer message is generated as customer service information, the second manual transfer message includes an emotional response statement, and the user corresponding to the user intention is transferred to manual customer service.
7. The AI-based customer service information generation method according to claim 6, characterized in that: If it is recognized in step S2.3 that the user intention includes a preset emotional feature, a second manual transfer information is generated as customer service information, including: Step S2.31: If it is identified that the dialogue information includes preset words or preset sentences, and the preset words and the preset sentences can reflect the type and degree of emotion of the user, it is determined that the user intention includes preset emotional characteristics, and a second manual transfer information is generated as customer service information.
8. The method for generating customer service information based on AI according to claim 1, characterized in that: The associative ability of the AI model is the lowest threshold. After identifying the user intention of the dialogue information based on the AI model prompt word calling method in step S2, the method further includes: Step S2.4: If the AI model cannot recognize the user's intention, or the user's intention recognized by the AI model cannot achieve a preset match with the preset response strategy, the first preset reply information is retrieved as customer service information.
9. The AI-based customer service information generation method according to claim 1, characterized in that: After identifying the user intention of the dialogue information based on the AI model prompt word calling method in step S2, the method further includes: Step S2.5: If it is identified that the user's intention includes publishing advertising information, the content of the dialog information containing the advertising information is marked and intercepted, and the second preset reply information is retrieved as customer service information.
10. An e-commerce customer service system, characterized in that: The system is used to execute the operating instructions contained in the AI-based customer service information generation method as described in any one of claims 1-9.
Citation Information
Cited By
Data processing method and system
CN121681728A