Intelligent customer service auxiliary intention matching method based on large language model

By using large language models to match users' intentions in smart customer service, the problems of poor intention matching effect and insufficient robustness in the existing technology are solved, and higher matching accuracy and model generalization capabilities are achieved.

CN119396964APending Publication Date: 2025-02-07GUANGDONG ARTIFICIAL INTELLIGENCE & DIGITAL ECONOMY LAB (GUANGZHOU)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311371234.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing smart customer service has problems such as narrow scope of application, low recognition accuracy and insufficient robustness when dealing with user intention matching.

Method used

Using a smart customer service assisted intention matching method based on a large language model, by building a user interaction interface and configuring a back-end server, using large language models such as LLaMa-2-70B for preprocessing and intention matching, and improving the model's fine-tuning and data enhancement performance.

Benefits of technology

It improves the accuracy and robustness of intention matching, can better handle complex and fuzzy user needs, and enhances the generalization ability of the model and the efficiency in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396964A_ABST
    Figure CN119396964A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent customer service auxiliary intention matching method based on a large language model, and the method comprises the steps: designing a front-end interface, which is used for constructing a user interaction interface; and a back-end server configuration step: receiving a user request transmitted by the user interaction interface, calling the large language model corresponding to the user request for processing, and returning a processing result to the user interaction interface. The large language model has a large amount of training data, so that the large language model can learn more user intention modes, and the intention matching accuracy is effectively improved. And secondly, the large language model has strong model capability, so that the large language model can also have a better recognition effect when processing some complex or fuzzy user requirements. And thirdly, due to the fact that the large language model has high generalization ability, the large language model can still keep high recognition accuracy when processing some abnormal or unseen user requirements, and therefore the robustness of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent customer service assisted intention matching method based on a large language model. Background Art

[0002] Existing smart customer service mainly solves the intention matching problem of smart customer service by setting rules, keyword matching or machine learning models of small-scale data. It has the following technical shortcomings:

[0003] First, the preset rules and keyword matching methods generally have a narrow scope of application. This method mainly relies on preset rules and keyword libraries, which requires high professional level and experience of the preset personnel. In addition, due to the diversity and complexity of user needs, preset rules and keyword libraries are often difficult to cover all user needs, especially when dealing with some semantically ambiguous or ambiguous needs, the matching effect of this method often cannot meet business needs.

[0004] Secondly, although machine learning models based on small-scale data can avoid the problems of manually preset rules and keywords to a certain extent, due to the limited size of training data, these models often cannot obtain sufficient user intent patterns, which means that they will still make recognition errors when dealing with some rare or new user needs.

[0005] Thirdly, the existing models usually have low recognition accuracy when facing some abnormal or unseen user demands, which leads to the weak robustness of the model. For intelligent customer service systems that need to handle a large number of user demands, the robustness of the model is very critical. If the model is not robust, its effect in practical applications will be greatly reduced. Summary of the invention

[0006] The purpose of the present invention is to overcome the deficiencies of the above-mentioned prior art and to provide a smart customer service assisted intention matching method based on a large language model to improve the intention matching effect of existing smart customer service and improve its efficiency and user satisfaction in practical applications.

[0007] To achieve the above object, the technical solution of the present invention is:

[0008] An intelligent customer service assisted intention matching method based on a large language model, comprising:

[0009] Front-end interface design steps to build the user interaction interface;

[0010] The back-end server configuration step is used to receive user requests from the user interaction interface, call the large language model corresponding to the user request for processing, and return the processing result to the user interaction interface.

[0011] Furthermore, when receiving a user request, the backend server first performs preprocessing to improve the recognition accuracy of the large language model.

[0012] Furthermore, the preprocessing work includes text cleaning, text normalization, and text segmentation; the text cleaning includes removing redundant spaces and punctuation marks; the text normalization includes converting all texts into lowercase and unifying digital expressions.

[0013] Furthermore, after preprocessing, the user request is input into the large language model, and the large language model understands the input text and generates a corresponding response.

[0014] Furthermore, the large language model is an LLaMa-2-70B model, and the LLaMa-2-70B model is fine-tuned, and the fine-tuning includes:

