Typical skill recommendation method, system and device based on intention recognition and retrieval optimization

By building a vector database and intention analysis module and combining large language models to generate accurate answers, the customer service speech recommendation assistant has solved the shortcomings of user real intention recognition and knowledge base retrieval, and significantly improved the accuracy and user experience of recommended speech.

CN118916456APending Publication Date: 2024-11-08JIANGSU SUNING BANK CO LTD

Patent Information

Application Number
CN202410949601.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing customer service speech recommendation assistant lacks the user's real intention recognition steps and knowledge base retrieval capabilities when dealing with complex and personalized user needs, resulting in long-lasting and redundant answers or inaccurate enough, and cannot effectively match vectors with similar semantics but different lengths.

Method used

By preprocessing knowledge base text, build a vector database, obtain user conversations and perform intent analysis, use vectorized models to retrieve intent vectors, combine pretrained reordering models to extract text features and similarity calculations, generate accurate answers, and finally, large languages Model generation recommendation speech.

Benefits of technology

It improves customer satisfaction and problem-solving rate, provides high-quality and highly relevant answers, reduces user waiting time and repeated operations, improves the accuracy and flexibility of recommended speeches, and makes the user experience more natural and smooth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916456A_ABST
    Figure CN118916456A_ABST
Patent Text Reader

Abstract

The invention discloses a verbal skill recommendation method, system and device based on intention recognition and retrieval optimization. The method comprises the following steps: constructing a vector database; obtaining a user dialogue, performing format processing on the user dialogue to obtain a dialogue text, and inputting the dialogue text into the large language model to obtain an intention text; inputting the intention text into a vectorization model, and retrieving an intention vector in a vector database to obtain an initial answer; obtaining an initial answer and intention vector, and inputting the initial answer and intention vector into a pre-trained reordering model to obtain a precise answer; and obtaining an accurate answer and a user dialogue, and inputting the accurate answer and the user dialogue into the large language model to generate a recommended verbal skill. The waiting time and repeated operation of the user are reduced, the user satisfaction degree is improved, the interaction process is more natural and smooth, the user feels that the conversation between the user and the intelligent customer service is closer to the real human customer service, the accuracy, flexibility and user experience of the recommendation verbal skill are greatly improved, and remarkable innovativeness and practical value are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a method, system and device for recommending speech based on intent recognition and retrieval optimization. Background Art

[0002] In today's rapidly developing digital age, the interactions between companies and their customers are becoming increasingly frequent and complex. High-quality customer service has become a key factor for companies to enhance their brand image and increase user satisfaction and loyalty. In this context, the optimization and innovation of the customer service recommendation assistant, as an important tool to improve customer service efficiency and service quality, is particularly important.

[0003] Traditional customer service recommendation assistants usually rely on preset scripts and static knowledge bases. This method performs well when dealing with standardized and highly repetitive queries, but it is unable to cope with complex and personalized user needs.

[0004] With the advancement of artificial intelligence, especially natural language processing technology, traditional customer service script recommendation assistants are gradually developing in a more intelligent direction, mainly by combining retrieval enhancement generation technology and the capabilities of large language models to provide more accurate and personalized services. When using this method, the in-line knowledge file can first be vectorized and saved to the vector library (the so-called knowledge file here is actually a cvs file consisting of the actual question and answer pairs between customers and customer service in production). Then, when the customer asks a question, the script recommendation assistant will retrieve relevant content from the vector library based on the customer's current question. Finally, the retrieved document information and the historical contextual dialogue between the customer and the customer service are passed to the large model as known information. The large model generates an answer based on the user's current question and the known information.

[0005] Although the existing customer service recommendation assistants have certain capabilities of dynamic content generation and deep personalized services, they still have many shortcomings in the application process of actual business scenarios, which urgently need targeted research and solutions. These shortcomings are specifically manifested in the following aspects:

