An e-commerce customer service reply method, system, device and medium
By employing a three-tier architecture and a hybrid inference training strategy, the accuracy and logic of responses in complex multi-turn dialogues of the e-commerce customer service system have been improved. This addresses the shortcomings of existing systems in handling complex issues and enables efficient and interpretable response generation.
Patent Information
- Application Number
- CN202511536100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-10-27
AI Technical Summary
Existing e-commerce customer service systems lack logical reasoning capabilities when handling complex multi-turn dialogues, resulting in decreased accuracy and logical coherence in responses. Furthermore, existing systems based on large language models generate inaccurate or misleading responses when knowledge is lacking, making it difficult to balance response quality and response speed.
A three-level architecture is adopted: large model inference annotation - small model inference distillation - medium model response enhancement. Combined with a hybrid inference training strategy, the inference steps are used as intermediate supervision signals. Through distillation learning of the basic language model, the first language model and the second language model and low-rank adaptive fine-tuning, logical and accurate response content is generated.
It improves the accuracy, logic, and interpretability of responses in complex multi-turn dialogues of e-commerce customer service systems, reduces computing resource consumption and response latency, and enhances user experience and system reliability.
Smart Images

Figure CN121009156B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of e-commerce management technology, and in particular to an e-commerce customer service response method, system, device and medium. Background Technology
[0002] With the booming development of e-commerce, online customer service has become a key bridge for communication between businesses and users, undertaking important functions such as answering inquiries, handling after-sales issues, and guiding sales. To improve service efficiency, reduce costs, and achieve 24 / 7 responsiveness, intelligent customer service is widely used. In this scenario, user questions often involve specific information such as product attributes, promotional rules, logistics timeliness, and after-sales service policies, and involve frequent multi-round interactions, requiring customer service representatives to possess the ability to understand context, accurately retrieve professional knowledge, and have a certain level of logical reasoning ability.
[0003] Existing technologies primarily rely on pre-defined rules or keywords for matching, resulting in poor generalization capabilities and an inability to handle complex multi-turn dialogues and unforeseen queries. While existing retrieval-enhanced generative architectures generate responses using large language models combined with knowledge bases, their style is rigid, their logic insufficient, and they heavily depend on the completeness and real-time nature of the knowledge base, leading to inaccurate or even misleading responses when knowledge is lacking. Therefore, existing technologies struggle to balance response quality and response speed, failing to meet the high concurrency and low latency requirements of e-commerce platforms. This is especially true when dealing with complex multi-step reasoning problems, where response accuracy and logic decline, and the process lacks interpretability. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0005] The main objective of this disclosure is to propose an e-commerce customer service response method, system, device, and storage medium. It can achieve a balance between inference speed and response effect by using a three-level architecture of "large model inference annotation - small model inference distillation - medium model response enhancement" combined with a hybrid inference training strategy, and using the inference steps as intermediate supervision signals. This improves the accuracy, logic, and interpretability of the response, and reduces costs.
[0006] A first aspect of this application provides an e-commerce customer service response method for a central controller, the method comprising:
[0007] Obtain the first historical customer service response context and the second historical customer service response context; the first historical customer service response context and the second historical customer service response context are multi-turn dialogue data of at least one type of e-commerce;
[0008] The system includes a pre-defined basic language model, a first language model, and a second language model. The basic language model is used to process input data into the basic language model based on at least two pre-defined processing methods to obtain corresponding output results. The first language model is used to generate inference steps based on the input data into the first language model. The second language model is used to generate response content based on the input data into the second language model.
[0009] The first historical customer service response context is input into the basic language model to obtain the first data output by the basic language model;
[0010] Based on the first language model, distillation learning is performed according to the basic language model, and low-rank adaptive fine-tuning is performed using the first data to obtain the third language model.
[0011] The second historical customer service response context is input into the third language model to obtain the second data output by the third language model;
[0012] Based on the second language model, the target language model is obtained by performing low-rank adaptive fine-tuning using the second data;
[0013] In response to a reply request, the reply request is input into the third language model and the target language model to obtain the reply content corresponding to the reply request.
[0014] In some embodiments of this application, the step of inputting the first historical customer service response context into the basic language model to obtain the first data output by the basic language model includes:
[0015] Using the aforementioned basic language model, the first historical customer service response context is processed using a first processing method and a second processing method to obtain a first processing result and a second processing result. The first processing method involves the basic language model generating inference steps based on the input data and generating response content based on the inference steps. The second processing method involves the basic language model generating response content based on the input data. Furthermore, the decoding parameters of the basic language model remain consistent under both the first and second processing methods.
[0016] Based on the first historical customer service response context, the first processing result, and the second processing result, construct an inference dataset;
[0017] The inference dataset is input into the base language model to obtain the first data output by the base language model.
[0018] In some embodiments of this application, the step of inputting the inference dataset into the base language model to obtain the first data output by the base language model includes:
[0019] Using the basic language model and the first processing method, the historical customer service response context in the reasoning dataset is processed to obtain the first reasoning step and the first response content.
[0020] Based on the aforementioned basic language model, a second reasoning step is generated according to the historical customer service response context in the reasoning dataset and the response content in the reasoning dataset.
[0021] The first data is constructed based on the first reasoning step, the first response content, and the second reasoning step.
[0022] In some embodiments of this application, the step of inputting the second historical customer service response context into the third language model to obtain the second data output by the third language model includes:
[0023] Based on the first language model, the third reasoning step is generated according to the second historical customer service response context and the first data.
[0024] Based on the second historical customer service response context, the third inference step, and the actual response content corresponding to the second historical customer service response context, a triplet sample is constructed to obtain the second data.
[0025] In some embodiments of this application, the step of obtaining a target language model by performing low-rank adaptive fine-tuning using the second data based on the second language model includes:
[0026] The historical customer service response context and reasoning steps in the second data are used as input data for the low-rank adaptive fine-tuning to train the second language model to obtain the target language model; wherein, the target language model is used to generate response content based on the input data input to the target language model.
[0027] In some embodiments of this application, the step of inputting the response request into the third language model and the target language model to obtain the response content corresponding to the response request includes:
[0028] The target response context in the response request is input into the third language model to obtain the target reasoning steps output by the third language model.
[0029] The target response context and the target reasoning steps in the response request are input into the target language model to obtain the response content output by the target language model.
[0030] To achieve the above objectives, a second aspect of the present invention provides an e-commerce customer service response system, the system comprising:
[0031] The acquisition module is used to acquire the first historical customer service response context and the second historical customer service response context; the first historical customer service response context and the second historical customer service response context are multi-turn dialogue data of at least one type of e-commerce.
[0032] A preset module is used to preset a basic language model, a first language model, and a second language model; the basic language model is used to process the input data input to the basic language model based on at least two preset processing methods to obtain corresponding output results; the first language model is used to generate inference steps based on the input data input to the first language model; the second language model is used to generate response content based on the input data input to the second language model.
[0033] The first module is used to input the first historical customer service response context into the basic language model to obtain the first data output by the basic language model.
[0034] The learning module is used to perform distillation learning based on the first language model and the base language model, and to perform low-rank adaptive fine-tuning using the first data to obtain a third language model.
[0035] The second module is used to input the context of the second historical customer service response into the third language model to obtain the second data output by the third language model.
[0036] The adjustment module is used to perform low-rank adaptive fine-tuning based on the second language model and the second data to obtain the target language model.
[0037] The response module is used to respond to a reply request by inputting the reply request into the third language model and the target language model to obtain the reply content corresponding to the reply request.
[0038] To achieve the above objectives, a third aspect of the present invention provides an electronic device, comprising: at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the above-described e-commerce customer service response method.
[0039] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described e-commerce customer service response method.
[0040] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the aforementioned e-commerce customer service response method.
[0041] This application provides an e-commerce customer service response method. It involves pre-setting a basic language model, a first language model, and a second language model; inputting the first historical customer service response context into the basic language model to obtain the first data output by the basic language model; based on the first language model, performing distillation learning and low-rank adaptive fine-tuning using the first data to obtain a third language model; inputting the second historical customer service response context into the third language model to obtain the second data output by the third language model; based on the second language model, performing low-rank adaptive fine-tuning using the second data to obtain a target language model; and inputting the response request into the third language model and the target language model to obtain the response content corresponding to the response request. This three-level model architecture, combined with a hybrid inference training strategy, improves the accuracy, logic, and interpretability of responses.
[0042] It is understood that the beneficial effects of the second to fifth aspects compared with the related technologies are the same as the beneficial effects of the first aspect compared with the related technologies. Please refer to the relevant description in the first aspect above, which will not be repeated here. Attached Figure Description
[0043] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0044] Figure 1 This is a flowchart illustrating an e-commerce customer service response method provided in an embodiment of this application;
[0045] Figure 2 This is a schematic diagram of a system framework provided in an embodiment of this application;
[0046] Figure 3 This is a schematic diagram of a hybrid inference data annotation process provided in an embodiment of this application;
[0047] Figure 4 This is a schematic diagram of the structure of an e-commerce customer service response system provided in an embodiment of this application;
[0048] Figure 5This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0049] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0050] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0051] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0052] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0053] With the booming development of e-commerce, online customer service has become a key bridge for communication between businesses and users, undertaking important functions such as answering inquiries, handling after-sales issues, and guiding sales. To improve service efficiency, reduce costs, and achieve 24 / 7 responsiveness, intelligent customer service is widely used. In this scenario, user questions often involve specific information such as product attributes, promotional rules, logistics timeliness, and after-sales service policies, and involve frequent multi-round interactions, requiring customer service representatives to possess the ability to understand context, accurately retrieve professional knowledge, and have a certain level of logical reasoning ability.
[0054] Existing technologies primarily rely on pre-defined rules or keywords for matching, resulting in poor generalization capabilities and an inability to handle complex multi-turn dialogues and unforeseen queries. While existing retrieval-enhanced generative architectures generate responses using large language models combined with knowledge bases, their style is rigid, their logic insufficient, and they heavily depend on the completeness and real-time nature of the knowledge base, leading to inaccurate or even misleading responses when knowledge is lacking. Therefore, existing technologies struggle to balance response quality and response speed, failing to meet the high concurrency and low latency requirements of e-commerce platforms. This is especially true when dealing with complex multi-step reasoning problems, where response accuracy and logic decline, and the process lacks interpretability.
[0055] Based on this, embodiments of this application provide an e-commerce customer service response method, system, electronic device, and medium. The aim is to achieve a balance between inference speed and response effect by using a three-level architecture of "large model inference annotation - small model inference distillation - medium model response enhancement" combined with a hybrid inference training strategy, and using the inference steps as intermediate supervision signals. This improves the accuracy, logic, and interpretability of responses while reducing costs.
[0056] The e-commerce customer service response method, system, electronic device, and medium provided in this application are specifically described through the following embodiments. First, the e-commerce customer service response method in this application embodiment is described.
[0057] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0058] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0059] The e-commerce customer service response method provided in this application relates to the field of e-commerce management technology. This e-commerce customer service response method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the e-commerce customer service response method, but is not limited to the above forms.
[0060] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0061] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0062] Therefore, referring to Figure 1 This application provides an e-commerce customer service response method. This method is applied to a central controller, which can be a server, an electronic device, or a mobile terminal, etc. There are no specific limitations here. The method includes the following steps S110 to S170.
[0063] Step S110: Obtain the first historical customer service response context and the second historical customer service response context; the first historical customer service response context and the second historical customer service response context are multi-turn dialogue data of at least one type of e-commerce.
[0064] Step S120: Preset a basic language model, a first language model, and a second language model; the basic language model is used to process the input data input to the basic language model based on at least two preset processing methods to obtain the corresponding output results; the first language model is used to generate inference steps based on the input data input to the first language model; the second language model is used to generate response content based on the input data input to the second language model.
[0065] Step S130: Input the first historical customer service response context into the basic language model to obtain the first data output by the basic language model;
[0066] Step S140: Based on the first language model, perform distillation learning according to the basic language model, and use the first data for low-rank adaptive fine-tuning to obtain the third language model;
[0067] Step S150: Input the second historical customer service response context into the third language model to obtain the second data output by the third language model;
[0068] Step S160: Based on the second language model, perform low-rank adaptive fine-tuning using the second data to obtain the target language model;
[0069] Step S170: In response to the reply request, input the reply request into the third language model and the target language model to obtain the reply content corresponding to the reply request.
[0070] In this step, first and second historical customer service response contexts from at least one type of e-commerce platform are obtained. The historical customer service response contexts include multi-turn dialogue data involving user inquiries, customer service responses, and related contextual information. Subsequently, a basic language model, a first language model, and a second language model are pre-defined.
[0071] Specifically, the basic language model refers to a pre-trained model that can generate diverse outputs through different processing methods. It is preferably implemented using the Transformer architecture with multi-task learning capabilities. Its role is to improve the diversity and accuracy of the generated results through parallel processing mechanisms. The first language model refers to a model specifically for generating logical reasoning steps. It is preferably implemented using a language model with fine-tuned instructions. Its role is to decompose complex problems into interpretable reasoning chains to enhance the logic of the response. The second language model refers to a model specifically for generating the final response content. It is preferably implemented using a lightweight model with parameter scale adapted to the business scenario. Its role is to focus on the content generation stage to improve response speed.
[0072] Furthermore, the context of the first historical customer service response is input into the basic language model to obtain the first data output by the basic language model. Then, based on the first language model, distillation learning is performed according to the basic language model, and low-rank adaptive fine-tuning is performed using the first data to obtain the third language model. Thus, the complex reasoning ability of the basic language model is transferred to the more lightweight third language model through distillation learning, and the model performance and training efficiency are balanced through low-rank adaptive fine-tuning.
[0073] Furthermore, the context of the second historical customer service response is input into the third language model to obtain the second data output by the third language model. Then, based on the second language model, low-rank adaptive fine-tuning is performed using the second data to obtain the target language model, thereby further optimizing the response content generation capability.
[0074] When responding to a reply request, the request is input into both the third language model and the target language model to obtain the corresponding reply content. Specifically, the third language model is responsible for generating the reasoning steps, while the target language model generates the final reply content based on these reasoning steps. This phased processing approach ensures the integrity of the reasoning logic and the accuracy of the reply content.
[0075] In some embodiments, three language models are preset: the base language model uses a large-scale pre-trained model such as GPT-3, the first language model is a specially trained inference step generation model, and the second language model is a response content generation model. The base language model is configured with two processing methods: one directly generates the response, and the other first generates the inference steps and then generates the response.
[0076] Furthermore, the first historical customer service response context is input into the basic language model and processed using two different methods to obtain first data containing reasoning steps and response content. Then, based on the first language model, the reasoning ability of the basic language model is transferred to the first language model through a distillation learning method. Specifically, the output of the basic language model is used as a teacher signal to guide the training of the first language model. Simultaneously, low-rank adaptive fine-tuning is performed using the first data, that is, a low-rank matrix is introduced into the model's adaptation layer, updating only some parameters, thereby obtaining the third language model.
[0077] Furthermore, the context of the second historical customer service response is input into the third language model to obtain second data containing reasoning steps. Based on the second language model, low-rank adaptive fine-tuning is performed using the second data to obtain the target language model. During the fine-tuning process, the reasoning steps in the second data are used as input, and the actual response content is used as the target output for training.
[0078] In practical applications, when a user requests a response, the request is first input into a third-language model to generate inference steps. Then, the original request and the generated inference steps are input into the target language model together to generate the response content, thereby ensuring the logic and accuracy of the response.
[0079] This application addresses the problem of insufficient logical reasoning ability in e-commerce intelligent customer service systems when handling complex multi-turn dialogues through the above-described solution. By decoupling the generation of reasoning steps from the generation of response content into independent modules, and employing distillation learning and low-rank adaptive fine-tuning techniques, the system's ability to handle complex queries is improved. This approach enhances the system's logical reasoning ability, improves the accuracy and coherence of responses, while maintaining low computational resource consumption and response latency. Especially when dealing with complex problems involving nested calculations of promotional rules or combined applications of return and exchange policies, the system can better establish cross-turn semantic relationships, reducing knowledge retrieval bias and reasoning path errors. This not only improves the user experience but also reduces the frequency of the system triggering error handling mechanisms, thereby reducing computational resource consumption and response latency.
[0080] In some embodiments, in step S130, the first historical customer service response context is input into the basic language model to obtain the first data output by the basic language model, including the following steps S210 to S230:
[0081] Step S210: Using the basic language model, the first historical customer service response context is processed using the first processing method and the second processing method respectively to obtain the first processing result and the second processing result; wherein, the first processing method is that the basic language model generates inference steps based on the input data input to the basic language model, and generates response content based on the inference steps; the second processing method is that the basic language model generates response content based on the input data input to the basic language model, and the decoding parameters of the basic language model are consistent under the first processing method and the second processing method.
[0082] Step S220: Construct an inference dataset based on the context of the first historical customer service response, the first processing result, and the second processing result;
[0083] Step S230: Input the inference dataset into the basic language model to obtain the first data output by the basic language model.
[0084] In this step, when the first historical customer service response context is input into the basic language model, the first processing method and the second processing method are used respectively to process the first historical customer service response context to obtain the first processing result and the second processing result.
[0085] The first processing method involves the basic language model generating inference steps based on the input data, and then generating response content based on the inference steps. The second processing method involves the basic language model generating response content based on the input data. The decoding parameters of the basic language model remain consistent under both the first and second processing methods to ensure the comparability of the output results and form data samples containing different processing paths.
[0086] Furthermore, an inference dataset is constructed based on the context of the first historical customer service response, the first processing result, and the second processing result. Specifically, the context of the first historical customer service response, the inference steps and response content in the first processing result, and the response content in the second processing result are combined to form an inference dataset containing multiple samples.
[0087] Furthermore, the inference dataset is input into the basic language model to obtain the first data output by the basic language model. This allows the model to infer the logic that generated the answer from the real answer, thereby realizing the construction of an inference dataset based on multiple processing methods. This enhances the basic language model's understanding and reasoning ability in e-commerce customer service scenarios, provides rich data support for subsequent model training and optimization, and helps to improve the quality and accuracy of the final generated response content.
[0088] In some embodiments, in step S230, the inference dataset is input into the base language model to obtain the first data output by the base language model, including the following steps S310 to S330:
[0089] Step S310: Using the basic language model and the first processing method, process the historical customer service response context in the reasoning dataset to obtain the first reasoning step and the first response content.
[0090] Step S320: Based on the basic language model, generate the second reasoning step according to the historical customer service response context in the reasoning dataset and the response content in the reasoning dataset;
[0091] Step S330: Construct the first data based on the first reasoning step, the first response content, and the second reasoning step.
[0092] In this embodiment, a basic language model is used to process the historical customer service response context in the inference dataset using a first processing method to obtain a first inference step and a first response content. The first processing method requires the model to simultaneously output the inference step and the response content, forming an end-to-end data chain. When generating the second inference step, the basic language model uses historical dialogue data and the generated response content as dual constraints, and reverse-engineers the inference logic through a cross-validation mechanism. Furthermore, the first inference step is generated based on the original dialogue context, while the second inference step is generated based on the joint input of the dialogue context and the generated response; both use different generation paths, forming a complementary inference path verification mechanism.
[0093] Specifically, the basic language model receives historical customer service response context from the inference dataset as input, then generates the corresponding first inference step and first response content according to the first processing method. Based on the basic language model, it uses historical customer service response context and existing response content from the inference dataset as input to generate the second inference step, aiming to provide multi-angle inference steps to enhance the model's inference ability.
[0094] Furthermore, a structured dataset is created by combining the first reasoning step, the first response content, and the second reasoning step, serving as the first data output. This ensures that the first data contains multi-dimensional reasoning information and response content, providing a rich data foundation for subsequent model training and optimization. This enables multi-faceted processing and integration of the basic language model's output, improving the model's reasoning ability and response quality for complex questions, and enhancing the performance of the intelligent customer service system when handling multi-step, multi-faceted questions. Simultaneously, by constructing a dataset containing multiple reasoning steps, richer and more diverse learning materials are provided for subsequent model training, contributing to improved overall model performance and adaptability.
[0095] In some embodiments, in step S150, the second historical customer service response context is input into the third language model to obtain the second data output by the third language model, including the following steps S410 to S420:
[0096] Step S410: Using the first language model, based on the second historical customer service response context and the first data, generate the corresponding third reasoning step;
[0097] Step S420: Based on the context of the second historical customer service response, the third inference step, and the actual response content corresponding to the context of the second historical customer service response, construct a triplet sample to obtain the second data.
[0098] In this embodiment, when the second historical customer service response context is input into the third language model, the first language model first generates the corresponding third inference step based on the second historical customer service response context and the first data. The second historical customer service response context is dialogue data distinct from the first historical customer service response context and has not been processed by the model.
[0099] Specifically, the first language model receives the second historical customer service response context as input and uses the historical reasoning steps and response content contained in the first data as a reference to generate a third reasoning step suitable for the current dialogue scenario.
[0100] Furthermore, triplet samples are constructed based on the context of the second historical customer service response, the third reasoning step, and the actual response content corresponding to the context of the second historical customer service response to obtain the second data. This provides structured training data for subsequent model training, which helps to improve the model's reasoning ability and response quality.
[0101] Specifically, the triplet sample consists of the customer service response context, inference steps, and the actual response content. For example, the customer service response context might include a user inquiry about the product return and exchange policy; the third inference step includes retrieving relevant policies, determining applicable conditions, and defining the return and exchange process; and the actual response content is the policy explanation and operational guidance provided by the customer service representative. This enables effective utilization of historical customer service dialogue data. By introducing inference steps, the model's logical reasoning ability is enhanced, the interpretability of the model's responses is improved, and the customer service system can provide more accurate, reasonable, and easy-to-understand responses.
[0102] In some embodiments, in step S160, based on the second language model, a low-rank adaptive fine-tuning is performed using the second data to obtain the target language model, including the following steps: using the historical customer service response context in the second data and the reasoning steps in the second data as input data for low-rank adaptive fine-tuning, and training the second language model to obtain the target language model; wherein, the target language model is used to generate response content based on the input data input to the target language model.
[0103] In this embodiment, the historical customer service response context from the second data and the reasoning steps from the second data are used as input data for low-rank adaptive fine-tuning to train the second language model and obtain the target language model. The target language model is used to generate response content based on the input data fed into the target language model.
[0104] Specifically, the second data includes historical customer service response context, corresponding reasoning steps, and actual response content. During the low-rank adaptive fine-tuning process, the historical customer service response context and reasoning steps are used as input, and the actual response content is used as the output label. Low-rank adaptation technology is used to fine-tune the second language model, updating only some parameters in the model to improve training efficiency while retaining the general capabilities of the original model.
[0105] Furthermore, the trained target language model can generate logical and professional responses based on the input customer service dialogue context and reasoning steps. Thus, the target language model not only inherits the basic capabilities of the second language model but also acquires professional knowledge and response capabilities specific to e-commerce scenarios through low-rank adaptive fine-tuning. This achieves the goal of quickly adapting to the target task on limited training data, improving the response quality of the intelligent customer service system and enhancing user trust in the system's responses.
[0106] In some embodiments, in step S160, the response request is input into the third language model and the target language model to obtain the response content corresponding to the response request, including the following steps S510 to S520:
[0107] Step S510: Input the target response context in the response request into the third language model to obtain the target reasoning steps output by the third language model;
[0108] Step S520: Input the target response context and target reasoning steps in the response request into the target language model to obtain the response content output by the target language model.
[0109] In this embodiment, the target response context from the response request is input into a third language model. The third language model receives the target response context as input and processes it. During processing, the third language model utilizes pre-trained knowledge and reasoning capabilities to analyze key information and logical relationships within the target response context. Based on these analysis results, the third language model generates target reasoning steps. These target reasoning steps include the key ideas and logical derivation processes required to answer the question in the target response context.
[0110] Furthermore, the target response context and target reasoning steps are input into the target language model. The target language model receives the target response context and target reasoning steps and performs a comprehensive analysis. In this process, the target language model combines the specific information of the target response context and the logical framework of the target reasoning steps to generate the final response content. The generated response content includes both a direct answer to the question in the target response context and incorporates the key points of the reasoning steps, making the response more comprehensive and persuasive.
[0111] Therefore, by generating inference steps through a third-language model and then combining these steps with the target language model to generate the response content, the inference steps and response generation are decoupled. This allows the system to better handle complex multi-step inference problems and improves its ability to process complex queries. Furthermore, this step-by-step approach makes the entire response generation process clearer and more controllable, improving the accuracy and logic of e-commerce customer service responses, as well as their flexibility. It enables the generation of more personalized and targeted responses based on different inference steps, thereby enhancing user satisfaction.
[0112] In some embodiments, such as Figure 2 As shown, this embodiment is mainly divided into three modules: the first is a hybrid inference step annotation module; the second is an LLM2 LoRA training and inference module; and the third is an LLM3 LoRA training and inference module based on LLM2 output. Figure 2 First, the LLM1 (qwen3-32B) model is used for hybrid inference step annotation. LLM1 represents a large language model (LLM) of similar size to qwen3-32B. Then, low-rank adaptation (LORA) training is performed using the LLM2 (qwen3-0.6B) model. LLM2 represents a large language model (LLM) of similar size to qwen3-0.6B. Finally, the dialogue context is represented... The reasoning steps (thinking process) are input into the LLM3 (qwen3-8B) model for low-rank adaptation training (lora) to obtain the answer. Here, LLM3 indicates that it adopts a large language model (LLM) with specifications similar to qwen3-8B.
[0113] In the hybrid reasoning step annotation module Indicates the context of the dialogue. Indicate the reasoning steps (thinking process). To indicate the answer, in Figure 3 Step 1 is a module that distinguishes between complex and simple questions. Simple questions can be answered directly from the dialogue context and background knowledge without generating reasoning steps. Examples include welcome messages, which courier service to use, and shelf life questions, which are common to background knowledge. Complex questions, on the other hand, require reasoning steps to assist in answering questions. Examples include after-sales issues, recommended products, and questions about product service rules, which require logical thinking.
[0114] exist Figure 3In step 1, during the process of constructing inference data, the same dialogue context will first be used. The input is fed into the LLM1 (qwen3-32B) model, and the output is processed in two modes: one is the think mode, which performs inference steps to obtain the inference results. and answer The other is the no_think mode, which generates the answer directly without generating reasoning steps. Subsequently and Consistency checks are performed, primarily determining whether two answers have the same meaning. In this embodiment, an LLM1 discriminator is used for this determination. If the two answers are consistent, the question-and-answer process within the dialogue context in this task does not require inference steps, and the dataset is obtained. Conversely, if they are inconsistent, it means that the reasoning steps are helpful in generating the answer, and thus the dataset is obtained. .in, and These are the datasets. Input and output, , Indicates the first A dialogue context, Indicates the first Each reasoning step is generated based on the dialogue context; only the reasoning steps are generated, not the answer. .
[0115] exist Figure 3 In step 2, the above dataset... Further processing is required, involving two modes, each with the same data volume percentage. 50% of:
[0116] First, input the dialogue context. The prompt is written and then the inference steps are generated through LLM1 display. and This indicates the reasoning step. It is the model itself's understanding of the dialogue context. This understanding aligns with the reasoning logic of the LLM1 model itself.
[0117] Second, input and The project developed a protocol that allows the model to generate reasoning steps by understanding the dialogue context and answers. The significance of this approach is that it enables the model to infer the logic behind generating the answer from the actual response, with the aim of fitting the thought process of a human customer service representative to obtain a dataset. .in, and These are the datasets Input and output, , Indicates the first A dialogue context, Indicates the first Each reasoning step will and The combined dataset yields a mixed inference steps dataset. This will be used for the next step of fine-tuning training of LLM2.
[0118] For the LoRA training and inference modules of LLM2, LoRA training of the LLM2 model is performed first. A small model (such as Qwen3-0.6B) is used as the base model, and a hybrid inference step dataset is employed. The model is trained using a LoRA (Low-Rank Adaptation) parameter fine-tuning method. The LoRA parameters used during training are as follows: the target modules are up_proj, q_proj, o_proj, down_proj, gate_proj, k_proj, and v_proj, with a rank dimension of 8 and lora_alpha = 16. The reasoning ability of the large model (i.e., the ability to generate reasoning steps based on the dialogue context) is distilled into a smaller model. The resulting model is called the "reasoning mini-model" LLM2, and its main function is to quickly output the corresponding reasoning steps based on the input dialogue context.
[0119] Using the LLM2 obtained above, we can apply it to large-scale e-commerce multi-turn dialogue datasets. (50% of this dataset consists of new dialogue data that did not participate in step 1, and the remaining 50% is expanded version of the original data.) Inference steps are generated to obtain a large dataset containing [dialogue context, LLM2 inference steps]. ,in, and These are the datasets Input and output, , Indicates the first A dialogue context, Indicates the first One reasoning step.
[0120] Then Combined with the corresponding real answers, a triplet sample inference augmentation response training dataset of [dialogue context, inference steps, real answer] is constructed. ,in, It is a dataset Input, and It is a dataset The output, , Indicates the first A dialogue context, Indicates the first One reasoning step, Indicates the first A true answer.
[0121] Step 3: LoRA fine-tuning in LLM3 mode:
[0122] LLM3 selects a medium-sized model (such as Qwen3-8B) as the base model. The goal is to train it to generate high-quality, realistic answers based on the dialogue context and reasoning steps. LoRA fine-tuning is performed on Qwen3-8B using the reasoning-enhanced response training dataset D4 constructed in Step 2, with LoRA parameters consistent with those in Step 2. During fine-tuning, the input is a concatenation (or a specific combination of formats) of the dialogue context and reasoning steps, and the training objective is to get the model to output realistic answers. In this process, Qwen3-8B is not required to explicitly output the reasoning steps; it only needs to "understand" and utilize the reasoning steps to assist in generating the final response. The resulting model is called the "Reasoning-Enhanced Response Model" LLM3.
[0123] Step 4: Online Service Reasoning Process:
[0124] Step a. When a user initiates a query or conversation, the system maintains the conversation context C in real time.
[0125] Step b. Input the current dialogue context into the inference mini-model LLM2 (Qwen3-0.6B) for LoRA training to quickly obtain the inference step T.
[0126] Step c. Input the current dialogue context C and the inference step T from step b into the inference augmented response model LLM3 (Qwen3-8B) for LoRA training.
[0127] Step d. LLM3 outputs the final customer service response and returns it to the user.
[0128] In this embodiment, a hierarchical architecture is adopted in which "small models are responsible for generating rapid inference steps, and medium-sized models are responsible for generating responses quickly using inference steps". This avoids the high latency caused by directly using large models. At the same time, by introducing explicit inference steps to guide response generation, the problem of insufficient inference ability of pure small models is overcome, and a balance between speed and effectiveness is achieved.
[0129] Furthermore, by training the large model with a 1:1 mix of labeled and unlabeled data to generate inference steps, the smaller inference model can learn the logical patterns of real customer service responses while maintaining a certain degree of flexibility and creativity in its reasoning. These inference steps, acting as intermediate supervisory signals, effectively improve the logic and rationality of the final response.
[0130] Furthermore, online services primarily rely on small models (Qwen3-0.6B) and medium-sized models (Qwen3-8B). Compared to directly deploying a large model (Qwen3-32B), this significantly reduces memory usage, computational power consumption, and deployment costs while maintaining performance, making it easier to apply on a large scale in actual e-commerce customer service systems. Additionally, the explicit inference step module (the output of the inference small model) can provide some explanatory basis for customer service responses, aiding in understanding model decisions and facilitating manual review and problem troubleshooting.
[0131] Therefore, this embodiment employs a three-tiered architecture in multi-turn dialogues within e-commerce intelligent customer service: "large model inference annotation - small model inference distillation - medium model response enhancement." It leverages the powerful inference capabilities of the large model (e.g., Qwen3-32B) to generate inference steps, which are then distilled to the small model (e.g., Qwen3-0.6B) via LoRA to quickly provide inference results. These results are then used as guidance, combined with the dialogue context, to generate the final response via LoRA fine-tuning by the medium model (e.g., Qwen3-8B). This achieves a balance between inference speed and response effectiveness.
[0132] Moreover, when constructing inference training data using the large model (Qwen3-32B), the different levels of simplicity and complexity of responses in different scenarios are taken into consideration. Simple responses do not require inference, while complex problems require long inference. Innovatively, a hybrid inference data model is adopted, which combines three modes: whether inference steps are needed and whether the inference steps have label information. The combination of these three types of hybrid data improves the simplicity, high quality, and diversity of inference steps.
[0133] Finally, when constructing inference training data using the large model (Qwen3-32B), considering the different levels of simplicity and complexity of responses in different scenarios, simple responses do not require inference, while complex problems require long inference, we innovatively adopted a hybrid inference data with three modes: whether the generated results need to be used to determine whether inference steps are required, and whether the inference steps have label information. The combination of these three types of hybrid data improves the simplicity, high quality, and diversity of inference steps.
[0134] like Figure 4 As shown in some embodiments of this application, an e-commerce customer service response system is provided. The system includes an acquisition module 410, a preset module 420, a first module 430, a learning module 440, a second module 450, an adjustment module 460, and a response module 470. Specifically:
[0135] The acquisition module 410 is used to acquire the first historical customer service response context and the second historical customer service response context; the first historical customer service response context and the second historical customer service response context are multi-turn dialogue data of at least one type of e-commerce.
[0136] The preset module 420 is used to preset a basic language model, a first language model, and a second language model; the basic language model is used to process the input data input to the basic language model based on at least two preset processing methods to obtain the corresponding output results; the first language model is used to generate inference steps based on the input data input to the first language model; the second language model is used to generate response content based on the input data input to the second language model.
[0137] The first module 430 is used to input the first historical customer service response context into the basic language model and obtain the first data output by the basic language model.
[0138] Learning module 440 is used to perform distillation learning based on the first language model and low-rank adaptive fine-tuning using the first data to obtain the third language model.
[0139] The second module 450 is used to input the second historical customer service response context into the third language model to obtain the second data output by the third language model.
[0140] The adjustment module 460 is used to perform low-rank adaptive fine-tuning based on the second language model and using the second data to obtain the target language model.
[0141] The response module 470 is used to respond to the reply request by inputting the reply request into the third language model and the target language model to obtain the reply content corresponding to the reply request.
[0142] It should be noted that the e-commerce customer service response system provided in this embodiment is based on the same inventive concept as the e-commerce customer service response method described above. Therefore, the relevant content of the e-commerce customer service response method described above also applies to the content of the e-commerce customer service response system. Therefore, it will not be repeated here.
[0143] To this end, the system employs a three-tiered model architecture: a base language model, a first language model, and a second language model. The first historical customer service response context is input into the base language model to obtain the first data output by the base language model. Based on the first language model, distillation learning is performed, and low-rank adaptive fine-tuning is conducted using the first data to obtain the third language model. The second historical customer service response context is input into the third language model to obtain the second data output by the third language model. Based on the second language model, low-rank adaptive fine-tuning is conducted using the second data to obtain the target language model. The response request is then input into the third language model and the target language model to obtain the corresponding response content. This three-tiered model architecture, combined with a hybrid inference training strategy, improves the accuracy, logic, and interpretability of responses.
[0144] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-mentioned e-commerce customer service response method.
[0145] like Figure 5 , Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes:
[0146] At least one battery;
[0147] At least one memory;
[0148] At least one processor;
[0149] At least one program;
[0150] The program is stored in memory, and the processor executes at least one program to implement the e-commerce customer service response method described above.
[0151] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0152] The electronic devices according to embodiments of this application will now be described in detail.
[0153] The processor 1600 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.
[0154] The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and called and executed by the processor 1600 to execute an e-commerce customer service response method according to an embodiment of this disclosure.
[0155] The input / output interface 1800 is used to implement information input and output.
[0156] The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0157] Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900);
[0158] The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.
[0159] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the aforementioned e-commerce customer service response method.
[0160] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0161] This disclosure also provides a computer program product in which the instructions, when executed by the processor of an electronic device, cause the electronic device to perform the aforementioned e-commerce customer service response method.
[0162] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.
[0163] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0166] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0167] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0169] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0170] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0171] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0172] The above is a detailed description of the preferred embodiments of this application. However, the embodiments of this application are not limited to the above-described implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the embodiments of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of the embodiments of this application.
[0173] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.
Claims
1. An e-commerce customer service reply method, characterized by, The method comprises: obtaining a first historical customer service reply context and a second historical customer service reply context; the first historical customer service reply context and the second historical customer service reply context are multi-round dialogue data of at least one type of e-commerce; presetting a basic language model, a first language model and a second language model; the basic language model is used to process input data input into the basic language model based on at least two preset processing modes to obtain corresponding output results; the first language model is used to generate inference steps according to input data input into the first language model; and the second language model is used to generate reply content according to input data input into the second language model; inputting the first historical customer service reply context into the basic language model to obtain first data output by the basic language model; based on the first language model, performing distillation learning based on the basic language model, and performing low-rank adaptive fine-tuning using the first data to obtain a third language model; inputting the second historical customer service reply context into the third language model to obtain second data output by the third language model; based on the second language model, performing low-rank adaptive fine-tuning using the second data to obtain a target language model; in response to a reply request, inputting the reply request into the third language model and the target language model to obtain reply content corresponding to the reply request. 2.The method of claim 1, wherein, The method comprises: by the basic language model, the first historical customer service reply context is processed by using a first processing mode and a second processing mode respectively to obtain a first processing result and a second processing result; wherein the first processing mode is that the basic language model generates inference steps according to input data input into the basic language model, and generates reply content according to the inference steps, and the second processing mode is that the basic language model generates reply content according to input data input into the basic language model, and decoding parameters of the basic language model under the first processing mode and the second processing mode remain consistent; according to the first historical customer service reply context, the first processing result and the second processing result, an inference data set is constructed; the inference data set is input into the basic language model to obtain first data output by the basic language model. 3.The method of claim 2, wherein, The method comprises: by the basic language model, the first historical customer service reply context is processed by using a first processing mode and a second processing mode respectively to obtain a first processing result and a second processing result; wherein the first processing mode is that the basic language model generates inference steps according to input data input into the basic language model, and generates reply content according to the inference steps, and the second processing mode is that the basic language model generates reply content according to input data input into the basic language model, and decoding parameters of the basic language model under the first processing mode and the second processing mode remain consistent; according to the first historical customer service reply context, the first processing result and the second processing result, an inference data set is constructed; the inference data set is input into the basic language model to obtain first data output by the basic language model. The method comprises: by the basic language model, the first historical customer service reply context is processed by using a first processing mode and a second processing mode respectively to obtain a first processing result and a second processing result; wherein the first processing mode is that the basic language model generates inference steps according to input data input into the basic language model, and generates reply content according to the inference steps, and the second processing mode is that the basic language model generates reply content according to input data input into the basic language model, and decoding parameters of the basic language model under the first processing mode and the second processing mode remain consistent; according to the first historical customer service reply context, the first processing result and the second processing result, an inference data set is constructed; the inference data set is input into the basic language model to obtain first data output by the basic language model. The method comprises: by the basic language model, the first historical customer service reply context is processed by using a first processing mode and a second processing mode respectively to obtain a first processing result and a second processing result; wherein the first processing mode is that the basic language model generates inference steps according to input data input into the basic language model, and generates reply content according to the inference steps, and the second processing mode is that the basic language model generates reply content according to input data input into the basic language model, and decoding parameters of the basic language model under the first processing mode and the second processing mode remain consistent; according to the first historical customer service reply context, the first processing result and the second processing result, an inference data set is constructed; the inference data set is input into the basic language model to obtain first data output by the basic language model. 4.The method of claim 1, wherein, The second historical customer service reply context is input into the third language model to obtain second data output by the third language model, which comprises: A corresponding third reasoning step is generated by the first language model according to the second historical customer service reply context and the first data; Triplet sample construction is performed according to the second historical customer service reply context, the third reasoning step and the real reply content corresponding to the second historical customer service reply context to obtain the second data. 5.The method of claim 1, wherein, The second data is used for low-rank adaptive fine-tuning based on the second language model to obtain a target language model, which comprises: The historical customer service reply context in the second data and the reasoning step in the second data are used as input data during the low-rank adaptive fine-tuning to train the second language model to obtain the target language model; wherein the target language model is used to generate reply content according to input data input into the target language model. 6.The method of claim 1, wherein, The reply request is input into the third language model and the target language model to obtain reply content corresponding to the reply request, which comprises: A target reasoning step output by the third language model is obtained by inputting a target reply context in the reply request into the third language model; The target reasoning step and the target reply context in the reply request are input into the target language model to obtain reply content output by the target language model.
7. An e-commerce customer service reply system, characterized by, The system comprises: An acquisition module is configured to acquire a first historical customer service reply context and a second historical customer service reply context; the first historical customer service reply context and the second historical customer service reply context are multi-round dialogue data of at least one type of e-commerce; A preset module is configured to preset a basic language model, a first language model and a second language model; the basic language model is used to process input data input into the basic language model based on at least two preset processing modes to obtain corresponding output results; the first language model is used to generate a reasoning step according to input data input into the first language model; and the second language model is used to generate reply content according to input data input into the second language model; A first module is configured to input the first historical customer service reply context into the basic language model to obtain first data output by the basic language model; A learning module is configured to perform distillation learning based on the first language model according to the basic language model, and perform low-rank adaptive fine-tuning using the first data to obtain a third language model; A second module is configured to input the second historical customer service reply context into the third language model to obtain second data output by the third language model; An adjustment module is configured to perform low-rank adaptive fine-tuning using the second data based on the second language model to obtain a target language model; A response module is configured to input a reply request into the third language model and the target language model to obtain reply content corresponding to the reply request in response to the reply request.
8. An electronic device, comprising: The computer readable storage medium stores computer executable instructions for causing a computer to perform the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing a computer to perform the method of any one of claims 1 to 6.
10. A computer program product, characterised in that, The instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent customer service question and answer method based on large language model technology
CN118364084A
Intelligent customer service question answering method and device based on large language model and knowledge graph, equipment and medium
CN119294536A