[0015] Freezing the front-end layers of the LLaMa-2-70B model and training the back-end layers to learn and adapt to new tasks while preserving the original vocabulary and grammatical patterns;

[0016] In the initial stage of the LLaMa-2-70B model training, a learning rate is set to quickly approach the optimal solution; as the training progresses, the learning rate is gradually reduced;

[0017] During the fine-tuning process, the LLaMa-2-70B model is monitored using a validation set to prevent overfitting and optimize model performance; when the model performance no longer improves on the validation set, training is stopped;

[0018] The LLaMa-2-70B model was optimized using a few-shot or one-shot approach.

[0019] Furthermore, HTML, CSS and JavaScript are used to build the user interface; Python language is used to start Uvicorn as the backend server.

[0020] Furthermore, the front-end interface uses localStorage to cache static resources and data, and the user's operations in an offline state are synchronized to the back-end server once the network is restored.

[0021] Furthermore, the backend server uses a message queue to perform asynchronous processing on time-consuming or multi-threaded model inference tasks, and uses websocket for real-time output, and disperses the incoming network traffic to multiple servers.

[0022] Furthermore, the backend server uses an NVIDIA A100 GPU, and after the backend server is started, the model is loaded using startup, and the model instance is kept in memory.

[0023] Furthermore, the large language model uses data enhancement to increase data quality; the data enhancement includes back translation and adversarial training; the back translation translates the text into other languages ​​and then translates it back to obtain a new text with the same meaning but different expression; the adversarial training generates new training samples through perturbation based on the original data.

[0024] Furthermore, the method also includes: a feedback and optimization step for optimizing the front-end interface and the back-end server according to user feedback and the operation status of the front-end interface and the back-end server.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] Since the large language model has a large amount of training data, it can learn more user intent patterns, thereby effectively improving the accuracy of intent matching. Secondly, the large language model has a strong model capability, which enables it to have a good recognition effect when dealing with some complex or ambiguous user needs. Thirdly, since the large language model has a strong generalization ability, it can maintain a high recognition accuracy when dealing with some abnormal or unseen user needs, thereby improving the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flowchart of a large language model intelligent customer service assisted intention matching method provided by an embodiment of the present invention;

[0028] Figure 2 A flowchart of a large language model intelligent customer service assisted intention matching method provided in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0029] Example:

[0030] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0031] See also Figure 1 As shown, the present embodiment provides a method for intelligent customer service assisted intention matching based on a large language model, which mainly includes the following steps:

[0032] Front-end interface design steps to build the user interaction interface;

[0033] The back-end server configuration step is used to receive user requests from the user interaction interface, call the large language model corresponding to the user request for processing, and return the processing result to the user interaction interface.

[0034] In this way, the large language model, because it has a large amount of training data, can learn more user intent patterns, thereby effectively improving the accuracy of intent matching. Secondly, the large language model has a strong model capability, which enables it to have a good recognition effect when dealing with some complex or ambiguous user needs. Thirdly, because the large language model has a strong generalization ability, it can maintain a high recognition accuracy when dealing with some abnormal or unseen user needs, thereby improving the robustness of the model.

[0035] In a specific embodiment, the front-end interface has the following characteristics:

[0036] (1) Usability: The front-end interface needs to provide users with clear and intuitive operation instructions so that users can quickly get started without much learning. For example, the usability of the interface can be improved by designing intuitive icons, clear menus, and concise operation processes.

[0037] (2) Stability: The front-end interface can run stably in various network environments by adopting the following technologies: 1. Offline availability. Use storage such as localStorage to cache static resources and data; 2. Priority loading: Prioritize the loading of critical resources, and load non-critical resources when the network conditions are good; 3. Data synchronization: Once the network is restored, the user's offline operations will be synchronized to the server (this item is for browsers that support Service Worker). In this way, even in poor network conditions, basic functions can be guaranteed, such as: question input, history viewing, etc.

[0038] (3) Real-time performance: The smart customer service system needs to be able to respond to user needs in real time. Therefore, the front-end interface needs to have good real-time performance and be able to display system feedback information instantly.