[0006] (1) Lack of user real intention identification step: The existing speech recommendation process is to search the knowledge base for highly relevant content based on the user's current question, and then let the large language model generate answers based on the searched document information and related historical context information. Even if the search is done, there will be a lot of other irrelevant content mixed in. These irrelevant contents will also be passed to the large model as document information, thus affecting the answers generated by the model, such as making the model's answers verbose, redundant, or inaccurate.

[0007] (2) Insufficient knowledge base retrieval capabilities: Existing knowledge base retrieval mostly calculates the L2 distance (Euclidean distance), that is, by measuring the "straight-line" distance between two vectors in Euclidean space to determine the similarity between two vectors. The smaller the distance, the more similar the vectors are. This type of measurement takes into account both the length and direction of the vectors. However, there is a problem. When the directions of two vectors are close but the length difference is too large, a good match cannot be made. This results in two answers that are very close in the vector direction (semantically) but very different in text length. There are many similar questions, which results in the answers to many questions being clearly present in the knowledge base but not being searchable. Summary of the invention

[0008] The purpose of the present invention is to provide a method, system and device for recommending words based on intent recognition and retrieval optimization, so as to solve the problems of lack of a step for identifying the user's true intent and insufficient knowledge base retrieval capability.

[0009] To achieve the above object, the present invention provides the following technical solution: a method for recommending words based on intention recognition and retrieval optimization, comprising the following steps:

[0010] Preprocess the knowledge base text and build a vector database;

[0011] Obtain user conversations, format the user conversations to obtain conversation texts, and input the conversation texts into a large language model to obtain intent texts;

[0012] Input the intent text into the vectorization model to obtain the intent vector, and search the intent vector in the vector database to obtain the initial answer;

[0013] Get the initial answer and intent vector and input them into the pre-trained re-ranking model to get an accurate answer;

[0014] Get accurate answers and dialogue with users, input them into the large language model, and generate recommended words.

[0015] Preferably, the constructing of the vector database comprises the following steps:

[0016] Acquire the knowledge base text, perform word segmentation on the knowledge base text, and obtain the word segmentation text;

[0017] Input the segmented text into the vectorization model for vectorization to obtain the text vector;

[0018] Store text vectors and build a vector database.

[0019] Preferably, obtaining the initial answer comprises the following steps:

[0020] Acquire the intention vector, search the intention vector in the knowledge base, output the first number of text vectors with the highest relevance, and obtain a number of reply texts;

[0021] Based on several reply texts, an initial answer is obtained.

[0022] Preferably, obtaining an accurate answer comprises the following steps:

[0023] Get the initial answer and intent vector;

[0024] Extract the text features of the reply text respectively, normalize the text features, and obtain the standard text;

[0025] Calculate the similarity value between the intent vector and the standard text one by one;

[0026] Outputting the second number of standard texts with the highest similarity values ​​according to the similarity values;

[0027] Get accurate answers.

[0028] The speech recommendation system based on intent recognition and retrieval optimization includes:

[0029] Preprocessing module, used to preprocess the knowledge base text and build a vector database;

[0030] The intent analysis module is used to obtain user dialogues, format the user dialogues, obtain dialogue texts, and input the dialogue texts into the large language model to obtain intent texts;

[0031] The vector processing module is used to input the intended text into the vectorization model to obtain the intended vector, retrieve the intended vector in the vector database, and obtain the initial answer;

[0032] The re-ranking module is used to obtain the initial answer and the intended text input into the pre-trained re-ranking model to obtain an accurate answer;

[0033] The answer generation module is used to obtain accurate answers and communicate with users, input them into the large language model, and generate recommended words.

[0034] Preferably, the preprocessing module comprises:

[0035] The data processing module is used to obtain the knowledge base text, perform word segmentation processing on the knowledge base text, and obtain the word segmentation text;

[0036] The vectorization module is used to input the segmented text into the vectorization model for vectorization to obtain the text vector;

[0037] The storage module is used to store text vectors and build a vector database.

[0038] Preferably, the vector processing module includes:

[0039] The matching module is used to obtain the intention vector, search the intention vector in the knowledge base, output the first number of text vectors with the highest relevance, obtain a number of reply texts; and obtain an initial answer based on the number of reply texts.

