Customer service question and answer statement generation method, customer service system, equipment and medium

Through the collaboration of the intelligent body, the problem of poor Q&A service and recommendation results in the existing technology is solved, and the Q&A service and recommendation results are achieved with more accurate and user experience.

CN119917630AActive Publication Date: 2025-05-02CHINA UNICOM SMART CONNECTION TECH LTD

Patent Information

Application Number
CN202411998921.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The customer service Q&A sentences generated in the existing technology in Q&A services and recommendation scenarios have poor results, cannot effectively answer user questions, and are prone to excessive marketing recommendations, resulting in poor user experience.

Method used

Through interactive collaboration between agents of different roles, customer service answers are generated with both Q&A service and recommendation. The planning agent determines the target Q&A based on the target questions, the Q&A agent generates question answer data, the planning agent decides whether to perform recommendation services, the recommended agent generates recommendation data, and summarizes the agent to finally generate customer service Q&A statements.

Benefits of technology

It improves the generation effect of customer service Q&A sentences in the Q&A scenarios, ensures the accuracy of the data of the question answers, avoids mechanical marketing recommendations, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917630A_ABST
    Figure CN119917630A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly discloses a customer service question and answer statement generation method, a customer service system, equipment and a medium. The method comprises the steps of determining a target question-answering agent for processing a target question based on a planning agent according to a question type corresponding to the target question and function description information corresponding to multiple question-answering agents; processing the target question based on the target question and answer agent, and generating question answer data corresponding to the target question; based on the planning agent, according to the target question, the question answering data corresponding to the target question and a preset question answering strategy, determining whether to execute a preset recommendation service, and when it is determined that the preset recommendation service is executed, generating recommendation data corresponding to the target question based on the recommendation agent; and based on the summary agent, according to the question answer data and the recommendation data, generating a customer service question and answer statement corresponding to the target question. According to the method, the customer service question and answer statement with double targets of question and answer service and recommendation can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method for generating a customer service question and answer statement, a customer service system, a device, and a medium. Background Art

[0002] In application scenarios such as e-commerce, in order to improve the efficiency of question and answer responses, intelligent customer service is usually used to answer questions raised by users and provide product recommendation services to users.

[0003] However, in the existing customer service question and answer sentence generation method, due to the complexity and diversity of the questions raised by users, the question and answer sentences generated by intelligent customer service cannot effectively answer user questions.

[0004] Moreover, after answering user questions, intelligent customer service will make mechanical marketing recommendations, which will lead to excessive marketing recommendations and repeated recommendations, resulting in poor user experience. Summary of the invention

[0005] To this end, the present disclosure provides a method for generating customer service question and answer statements, a customer service system, a device and a medium to solve the problem in the prior art that customer service question and answer statements generated in question and answer service and recommendation scenarios have poor effects.

[0006] In order to achieve the above-mentioned object, the first aspect of the present disclosure provides a method for generating a customer service question and answer statement, comprising:

[0007] Based on the planning agent, according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents, determine a target question-answering agent for processing the target question from the multiple question-answering agents;

[0008] Processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question;

[0009] Based on the planning agent, determining whether to execute a preset recommendation service according to the target question, the question answer data corresponding to the target question and the preset question-answering strategy, and generating the recommendation data corresponding to the target question based on the recommendation agent if it is determined to execute the preset recommendation service;

[0010] Based on the summary agent, a customer service question and answer statement corresponding to the target question is generated according to the question answer data and the recommendation data.

[0011] In an optional implementation, the question-answering agent includes a query-type agent and a knowledge-type agent. When the target question-answering agent is the query-type agent, processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question includes:

[0012] Inputting the target question and multiple interface description information corresponding to multiple preset query interfaces into the query type agent, so that the query type agent selects a target query interface corresponding to the target question from the multiple preset query interfaces according to the multiple interface description information, and generates parameter information corresponding to the target query interface according to the target question;

[0013] Matching the parameter information with preset parameter words, and updating the parameter information according to the matching result;

[0014] The target query interface is run according to the updated parameter information, and question answer data corresponding to the target question is generated according to the running result of the target query interface.

[0015] In an optional implementation manner, matching the parameter information with a preset parameter term includes:

[0016] Extracting a first preset parameter word that matches the parameter type corresponding to the parameter information from the product sample information, matching the parameter information with the first preset parameter word, and obtaining a first matching result;

[0017] Performing regular expression matching on the parameter information and a second preset parameter word in the preset parameter word library to obtain a second matching result;

[0018] The matching result is obtained according to the first matching result and the second matching result.

[0019] In an optional implementation, when the target question-answering agent is the knowledge-type agent, processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question includes:

[0020] Slicing the preset document knowledge data to obtain multiple data slices corresponding to the preset document knowledge data;

[0021] Extracting a target keyword from the target question, generating a related keyword associated with the target keyword according to the semantics of the target keyword, and using the target keyword and the related keyword as search keywords;

[0022] According to the search keyword, a target data slice corresponding to the search keyword is retrieved from the multiple data slices;

[0023] The target question and the target data slice are input into the knowledge type agent, so that the knowledge type agent generates question answer data corresponding to the target question according to the target data slice.

[0024] In an optional implementation, the generating the recommendation data corresponding to the target question based on the recommendation agent includes:

[0025] Acquire relevant dialogue data corresponding to the target question from historical dialogue data;

[0026] Performing vector matching on the associated conversation data and a plurality of preset recommended case data, and selecting target recommended case data corresponding to the associated conversation data according to the vector matching result;

[0027] Prompt information is generated according to the target recommendation case data and the preset answer strategy, and the prompt information is input into the recommendation agent so that the recommendation agent generates recommendation data corresponding to the target question according to the prompt information.

[0028] In an optional implementation, the preset question-and-answer strategy and the preset recommended case data are generated in the following manner:

[0029] Extracting information from each conversation data in the historical conversation data to obtain a question-answering strategy corresponding to the conversation data and a conversation result corresponding to the conversation data;

[0030] Determine the number of positive samples and the number of negative samples corresponding to the question-answering strategy according to the conversation results corresponding to the multiple conversation data corresponding to the same question-answering strategy;

[0031] Calculate the strategy effectiveness of the question-answering strategy according to the number of positive samples and the number of negative samples corresponding to the question-answering strategy;

[0032] In the case where the strategy effectiveness is higher than a preset threshold, the question-and-answer strategy is used as the preset question-and-answer strategy, and the preset recommendation case data is generated according to the dialogue data corresponding to the question-and-answer strategy.

[0033] In an optional implementation, the summary agent is trained according to preset questions and question-answering statements of preset speech styles corresponding to the preset questions, and the generation of customer service question-answering statements corresponding to the target questions based on the question answer data and the recommendation data by the summary agent includes:

[0034] Performing data filling processing and / or redundant data filtering processing on the question answer data and the recommendation data;

[0035] The processed question answer data and recommendation data are input into the summary agent so that the summary agent generates a customer service question and answer statement corresponding to the target question according to the preset speech style.

[0036] A second aspect of the present disclosure provides a customer service system, including: a planning agent, a question-answering agent, a summarizing agent, and a recommending agent;

[0037] The planning agent is used to determine a target question-answering agent for processing the target question from the multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents;

[0038] The question-answering agent is used to process the target question and generate question answer data corresponding to the target question;

[0039] The planning agent is further used to determine whether to execute a preset recommendation service according to the target question, the question answer data corresponding to the target question, and the preset question-answering strategy;

[0040] The recommendation agent is used to generate recommendation data corresponding to the target problem when determining to execute the preset recommendation service;

[0041] The summarizing agent is used to generate a customer service question and answer statement corresponding to the target question based on the question answer data and the recommendation data.

[0042] A third aspect of the present disclosure provides an electronic device, including:

[0043] one or more processors;

[0044] A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for generating customer service question and answer statements;

[0045] One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

[0046] A fourth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the above-mentioned method for generating customer service question and answer statements when the program is executed by a processor.