[0039] In order to achieve the above features, front-end technologies such as HTML, CSS and JavaScript are used to build the interface. HTML (HyperText Markup Language) is a language used to describe web pages and can be used to create structured web page content. CSS (Cascading Style Sheets) can be used to describe the style of a web page, including layout, color, font, etc. JavaScript is a programming language that can be used to implement complex functions such as interactive effects and form validation.

[0040] During the front-end interface design process, you can adopt a modular and component-based design concept to split the complex interface into multiple simple modules or components, then implement and test them separately, and finally combine them. This can improve development efficiency and facilitate subsequent maintenance and upgrades.

[0041] In a specific embodiment, the Python language is used to start Uvicorn as a backend server. In terms of performance, Uvicorn is a high-performance server framework based on ASGI (Asynchronous Server Gateway Interface). Compared with the traditional WSGI (Web Server Gateway Interface), ASGI supports asynchronous processing and can better cope with high concurrency and high-traffic scenarios, thereby providing higher performance. In terms of language advantages, the Python language is widely used in the development of various applications, especially in the fields of data processing and artificial intelligence, because of its concise and elegant syntax, rich library functions and a large user community. Python's asynchronous programming capabilities allow us to process multiple user requests at the same time, improving the response speed and processing power of the system. In terms of ease of use, the concise and clear syntax of the Python language allows developers to get started faster and develop more efficiently. At the same time, the Python community provides a wealth of tutorials and resources to help developers solve various problems.

[0042] In a specific embodiment, the large language model uses the LLaMa-2-70B model; in terms of model performance, LLaMa-2-70B is a large Transformer model with more than 70 billion parameters, which performs well in various language tasks, including text generation, text understanding, question and answering, and other tasks. This means that it can better understand and process user requests and provide more accurate responses. In terms of model capacity, the large model capacity of LLaMa-2-70B means that it can handle more complex semantic patterns, thereby providing more accurate intent matching. This is very helpful for handling complex user needs and providing answers or actions that meet user needs.

[0043] When configuring a large language model, you need to consider how to adjust model parameters according to actual needs, such as the maximum input length, maximum generation length, etc., to ensure the performance and efficiency of the model. Among them, the maximum input length parameter is set according to the actual customer service conversation content. Generally, customer questions and customer service answers are not too long, so there is no need to set a very large maximum input length. At the same time, the computational complexity of the model increases with the increase of input length, so it should not be set too large. A suitable maximum input length can be obtained by statistically analyzing the sentence length distribution in the training data; the maximum generation length parameter determines the maximum length of the answer generated by the model. Usually, the customer service answer is not too long, so a moderate maximum generation length can be set. If it is set too small, the model may not be able to generate a complete answer; if it is set too large, the model may generate lengthy answers, affecting the user experience.

[0044] At the same time, the large language model needs to be regularly updated and maintained to ensure that it achieves the best performance under the latest data and algorithms. To this end, the large language model is improved, and data enhancement and other means are used to increase data quality from a data perspective. More sophisticated data preprocessing is used for the data, such as dialogue expansion in the specific customer service field. At the same time, conversion learning and specific task optimization are used: the model is fine-tuned for specific customer service user dialogue tasks, so that the model can better adapt to intent matching tasks and improve performance.

[0045] Specifically, data augmentation mainly uses two methods: back translation and adversarial training. Back translation refers to translating text into other languages ​​and then translating it back to obtain a new text with the same meaning but different expression; adversarial training generates new training samples through small perturbations on the original data.

[0046] Specifically, the preprocessing work includes text cleaning, text normalization, and text segmentation; the text cleaning includes removing extra spaces and punctuation marks; the text normalization includes converting all texts into lowercase and unifying digital expressions. These preprocessing tasks help improve the recognition accuracy and processing speed of the model. After the above preprocessing, the user's request is input into the LLaMa-2-70B model. The LLaMa-2-70B model will have a deep understanding of the input text, capture its subtle semantics and contextual information, and generate corresponding responses based on its understanding. This process is the process of intent matching. In this process, the model needs to handle various complex situations, including but not limited to synonym recognition, reference resolution, sentiment analysis, etc. The generated responses are not always perfect. Sometimes, the generated responses may need to be post-processed to meet specific business needs or user experience. For example, some rules can be set to adjust the generated responses, such as limiting the length of the response, removing sensitive words, adding specific polite expressions, etc., to meet the actual needs of users and improve user experience.