[0040] Preferably, the reordering module comprises:

[0041] The feature processing module is used to obtain the initial answer and the intention vector; extract the text features of the reply text respectively, and normalize the text features to obtain the standard text;

[0042] A calculation module, used for calculating the similarity value between the intention vector and the standard text one by one;

[0043] The text sorting module is used to output the second number of standard texts with the highest similarity values ​​according to the similarity values, so as to obtain accurate answers.

[0044] The speech recommendation device based on intention recognition and retrieval optimization includes:

[0045] A processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, a method for recommending words based on intent recognition and retrieval optimization is implemented.

[0046] The technical effects and advantages of the present invention are as follows: the intention analysis module and the reordering module are used to accurately screen and comprehensively sort user questions, and the answer generation module calls the large language model in combination with user conversations to generate recommendation words to improve customer satisfaction and problem-solving rate. By providing high-quality and highly relevant answers, the user's waiting time and repeated operations are reduced, user satisfaction is improved, the interaction process is more natural and smooth, and the user feels that the conversation with the intelligent customer service is closer to real human customer service, which greatly improves the accuracy, flexibility and user experience of the recommendation words, and has significant innovation and practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0048] Figure 2 It is a system schematic diagram of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] The present invention provides Figure 1-2 The method, system and device for recommending words based on intention recognition and retrieval optimization shown in the above-mentioned embodiment perform the above-mentioned steps through the following modules: a preprocessing module, an intention analysis module, a vector processing module, a reordering module and an answer generation module. The method of the present invention is performed by using the above-mentioned modules, and includes the following steps:

[0051] S1: The content of the knowledge base text is obtained through the preprocessing module, and the knowledge base text is segmented through the data processing module to obtain the segmented text, so as to significantly improve the effect of subsequent processing and build a vector database. Among them, the word segmenter adopts a recursive segmentation algorithm based on the characteristics of Chinese text, which can effectively identify and segment the words in the text; after obtaining the segmented text, the segmented text is vectorized by the vectorization module using a pre-trained vectorization model, and the self-attention mechanism is used to dynamically capture context information and convert the segmented text into a high-dimensional vector to obtain a text vector. The text vector not only retains the semantic similarity and difference of the text, but also can perform accurate semantic matching and comparison in high-dimensional space; finally, the text vector is stored through the storage module to build a text vector database.

[0052] S2: The intent analysis module is used to obtain user conversations, which include current questions and historical contexts. The current questions and historical contexts are automatically formatted to obtain conversation texts in a unified format. The large language model is used to obtain all historical contexts and current questions, and the user conversations are understood separately to obtain the intent text.

[0053] S3: Input the intent text into the vectorization model through the vector processing module, obtain the intent vector in the same format as the text vector by vectorizing the intent text, retrieve the intent vector in the vector database through the matching module, retrieve the intent vector in the knowledge base according to the relevance, output the first number of reply texts; collect the reply texts to obtain the initial answer.

[0054] S4: Obtain the initial answer and intention vector through the reordering module, extract the text features of the reply text respectively through the feature processing module, normalize the text features to obtain the standard text; calculate the similarity value between the intention vector and the standard text one by one through the calculation module; finally, sort the standard texts from large to small according to the similarity value through the text sorting module, output the second number of standard texts, and use the output standard text as the accurate answer.

[0055] S5: The answer generation module obtains the precise answer, the current question, and the historical context, and inputs them into the large language model. The precise answer is processed by the large language model to generate recommended words, which are then sent to the customer service end. The customer service end manually screens the words and finally sends them to the client end as the final answer to the customer's current question.

[0056] The following is an example run in Python:

[0057] S1: First, obtain a preprocessed knowledge base, where the knowledge base is a historical question and answer, updated content or manually added data archive of the industry, obtain the latest knowledge base text through the preprocessing module, and vectorize the knowledge base text respectively, finally obtain a vector database, and store the vector database;