[0047] The present disclosure has the following advantages:

[0048] In the disclosed embodiment, through the interactive collaboration between agents of different roles, a customer service answer statement with dual goals of question-answering service and recommendation is generated. The planning agent determines the target question-answering agent for processing the target question from multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to multiple question-answering agents; the question-answering agent generates question-answering data in a targeted manner to ensure the data accuracy of the question-answering data; and the planning agent further confirms whether it is necessary to perform the recommendation service based on the question-answering data generated by the question-answering agent and the preset question-answering strategy. Only when it is necessary to perform the recommendation service, the recommendation data corresponding to the target question will be generated based on the recommendation agent, avoiding mechanical marketing recommendations after answering user questions; and finally, the summary agent summarizes the generated question-answering data and recommendation data to generate the final customer service question-answering statement, thereby improving the generation effect of the customer service question-answering statement in the question-answering service and recommendation scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to provide further understanding of the present disclosure and constitute a part of the specification. They are used to explain the present disclosure together with the following detailed description, but do not constitute a limitation of the present disclosure.

[0050] Figure 1 A flowchart of a method for generating a customer service question and answer statement provided in an embodiment of the present disclosure;

[0051] Figure 2 A schematic diagram of a method for generating a customer service question and answer statement provided in an embodiment of the present disclosure;

[0052] Figure 3 is a schematic diagram of the application of each intelligent agent in the embodiment of the present disclosure;

[0053] Figure 4 A block diagram of a customer service system provided in an embodiment of the present disclosure;

[0054] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0055] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0056] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0057] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0058] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0059] The embodiments described in the present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic diagrams of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0060] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0061] In e-commerce customer service dialogue scenarios, user questions are diverse and complex, resulting in the question and answer statements generated by intelligent customer service being unable to effectively meet user requirements. In addition, the question and answer statements generated by intelligent customer service when making marketing recommendations are prone to repeated wording, leading to excessive marketing recommendations and a poor user experience.

[0062] In view of this, the disclosed embodiment provides a method for generating customer service question and answer statements, a customer service system, a device and a medium, which generate customer service answer statements with both question and answer service and recommendation through interactive collaboration between agents of different roles. The planning agent determines the target question and answer agent for processing the target question from multiple question and answer agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question and answer agents; the question and answer agent generates question and answer data in a targeted manner to ensure the data accuracy of the question and answer data; and the planning agent further confirms whether it is necessary to perform the recommendation service according to the question and answer data generated by the question and answer agent and the preset question and answer strategy. Only when it is necessary to perform the recommendation service, the recommendation data corresponding to the target question will be generated based on the recommendation agent, avoiding mechanical marketing recommendations after answering the user's questions; thus, the summary agent finally summarizes the generated question and answer data and the recommendation data to generate the final customer service question and answer statement, thereby improving the generation effect of the customer service question and answer statement in the question and answer service and recommendation scenarios.

[0063] In a first aspect, an embodiment of the present disclosure provides a method for generating a customer service question and answer statement. Figure 1 A flowchart of a method for generating a customer service question and answer statement provided in an embodiment of the present disclosure, referring to Figure 1 , the method comprising:

[0064] Step S110: Based on the planning agent, a target question-answering agent for processing the target question is determined from multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents.

[0065] The target question is the consulting question raised by the user during the conversation process.

[0066] Among them, the planning agent is used to coordinate the planning of question-answering services and recommendation services, including selecting a question-answering agent to handle target questions to provide question-answering services, and determining whether to provide preset recommendation services based on the recommendation agent.

[0067] Among them, each question-answering agent corresponds to a question type, and is used to generate answer data for questions corresponding to this question type.

[0068] Specifically, the question types may include query questions, knowledge questions, and other question types, and the embodiments of the present disclosure do not limit this. Accordingly, for each question type, there is a corresponding question-answering agent for generating questions to handle the question type.

[0069] In an optional implementation, the question-answering agent includes a query-type agent corresponding to query-type questions and a knowledge-type agent corresponding to knowledge-type questions.

[0070] Furthermore, the target question can be input into the planning agent, so that the planning agent can determine the type of question corresponding to the target question according to the question intent of the target question. For example, when the target question corresponds to the query intent of product inventory query, price inquiry, discount information inquiry, etc., the type of question corresponding to the target question is determined to be a query type question. When the target question corresponds to the question-answering intent such as knowledge question-answering, the type of question corresponding to the target question is determined to be a knowledge type question.

[0071] In an optional implementation, before determining the target question-answering agent for processing the target question, the target question may be standardized based on the planning agent so that the question content of the target question is expressed in a standardized manner.

[0072] Normalization processing can include various processing methods such as content filling and word order adjustment, which can be implemented by the planning agent based on the Chain of Thought (CoT) method.

[0073] Among them, the functional description information corresponding to the question-answering agent is used to describe the functional characteristics such as the question types corresponding to the questions that the question-answering agent can handle.

[0074] Accordingly, task prompt information can be jointly constructed based on the target question, functional description information corresponding to multiple question-and-answer agents, and task description information to input into the planning agent, so that the planning agent can determine the question type of the target question, and determine the target question-and-answer agent for processing the target question from multiple question-and-answer agents based on the question type corresponding to the target question and the functional description information corresponding to multiple question-and-answer agents.

[0075] It should be noted that the planning agent and the question-answering agent can be constructed based on the existing large language model (LLM), and the embodiments of the present disclosure do not limit this.

[0076] Step S120: Process the target question based on the target question-answering agent and generate question answer data corresponding to the target question.

[0077] Among them, the question answer data corresponding to the target question refers to the answer content output by the target question-answering agent in response to the target question.

[0078] In an optional implementation, when the target question-answering agent is a query-type agent, a preset query interface can be used to enable the target question-answering agent to select the corresponding preset query interface according to the target question and generate question answer data corresponding to the target question.

[0079] Correspondingly, the target question is processed based on the target question-answering agent to generate question answer data corresponding to the target question, including: inputting the target question and multiple interface description information corresponding to multiple preset query interfaces into the query type agent, so that the query type agent selects the target query interface corresponding to the target question from multiple preset query interfaces according to the multiple interface description information, and generates parameter information corresponding to the target query interface according to the target question; matches the parameter information with preset parameter terms, and updates the parameter information according to the matching result; runs the target query interface according to the updated parameter information, and generates question answer data corresponding to the target question according to the running result of the target query interface.

[0080] Each preset query interface is used to implement a query function, and the query functions implemented by different preset query interfaces are different. There are corresponding parameters for each preset query interface, and the parameters are determined according to the query function corresponding to the preset query interface.

[0081] The interface description information includes interface function description information and interface parameter description information. The interface function description information is used to describe the query function corresponding to the query interface, and the interface parameter description information is used to describe the meaning of the parameters corresponding to the query interface.

[0082] For example, the preset query interface may include: a product inventory query interface, a price query interface, a discount activity query interface, etc., and correspondingly, the corresponding query functions are respectively querying product inventory, querying prices, and querying discount activities.

[0083] Therefore, the interface description information can be used to describe in detail the function and parameter meaning of each preset query interface.

[0084] Correspondingly, the query type agent can select a target query interface corresponding to the target question from multiple preset query interfaces according to the target question and multiple interface description information, and convert the target question into parameter information corresponding to the target query interface.

[0085] For example, when the target question is "Are white model A electronic products still in stock?", the corresponding target query interface can be a product inventory query interface, and the target question can be converted into parameter information corresponding to the query interface, such as color parameter: white, model parameter: model A.

[0086] It should be noted that in the process of converting the target question into parameter information, the parsed parameter information may be wrong due to reasons such as incorrect expression of the target question. Therefore, it is necessary to match the parameter information with the preset parameter terms, and then update the parameter information according to the matching results.

[0087] Among them, the preset parameter words refer to standard parameter words used to characterize product names, attributes, and types. When the preset query interface is called, valid query results can be queried in the database through the preset parameter words.