[0047] Specifically, transformation learning is a method of applying the knowledge learned by the pre-trained model to specific tasks, which is usually achieved by fine-tuning the data of the specific task. In the scenario of intelligent customer service intent matching, the specific task optimization mainly refers to the intent matching task, that is, judging the user's intent based on the user's question and providing a corresponding answer.

[0048] Llama2-70B is an advanced pre-trained language model with 70 billion parameters, providing large-scale pre-training and strong generalization capabilities. In order to adapt it to specific intent matching tasks, this application adopts a fine-tuning approach. Fine-tuning is a critical task for Llama2-70B. Although this model has been pre-trained and optimized on a large scale, in specific application scenarios, the model still needs to be fine-tuned and optimized according to the characteristics and requirements of specific tasks. First, in the Llama2-70B model, some of its layers are frozen, and only specific layers are trained. For example, I can freeze the front end of the model (for example, the first 50% layers) and only train the back-end layers (for example, the back 50% layers). Such a decision is based on the observation that the front end of the model is usually responsible for extracting general features from the data, such as grammatical and lexical patterns, while the back-end layers are responsible for learning specific tasks. By freezing the front-end layers, the model can learn and adapt to new tasks while retaining the original vocabulary and grammatical patterns. Secondly, hyperparameters such as learning rate need to be adjusted. The learning rate is a key parameter in model training, which determines the speed of model optimization and the final performance. One possible strategy is to use a decreasing learning rate. In the early stages of training, a higher learning rate (for example, 0.01) can be set to quickly approach the optimal solution. As training proceeds, the learning rate is gradually reduced (for example, by 10% per epoch). In this way, faster convergence can be achieved while maintaining model performance, and fine-tuning can be performed near the optimal solution.

[0049] During the fine-tuning process, the validation set is also used to monitor the model. At the data set division level, the data set is divided into a training set, a validation set, and a test set, for example, in a ratio of 8:1:1. After each epoch, the validation set is used to evaluate the performance of the model and adjust the model parameters based on its performance. If the performance of the validation set does not improve in several consecutive epochs (for example, 5), it can be considered that the model has reached the optimal state, and training should be stopped at this time to prevent overfitting.

[0050] Finally, the few-shot or one-shot method is used to optimize the model. The key to this method is to select appropriate samples. For example, a small number of samples that are most relevant to the target task can be selected (for example, 10 samples are selected from the training set as few-shot samples), or only one of the most representative samples (as a one-shot sample) can be selected to fine-tune the model. In this way, the risk of overfitting can be reduced while ensuring that the model learns task-related information, and the generalization performance of the model can be improved.

[0051] In the specific model practice, in order to better adapt to specific intent matching tasks and data, multiple parameter configurations and experiments were carried out, which can be specifically divided into training parameters and configuration model parameters. The main training parameters involved are as follows:

[0052] 1. Adjustment of the model structure: For example, add a fully connected layer to the back end of the model, and set the number of neurons in this layer to 512. Or add a self-attention mechanism layer and set the number of attention heads to 8.

[0053] 2. Choice of optimizer: If the task to be trained is a classification task, you can first try to use the SGD optimizer; if it is a generation task, the Adam optimizer may be preferred. When using SGD, you may also need to adjust its momentum parameter, for example, set it to 0.9.

[0054] 3. Adjustment of batch size: You can start with a smaller batch size, such as 32 or 64, and then observe the model training process and results. If you find that the model training is unstable or the performance is poor, you can gradually increase the batch size.

[0055] 4. Adjust the regularization strategy: for example, add L2 weight decay during model training, and set the decay coefficient to 0.001; or add dropout after the fully connected layer of the model, and set the dropout rate to 0.5.

