Customer service agent and implementation method thereof
Through pre-trained large language model and robot process automation module, user request information is enhanced, and the problem of long response time for intelligent customer service in vertical industries is solved, efficient, flexible and accurate customer demand response is achieved, and accurate technical support is provided and consulting services.
Patent Information
- Application Number
- CN202411815184.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-01-14
AI Technical Summary
Existing intelligent customer service cannot effectively deal with complex professional and technical problems and customer business needs in vertical industries, resulting in long response time and inability to respond to customer needs in a timely manner.
The pre-trained large language model is used to combine the robot process automation module to enhance user request information through intention recognition and automation of business processes, improve semantic understanding and expression capabilities, and quickly respond to customer needs.
It achieves efficient, flexible and accurate customer demand response, provides accurate technical support and consulting services, and improves service efficiency and customer satisfaction.
Smart Images

Figure CN119311857A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a customer service intelligent agent and an implementation method thereof. Background Art
[0002] Existing intelligent customer service in vertical industries usually adopts simple rule engines and fixed dialogue modes, mainly through manual rule setting or customized development, and cannot handle complex professional technical issues and customer business needs. In addition, in vertical industries, customers need timely and accurate professional technical support and guidance. Traditional intelligent customer service is limited by fixed rules and processes, resulting in a long response time and unable to respond to customer needs in a timely manner. Summary of the invention
[0003] Purpose of the invention: The present invention aims to propose a customer service intelligent agent and its implementation method, which can provide efficient, flexible and accurate customer demand response solutions.
[0004] Invention content: To achieve the above-mentioned purpose, the present invention proposes the following technical solutions: In a first aspect, a method for implementing a customer service agent is provided, the method comprising: Obtaining first request information input by the user; Using a pre-trained large language model to perform intent recognition on the first request information to determine the target business of the user; Input the target business into a robotic process automation module, use the robotic process automation module to execute a preset automated business process according to the target business, and obtain recall information; Using the recall information to enhance the first request information, to obtain second request information; The second request information is input into the large language model to obtain response information of the large language model.
[0005] As an optional implementation of the method of the first aspect, the method further includes: constructing a knowledge base of the target business domain; The pre-trained large language model is used to perform intent recognition on the first request information to determine the target business of the user, specifically including: Retrieving relevant information in the knowledge base according to the first request information; enhancing the first request information by using the relevant information; The enhanced first request information is input into the large language model to obtain the target service.
[0006] As an optional implementation of the method of the first aspect, the method further includes: constructing a knowledge base of the target business field, and converting text data in the knowledge base into vectors and storing them in a vector library; Inputting the target business into a robotic process automation module, using the robotic process automation module to execute a preset automated business process according to the target business, and obtaining recall information, specifically includes: Using the robotic process automation module to perform a text search in the knowledge base according to the target business to obtain text search results; Using the robotic process automation module to perform semantic search in the vector library according to the target business, to obtain semantic search results; Normalizing the text search results and the semantic search results; Calculate the entropy value based on the normalized text search results and the normalized semantic search results: H(X)=-Σ(P(X)*log(P(X))) P(X) = a*Xnorm1+(1-a)*Xnorm2 Where H(X) represents the entropy value of event X, P(X) represents the probability of event X occurring, log represents the logarithm operation with base 2, a is the weight coefficient, Xnorm1 represents the normalized text search results, and Xnorm2 represents the normalized semantic search results; The recall information is determined according to the entropy value.
[0007] Specifically, determining the recall information according to the entropy value specifically includes: If the entropy value is lower than a preset threshold, directly determining the recall information according to the text search results and the semantic search results; If the entropy value is higher than the threshold, the recall information is generated according to a preset empirical rule.
[0008] As an optional implementation manner of the method of the first aspect, enhancing the first request information by using the recall information to obtain the second request information specifically includes: The recall information and the first request information are assembled into the second request information using a preset prompt template.
[0009] As an optional implementation manner of the method of the first aspect, enhancing the first request information by using the recall information to obtain the second request information specifically includes: Splitting the recall information into multiple data segments; For each data segment, mapping the data segment into a first embedding vector using the large language model; Mapping the first request information into a second embedding vector using the large language model; Determining a target first embedding vector according to a similarity between the first embedding vector and the second embedding vector; The data segment corresponding to the target first embedding vector is used as a context of the first request information to construct the second request information.
[0010] In a second aspect, a customer service agent is provided, including: A data acquisition module, configured to acquire first request information input by a user; a response module configured to use a pre-trained large language model to perform intent recognition on the first request information to determine the target business of the user; and generate reply information in response to the second request information; The robotic process automation module is configured to respond to the input of the target business, execute a preset automated business process according to the target business, and obtain recall information; use the recall information to enhance the first request information to obtain the second request information, and input the second request information into the response module.
[0011] According to a third aspect, a customer service system is provided, wherein the customer service system is deployed with a customer service agent, and the customer service agent is implemented using the above-mentioned customer service agent implementation method.
[0012] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device executes the above-mentioned method for implementing the customer service intelligent agent.
[0013] In a fifth aspect, an electronic device is provided, including: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the above-mentioned implementation method of the customer service intelligent agent.
[0014] Beneficial effect: The beneficial effect of the implementation method of the customer service intelligent agent described in the embodiment of this specification is that the method pre-trains the large language model so that the large language model has good intent recognition capabilities and the ability to understand the target business domain knowledge, so that the large language model can accurately identify user intentions and map user intentions to the corresponding target business. Combined with the business scenario-based automation process built with RPA technology, it can automatically retrieve information related to the target business to enhance the request information input by the user. Finally, the enhanced request information is input into the large language model to help the large language model better understand the user's needs, so that the large language model has higher semantic understanding and expression capabilities, can quickly respond to user needs, and better provide users with accurate technical support and consulting services. The customer service intelligent agent and customer service system described in the embodiment of this specification also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of a method for implementing a customer service agent involved in an embodiment; Figure 2 A schematic diagram of a domain knowledge retrieval optimization process based on retrieval enhancement generation involved in an embodiment; Figure 3 A schematic diagram of a process for generating reply information using a large language model involved in an embodiment; Figure 4 A schematic diagram of a flow chart of a RAG model executing a Text2SQL task involved in an embodiment; Figure 5 A structural diagram of a customer service agent involved in an embodiment. DETAILED DESCRIPTION
[0016] First of all, it should be noted that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.
[0017] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0018] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0019] The existing customer service system has the following pain points: Limitations of knowledge response: It mainly relies on preset rules, templates and corpora to identify and handle customer questions. It usually works through keyword matching or simple natural language processing technology, and the questions answered and the services provided are relatively fixed and limited.
[0020] Poor intelligence and adaptability: Since it is based on fixed rules and templates, its intelligence and adaptability are relatively limited and cannot handle problems or changing situations beyond the preset scope.
[0021] Slow processing efficiency and response speed: It can handle a certain amount of customer inquiries, but due to its technical limitations, its efficiency is limited when dealing with complex issues or a large number of inquiries.
[0022] High cost and maintenance: As business grows and problems become more complex, preset rules and templates need to be upgraded, resulting in high maintenance costs.
[0023] This embodiment aims to address the technical problems of existing customer service systems, such as poor understanding of user input, low response accuracy, and low response efficiency, and to provide a customer service intelligent agent and an implementation method thereof, so as to at least partially overcome the above technical problems.
[0024] The customer service intelligent entity and its implementation method described in one or more embodiments of this specification will be further described in detail below in conjunction with the drawings and specific embodiments of the specification, but this detailed description does not constitute a limitation on the embodiments of this specification.
[0025] Please refer to Figure 1 , Figure 1 Flow chart of a method for implementing a customer service agent proposed in one or more embodiments of this specification. Figure 1 As shown, the method may include steps S100 to S108.
[0026] S100: Acquire first request information input by a user.
[0027] The first request information may be in text form or in voice form. In this implementation, there is no limitation on the form of the first request information.
[0028] S102: Use a pre-trained large language model to perform intent recognition on the first request information to determine the user's target business.
[0029] The structure of the above-mentioned large language model can be adaptively selected according to needs. For example, the BERT model can be used as the above-mentioned large language model.
[0030] The above-mentioned large language model is pre-trained to be able to recognize the user's intention, specifically, to be able to recognize the target business that the user needs to handle based on the first request information input by the user.
[0031] In order to enable the large language model to have the above-mentioned intent recognition capabilities, the large language model can be trained in the following ways: First, obtain training samples. The training samples here can be domain knowledge of related business fields, such as business data, customer service conversation data, and other data samples including user questions and corresponding answers. Clean these data and label them with intent. The intent label here points to the preset target business, and finally obtain training samples.
[0032] The above training samples are used to train the large language model until a large language model that meets the requirements is obtained.
[0033] In some implementations, in order to enable the large language model to better understand the first request information proposed by the user, the first request information may be further enhanced and retrieved. Specifically, a knowledge base of the target business domain may be pre-built, and the knowledge base stores the business knowledge of the target business domain. Then, the relevant information is retrieved from the knowledge base according to the first request information, and the first request information is enhanced using the retrieved relevant information, and the enhanced first request information is input into the large language model, and finally the target business is obtained.
[0034] In some implementations, the above-mentioned knowledge base can also be used to fine-tune the large language model. For example, the business knowledge data in the knowledge base can be used to perform text prediction tasks on the large language model, including giving the previous / next context and letting the large language model predict the corresponding next / previous context, or masking the middle part of the text data and letting the large language model predict the context content, etc. Specific fine-tuning tasks can be set according to needs, aiming to allow the large language model to fully understand the business knowledge of the target business field.
[0035] In some implementations, some evaluation indicators may be set according to needs, such as accuracy, answer time, and user satisfaction, etc. The performance of the large language model is evaluated based on user feedback and these evaluation indicators, and the large language model is continuously optimized to improve the quality and performance of the customer service agent.
[0036] S104: Input the target business into the robot process automation module, use the robot process automation module to execute a preset automated business process according to the target business, and obtain recall information.
[0037] The above-mentioned robotic process automation module has pre-built automated business processes for different business types. For example, for query scenarios such as checking traffic, checking call charges, and checking packages, a standardized query business process is formed, and for operation scenarios such as reactivating the phone, reporting loss, replacing the card, and resetting the password, a standardized operation business process is formed.
[0038] The robotic process automation module is configured to trigger the execution of corresponding automated business processes based on the input intent recognition results, such as automatic query information search of the knowledge base and multi-data source information query.
[0039] In some implementations, the questions that need to be queried can be automatically parsed through the robotic process automation module, and then information search can be performed in the entire business system, so that the data scattered in various business systems can be classified and integrated, and the business of different scenarios can be centrally displayed, which greatly shortens the query time and improves the efficiency of the customer service agent in handling complex problems.
[0040] In some implementations, for the retrieval process of the robotic process automation module, the retrieval-augmented generation (RAG) technology can be used to optimize the domain knowledge retrieval. Figure 2 As shown, it is a RAG-based domain knowledge retrieval optimization process.
[0041] exist Figure 2 In the retrieval process shown, the existing domain knowledge is first divided. For example, knowledge bases for different business types can be built according to the knowledge type, such as operation business knowledge base, query business knowledge base, complaint handling knowledge base, etc. Public knowledge bases and private knowledge bases can also be built according to access rights to achieve the effect of controllable knowledge boundaries. Next, the text data in the knowledge base can be vectorized to build a vector library. Then, the retrieval process is visualized, including search, sorting, and generating understanding, so that the process is clear and traceable. Finally, the knowledge base can be expanded through expert experience.
[0042] The above-mentioned search process can adopt a fusion search method. The fusion search process mainly includes text search and semantic search. Fusion search combines the advantages of multiple search technologies and complements each other. It can select appropriate search strategies according to different business scenarios and needs to improve the diversity and accuracy of search results.
[0043] Text search specifically refers to using the robotic process automation module to perform text search in the above-mentioned knowledge base according to the target business to obtain text search results. In this embodiment, a text matching search method based on BM25 and TF-IDF algorithms can be used. BM25 and TF-IDF are effective in processing specific terms (such as product names or professional terms), but they are more sensitive to spelling errors and synonyms, and may ignore some important contextual information.
[0044] BM25 is a probability-based ranking function used in information retrieval systems. It evaluates the relevance of a document to a user query by considering term frequency (TF) and inverse document frequency (IDF). The BM25 algorithm is short for the OkapiBM25 algorithm, which is one of a series of models developed by Robertson and Jones in the 1980s.
[0045] BM25 is based on the assumption that for a specific query term, it appears more frequently in relevant documents than in irrelevant documents. The BM25 algorithm calculates the score of a document by combining the term frequency (TF) and document frequency (DF).
[0046] The main idea of the BM25 algorithm can be briefly described as follows: extract and decompose the information query to be retrieved to generate several feature items (words) qi; then for each search result D, calculate the relevance score of each feature qi with D, and finally, perform a weighted sum of the relevance scores of qi relative to D to obtain the relevance score of the query with D. The general representation of the algorithm can be abbreviated as follows: ; Among them, q represents the information query to be retrieved, q i represents a feature item after q is decomposed (for Chinese, the word segmentation of query can be used as the basic feature item), d represents a search result document; W i Represents feature q i The weight of R(q i ,d) represents the characteristic term q i Relevance score to document d.
[0047] For W i and R(q i , d), the following formula is used to describe in this embodiment: ; Where N is the total number of documents in the document collection, n(q i ) is the number containing q i The IDF formula states that q iThe more documents q appears in, the i The lower the weight of a word, the lower the weight of the word. There is a problem with the definition here, that is, if a word appears in more than half of the documents, the IDF is negative, so the contribution of this word to the BM25 score is negative. Generally, such a feature is not desired, so when the IDF is negative, it can be set to 0, or a relatively small positive number, or a function form that smoothly transitions to 0 can be used.
[0048] For the characteristic term q i The relevance score R(q i ,d), R(q i ,d): ; Among them, f(q i ,d) is q i The document frequency in d, L d is the document length, L avg is the average length of the document collection, k1 and b are freely adjustable hyperparameters, and the general range is k1∈[1.2,2.0], b=0.75. R(q i ,d) About The function is a "saturated" increasing function, which makes the growth of document word frequency nonlinear to the growth of relevance score. The hyperparameter k1 plays the role of adjusting the frequency scale of feature word text. k1 taking 0 means that the algorithm degenerates into a binary model (without considering word frequency), while taking a larger value is similar to using only the original feature word frequency. The hyperparameter b is generally called the normalization of text length, which is used to adjust the impact of document length on relevance. The larger b is, the greater the impact of document length on relevance score, and the longer the relative length of the document, The larger the value, the smaller the relevance score. This can be understood as follows: when the document is relatively long, the content of q i The greater the chance, therefore, the same tf(q i ,d) In the case of long documents and q i should be more relevant than short documents with q i The correlation is weak.
[0049] Based on the above principles, the general form of the BM25 algorithm can be fully expressed as follows: ; In addition, if the information query to be retrieved is relatively long and some terms appear frequently in the query, the importance of these terms should be increased accordingly, but there should also be a similar saturation growth setting for terms relative to documents to constrain the growth of term frequency in the query. Applying a similar weighting strategy to the feature items in the query yields: ; Among them, tf(q i ,q) is the characteristic term q i In the frequency of query q, the role of the hyperparameter k3 is still to adjust the frequency scale of the feature words in the query text. At this time, it is unnecessary to normalize the length of the query because the query is fixed in advance for all candidate retrieval results.
[0050] Semantic search specifically refers to using the robotic process automation module to perform semantic search in the vector library according to the target business to obtain semantic search results. In this embodiment, semantic search can be performed using the vector KNN algorithm. This method can perform multi-language and multi-modal retrieval based on the semantic meaning of the query, and has good fault tolerance for spelling errors, but some scenarios may ignore the precise matching of keywords. Its effect depends on the quality of vector embedding and is more sensitive to terms in non-professional fields.
[0051] After obtaining the text search results and semantic search results, the text search results and semantic search results can be normalized respectively, that is, the text search results and semantic search results are mapped to the 0-1 space respectively, so as to facilitate the fusion of the retrieval information in the next step. The specific formula for normalization is: Xnorm = (X-Xmin) / (Xmax-Xmin) Where X is the original data, Xmin and Xmax are the minimum and maximum values in the data set, respectively, and Xnorm is the normalized data.
[0052] Then the retrieval information is integrated, that is, the entropy value is calculated based on the normalized text search results and the normalized semantic search results: H(X)=-Σ(P(X)*log(P(X))) P(X) = a*Xnorm1+(1-a)*Xnorm2 Where H(X) represents the entropy value of event X, P(X) represents the probability of event X occurring, log represents the logarithm operation with base 2, a is the weight coefficient, Xnorm1 represents the normalized text search results, and Xnorm2 represents the normalized semantic search results.
[0053] Finally, the final search result output is determined based on the size of the entropy value. The higher the entropy value, the more dispersed the results are and the greater the uncertainty; the lower the entropy value, the more concentrated the result distribution is and the smaller the uncertainty is. Based on this rule, if the fusion entropy value of the search information is low, for example, the calculated entropy value is lower than the preset threshold, it means that the entropy value results are concentrated and the search result credibility is high. At this time, the recall information can be directly determined based on the text search results and semantic search results. If the fusion entropy value of the search information is a high entropy value, it means that the result score, that is, the reliability of the search result is low. At this time, the result can be output according to the preset empirical value rule, for example, a prompt information can be output to guide the user to correct the first request information.
[0054] S106: Use the recall information to enhance the first request information to obtain second request information.
[0055] In some implementations, the recall information and the first request information may be assembled together using a preset prompt template to form the second request information.
[0056] In some implementations, the recall information may be further screened to construct more accurate second request information. Figure 3 , Figure 3 The schematic diagram of a process of generating a reply message by a large language model is shown schematically, and a method for constructing a second request message is specifically shown therein. Figure 3 As shown, the construction process of the second request information is as follows: The recall information is divided into multiple data segments, recorded as date1, date2, ..., daten, where n represents the total number of data segments.
[0057] For each data segment, the large language model is used to map the data segment into a first embedding vector embedding.
[0058] The first request information is mapped into a second embedding vector embedding1 using a large language model.
[0059] According to the similarity between the first embedding vector embedding and the second embedding vector embedding1, where the similarity can be measured by the distance between the above embedding vectors, the target first embedding vector is then determined according to the similarity. For example, the K first embedding vectors with the highest similarity can be selected as the target first embedding vectors.
[0060] The data segment corresponding to the target first embedding vector is used as the context of the first request information to construct the second request information.
[0061] The above-mentioned second request information generation process can be implemented by a pre-trained RAG model, which is trained to perform the intelligent search enhancement (Text2SQL) task. Specifically, the process of the RAG model performing the Text2SQL task is as follows: Figure 4 As shown, it includes: inputting recall information and first request information, the RAG model translates the first request information into a SQL executable query statement, and then executes the query operation in the database composed of the recall information split and vectorized and returns the query result, and then assembles the query result and the first request information into a preset Prompt template to generate the second request information.
[0062] To train the above RAG model, a sample database can be built in advance to obtain DDL statements, metadata (descriptive information about the data in the sample database), relevant document descriptions, prompt sample SQL statements, etc. related to the target business domain knowledge. Then the above data is vectorized and the obtained embedding vector embedding is stored in the vector database. The vectorization process mainly includes: DDL statement vectorization, document vectorization, and query and reference sample SQL statement vectorization.
[0063] DDL statement vectorization: For each table creation statement, related SQL query, table or field comment, embed it and store it in the vector database.
[0064] Document vectorization: All metadata in the database can be spliced into natural language according to certain rules and then vectorized. The explanations of some proper nouns that are difficult for large language models to understand can also be vectorized. When a related query comes in, the explanation of the proper noun will also be recalled and put into the prompt to help LLM understand the query.
[0065] Vectorize the query and reference sample SQL statements: Concatenate the query and reference sample SQL statements into a string and vectorize them together.
[0066] The above RAG model is trained using the embedding vectors in the above vector sample library. During the training process, the question samples as training samples are input into the RAG model. The RAG model converts the question samples into SQL executable query statements, and then searches the vector database for the relevant embedding vectors, and combines the embedding vectors with the question samples into prompt words. A loss function is constructed based on the difference between the prompt words output by the RAG model and the preset prompt word template (as a training label), and the loss function is used to optimize the parameters of the RAG model until the RAG model meets the preset requirements, that is, it can generate prompt words that meet the requirements of the prompt word template.
[0067] S108: Input the second request information into the large language model to obtain response information from the large language model.
[0068] Please continue to refer to Figure 3 After constructing the second request information, the second request information is input into the large language model as a prompt word, and the reply information output by the large language model can be obtained.
[0069] In some implementations, a prompt word optimization strategy may be used to further optimize the prompt word.
[0070] The prompt word optimization strategy can mainly include the following aspects: Keyword optimization: Extract key, representative words or phrases from the second request information. These keywords can directly reflect the subject or content of the relevant documents, making it easier for users to find relevant information through a simple word search.
[0071] Contextual association: In addition to keywords, the prompt word optimization strategy can also consider the contextual relationship of information. For example, when searching for "4G network optimization", relevant prompt words such as "LTE signal coverage" and "network interference troubleshooting" can also be recommended based on contextual association to help users understand relevant information more comprehensively.
[0072] Personalized recommendations: Based on the user's historical search records and browsing habits, the prompt word optimization strategy can also recommend more personalized search results to users. This not only improves search efficiency, but also increases user satisfaction.
[0073] The above is the implementation method of the customer service intelligent body described in this embodiment. This method constructs a large language model with professional technology and business knowledge. The large language model can learn massive data, understand complex professional technical terms and business concepts, and perform accurate intent recognition. Combining RPA technology to build a customer service intelligent body can better provide customers with accurate technical support and consulting services, and have higher semantic understanding and expression capabilities.
[0074] The customer service agent based on the large language model has a certain degree of autonomous learning ability. It can continuously improve the performance of customer service through training on large-scale data. It can adapt to new problems and scenarios to a certain extent, provide 24-hour service, and can quickly and accurately answer and solve customers' industry technical problems and business needs, thereby improving service efficiency and customer satisfaction.
[0075] Customers in vertical industries often have different industry backgrounds and needs, and require personalized professional technical support and services. Customer service agents based on large language models can use deep learning to achieve more intelligent and flexible conversational interactions, provide customers with personalized technical / business consulting and guidance, and enhance user experience and satisfaction.
[0076] Vertical industries involve a lot of technical data and business knowledge. Customer service agents based on large language models process and learn large-scale professional technical data through deep learning technology. They can handle more complex user problems and provide a higher level of intelligent professional technical support.
[0077] Corresponding to the implementation method of the above-mentioned customer service intelligent agent, this embodiment also provides a customer service intelligent agent for implementing the implementation method of the customer service intelligent agent. Figure 5 As shown, including: The data acquisition module 501 is configured to acquire first request information input by a user.
[0078] The response module 502 is configured to use a pre-trained large language model to perform intent recognition on the first request information to determine the user's target business; and generate reply information in response to the second request information.
[0079] The robotic process automation module 503 is configured to respond to the input of the target business, execute the preset automated business process according to the target business, and obtain recall information; use the recall information to enhance the first request information to obtain the second request information, and input the second request information into the response module 502.
[0080] Optionally, the first request information acquired by the data acquisition module 501 may be in text form or in voice form. In this implementation, there is no limitation on the form of the first request information.
[0081] Optionally, the response module 502 may use a BERT model as the large language model, which is pre-trained to be able to recognize user intent, specifically, to be able to recognize a target business that the user needs to handle based on the first request information input by the user.
[0082] In order to enable the large language model to have the above-mentioned intent recognition capability, the response module 502 can pre-train the large language model in the following manner: First, obtain training samples. The training samples here can be domain knowledge of related business fields, such as business data, customer service conversation data, and other data samples including user questions and corresponding answers. Clean these data and label them with intent. The intent label here points to the preset target business, and finally obtain training samples.
[0083] The above training samples are used to train the large language model until a large language model that meets the requirements is obtained.
[0084] In some implementations, in order to enable the large language model to better understand the first request information proposed by the user, the response module 502 may also perform enhanced retrieval on the first request information. Specifically, a knowledge base of the target business field may be pre-built, and the knowledge base stores the business knowledge of the target business field. Then the response module 502 retrieves relevant information from the knowledge base according to the first request information, enhances the first request information using the retrieved relevant information, inputs the enhanced first request information into the large language model, and finally obtains the target business.
[0085] In some implementations, the response module 502 can also use the above-mentioned knowledge base to fine-tune the large language model, for example, using the business knowledge data in the knowledge base to perform text prediction tasks on the large language model, including giving the previous / next context and letting the large language model predict the corresponding next / previous context, or masking the middle part of the text data and letting the large language model predict the context content, etc. Specific fine-tuning tasks can be set according to needs, aiming to allow the large language model to fully understand the business knowledge of the target business field.
[0086] In some implementations, the response module 502 may also set some evaluation indicators according to requirements, such as accuracy, answer time, and user satisfaction, etc. The performance of the large language model is evaluated based on user feedback and these evaluation indicators, and the large language model is continuously optimized to improve the quality and performance of the customer service agent.
[0087] Optionally, the above-mentioned robotic process automation module 503 pre-constructs automated business processes for different business types. For example, standardized query business processes are formed for query scenarios such as checking traffic, checking call charges, and checking packages, and standardized operation business processes are formed for operation scenarios such as re-activating the phone, reporting loss, replacing the card, and resetting the password.
[0088] The robotic process automation module 503 is configured to trigger the execution of a corresponding automated business process based on the input intention recognition result, such as automatic query information search of the knowledge base and multi-data source information query.
[0089] In some embodiments, the robotic process automation module 503 can automatically parse the questions that need to be queried, and then search for information in the entire business system, so that the data scattered in each business system can be classified and integrated, and the business in different scenarios can be centrally displayed, which greatly shortens the query time and improves the efficiency of the customer service agent in handling complex problems.
[0090] In some implementations, the robotic process automation module 503 may use retrieval-augmented generation (RAG) technology to optimize domain knowledge retrieval, including: The robotic process automation module 503 performs a text search in the knowledge base according to the target business and obtains text search results; The robotic process automation module 503 performs semantic search in the vector library according to the target business and obtains semantic search results; The robotic process automation module 503 normalizes the text search results and the semantic search results; Calculate the entropy value based on the normalized text search results and the normalized semantic search results: H(X)=-Σ(P(X)*log(P(X))) P(X) = a*Xnorm1+(1-a)*Xnorm2 Where H(X) represents the entropy value of event X, P(X) represents the probability of event X occurring, log represents the logarithm operation with base 2, a is the weight coefficient, Xnorm1 represents the normalized text search results, and Xnorm2 represents the normalized semantic search results; The recall information is determined based on the entropy value. For example, if the entropy value is lower than a preset threshold, the recall information is directly determined based on the text search results and the semantic search results; if the entropy value is higher than the preset threshold, the recall information is generated based on preset empirical rules.
[0091] Optionally, the robotic process automation module 503 may utilize a preset prompt template to assemble the recall information and the first request information into the second request information.
[0092] Optionally, the robotic process automation module 503 may also obtain the second request information by using the following method, specifically including: Split the recall information into multiple data segments; For each data segment, map the data segment into a first embedding vector using a large language model; Mapping the first request information into a second embedding vector using a large language model; Determining a target first embedding vector according to a similarity between the first embedding vector and the second embedding vector; The data segment corresponding to the target first embedding vector is used as the context of the first request information to construct the second request information.
[0093] For the above-mentioned customer service agent, taking the module as an example of a software functional unit, the data acquisition module 501 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the data acquisition module 501 may include code running on multiple hosts / virtual machines / containers. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.
[0094] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0095] As an example of a hardware functional unit, the data acquisition module 501 may include at least one computing device, such as a server, etc. Alternatively, the data acquisition module 501 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0096] The multiple computing devices included in the data acquisition module 501 can be distributed in the same region or in different regions. The multiple computing devices included in the data acquisition module 501 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the data acquisition module 501 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0097] In other embodiments, the data acquisition module 501 can be used to execute any step in the implementation method of the above-mentioned customer service agent, the response module 502 can be used to execute any step in the implementation method of the above-mentioned customer service agent, and the robotic process automation module 503 can be used to execute any step in the implementation method of the above-mentioned customer service agent. The steps that the data acquisition module 501, the response module 502, and the robotic process automation module 503 are responsible for implementing can be specified as needed, and the data acquisition module 501, the response module 502, and the robotic process automation module 503 respectively implement different steps in the implementation method of the above-mentioned customer service agent to realize all the functions of the above-mentioned customer service agent.
[0098] In this implementation, the customer service agent can also be applied to computing devices such as computers and servers, or to a computing device cluster including at least one computing device, to realize the functions of the customer service agent.
[0099] Corresponding to the implementation method of the above-mentioned customer service intelligent agent, this embodiment also provides a customer service system, which is deployed with a customer service intelligent agent, and the customer service intelligent agent is implemented using the implementation method of the above-mentioned customer service intelligent agent.
[0100] It should be noted that the customer service system may include a server and a user end, and the customer service agent may be deployed on the server end to implement the above-mentioned customer service agent implementation method during the interaction with the user end.
[0101] Corresponding to the above method, this embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above method for implementing the customer service intelligent agent is implemented.
[0102] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0103] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0104] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0105] Corresponding to the above method, this embodiment also provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, and the program instructions, when read and executed by the one or more processors, execute the above-mentioned implementation method of the customer service intelligent body.
[0106] At the hardware level, the electronic device includes a processor, a computer-readable storage medium, a memory, a data interface, a network interface, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as a processor reading a corresponding computer program from a computer-readable storage medium into a memory and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the above processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0107] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for implementing a customer service agent, characterized in that: include: Obtaining first request information input by the user; Using a pre-trained large language model to perform intent recognition on the first request information to determine the target business of the user; Input the target business into a robotic process automation module, use the robotic process automation module to execute a preset automated business process according to the target business, and obtain recall information; Using the recall information to enhance the first request information, to obtain second request information; The second request information is input into the large language model to obtain response information of the large language model.
2. The method according to claim 1, characterized in that The method further comprises: constructing a knowledge base of the target business domain; The pre-trained large language model is used to perform intent recognition on the first request information to determine the target business of the user, specifically including: Retrieving relevant information in the knowledge base according to the first request information; enhancing the first request information by using the relevant information; The enhanced first request information is input into the large language model to obtain the target service.
3. The method according to claim 1, characterized in that The method further comprises: constructing a knowledge base of the target business domain, and converting text data in the knowledge base into vectors and storing the converted data in the vector base; Inputting the target business into a robotic process automation module, using the robotic process automation module to execute a preset automated business process according to the target business, and obtaining recall information, specifically includes: Using the robotic process automation module to perform a text search in the knowledge base according to the target business to obtain text search results; Using the robotic process automation module to perform semantic search in the vector library according to the target business, to obtain semantic search results; Normalizing the text search results and the semantic search results; Calculate the entropy value based on the normalized text search results and the normalized semantic search results: H(X)=-Σ(P(X)*log(P(X))) P(X) = a*Xnorm1+(1-a)*Xnorm2 Where H(X) represents the entropy value of event X, P(X) represents the probability of event X occurring, log represents the logarithm operation with base 2, a is the weight coefficient, Xnorm1 represents the normalized text search results, and Xnorm2 represents the normalized semantic search results; The recall information is determined according to the entropy value.
4. The method according to claim 3, characterized in that: Determining the recall information according to the entropy value specifically includes: If the entropy value is lower than a preset threshold, directly determining the recall information according to the text search results and the semantic search results; If the entropy value is higher than the threshold, the recall information is generated according to a preset empirical rule.
5. The method according to claim 1, characterized in that The first request information is enhanced by using the recall information to obtain the second request information, specifically including: The recall information and the first request information are assembled into the second request information using a preset prompt template.
6. The method according to claim 1, characterized in that The first request information is enhanced by using the recall information to obtain the second request information, specifically including: Splitting the recall information into multiple data segments; For each data segment, mapping the data segment into a first embedding vector using the large language model; Mapping the first request information into a second embedding vector using the large language model; Determining a target first embedding vector according to a similarity between the first embedding vector and the second embedding vector; The data segment corresponding to the target first embedding vector is used as a context of the first request information to construct the second request information.
7. A customer service agent, characterized in that: include: A data acquisition module, configured to acquire first request information input by a user; A response module, configured to use a pre-trained large language model to perform intent recognition on the first request information to determine a target business of the user; and, in response to the second request information, generating reply information; a robotic process automation module, configured to respond to the input of the target business, execute a preset automated business process according to the target business, and obtain recall information; The first request information is enhanced by using the recall information to obtain the second request information, and the second request information is input into the response module.
8. A customer service system, characterized in that: The customer service system is deployed with a customer service agent, and the customer service agent is implemented using the method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 6.
10. An electronic device comprising: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multipath text recall method and system, electronic equipment and storage medium
CN117421404A
Method and system for realizing e-commerce commodity information interaction by using large language model
CN117592489A
Document knowledge question-answering method and system based on LLM
CN118069811A
Question and answer pair generation method and system based on large language model
CN118332086A
Cited By
Electricity marketing work order reply generation method and system based on generative large model
CN120670562A
Device and method for realizing telephone question and answer customer service agent based on large model RAG
CN121071099A