[0088] In the disclosed embodiment, a preset query interface based on a query type agent and business scenario is constructed to generate question and answer statements corresponding to dynamic query type questions in a user session, thereby improving the generation effect of question and answer statements under query type questions.

[0089] In an optional implementation, in order to improve the matching effect between parameter information and preset parameter words, the parameter information is matched with the preset parameter words, including: extracting a first preset parameter word that matches the parameter type corresponding to the parameter information from the product sample information, matching the parameter information with the first preset parameter word to obtain a first matching result; performing regular matching on the parameter information with a second preset parameter word in a preset parameter vocabulary to obtain a second matching result; and obtaining a matching result based on the first matching result and the second matching result.

[0090] The product sample information refers to the product description information corresponding to the product sample. Since there are many types of products, a preset number of popular product information can be selected from multiple preset product information as product sample information each time, and the first preset parameter word contained in the product sample information is matched with the parameter information.

[0091] The parameter type corresponding to the parameter information is used to characterize product information and product characteristics. For example, the parameter type may be a product name, a product attribute, a product type, and the like.

[0092] Thus, according to the parameter type, the first preset parameter words matching the parameter type can be extracted from the product sample information, and the parameter information is matched with the first preset parameter words to obtain a first matching result. Accordingly, the first matching result can include the first preset parameter words related to the parameter information.

[0093] The preset parameter word library includes second preset parameter words corresponding to different parameter types preset according to the product standard alias word list.

[0094] By performing regular matching between the parameter information and the second preset parameter words in the preset parameter vocabulary, a second matching result is obtained, and the second preset parameter words related to the parameter information can be screened out.

[0095] Finally, when a matching result is obtained based on the first matching result and the second matching result, the preset parameter words most relevant to the parameter information can be selected as the final matching result based on the first matching result and the second matching result, or the preset parameter words contained in the first matching result and the second matching result can be sorted by relevance to generate a preset parameter word sequence, and the preset parameter word sequence can be used as the matching result.

[0096] In the embodiments of the present disclosure, taking into account the possibility of incorrect expression of parameter information, the product sample information corresponding to products with higher popularity values ​​and the standard preset parameter vocabulary are combined to extract preset parameter words that match the parameter information, thereby facilitating the normalization of parameter information in an irregular format and ensuring the stability of the query process.

[0097] In an optional implementation, in order to improve the accuracy of updating parameter information, updating the parameter information according to the matching results includes: selecting a target parameter word with the highest similarity to the parameter information from preset parameter words according to the matching results, and updating the parameter information according to the target parameter word.

[0098] The matching result represents the preset parameter words that match the parameter information, and the matching similarity between the parameter information and the preset parameter words.

[0099] After obtaining the updated parameter information, the query type agent can run the target query interface according to the updated parameter information, thereby generating question answer data corresponding to the target question according to the running result of the target query interface.

[0100] Specifically, a code parser is provided in the query type agent for executing query functions corresponding to the preset query interface, such as product discount comparison, price sorting, time calculation, etc., so as to obtain the operation result of the target query interface.

[0101] It should be noted that, when the running result of the target query interface is empty, the parameter information can be updated again according to the matching result, and the target query interface can be run according to the updated parameter information, which is not limited in the embodiment of the present disclosure.

[0102] In an optional implementation, when the target question-answering agent is a knowledge-type agent, in order to improve the accuracy of the knowledge-type agent in generating question answer data, keywords can be extracted from the target question, thereby retrieving knowledge fragments based on the extracted keywords, and generating question answer data based on the retrieved knowledge fragments.

[0103] Correspondingly, in the case where the target question-answering agent is a knowledge-type agent, the target question is processed based on the target question-answering agent to generate question answer data corresponding to the target question, including: slicing the preset document knowledge data to obtain multiple data slices corresponding to the preset document knowledge data; extracting target keywords from the target question, generating associated keywords that have an association relationship with the target keywords based on the word semantics of the target keywords, and using the target keywords and the associated keywords as retrieval keywords; based on the retrieval keywords, retrieving the target data slices corresponding to the retrieval keywords from multiple data slices; and inputting the target question and the target data slices into the knowledge-type agent, so that the knowledge-type agent generates question answer data corresponding to the target question based on the target data slices.

[0104] The preset document knowledge data is the professional knowledge document data corresponding to the preset business scenario field. When the preset document knowledge data is segmented, it can be segmented according to the preset data length, so as to obtain multiple data segments corresponding to the preset document knowledge data.

[0105] Among them, the target keywords refer to the key words or phrases that can represent the question content and subject corresponding to the target question.

[0106] By extracting target keywords from the target question, multiple data slices corresponding to the preset document knowledge data can be retrieved according to the target keywords, thereby screening out the target data slice corresponding to the keyword, which contains the knowledge data corresponding to the target question.

[0107] It should be noted that since the target keyword may be inaccurately expressed, after extracting the target keyword, it is also possible to generate associated keywords that have an association relationship with the target keyword based on the word semantics of the target keyword. For example, the target keyword is matched with the knowledge words contained in a preset knowledge vocabulary, so as to select knowledge words that have semantic similarity with the target keyword as associated keywords.

[0108] The associated keyword is the supplementary keyword corresponding to the target keyword. Therefore, when searching for knowledge fragments, the target keyword and the associated keyword can be used as search keywords, and the target data fragments can be screened out according to the search keywords, thereby improving the screening effectiveness and reliability of the target data fragments.

[0109] After the target data slice is screened out, the target question and the target data slice are input into the knowledge type agent, so that the knowledge type agent can generate question answer data corresponding to the target question according to the content of the target data slice.

[0110] It should be noted that in order to improve the reliability of generated question answering data, in an optional implementation method, the target question, target data segment and data generation requirements are input into the knowledge type agent, so that the knowledge type agent can generate question answering data based on the target data segment when the target data segment is relevant to the target question.

[0111] Thus, it is avoided that erroneous question answer data is generated when the filtered target data slices are irrelevant to the target question.

[0112] Correspondingly, when the filtered target data fragments are irrelevant to the target problem, the knowledge type agent can output empty data to indicate that the target data fragments are not relevant to the target data.

[0113] Step S130: Based on the planning agent, determine whether to execute the preset recommendation service according to the target question, the question answer data corresponding to the target question and the preset question-answering strategy. If it is determined to execute the preset recommendation service, generate the recommendation data corresponding to the target question based on the recommendation agent.

[0114] Among them, the preset Q&A strategy refers to the preset answer strategy for different questions, which includes Q&A skills, Q&A language, etc. For example, when the user's question expresses concern about product quality, you should first understand the user's concerns, then explain according to the product's formal qualification description, and finally introduce the return guarantee information.

[0115] Accordingly, the preset question-and-answer strategy can be generated by data mining historical conversation data and / or SOP process specifications based on business experience.

[0116] Thus, by inputting the target question, the question answer data corresponding to the target question, and the preset question-answering strategy into the planning agent, the planning agent can refer to the preset question-answering strategy to determine whether to execute the preset recommendation service.

[0117] Exemplarily, the preset question-answering strategy includes preset questions and the question-answering process corresponding to the preset questions. Thus, the planning agent searches for the corresponding question-answering process in the preset question-answering strategy according to the target question and the question answer data corresponding to the target question. In the case where the question-answering process includes a recommendation process, it is determined to execute the preset recommendation service.

[0118] For example, for product inventory consultation questions, the preset question-answering strategy stipulates that relevant products should be recommended when there is no inventory. Therefore, the planning agent can determine to execute the preset recommendation service when the answer data corresponding to the product inventory consultation question is no inventory.

[0119] Among them, the recommendation agent is used to explore user needs and generate corresponding recommendation data. The recommendation data can be recommendation speech information such as product description content, product purchase links, etc., which is not limited in this embodiment of the present disclosure.

[0120] Thus, when it is determined to execute the preset recommendation service, recommendation data corresponding to the target problem can be generated based on the recommendation agent.