[0056] 5. Adjust the model initialization strategy: If the activation function of the model is ReLU or its variant, you can choose to use He initialization; if it is sigmoid or tanh, you can choose to use Xavier initialization. The above are examples and recommended values ​​of the relevant parameters involved in the training phase. The pseudo code is as follows: Assuming that our model is model, using the pytorch framework, for specific codes, the following are some examples: 1. Adjustment of the model structure: ```python from torch import nnmodel.add_module("fc",nn.Linear(1024,512))#Add a fully connected layer

[0057] model.add_module("attn",nn.MultiheadAttention(1024,8))#Add self-attention mechanism layer```2. Choice of optimizer:```python from torch.optim import SGD,Adam optimizer=

[0058] SGD(model.parameters(),lr=0.01,momentum=0.9)#Use SGD optimizer#or optimizer=Adam(model.parameters(),lr=0.01)#Use Adam optimizer```3. Adjustment of batch size: This is usually set in the data loader (DataLoader). ```python from torch.utils.dataimport DataLoader loader=DataLoader(dataset,batch_size=32) #Set batch size to 32```4. Adjust regularization strategy:```python #Assume the name of the model is model from torch.optim importSGD from torch.nn import Dropout model.add_module("dropout",Dropout(0.5)) #Add dropout to the model optimizer=SGD(model.parameters(),lr=0.01,weight_decay=0.001) #Add L2 weight decay to the optimizer```5. Adjust the initialization strategy of the model:```python #Assume the name of the model is model from torch.nn.init import xavier_uniform_,kaiming_uniform_forname,param model.named_parameters(): if 'weight' in name:xavier_uniform_(param) #Use Xavier initialization #or kaiming_uniform_(param) #Use He initialization```

[0059] When exploring the feasibility, we also tried the LoRA method to adjust the output of the model to try to improve the model performance. However, since it only adjusts the output of the model, the adapter effect is unstable. In actual operation, the LoRA method was abandoned and listed as the direction for subsequent optimization. LoRA (Learning from Outputs, Recovering from Activations) is a new method for transfer learning. The main idea is to add a new layer of linear adapter to the pre-trained model, and then train this adapter according to the label of the specific task. The main advantage of LoRA is that it can effectively fine-tune the model without disturbing the weights of the pre-trained model. This means that you can add a new linear adapter on the basis of the pre-trained model and train it to adapt to a specific task. In implementation, LoRA can usually be achieved by adding a new fully connected layer. The specific code may be as follows:```python import torch.nn as nn class LoraLayer(nn.Module):def__init__(self,input_dim,output_dim):super(LoraLayer,self).__init__()self.linear=nn.Linear(input_dim,output_dim)def forward(self,x):return self.linear(x)#Assume that the original model is model model.add_module("lora",LoraLayer(1024,512))#Add LoRA layer```In this code, a new LoRA layer is first defined, which contains a linear transformation. Then, this LoRA layer is added to the pre-trained model. However, LoRA is adjusted at the output of the model instead of directly splicing the model weights. Therefore, the trained model parameters cannot be simply spliced ​​to the large model weights using LoRA. The main function of LoRA is to add a layer of learnable adapter to the pre-trained model for fine-tuning specific tasks.

[0060] The relevant parameters used in configuring the model output include: gen_config = dict(max_new_tokens = 1024, max_time = 2*60, suppress_tokens = tok.encode('\n')[-1:], temperature = 0.1, repetition_penalty = 1.13, top_k = 70, top_p = 0.5, do_sample = False, length_penalty = -1.0) This is a set of configuration parameters used when the model generates text. The following is the meaning of each parameter:

[0061] 1. `max_new_tokens`: This refers to the maximum number of new tokens that the model can generate each time it generates text. For example, if it is set to 1024, the model can generate up to 1024 new tokens in one generation operation.

[0062] 2. `max_time`: This is the maximum time (in seconds) to generate a new token. If the operation to generate a token exceeds this time, the operation will be terminated.

[0063] 3. `suppress_tokens`: This is a list of tokens that need to be suppressed (i.e. not generated) during the generation process. In this example, the model is set to not generate newline characters ('\n').