[0058] S2: The intention analysis module obtains the customer dialogue "What is my current loan interest rate?" and formats the user dialogue to obtain the dialogue text: [{"I want to know", "loan", "interest rate"...}], and inputs the dialogue text into the large language model. The large language model analyzes the customer's intention and generates structured intention information. The customer's real intention is "loan interest rate query", and the intention text is "loan interest rate query";

[0059] S3: The intent text is vectorized by the vector processing module to obtain the intent vector, and the text vector related to "loan interest rate inquiry" is retrieved in the vector database, and an initial answer consisting of multiple reply texts is obtained, wherein the number of reply texts is configurable. Assuming that the first number is preset to 10, the 10 reply texts with the highest relevance are output according to the relevance, and these 10 reply texts are used as the initial answer. The 10 related words obtained by the preliminary retrieval are as follows (5 of which are matched by L2 and 5 by cosine similarity):

[0060] L2 matched the following 5 lines of speech: "Our current personal loan interest rate is 4.5%, depending on your credit score", "We offer home loans with interest rates starting at 3.8%, which may vary depending on your situation", "Personal loan interest rates are usually between 4.0% and 5.0%, please consult your account manager for details", "We have a variety of loan products with interest rates ranging from 3.5% to 5.0%, welcome to consult in detail", "Loan interest rates will be adjusted based on market conditions and your credit score",

[0061] 5 statements obtained by cosine similarity matching: "Our mortgage interest rate is 3.8%, the specific interest rate depends on the loan amount and term", "You can choose a fixed rate or a floating rate, please refer to our official website for specific interest rates", "Personal loan interest rates vary depending on your credit score and loan term, generally around 4.5%", "We offer a variety of loan products, welcome to consult for specific interest rates and conditions", "Loan interest rates will be adjusted according to market conditions, please pay attention to our latest announcements";

[0062] S4: Extract the text features of each reply text, such as keywords ("loan", "interest rate"), text length, and release time, normalize the text features, remove outliers and noise, calculate the feature similarity value between the intent vector and each reply text, input the standard text vector into the trained gradient boosting tree model, calculate the feature similarity value, and output the final score of each reply text, sort them according to the score, and set the second number to 3. After calculating the final similarity value, the first three reply texts will be output as accurate answers; for example: re-sort the above 10 words through the re-ranking model, and output the top three words with the highest scores according to the user's real intention ("loan interest rate query"):

[0063] Script 1: “Our current personal loan interest rate is 4.5%, depending on your credit score.” {Directly answers the user’s question about loan interest rates and mentions specific credit scores, which is highly relevant to the user’s intent},