[0121] Step S140: Based on the summary agent, a customer service question and answer statement corresponding to the target question is generated according to the question answering data and the recommendation data.

[0122] Among them, the summarizing agent is used to summarize the speech and post-process the data generated by the target question-answering agent and the recommendation agent.

[0123] Specifically, the speech generation requirements and preset business rules can be input into the summary agent, so that the customer service question and answer statements output by the summary agent based on the question answering data and the recommended data are standardized and compliant.

[0124] In addition, when the recommendation agent does not need to generate recommendation data, the summary agent can generate customer service question and answer statements based only on the question answer data, and the embodiments of the present disclosure do not limit this.

[0125] It should also be noted that the above-mentioned intelligent agents in the embodiments of the present disclosure can all be constructed based on the large language model LLM, and the embodiments of the present disclosure are not limited to this.

[0126] In the disclosed embodiment, through the interactive collaboration between agents of different roles, a customer service answer statement with dual goals of question-answering service and recommendation is generated according to the interaction results. The planning agent determines the target question-answering agent for processing the target question from multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents; the question-answering agent generates the question answering data in a targeted manner to ensure the data accuracy of the question answering data; and the planning agent further confirms whether it is necessary to perform the recommendation service according to the question answering data generated by the question-answering agent and the preset question-answering strategy. Only when it is necessary to perform the recommendation service, the recommendation data corresponding to the target question will be generated based on the recommendation agent, avoiding mechanical marketing recommendations after answering the user's questions; and finally, the summary agent summarizes the generated question answering data and recommendation data to generate the final customer service question-answering statement, which improves the generation effect of the customer service question-answering statement in the question-answering service and recommendation scenarios.

[0127] In addition, those skilled in the art may also make various modifications and variations to the method disclosed herein:

[0128] In an optional implementation, in order to improve the recommendation effect of the recommendation agent in generating recommendation data, target recommendation case data can be screened out from preset recommendation case data based on the associated dialogue data corresponding to the target question, so that the recommendation agent can generate recommendation data based on the target recommendation case data.

[0129] Correspondingly, generating recommendation data corresponding to the target question based on the recommendation agent includes: acquiring associated conversation data corresponding to the target question from historical conversation data; performing vector matching on the associated conversation data and a plurality of preset recommendation case data, and selecting target recommendation case data corresponding to the associated conversation data based on the vector matching result; generating prompt information based on the target recommendation case data and the preset answer strategy, and inputting the prompt information into the recommendation agent, so that the recommendation agent generates recommendation data corresponding to the target question based on the prompt information.

[0130] The historical conversation data refers to the contextual conversation data in the historical time. The associated conversation data corresponding to the target question refers to the historical conversation data related to the target question.

[0131] For example, the target question and the first N rounds of dialogue data or the first N dialogue sentences corresponding to the target question, where N is a natural number, which is not limited in the embodiments of the present disclosure.

[0132] Since the target questions raised by users may contain incomplete information, the associated conversation data corresponding to the target questions is extracted to reflect the user's actual intentions and the historical conversation process between the user and the intelligent customer service.

[0133] Among them, the preset recommended case data refers to the preset recommended case template, which may include recommended case dialogues, processes and other contents.

[0134] Specifically, the preset recommendation case data may be stored in a vector database, so that when recommendation data needs to be generated, target recommendation case data similar to the associated conversation data may be selected by performing vector matching between the associated conversation data and a plurality of preset recommendation case data.

[0135] Furthermore, by generating prompt information based on the target recommendation case data and the preset answer strategy, and inputting the prompt information into the recommendation agent, the recommendation agent can refer to the target recommendation case data and the preset answer strategy for reasoning and generate recommendation data.

[0136] It should be noted that the prompt information may also include the target question, the answer data corresponding to the target question, the associated dialogue data and other related information, which is not limited in this embodiment of the present disclosure.

[0137] In the disclosed embodiment, an independent recommendation agent is used to jointly construct prompt information through preset question-and-answer strategies summarized through business experience and offline data mining, and target recommendation case data corresponding to associated dialogue data corresponding to the target question in the preset recommendation case data. Thus, recommendation data is generated according to the preset answer strategy and the target recommendation case data, so that product recommendations are made using corresponding question-and-answer strategies according to different dialogue scenarios, thereby solving the problem of poor recommendation results caused by traditional recommendation statements that only have simple recommendation words but lack recommendation strategies, recommendation timing selection, and insight into user needs.

[0138] In an optional implementation, in order to improve the generation effect of the preset question and answer strategy and the preset recommended case data, data mining can be performed from historical conversation data to generate the preset question and answer strategy and the preset recommended case data.

[0139] Correspondingly, the preset question-and-answer strategy and the preset recommended case data are generated in the following manner: information is extracted from each dialogue data in the historical dialogue data to obtain the question-and-answer strategy corresponding to the dialogue data and the dialogue result corresponding to the dialogue data; the number of positive samples and the number of negative samples corresponding to the question-and-answer strategy are determined based on the dialogue results corresponding to multiple dialogue data corresponding to the same question-and-answer strategy; the strategy effectiveness of the question-and-answer strategy is calculated based on the number of positive samples and the number of negative samples corresponding to the question-and-answer strategy; when the strategy effectiveness is higher than a preset threshold, the question-and-answer strategy is used as the preset question-and-answer strategy, and the preset recommended case data is generated based on the dialogue data corresponding to the question-and-answer strategy.

[0140] Among them, each conversation data in the historical conversation data refers to a complete conversation data between the user and the intelligent customer service.

[0141] The question-answering strategy corresponding to the dialogue data refers to the dialogue process, discourse sentences, etc. extracted from the dialogue data. The dialogue results corresponding to the dialogue data include the user's service evaluation of the intelligent customer service and / or product conversion status.

[0142] Among them, the number of positive samples corresponding to the question-answering strategy refers to the number of conversation data whose conversation results are successful product conversion and / or service evaluation reaching the preset evaluation value, and the number of negative samples corresponding to the question-answering strategy refers to the number of conversation data whose conversation results are failed product conversion and / or service evaluation not reaching the preset evaluation value.

[0143] Among them, strategy effectiveness is used to characterize the strategy execution effect of the question-answering strategy. The higher the strategy effectiveness, the more effective the question-answering strategy is.

[0144] Therefore, according to the number of positive samples and the number of negative samples corresponding to the question-answering strategy, the strategy effectiveness of the question-answering strategy can be calculated. For example, the ratio between the number of positive samples and the total number of samples corresponding to the number of positive samples and the number of negative samples is calculated to obtain the strategy effectiveness.

[0145] Correspondingly, when the strategy effectiveness is higher than a preset threshold, the question-and-answer strategy can be used as a preset question-and-answer strategy, and preset recommendation case data is generated based on the dialogue data corresponding to the question-and-answer strategy.

[0146] Exemplarily, key conversation data may be extracted from the conversation data corresponding to the question-answering strategy, thereby generating preset recommendation case data based on the key conversation data.

[0147] In the disclosed embodiment, historical conversation data is mined based on user evaluation feedback and product conversion status to generate preset question-and-answer strategies and preset recommendation case data, thereby improving the data validity of the preset question-and-answer strategies and the preset recommendation case data, thereby helping to improve the accuracy of the planning agent's judgment on executing the preset recommendation service based on the preset question-and-answer strategy and the data effect of the recommendation agent generating recommendation data.

[0148] In an optional implementation, in order to improve the generation effect of the summary agent for customer service question and answer sentences, the summary agent can be trained according to preset questions and question and answer sentences of a preset style of speech corresponding to the preset questions, so that the summary agent can generate customer service question and answer sentences of a preset style of speech based on the question answer data and recommendation data.

[0149] Accordingly, the summary agent is trained according to preset questions and question and answer statements of preset speech styles corresponding to the preset questions. Based on the question answer data and recommendation data, the summary agent generates customer service question and answer statements corresponding to the target question, including: performing data filling processing and / or redundant data filtering processing on the question answer data and recommendation data; inputting the processed question answer data and recommendation data into the summary agent, so that the summary agent generates customer service question and answer statements corresponding to the target question according to the preset speech style.