[0064] 4. `temperature`: This is a parameter that controls the diversity of the generated text. Higher values ​​(close to 1) will cause the model to generate more novel and diverse texts, while lower values ​​(close to 0) will cause the model to generate more deterministic and less diverse texts.

[0065] 5.`repetition_penalty`: This is a parameter that controls the repetitiveness of the generated text. A higher value will make the model more inclined to generate non-repetitive text, while a lower value will make the model more likely to generate repetitive text.

[0066] 6. `top_k`: As each new token is generated, the model calculates the probabilities of all possible tokens and selects the k tokens with the highest probabilities. This parameter is that k.

[0067] 7. `top_p`: This is a parameter that controls the randomness of the generated text. The model calculates the probabilities of all possible tokens and then selects the smallest set of tokens whose total probability is greater than p and selects the next token from them.

[0068] 8. `do_sample`: This is a boolean value that determines whether the model should select the token with the highest probability or sample according to the probability distribution of tokens.

[0069] 9. `length_penalty`: This is a parameter that controls the length of the generated text. A higher value will make the model generate longer texts, while a lower value will make the model generate shorter texts.

[0070] That is to say, in order to achieve a specific intent matching task, a user and customer service corpus (which can be understood as the corpus of user and content conversations) is developed, and fine-tuning is added at the same time (as mentioned above, the model layer selected for fine-tuning freezes some layers of the model (such as the front-end or low-level feature extraction layer), and only trains specific layers (such as the back-end or high-level feature extraction layer). The weight splicing requires the use of a model fusion method to configure the weights to be spliced ​​to have the same structure and shape as the original model. Assisted by conventional training methods, the learning rate is adjusted, the validation set and batch size are used, and finally the few-shot or one-shot method (Lora is optional) is used again to improve performance. Generally speaking, it is not common to replace the weights of a pre-trained model. A more common practice is to fine-tune on the basis of a pre-trained model, that is, to retain most of the model's weights and only update a small part of them.

[0071] For example, the original task is to analyze and classify the user intentions in the customer service scenario. For example, the intentions may be "check the phone bill", "check the remaining traffic", "report a problem", etc.

[0072] Untuned case: A user might say, “I want to know how much data I have left?” If the model has not been fine-tuned, it might misclassify this intent, such as “check phone bill” or “report a problem,” which is inaccurate.

[0073] After fine-tuning: Fine-tune the model so that it can be trained on the conversation data of telecom customer service scenarios, such as user inquiries and customer service responses. After such training, the model will understand the user intent in telecom customer service scenarios more accurately. When a user says, "I want to know how much traffic I have left?" the model can accurately classify this intent as "query the remaining traffic", so that the customer service system can generate a corresponding response based on this correct intent, such as querying the user's remaining traffic and telling the user.

[0074] In this way, through fine-tuning, the model can more accurately understand and classify user intentions, generate high-quality intent matching analysis results, and thus help the customer service system provide more accurate services.

[0075] In addition, it is also necessary to consider how to effectively integrate large language models with back-end servers to ensure the stability and responsiveness of the system. This includes how to effectively load and call models, how to process model outputs, and how to handle possible exceptions. Specifically, model loading and calling: The back-end server uses the NVIDIA A100 high-performance GPU. After the server is started, the model is loaded using startup, and the model instance is kept in memory, which ensures that the model does not need to be reloaded each time a request is processed, thereby saving time and improving response speed. Processing model output: The output of the model usually requires further processing before it can be used to respond to users. UTF-8 is used for unified format conversion in the output stage. Performance monitoring: When processing a large number of requests, A100 supports real-time monitoring of GPU usage and performance. Specifically, NVIDIA's Data Center GPU Manager (DCGM) tool is used to help monitor the status and performance of the GPU.

[0076] As a preferred embodiment of this embodiment, Figure 2 As shown, the intelligent customer service assisted intention matching method based on a large language model also includes feedback and optimization steps:

[0077] (1) Collection and analysis of user feedback: User feedback can be collected through various means, such as online surveys, user reviews, user messages, etc. The collected feedback information needs to be analyzed and organized in detail to understand the user's true feelings and needs for the smart customer service system (mainly composed of the front-end interface and back-end server). The system can be adjusted and optimized based on the feedback information, such as optimizing the intent matching effect and optimizing the user interaction interface.

[0078] (2) Monitoring and analysis of system operation: It is necessary to continuously monitor the system operation, including the system response speed, error rate, CPU usage, memory usage, etc. By analyzing this data, the system performance bottleneck can be discovered and resolved in a timely manner to ensure the stable operation of the system.

[0079] (3) Continuous optimization of the model: The large language model can be continuously optimized based on user feedback and system operation. For example, if it is found that the matching effect of certain types of user requests is poor, the corresponding training data can be added to retrain and adjust the model.

[0080] (4) Continuous optimization of the front-end interface: Based on user feedback and usage, the front-end interface can be continuously optimized to provide a better user experience. For example, if it is found that users often make mistakes in certain operations, the corresponding operation process can be optimized or clearer operation prompts can be provided.

[0081] By continuously collecting user feedback, monitoring system operation, and continuously optimizing the system and model based on this information, the performance and user satisfaction of the smart customer service system can be continuously improved.

[0082] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.

Claims

1. A smart customer service assisted intention matching method based on a large language model, characterized in that: include: Front-end interface design steps to build the user interaction interface; The back-end server configuration step is used to receive user requests from the user interaction interface, call the large language model corresponding to the user request for processing, and return the processing result to the user interaction interface.

2. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 1, characterized in that: When receiving a user request, the backend server first performs preprocessing to improve the recognition accuracy of the large language model.

3. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 2, characterized in that: The preprocessing work includes text cleaning, text normalization, and text segmentation; the text cleaning includes removing redundant spaces and punctuation marks; the text normalization includes converting all texts into lowercase and unifying digital expressions.

4. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 3, characterized in that: After preprocessing, the user request is input into the large language model, and the large language model understands the input text and generates a corresponding response.

5. The intelligent customer service assisted intention matching method based on a large language model as described in any one of claims 1 to 4, characterized in that: The large language model is an LLaMa-2-70B model, and the LLaMa-2-70B model is fine-tuned, and the fine-tuning includes: Freezing the front-end layers of the LLaMa-2-70B model and training the back-end layers to learn and adapt to new tasks while preserving the original vocabulary and grammatical patterns; In the initial stage of the LLaMa-2-70B model training, a learning rate is set to quickly approach the optimal solution; as the training progresses, the learning rate is gradually reduced; During the fine-tuning process, the LLaMa-2-70B model is monitored using the validation set to prevent overfitting and optimize model performance; when the model performance no longer improves on the validation set, training is stopped; The LLaMa-2-70B model was optimized using a few-shot or one-shot approach.

6. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 1, characterized in that: Use HTML, CSS and JavaScript to build the user interface; use Python language to start Uvicorn as the backend server; The front-end interface uses localStorage to cache static resources and data. Once the network is restored, the user's operations in the offline state will be synchronized to the back-end server.

7. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 1, characterized in that: The backend server uses message queues for asynchronous processing of time-consuming or multi-threaded model inference tasks, uses websockets for real-time output, and distributes incoming network traffic to multiple servers.

8. The intelligent customer service assisted intention matching method based on a large language model as described in claim 1 or 7, characterized in that: The backend server uses NVIDIA A100 GPU. After the backend server is started, the model is loaded using startup and the model instance is kept in memory.

9. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 5, characterized in that: The large language model uses data enhancement to increase data quality; the data enhancement includes back translation and adversarial training; the back translation translates the text into other languages ​​and then translates it back to obtain a new text with the same meaning but different expression; the adversarial training generates new training samples through perturbation based on the original data.

10. The intelligent customer service assisted intention matching method based on a large language model as claimed in claim 1, characterized in that: The method also includes: a feedback and optimization step for optimizing the front-end interface and the back-end server according to user feedback and the operation status of the front-end interface and the back-end server.

Citation Information

Cited By

  • AI customer service training method and system based on multi-language cross-border

    CN120596638A

  • Multi-modal intelligent dialogue method and system based on AI language model

    CN120744063A