[0064] Script 2: "Our mortgage rate is 3.8%, and the specific rate depends on the loan amount and term." {provides the specific interest rate for the mortgage and mentions the specific conditions, which is also related to the user's intent},

[0065] Talk 3: "Personal loan interest rates vary depending on your credit score and loan term, and are generally around 4.5%." {Explains the factors that affect loan interest rates and gives a rough range of interest rates that meets the needs of users};

[0066] S4: Finally, the answer generation module obtains the precise answer, current question and historical context, inputs them into the large language model, connects the current question and historical context through the precise answer, generates recommended words, outputs the recommended words to the customer service staff's operation interface for display, and with the intervention of the customer service staff, pushes the final answer to the user end.

[0067] In summary, based on user conversations, a large language model is used to generate the user's intent text to learn the user's true intent. The intent text is then vectorized through a vectorization model and retrieved. After the retrieval generates an initial answer, the reply text is comprehensively sorted according to the reordering module to obtain an accurate answer. Finally, the answer generation module calls the large language model to combine the current question and historical context to generate recommended words, which greatly improves the accuracy, flexibility and user experience of the system, and has significant innovation and practical value.

[0068] Through the re-ranking module, the bank customer service script recommendation assistant can significantly improve the accuracy and effectiveness of script recommendations to increase customer satisfaction and problem resolution rate. By providing high-quality and relevant answers, it reduces user waiting time and repetitive operations, improves user satisfaction, and makes the interaction process more natural and smooth. Users feel that conversations with intelligent customer service are closer to real human customer service.

[0069] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. Speech recommendation method based on intent recognition and retrieval optimization, Features: The steps include: Preprocess the knowledge base text and build a vector database; Obtain user conversations, format the user conversations to obtain conversation texts, and input the conversation texts into a large language model to obtain intent texts; Input the intent text into the vectorization model to obtain the intent vector, and search the intent vector in the vector database to obtain the initial answer; Get the initial answer and intent vector and input them into the pre-trained re-ranking model to get an accurate answer; Get accurate answers and dialogue with users, input them into the large language model, and generate recommended words.

2. The method for recommending words based on intention recognition and retrieval optimization according to claim 1, Features: The constructing of the vector database comprises the following steps: Acquire the knowledge base text, perform word segmentation on the knowledge base text, and obtain the word segmentation text; Input the segmented text into the vectorization model for vectorization to obtain the text vector; Store text vectors and build a vector database.

3. The method for recommending words based on intention recognition and retrieval optimization according to claim 2, Features: The obtaining of the initial answer comprises the following steps: Acquire the intention vector, search the intention vector in the knowledge base, output the first number of text vectors with the highest relevance, and obtain a number of reply texts; Based on several reply texts, an initial answer is obtained.

4. The method for recommending words based on intention recognition and retrieval optimization according to claim 3, Features: The steps of obtaining an accurate answer include: Get the initial answer and intent vector; Extract the text features of the reply text respectively, normalize the text features, and obtain the standard text; Calculate the similarity value between the intent vector and the standard text one by one; Outputting the second number of standard texts with the highest similarity values ​​according to the similarity values; Get accurate answers.

5. A speech recommendation system based on intent recognition and retrieval optimization. Features: Preprocessing module, used to preprocess the knowledge base text and build a vector database; The intent analysis module is used to obtain user dialogues, format the user dialogues, obtain dialogue texts, and input the dialogue texts into the large language model to obtain intent texts; The vector processing module is used to input the intended text into the vectorization model to obtain the intended vector, retrieve the intended vector in the vector database, and obtain the initial answer; The re-ranking module is used to obtain the initial answer and the intended text input into the pre-trained re-ranking model to obtain an accurate answer; The answer generation module is used to obtain accurate answers and communicate with users, input them into the large language model, and generate recommended words.

6. The speech recommendation system based on intention recognition and retrieval optimization according to claim 5, Features: The preprocessing module comprises: The data processing module is used to obtain the knowledge base text, perform word segmentation processing on the knowledge base text, and obtain the word segmentation text; The vectorization module is used to input the segmented text into the vectorization model for vectorization to obtain the text vector; The storage module is used to store text vectors and build a vector database.

7. The speech recommendation system based on intention recognition and retrieval optimization according to claim 6, Features: The vector processing module comprises: The matching module is used to obtain the intention vector, search the intention vector in the knowledge base, output the first number of text vectors with the highest relevance, obtain a number of reply texts; and obtain an initial answer based on the number of reply texts.

8. The speech recommendation system based on intention recognition and retrieval optimization according to claim 7, Features: The reordering module comprises: The feature processing module is used to obtain the initial answer and the intention vector; extract the text features of the reply text respectively, and normalize the text features to obtain the standard text; A calculation module, used for calculating the similarity value between the intention vector and the standard text one by one; The text sorting module is used to output the second number of standard texts with the highest similarity values ​​according to the similarity values, so as to obtain accurate answers.

9. A speech recommendation device based on intent recognition and retrieval optimization. Features: include: A processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the method described in claims 1-4 is implemented.

Citation Information

Patent Citations

  • Knowledge question and answer method, device and equipment and storage medium

    CN116680384A

  • LLM-based intelligent question and answer reply method, system and device

    CN117972216A

Cited By

  • Customer service information generation method and system based on historical sessions

    CN119311840A

  • A customer service information generation method and system based on historical conversations

    CN119311840B

  • Optimization method and system for generating mathematical formula format based on large language model

    CN119647410A