[0150] The preset speech style refers to the language expression corresponding to the sentence. Different customer service roles may have different corresponding speech styles. Therefore, by collecting preset questions and the question and answer sentences of the artificial customer service roles corresponding to the preset questions and the preset speech styles, the large language model can be fine-tuned and trained according to the preset questions and the question and answer sentences to obtain the summary agent.

[0151] Among them, data filling processing for question answer data and recommendation data refers to supplementing missing data in question answer data and recommendation data, for example, missing product names, etc., to improve the sentence completeness of the generated customer service question and answer sentences.

[0152] In an optional implementation, data filling processing is performed on the question answering data and the recommendation data, including: based on the summarizing agent, determining whether there is missing data to be filled in the question answering data and the recommendation data, and determining the data type of the missing data; extracting target filling data corresponding to the data type from the associated dialogue data corresponding to the target question; and performing data filling processing on the question answering data and the recommendation data according to the target filling data.

[0153] Specifically, the question answering data and the recommendation data may be input into the summary agent so that the summary agent can determine whether there is any missing data to be filled in the question answering data and the recommendation data, such as a missing product name, product type, etc.

[0154] Therefore, according to the data type of the missing data, the target filling data corresponding to the data type is extracted from the associated dialogue data corresponding to the target question, and data filling processing is performed based on the target filling data.

[0155] For example, for a target question "What is the remaining inventory of product A?", the answer data is remaining inventory: 10. Therefore, the summary agent can determine that there is a product name to be filled in the question answer data, and then obtain the target filling data from the related data, that is, the product name is "Product A", and then fill the target filling data into the question answer data.

[0156] In the disclosed embodiment, the associated dialogue data corresponding to the target question is used to complete the missing key information in the question answer data and the recommendation data, such as the product name, so as to ensure the sentence integrity of the generated customer service question and answer sentences.

[0157] Among them, performing redundant data filtering on question answering data and recommendation data refers to filtering redundant information in question answering data and recommendation data corresponding to the content explained by the intelligent agent.

[0158] Specifically, the summary agent may directly perform redundant data filtering processing on the question answer data and the recommendation data, or redundant filtering rules may be set and data filtering processing may be performed based on the redundant filtering rules, and the embodiments of the present disclosure do not impose any restrictions on this.

[0159] Correspondingly, after the processed question answering data and recommendation data are input into the summary agent, since the summary agent is trained according to the question and answer sentences corresponding to the preset speech style, the summary agent can generate customer service question and answer sentences in the preset speech style based on the processed question answering data and recommendation data.

[0160] In the disclosed embodiments, by performing data filling and data filtering on question answer data and recommendation data, customer service question and answer statements are generated based on the processed data. On the one hand, the generation accuracy of the customer service question and answer statements is improved. On the other hand, since the summary agent is trained based on question and answer statements with a preset speech style, the generated customer service question and answer statements can also maintain the same preset speech style, thereby solving the problem of mechanical speech.

[0161] In an optional implementation, in order to improve the accuracy of generating customer service question and answer statements, the above method also includes: for any intelligent agent, according to the intelligent agent type corresponding to the intelligent agent, determining the verification rules corresponding to the intelligent agent; for any intelligent agent, verifying the output data of the intelligent agent according to the verification rules corresponding to the intelligent agent, and determining whether the output data is abnormal data, and if it is determined that the output data is abnormal data, instructing the intelligent agent to update the output data; if the number of updates of the output data reaches a preset number threshold, sending question clarification information to the client to confirm the target question.

[0162] Among them, different intelligent agent types correspond to different verification rules, and the specific verification rules can be adaptively set according to the needs of the application scenario, which is not limited in the embodiments of the present disclosure.

[0163] For example, for question-answering agents such as query-type agents or knowledge-type agents, the verification rules can be set to determine that the output question answer data is abnormal data when the output is empty data.

[0164] For another example, for the summarizing agent, the verification rules can be set to determine that the output customer service question and answer statements are abnormal data when the generated customer service question and answer statements contain preset non-standard language.

[0165] Thus, when it is determined that the output data is abnormal data, the agent is instructed to update the output data, and when the number of updates of the output data reaches a preset threshold, a question clarification message is sent to allow the user to confirm the accuracy of the target question.

[0166] It should also be noted that by setting verification instructions, the intelligent agent can automatically verify the output data according to the preset verification rules in the verification instructions, and regenerate the output data if the verification is abnormal data.

[0167] In the disclosed embodiment, a verification and error correction function is added to the intelligent agent to verify the output data of the intelligent agent, so that in the event of a verification anomaly, the intelligent agent can regenerate the output data, and when the number of regenerations reaches a preset threshold, the problem will be clarified to ensure the accuracy of the target problem.

[0168] To facilitate understanding, the specific implementation details of the above implementation are described below using a specific example.

[0169] The professional terms in the following examples are explained as follows:

[0170] (1) Large Model Agent: It is an intelligent agent built on a large language model (LLM). It has the ability to perceive user information, autonomously understand, make decisions, execute actions and return responses. The large model agent can simulate independent thinking processes. The large model agent consists of four key parts: planning, memory, tools and actions, which are responsible for task decomposition and strategy evaluation, information storage and recall, environmental perception and decision assistance, and converting thinking into actual actions.

[0171] (2) Planning Agent: Planning is the agent’s thinking model, which is responsible for breaking down the user’s complex tasks into executable subtasks and building execution strategies based on preset goals.

[0172] (3) Agent memory function: Memory is information storage and recall, including short-term memory and long-term memory. Short-term memory is used to store the current user conversation context and can support multiple rounds of dialogue; long-term memory stores knowledge data, excellent dialogue case data, etc., and is usually quickly accessed through technologies such as vector databases.

[0173] (4) Tool Agent: Tools are auxiliary means for Agent to execute decisions. Agent’s capabilities are expanded by accessing tools, such as product discount information query, product sales statistics, etc.

[0174] (5) Agent action function: Action is the process by which the agent transforms planning and memory into specific outputs, including intelligent customer service responding to users and calling tools in the external environment.

[0175] (6) Multi-Agent: Multi-Agent assigns different roles to different agents, such as overall planning agent, question-answering agent, recommendation agent, etc., and completes complex multi-objective tasks through collaborative cooperation between agents.

[0176] (7) RAG: Retrieval-Augmented Generation is a technology that combines information retrieval technology with large model generation. This technology retrieves relevant information from the product / service knowledge base and inputs it as prompts to the large model to enhance the model's ability to handle product / service knowledge-intensive tasks. By optimizing the output of the large language model, it overcomes its shortcomings in dealing with product domain expertise. RAG accesses the product / service internal knowledge base without retraining the model, allowing it to maintain relevance, accuracy, and timeliness in the intelligent customer service scenario.

[0177] (8) Chain of Thought (CoT): refers to a series of intermediate reasoning steps that aim to improve the performance of large models on complex reasoning tasks. For complex user questions, especially when multiple knowledge base searches or tool calls are required, it is difficult for large models to give correct answers. CoT enhances the reasoning ability of large models for complex problems by requiring them to output intermediate step-by-step reasoning steps before outputting the final answer.

[0178] (9) In-Context Learning: This is a special capability exhibited in large language models. By showing the model a few relevant examples, the model can learn what to do for a task. This allows the model to rely on examples and prompts in the context to guide the model's reasoning without explicit training.

[0179] In the 3C digital (Computer, Communication, Consumer Electronics) e-commerce customer service dialogue scenario, intelligent customer service needs to generate question and answer statements to communicate with potential purchasing users. While completing the answers to users' purchasing questions, actively guide users to place orders for products. Because the questions raised by users are complex and diverse, specifically manifested in colloquial descriptions, omitted information, aliases, typos, interfering noise information, repeated sentences, involving knowledge of multiple questions in the question and answer library, and the answer to the question requires reasoning, the conventional method of matching the questions in the question and answer library to return the question and answer statement cannot meet user needs.

[0180] At the same time, user intentions vary greatly, and it is difficult to cope with all conversation scenarios using traditional process canvas configurations. Moreover, in marketing recommendation scenarios, generating question and answer statements only through prompt marketing speech instructions can easily lead to excessive marketing problems such as speech duplication and speech pressure. In addition, in the marketing recommendation process of intelligent customer service, the ability to select marketing opportunities and proactively understand user needs is insufficient, resulting in a poor user experience.

[0181] In addition, some of the scripts and knowledge in customer service business scenarios have strict requirements and specifications, which need to be followed by the intelligent customer service system.

[0182] Specifically, the existing customer service question and answer sentence generation method has the following problems:

[0183] (1) Semantic understanding problem: For users’ diverse, context-related, and non-standard expressions, the semantic vector representation model or the large model is not capable of understanding them. This results in an inaccurate understanding of user needs, resulting in poor results in generating question-answering sentences.

[0184] (2) Semantic similarity matching problem: The semantic similarity between user questions and knowledge base questions is not calculated accurately, and the wrong QA pairs are matched, or the similarity scores of questions with the same meaning but large differences in expression are insufficient to reach the threshold, making it impossible to generate accurate QA sentences;

[0185] (3) Fixed FAQ questions: Due to the limitations of FAQ, only standard question and answer statements can be provided, and mechanical answers cannot effectively answer user questions, resulting in poor user experience;

[0186] (4) Complex questions: User questions involve multiple FAQs, or require reasoning to generate question-answer statements;

[0187] (5) Complex task processing issues: Limited by the dialogue configuration of the logical process canvas, it is impossible to generate comprehensive question-and-answer statements to deal with complex and diverse user questions. In addition, the processing of multiple rounds of dialogues often falls into a mechanical cycle;

[0188] (6) Dynamic query issues: For some real-time query system issues (such as checking inventory, checking promotions at different stores, whether delivery is available at the current time, etc.), the intelligent customer service needs to be able to call tools to query;

[0189] (7) Lack of marketing strategy: The method of using only prompt marketing words to let the big model generate question-and-answer sentences according to instructions is not effective. The question-and-answer sentences can only contain simple marketing words, and lack high-level marketing strategies such as marketing timing selection and active insight into user needs.

[0190] (8) Lack of overall planning for service and marketing: Using search enhancement to generate RAGs to answer user questions and provide services, and guiding marketing through marketing role setting, can easily lead to repeated and oppressive language in question and answer statements, resulting in poor marketing results.

[0191] In view of this, a method for generating customer service question and answer statements is proposed in this example:

[0192] (1) Use planning agents to coordinate the planning of services and marketing in the conversation process, thereby solving the problems of excessive marketing and repeated marketing caused by the lack of marketing recommendation goals and mechanical marketing recommendations after answering user questions.

[0193] (2) An independent recommendation agent is used to summarize marketing strategies, skills, and words through business experience and offline data mining, and recall similar samples in the preset recommendation case data as in-context learning instances. This solves the problem that traditional intelligent customer service can only generate simple marketing recommendation words, lacks marketing strategies, and lacks marketing opportunity selection and insight into user needs for marketing recommendations.

[0194] (3) Using question-answering agents such as query type agents and constructing preset query interface APIs based on business scenarios to answer dynamic query questions in user sessions, greatly increasing the practicality of intelligent customer service.

[0195] (4) Use the summary agent to generate a summary of the output of the question-answering agent and the recommendation agent, and fine-tune the large model through artificial customer service conversation data to obtain the summary agent, so that the generated customer service question and answer sentences are aligned with the artificial conversation style. At the same time, by adding speech requirements and following rules in the summary agent, the standardization of customer service question and answer data is ensured, and by adding error correction and fault tolerance mechanisms, effective collaboration between agents is ensured.

[0196] (5) Use multiple agents to assist in completing the conversation process, assign different roles to different agents, and achieve the goals of question-and-answer service and marketing recommendation through collaboration between multiple agents. This solves the problems of difficulty in handling complex tasks, low coverage of conversation process configuration, mechanical processing, lack of intelligence, and poor semantic understanding due to non-standard user expressions, as well as the problem of using a single agent as a service and marketing agent, which leads to step-by-step decision-making, lack of overall planning, and easy to fall into an endless loop when generating customer service question-and-answer statements.

[0197] Figure 2 This is a schematic diagram of the method for generating customer service question and answer statements proposed in this example. Figure 2 , the method comprising:

[0198] Step S201: Based on the planning agent, a target question-answering agent for processing the target question is determined from multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents.

[0199] Specifically, Figure 3 This is a schematic diagram of the application of each agent in this example, refer to Figure 3 For the target problem raised by the user, the planning agent rewrites the target problem by CoT to generate a more standardized and complete target problem, thereby helping the model to better understand and plan tasks.

[0200] In addition, the data can be cleaned through regular expressions for typos, reduplications, non-standard characters, etc. in the target questions.

[0201] Correspondingly, after understanding the user's question intent, the planning agent will guide the entire question-answering statement generation process and call other agents for interaction in the process.

[0202] The planning agent will plan according to preset prompts, such as functional description information corresponding to multiple question-answering agents, so as to determine the target question-answering agent for processing the target problem from multiple question-answering agents such as query-type agents and knowledge-type agents.

[0203] Step S202: Process the target question based on the target question-answering agent and generate question answer data corresponding to the target question.

[0204] Specifically, refer to Figure 3 ,When the planning agent determines that there are dynamic query tasks such as product inventory ,inquiry, price inquiry, discount information inquiry, etc., the query type agent will be called, which is the tool execution agent.

[0205] The query type agent has the function of calling the preset query interface API and code parser, and is responsible for executing specific query tasks. Its input is the target question, the interface description information of all preset query interface APIs, such as detailed description of functions and detailed description of parameters, and then the query type agent can output the target query interface to be called, and convert the target question into parameter information and pass it to the target query interface. After that, the code parser is constructed for query functions such as product discount comparison, price sorting, time calculation, etc., and the target query interface is executed and the results are returned.

[0206] In the process of converting the target question into the parameter information corresponding to the target query interface, an API parsing plug-in is added. If the parameter parsing is wrong, the API parsing plug-in is called. After completing the target question parsing and API selection, by combining the few-shot large model extraction based on 3C digital product samples with the regular extraction of the 3C digital product standard alias table, parameter information such as product name, attribute, type, etc. is corrected, and parameters with irregular formats are standardized to ensure the stability of the query process.

[0207] When the planning agent determines that there is a professional knowledge question-answering task, the knowledge type agent is called to perform RAG based on the preset document knowledge data. The knowledge type agent answers the target question based on the preset document knowledge data. Its input is the target question and the preset document knowledge data. During the execution process, the preset document knowledge data is segmented, and the target keywords are extracted from the target question, so as to retrieve the target data segment based on the target keyword, so that the large model can answer the target question based on the target data segment. When answering, the answer must strictly follow the document content, even if it is inconsistent with the facts. If it is irrelevant, do not answer, and finally output the question answer data.

[0208] In addition, QA pairs can be extracted from the preset document knowledge data or a knowledge graph can be constructed, thereby creating a vector database to store QA pairs or using hierarchical clustering to cluster entities in the knowledge graph. Finally, question answering data can be generated by performing semantic similarity retrieval or entity traversal query on the target question.

[0209] Step S203: Based on the planning agent, determine whether to execute the preset recommendation service according to the target question, the question answer data corresponding to the target question and the preset question-answering strategy.

[0210] Reference Figure 3 After the query type agent or knowledge type agent is executed, the generated question answer data is returned to the planning agent. The planning agent determines whether to execute the preset service based on the preset answer strategy, such as business experience SOP process specifications and the answer strategy based on historical dialogue data mining.

[0211] Step S204: when it is determined to execute the preset recommendation service, the associated dialogue data corresponding to the target question is obtained from the historical dialogue data.

[0212] Reference Figure 3 If the planning agent determines that a preset recommendation service is needed, the recommendation agent is called to make marketing recommendations. The recommendation agent can further explore user needs and decide which marketing recommendation method to use based on the user's current needs and intentions. The recommendation agent generates recommendation data through preset question-and-answer strategies and preset recommendation case data to guide users to purchase and convert products.

[0213] Among them, the associated conversation data is the contextual conversation data between the current user and the intelligent customer service.

[0214] Step S205: performing vector matching on the associated conversation data and a plurality of preset recommendation case data, and selecting target recommendation case data corresponding to the associated conversation data according to the vector matching result.

[0215] Reference Figure 3 The preset recommended case data is excellent marketing dialogue cases mined from historical dialogue data. At the same time, more preset recommended case data will be supplemented based on real-time user feedback and product conversion. Furthermore, the preset recommended case data can be vectorized using a vector representation model and stored in a vector database.

[0216] In this step, by vector indexing the input target question and preset recommended case data, target recommended case data similar to the current associated conversation data is retrieved, and at the same time, preset recommended case data with inconsistent product types are filtered out.

[0217] Step S206: Generate prompt information based on the target recommendation case data and the preset answer strategy, and input the prompt information into the recommendation agent so that the recommendation agent generates recommendation data corresponding to the target question based on the prompt information.

[0218] Reference Figure 3 , by combining the target recommendation case data and the preset question-answering strategy into prompt information, different question-answering strategies are used according to different situations through in-context learning, and corresponding recommendation data are generated.

[0219] In addition, a few-shot examples can be constructed as prompt information based on the target recommendation case data and the preset question-answering strategy, which is not limited in this example.

[0220] In the recommendation agent of this example, based on the preset question-and-answer strategies such as SOP standard marketing strategies and the associated conversation data, that is, the stored contextual conversation data, it is used as a Short-term to assist the recommendation agent's thinking, reasoning and decision-making. The preset recommendation case data is retrieved and learned as a Long-term. The conversation data is supplemented as a Long-term to accumulate experience based on the online user's evaluation feedback and product conversion status, so as to achieve iterative optimization of the recommendation ability of the recommendation agent.

[0221] Step S207: Based on the summary agent, a customer service question and answer statement corresponding to the target question is generated according to the question answering data and the recommendation data.

[0222] Reference Figure 3 , the data generated by the question-answering agent and the recommendation agent are passed to the summary agent, and the generated data is summarized and post-processed. The summary agent can be fine-tuned based on the real conversation data with the preset conversation style, so that the style of the output customer service question and answer statements is consistent with the manual conversation, solving the problem of mechanical conversation.

[0223] In addition, the requirements for speech and business compliance rules can be added to the summary agent to ensure the standardization and compliance of the final output of the customer service question and answer statements. It uses the associated conversation data, namely the conversation context, to complete the key information missing in the recommendation data and question answering data to ensure that the speech is more complete, and by filtering out the redundant information generated by all large model thinking and interpretation, the final output of the customer service question and answer statements is accurate and standard.

[0224] In addition, refer to Figure 3 In order to ensure the accuracy of customer service Q&A statements, a fault-tolerant and error-correcting mechanism can be applied in the agent to allow the large model to reflect and optimize itself after an error occurs, such as giving the large model a similar instruction "If the returned result is empty or incorrect, please reflect and re-execute the task". The error-correcting and error-tolerant mechanism ensures effective collaboration between various agents and improves the robustness of the entire system. At the same time, if the entire process is repeatedly judged to be incorrect for multiple rounds, the bottom-up strategy is triggered to clarify the problem and ask the user to confirm the question again.

[0225] Correspondingly, for the conversation between the user and the intelligent customer service, it is also necessary to maintain the chat history of the current conversation, store the user's target question and the customer service question and answer statements of the intelligent customer service, and when the user has a new target question input, add it to the chat history to ensure the perception of all the above information.

[0226] In this example, for the generation of customer service question and answer sentences in the 3C digital e-commerce scenario, the planning agent is the overall coordinator, the query type agent and the knowledge type agent focus on solving user question services, the recommendation agent focuses on marketing recommendations, and the summary agent integrates the content to generate customer service question and answer sentences and feeds back to the user. In addition, each agent has a fault-tolerant and error-correcting mechanism, which can reflect on and optimize errors and regenerate data, thereby improving the generation effect of customer service question and answer sentences that have the dual goals of service and marketing recommendations.

[0227] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0228] In a second aspect, the present disclosure provides a customer service system. Figure 4 A block diagram of a customer service system 40 provided in an embodiment of the present disclosure, the customer service system 40 includes:

[0229] A planning agent 41, configured to determine a target question-answering agent for processing the target question from among the multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents;

[0230] A question-answering agent 42, used to process the target question and generate question answer data corresponding to the target question;

[0231] The planning agent 41 is further used to determine whether to execute a preset recommendation service according to the target question, the question answer data corresponding to the target question and the preset question-answering strategy;

[0232] The recommendation agent 43 is used to generate recommendation data corresponding to the target problem when it is determined to perform the preset recommendation service;

[0233] The summary agent 44 is used to generate a customer service question and answer statement corresponding to the target question based on the question answer data and the recommendation data.

[0234] In an optional implementation, the question-answering agent includes a query-type agent and a knowledge-type agent. When the target question-answering agent is the query-type agent, processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question includes:

[0235] Inputting the target question and multiple interface description information corresponding to multiple preset query interfaces into the query type agent, so that the query type agent selects a target query interface corresponding to the target question from the multiple preset query interfaces according to the multiple interface description information, and generates parameter information corresponding to the target query interface according to the target question;

[0236] Matching the parameter information with preset parameter words, and updating the parameter information according to the matching result;

[0237] The target query interface is run according to the updated parameter information, and question answer data corresponding to the target question is generated according to the running result of the target query interface.

[0238] In an optional implementation manner, matching the parameter information with a preset parameter term includes:

[0239] Extracting a first preset parameter word that matches the parameter type corresponding to the parameter information from the product sample information, matching the parameter information with the first preset parameter word, and obtaining a first matching result;

[0240] Performing regular expression matching on the parameter information and a second preset parameter word in the preset parameter word library to obtain a second matching result;

[0241] The matching result is obtained according to the first matching result and the second matching result.

[0242] In an optional implementation, when the target question-answering agent is the knowledge-type agent, processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question includes:

[0243] Slicing the preset document knowledge data to obtain multiple data slices corresponding to the preset document knowledge data;

[0244] Extracting a target keyword from the target question, generating a related keyword associated with the target keyword according to the semantics of the target keyword, and using the target keyword and the related keyword as search keywords;

[0245] According to the search keyword, a target data slice corresponding to the search keyword is retrieved from the multiple data slices;

[0246] The target question and the target data slice are input into the knowledge type agent, so that the knowledge type agent generates question answer data corresponding to the target question according to the target data slice.

[0247] In an optional implementation, the generating the recommendation data corresponding to the target question based on the recommendation agent includes:

[0248] Acquire relevant dialogue data corresponding to the target question from historical dialogue data;

[0249] Performing vector matching on the associated conversation data and a plurality of preset recommended case data, and selecting target recommended case data corresponding to the associated conversation data according to the vector matching result;

[0250] Prompt information is generated according to the target recommendation case data and the preset answer strategy, and the prompt information is input into the recommendation agent so that the recommendation agent generates recommendation data corresponding to the target question according to the prompt information.

[0251] In an optional implementation, the preset question-and-answer strategy and the preset recommended case data are generated in the following manner:

[0252] Extracting information from each conversation data in the historical conversation data to obtain a question-answering strategy corresponding to the conversation data and a conversation result corresponding to the conversation data;

[0253] Determine the number of positive samples and the number of negative samples corresponding to the question-answering strategy according to the conversation results corresponding to the multiple conversation data corresponding to the same question-answering strategy;

[0254] Calculate the strategy effectiveness of the question-answering strategy according to the number of positive samples and the number of negative samples corresponding to the question-answering strategy;

[0255] In the case where the strategy effectiveness is higher than a preset threshold, the question-and-answer strategy is used as the preset question-and-answer strategy, and the preset recommendation case data is generated according to the dialogue data corresponding to the question-and-answer strategy.

[0256] In an optional implementation, the summary agent is trained according to preset questions and question-answering statements of preset speech styles corresponding to the preset questions, and the generation of customer service question-answering statements corresponding to the target questions based on the question answer data and the recommendation data by the summary agent includes:

[0257] Performing data filling processing and / or redundant data filtering processing on the question answer data and the recommendation data;

[0258] The processed question answer data and recommendation data are input into the summary agent so that the summary agent generates a customer service question and answer statement corresponding to the target question according to the preset speech style.

[0259] The functions or modules included in the system provided by the embodiments of the present disclosure can be used to execute the method described in the first aspect of the method embodiment above. The specific implementation and technical effects thereof can be referred to the description of the method embodiment above, and will not be repeated here for the sake of brevity.

[0260] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.

[0261] Reference Figure 5 , an embodiment of the present disclosure provides an electronic device, comprising:

[0262] One or more processors 501;

[0263] A memory 502 having one or more programs stored thereon, which, when executed by one or more processors, enables the one or more processors to implement any one of the above methods for generating customer service question and answer statements;

[0264] One or more I / O interfaces 503 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.

[0265] Among them, the processor 501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 502 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 503 is connected between the processor 501 and the memory 502, and can realize information interaction between the processor 501 and the memory 502, including but not limited to a data bus (Bus), etc.

[0266] In some embodiments, the processor 501 , the memory 502 , and the I / O interface 503 are connected to each other through a bus, and further connected to other components of the computing device.

[0267] This embodiment also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for generating customer service question and answer statements provided in this embodiment is implemented. To avoid repeated description, the specific steps of the method for generating customer service question and answer statements are not repeated here.

[0268] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the invented method described above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0269] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0270] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0271] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A method for generating a customer service question and answer statement, characterized in that: The method comprises: Based on the planning agent, according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents, determine a target question-answering agent for processing the target question from the multiple question-answering agents; Processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question; Based on the planning agent, determining whether to execute a preset recommendation service according to the target question, the question answer data corresponding to the target question and the preset question-answering strategy, and generating the recommendation data corresponding to the target question based on the recommendation agent if it is determined to execute the preset recommendation service; Based on the summary agent, a customer service question and answer statement corresponding to the target question is generated according to the question answer data and the recommendation data.

2. The method for generating a customer service question and answer statement according to claim 1, characterized in that: The question-answering agent includes a query-type agent and a knowledge-type agent. When the target question-answering agent is the query-type agent, the target question is processed based on the target question-answering agent to generate question answer data corresponding to the target question, including: Inputting the target question and multiple interface description information corresponding to multiple preset query interfaces into the query type agent, so that the query type agent selects a target query interface corresponding to the target question from the multiple preset query interfaces according to the multiple interface description information, and generates parameter information corresponding to the target query interface according to the target question; Matching the parameter information with preset parameter words, and updating the parameter information according to the matching result; The target query interface is run according to the updated parameter information, and question answer data corresponding to the target question is generated according to the running result of the target query interface.

3. The method for generating customer service question and answer statements according to claim 2, characterized in that: The matching of the parameter information with the preset parameter words includes: Extracting a first preset parameter word that matches the parameter type corresponding to the parameter information from the product sample information, matching the parameter information with the first preset parameter word, and obtaining a first matching result; Performing regular expression matching on the parameter information and a second preset parameter word in the preset parameter word library to obtain a second matching result; The matching result is obtained according to the first matching result and the second matching result.

4. The method for generating customer service question and answer statements according to claim 2, characterized in that: In the case where the target question-answering agent is the knowledge-type agent, processing the target question based on the target question-answering agent to generate question answer data corresponding to the target question includes: Slicing the preset document knowledge data to obtain multiple data slices corresponding to the preset document knowledge data; Extracting a target keyword from the target question, generating a related keyword associated with the target keyword according to the semantics of the target keyword, and using the target keyword and the related keyword as search keywords; According to the search keyword, a target data slice corresponding to the search keyword is retrieved from the multiple data slices; The target question and the target data slice are input into the knowledge type agent, so that the knowledge type agent generates question answer data corresponding to the target question according to the target data slice.

5. The method for generating a customer service question and answer statement according to any one of claims 1 to 4, characterized in that: The generating the recommendation data corresponding to the target problem based on the recommendation agent includes: Acquire relevant dialogue data corresponding to the target question from historical dialogue data; Performing vector matching on the associated conversation data and a plurality of preset recommended case data, and selecting target recommended case data corresponding to the associated conversation data according to the vector matching result; Prompt information is generated according to the target recommendation case data and the preset answer strategy, and the prompt information is input into the recommendation agent so that the recommendation agent generates recommendation data corresponding to the target question according to the prompt information.

6. The method for generating customer service question and answer statements according to claim 5, characterized in that: The preset question-and-answer strategy and the preset recommended case data are generated in the following manner: Extracting information from each conversation data in the historical conversation data to obtain a question-answering strategy corresponding to the conversation data and a conversation result corresponding to the conversation data; Determine the number of positive samples and the number of negative samples corresponding to the question-answering strategy according to the conversation results corresponding to the multiple conversation data corresponding to the same question-answering strategy; Calculate the strategy effectiveness of the question-answering strategy according to the number of positive samples and the number of negative samples corresponding to the question-answering strategy; In the case where the strategy effectiveness is higher than a preset threshold, the question-and-answer strategy is used as the preset question-and-answer strategy, and the preset recommendation case data is generated according to the dialogue data corresponding to the question-and-answer strategy.

7. The method for generating customer service question and answer statements according to claim 5, characterized in that: The summarizing agent is trained according to preset questions and question-answering statements of preset speech styles corresponding to the preset questions, and the summarizing agent generates customer service question-answering statements corresponding to the target questions according to the question answering data and the recommendation data, including: Performing data filling processing and / or redundant data filtering processing on the question answer data and the recommendation data; The processed question answer data and recommendation data are input into the summary agent so that the summary agent generates a customer service question and answer statement corresponding to the target question according to the preset speech style.

8. A customer service system, characterized in that: The customer service system includes a planning agent, a question-answering agent, a summarizing agent, and a recommendation agent; The planning agent is used to determine a target question-answering agent for processing the target question from the multiple question-answering agents according to the question type corresponding to the target question and the functional description information corresponding to the multiple question-answering agents; The question-answering agent is used to process the target question and generate question answer data corresponding to the target question; The planning agent is further used to determine whether to execute a preset recommendation service according to the target question, the question answer data corresponding to the target question, and the preset question-answering strategy; The recommendation agent is used to generate recommendation data corresponding to the target problem when determining to execute the preset recommendation service; The summarizing agent is used to generate a customer service question and answer statement corresponding to the target question based on the question answer data and the recommendation data.

9. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7; One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

10. A computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Speech recommendation method and device in multi-round dialogue scene

    CN110008322A

  • Product recommendation method and system

    CN113468420A

  • Man-machine cooperation method and system based on domain knowledge graph

    CN114818740A

  • Talk skill recommendation method and device, terminal equipment and medium

    CN116108152A

  • Intelligent customer service question answering method and system, electronic equipment and storage medium

    CN116910208A

Cited By

  • Technical standard intelligent assistant based on large model and recommendation method

    CN120297693A

  • A large model-based technical standard recommendation device and a recommendation method

    CN120297693B

  • Data query method and system

    CN121278169A

  • Information processing method and device, storage medium and program product

    CN121480553A