Model temperature parameter determination method and electronic equipment

By obtaining customer satisfaction based on the large language model and adjusting the temperature parameters after grouping, the problem of lack of diversity in the output words of the large language model is solved, the satisfaction of bank services and the manual replacement rate are improved, and efficient temperature parameters are achieved search.

CN119323261APending Publication Date: 2025-01-17WEBANK (CHINA)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411477343.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The words output by the large language model in banking services lack diversity, causing customers to judge that it is non-human customer service, thereby refusing to answer calls or reducing their willingness to participate in the service.

Method used

The customer satisfaction level of each sample customer under the preset temperature parameters is obtained based on the trained target large language model. After grouping, a preset number of target sample customers are taken from each customer group to obtain the maximum score of each target sample customer. The optimal temperature parameters are obtained, and the temperature parameters of the remaining sample customers are adjusted cyclically until the optimal temperature parameters of each sample customer are obtained.

Benefits of technology

It realizes that the output of the large language model has personalized differences for different people, thereby improving the satisfaction of bank services and the manual replacement rate, narrowing the search interval for temperature parameters by customer groups, and improving the search efficiency of temperature parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323261A_ABST
    Figure CN119323261A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model temperature parameter determination method and electronic equipment, and the method comprises the steps: obtaining a preset customer satisfaction degree of each sample customer under a preset temperature parameter according to a trained target large language model; taking preset customer satisfaction as a grouping basis to obtain a plurality of customer groups; a preset number of target sample customers are taken out from each customer group, and an optimal temperature parameter corresponding to each target sample customer is acquired; according to the optimal temperature parameter corresponding to each target sample customer, cyclically adjusting the temperature parameters of the remaining sample customers in each customer group until the optimal temperature parameter corresponding to each sample customer is obtained; according to the method, the temperature parameter of the large language model is adjusted according to the customer satisfaction of the customer under different temperature parameters, so that the optimal temperature parameter corresponding to each sample customer is obtained, the output of the model has personalized difference for different people, and the satisfaction of bank services is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of large models; specifically, to a method for determining a temperature parameter of a model and an electronic device. Background Art

[0002] Large language models are usually used in banking services to provide services in marketing, debt collection, customer service and other scenarios. However, the words output by large language models lack diversity, which causes customers to judge that the customer service representative is not a human, and thus refuse to answer the call or reduce their willingness to participate in the service.

[0003] However, the model temperature parameter is an important parameter used to regulate the randomness and diversity of text generated by a large language model. Existing model temperature parameters are usually model-level parameters, that is, a fixed temperature parameter is set according to the application scenario, which makes the language output by the large language model have a single problem, affecting user satisfaction. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present application provide a method for determining a model temperature parameter and an electronic device, which solves the problem of lack of diversity in the language output by a large language model in the related art.

[0005] According to one aspect of an embodiment of the present application, a method for determining model temperature parameters is provided, the method comprising: obtaining a preset customer satisfaction of each sample customer under preset temperature parameters based on a trained target large language model; obtaining a plurality of customer groups using the preset customer satisfaction as a basis for grouping; taking a preset number of target sample customers from each customer group, and obtaining an optimal temperature parameter corresponding to each target sample customer; and cyclically adjusting the temperature parameters of the remaining sample customers in each customer group based on the optimal temperature parameter corresponding to each target sample customer until the optimal temperature parameter corresponding to each sample customer is obtained.

[0006] Optionally, obtaining the optimal temperature parameter corresponding to the target sample customer includes: obtaining the current upper limit value and the current lower limit value of the temperature parameter; if the current lower limit value is less than or equal to the current upper limit value, obtaining the current intermediate value according to the current upper limit value and the current lower limit value; obtaining a first satisfaction level corresponding to the current intermediate value, a second satisfaction level corresponding to the current reference value, a third satisfaction level corresponding to the current lower limit value, and a fourth satisfaction level corresponding to the current upper limit according to the target large language model; the current reference value is the difference between the current intermediate value and a preset threshold value; if the first satisfaction level is greater than the second satisfaction level, and the first satisfaction level is greater than the third satisfaction level, using the current lower limit value as the optimal temperature parameter corresponding to the current customer; if the first satisfaction level is less than the second satisfaction level, and the first satisfaction level is less than the fourth satisfaction level, using the current upper limit value as the optimal temperature parameter corresponding to the current customer.

[0007] Optionally, the method also includes: if the first satisfaction level is greater than the second satisfaction level, and the first satisfaction level is less than the third satisfaction level, using the current intermediate value as the lower limit value for the next round of search; if the first satisfaction level is less than the second satisfaction level, and the first satisfaction level is greater than the fourth satisfaction level, using the current intermediate value as the upper limit value for the next round of search; if the current lower limit value is greater than the current upper limit value, using the current intermediate value as the optimal temperature parameter corresponding to the current customer.

[0008] Optionally, according to the optimal temperature parameters corresponding to each target sample customer, the temperature parameters of the remaining sample customers in each customer group are cyclically adjusted until the optimal temperature parameters corresponding to each sample customer are obtained, including: according to the optimal temperature parameters corresponding to each target sample customer, a first probability density function of a normal distribution is obtained; wherein the preset number of target sample customers are sample customers taken out for the first time from the current customer group based on an initial sliding window, and the size of the initial sliding window matches the preset number; based on the initial sliding window, a preset number of search sample customers are taken out for the second time from the current customer group; according to the first probability density function, the target temperature parameters corresponding to the extreme points are obtained; according to the target temperature parameters, the optimal temperature parameters corresponding to each search sample customer are obtained; according to the initial sliding window, a preset number of search sample customers are continued to be taken out from the current customer group until the optimal temperature parameters of all sample customers in the current customer group are obtained.

[0009] Optionally, according to the target temperature parameter, the optimal temperature parameter corresponding to each search sample customer is obtained, including: obtaining a reference satisfaction degree corresponding to each target sample customer under the target temperature parameter; dividing the preset number of target sample customers into multiple reference subsets based on the reference satisfaction degree as a basis for grouping; obtaining a reference probability density function corresponding to each reference subset based on the mean and standard deviation corresponding to each reference subset; obtaining the optimal reference temperature parameter corresponding to each reference subset based on each reference probability density function; obtaining the first search satisfaction degree corresponding to each search sample customer under the target temperature parameter; dividing the preset number of search sample customers into multiple search subsets based on the first search satisfaction degree; making a one-to-one correspondence between the optimal reference temperature parameter corresponding to each reference subset and the multiple search subsets, and obtaining the second search satisfaction degree corresponding to each customer in each search subset under the corresponding optimal reference temperature parameter; if the difference between all the second search satisfaction degrees is within a preset range, the optimal reference temperature parameter corresponding to each reference subset is used as the optimal temperature parameter corresponding to the corresponding search sample customer.

[0010] Optionally, after obtaining the reference probability density function corresponding to each reference subset based on the mean and standard deviation corresponding to each reference subset, the method further includes: obtaining the current search interval based on the reference probability density function corresponding to the current reference subset; if the lower limit value of the current search interval is equal to the upper limit value of the current search interval, using the optimal reference temperature parameters corresponding to each reference subset as the optimal temperature parameters corresponding to the corresponding search sample customers.

[0011] Optionally, a preset number of search sample customers are continuously taken out from the current customer group according to the initial sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained, including: obtaining a second probability density function according to the optimal temperature parameters corresponding to each target sample customer and the optimal temperature parameters corresponding to each search sample customer; obtaining the difference between the first probability density function and the second probability density function; correcting the initial sliding window according to the difference to obtain an updated sliding window; and performing a cyclic search from the remaining sample customers in the current customer group based on the updated sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained.

[0012] Optionally, a calculation formula for obtaining the difference between the first probability density function and the second probability density function is:

[0013]

[0014] Among them, diff represents the difference, p(T) represents the first probability density function, q(T) represents the second probability density function, u1 represents the first mean, u2 represents the second mean, σ1 represents the first standard deviation, σ2 represents the second standard deviation, and T represents the temperature parameter.

[0015] Optionally, the initial sliding window is corrected according to the difference, and a calculation formula for obtaining an updated sliding window is:

[0016]

[0017] Among them, w represents the size of the sliding window, k represents the total number of rounds allowed for searching, and C remain Indicates the number of remaining sample customers in the current customer group.

[0018] According to one aspect of an embodiment of the present application, a device for determining model temperature parameters is provided, the device comprising: a customer satisfaction acquisition module, used to obtain a preset customer satisfaction of each sample customer under preset temperature parameters based on a trained target large language model; a customer grouping module, used to obtain multiple customer groups based on the preset customer satisfaction as a grouping basis; a first temperature parameter acquisition module, used to take out a preset number of target sample customers from each customer group, and obtain the optimal temperature parameters corresponding to each target sample customer; a second temperature parameter acquisition module, used to cyclically adjust the temperature parameters of the remaining sample customers in each customer group according to the optimal temperature parameters corresponding to each target sample customer, until the optimal temperature parameters corresponding to each sample customer are obtained.

[0019] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for determining the model temperature parameter in the above technical solution is implemented.

[0020] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions so that the electronic device implements a method for determining model temperature parameters as in the above technical solution.

[0021] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method for determining the model temperature parameters in the above technical solution is implemented.

[0022] The technical solution provided by this application includes at least the following beneficial effects:

[0023] (1) This application adjusts the temperature parameters of the large language model according to the customer satisfaction under different temperature parameters, so as to obtain the optimal temperature parameters corresponding to each sample customer, so that the output of the model has personalized differences for different people, thereby improving the satisfaction of banking services and the artificial replacement rate.

[0024] (2) The present application groups a large number of sample customers according to their customer satisfaction under the same temperature parameters, and divides the massive sample customers into multiple groups, so that the sample customers in each group have similar performance habits. This can narrow the search range of the temperature parameters for each customer group, thereby improving the search efficiency of the temperature parameters.

[0025] (3) For each customer group, the present application uses the optimal temperature parameters corresponding to each target sample customer as a reference to dynamically adjust the temperature parameters of the remaining sample customers in each customer group. This allows the optimal temperature parameters corresponding to the remaining sample customers to be quickly obtained without the need to input each temperature parameter into the target large language model to try to obtain the corresponding customer satisfaction, thereby further improving the search efficiency for obtaining the optimal temperature parameters for a large number of sample customers. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0027] Figure 1 FIG. 1 is a flow chart of a method for determining a model temperature parameter provided in an embodiment of the present application;

[0028] Figure 2 The figure shows a schematic diagram of the application of a temperature parameter in a large language model provided by an embodiment of the present application;

[0029] Figure 3 Shown Figure 1 An exemplary flow chart of step S30 in FIG.

[0030] Figure 4 Shown is a schematic diagram of a probability density function provided in an embodiment of the present application;

[0031] Figure 5 Shown is a schematic diagram of crossing a peak value provided by an embodiment of the present application;

[0032] Figure 6 Shown Figure 1 An exemplary flow chart of step S40 in FIG.

[0033] Figure 7 Shown Figure 6 An exemplary flow chart of step S440 in FIG.

[0034] Figure 8 Shown Figure 6 An exemplary flow chart of step S450 in FIG.

[0035] Fig. 9 Shown is a schematic structural diagram of a device for determining a model temperature parameter provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0037] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0040] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.

[0041] Glossary:

[0042] Large Language Model (LLM): A deep learning model trained with a large amount of text data that can generate natural language text or understand the meaning of language text. Large language models can handle a variety of natural language tasks, such as text classification, question answering, and dialogue, and are an important path to artificial intelligence.

[0043] Temperature parameter: The temperature parameter of the large model is an important parameter used to control the randomness and diversity of the model when generating text. The value of the temperature parameter is between 0 and 2.

[0044] Token: Token represents the smallest unit of meaning that the model can understand and generate. It is the basic unit of the model. LLM uses tokens to ensure the coherence and consistency of the text and effectively handle various tasks such as writing, translation, and answering.

[0045] Softmax: Softmax can convert the output of a large model into a probability distribution, helping the model learn how to predict the output probability of each category based on the input data.

[0046] Sliding window: A flow control technique that controls the flow by controlling the size of the window.

[0047] Figure 1 FIG. 1 is a flow chart of a method for determining a model temperature parameter provided in an embodiment of the present application; Figure 1 As shown, the method specifically comprises the following steps:

[0048] Step S10: Obtain preset customer satisfaction of each sample customer under preset temperature parameters according to the trained target large language model.

[0049] In this embodiment, the trained target large language model can be a deep learning model trained using a large amount of text data, which can generate natural language text or understand the meaning of language text. The large language model can handle a variety of natural language tasks, such as text classification, question answering, dialogue, etc., and is an important path to artificial intelligence.

[0050] The customer satisfaction defined in this embodiment is qs, which is the average of the normalized data of three dimensions: the rate of customers hanging up directly after answering the phone α, the proportion of customers still looking for manual service after the large language model service β, and the satisfaction score after service γ (other application scenarios may also use other parameters). The specific formula for data normalization is:

[0051]

[0052] Among them, x in formula (1) represents the direct hang-up rate α, the proportion of people looking for manual help β and the satisfaction score γ. Since the higher the direct hang-up rate α and the proportion of people still looking for manual help after the large model service β, the lower the customer satisfaction qs, and the higher the satisfaction score γ, the higher the customer satisfaction, so we use and Describing the impact on qs, the calculation formula for customer satisfaction qs is as follows:

[0053]

[0054] Since each customer has a different degree of acceptance of non-manual services or accurate but lengthy expressions, different customers have different customer satisfaction qs corresponding to the same preset temperature parameters. Therefore, the purpose of this application is to set corresponding temperature parameters according to different customers and store the corresponding temperature parameters of all customers in a temperature parameter table to meet the needs of different customers for the diversity of large language model output.

[0055] It should also be noted that the role of temperature parameters in large language models is as follows Figure 2 As shown in the figure, the large language model passes the input sequence through the transformer encoding layer and the transformer decoding layer to obtain the output vector, and then maps the output vector into a longer vector called the logits vector through the fully connected layer. The logits vector describes each word and the corresponding score; the Softmax layer converts these scores into probabilities and selects the word with the appropriate probability to output according to the temperature parameter; the value of the temperature parameter is between 0 and 2. Higher values ​​(such as 0.8) will make the output more random, while lower values ​​(such as 0.2) will make the output more concentrated and certain. For example, if the input to the large language model is "Suggest you_", the output of the large language model may be:

[0056] A (60%): A loan of 10,000 yuan, with the right to use XXX interest-free benefits, and an annual interest rate of 18%;

[0057] B (30%): Don’t waste the interest-free benefit and borrow 10,000 yuan to reduce the annual interest rate by 5%;

[0058] C(10%): Go and use the interest-free benefit, which can reduce the interest.

[0059] From this, we can see that A's output is the most regular, B's expression is more flexible, and C's expression is more lively but does not output the key elements. The higher the temperature parameter, the greater the possibility of choosing a low-probability expression. For 100 customers, the ratio of A, B, and C is 4.5:3.5:2 under high temperature parameters, and the ratio of A, B, and C is 8:1.8:0.2 under low temperature parameters. By adjusting the temperature parameter, the creativity level of the AI ​​model when generating text can be controlled, thereby affecting the diversity and relevance of the output.

[0060] Step S20: using the preset customer satisfaction as a grouping basis to obtain multiple customer groups.

[0061] Through research, it is found that the temperature parameters that produce high customer satisfaction qs under a large number of samples present a normal distribution, that is, most customers have similar acceptance of the diversity and accuracy of the output of the large language model, so grouping similar customers together can find the appropriate temperature parameters more quickly. Based on this, this embodiment selects the historical customer satisfaction qs of each sample customer under the same temperature parameter as the grouping basis, and customers with similar customer satisfaction qs are grouped into the same group, indicating that the same group of customers have similar acceptance of the output of the large language model, so that the standard deviation of the normal distribution of customers in each group after grouping is smaller, thereby improving search efficiency.

[0062] Step S30: taking out a preset number of target sample customers from each customer group, and obtaining the optimal temperature parameter corresponding to each target sample customer.

[0063] In this embodiment, the preset number of target sample customers are sample customers first taken out from the current customer group based on the initial sliding window, and the size of the initial sliding window matches the preset number. The sliding window is a processing area for searching customers in each round, and the size of the initial sliding window is set to w. The initial size of w can be 30, because according to the central limit theorem, w positioning 30 can reflect the probability distribution of data at a higher confidence level. For example, assuming that there are a total of 100 sample customers in the current customer group, since the initial sliding window size w is 30, 30 target sample customers are first taken out from the current 100 sample customers based on the initial sliding window.

[0064] In one embodiment, if Figure 3 As shown, obtaining the optimal temperature parameters corresponding to the target sample customers specifically includes the following steps:

[0065] Step S310, obtaining the current upper limit value and the current lower limit value of the temperature parameter;

[0066] Step S320, determine whether the current lower limit value is less than or equal to the current upper limit value, if yes, execute step S340, if no, execute step S330;

[0067] Step S330: Use the current intermediate value as the optimal temperature parameter corresponding to the current customer.

[0068] Step S340, obtaining a current intermediate value according to the current upper limit value and the current lower limit value;

[0069] Step S350, obtaining, according to the target large language model, a first satisfaction level corresponding to the current middle value, a second satisfaction level corresponding to the current reference value, a third satisfaction level corresponding to the current lower limit value, and a fourth satisfaction level corresponding to the current upper limit value;

[0070] Step S360, determine whether the first satisfaction level is greater than the second satisfaction level; if so, proceed to step S370, if not, proceed to step S380;

[0071] Step S370, determine whether the first satisfaction level is less than the third satisfaction level; if so, execute step S371, if not, execute step S372;

[0072] Step S371, taking the current intermediate value as the lower limit value of the next round of search;

[0073] Step S372: taking the current lower limit value as the optimal temperature parameter corresponding to the current customer;

[0074] Step S380, determine whether the first satisfaction level is less than the fourth satisfaction level; if so, execute step S381, if not, execute step S382;

[0075] Step S381, taking the current middle value as the upper limit value of the next round of search;

[0076] Step S382: Use the current upper limit value as the optimal temperature parameter corresponding to the current customer.

[0077] In this embodiment, after executing step S371 or step S381, step S310 is continued to be executed.

[0078] It should be noted that by observing the relationship between the historical temperature parameter T value and customer satisfaction qs of the sample customers, it can be seen that the customer satisfaction qs of each customer under different temperature parameters T is a parabola such as Figure 4 The specific method of obtaining the optimal temperature parameter corresponding to each target sample customer in this embodiment is as follows: first, obtain the current lower limit value low and the current upper limit value high of the temperature parameter. The current lower limit value low in the first search is 0, the current upper limit value high is 2, and the current intermediate value The current reference value is mid - dT (dT is a preset threshold, which can be taken as 0.1); let qs(mid) represent the first satisfaction degree, qs(mid - dT) represent the second satisfaction degree, qs(low) represent the third satisfaction degree, and qs(high) represent the fourth satisfaction degree; if qs(mid)>qs(mid - dT), it indicates that it is in a decreasing interval, and let low = mid and continue to search to the left; otherwise, it indicates that it is in an increasing interval, and let high = mid and continue to search to the right; however, if it is in a decreasing interval and continuing to search to the left instead reduces qs, it is because mid and mid - dT have crossed the peak point of qs (as shown in Figure 5 ), at this time, directly take the T corresponding to the maximum qs searched before; through the binary search provided by this embodiment, the retrieval efficiency of the optimal temperature parameter can be improved.

[0079] Illustrate with an example: Assume that the relationship between the temperature parameter T of a sample customer and the customer satisfaction degree qs is as shown in Figure 4 . In the first round of search:

[0080] low = 0, high = 2, mid=(0 + 2) / 2 = 1;

[0081] qs(1)=1.2 < qs(0.9)=1.4, at this time it is in a decreasing interval;

[0082] Since qs(mid)=1.2 > qs(high)=2, let high = mid = 1.

[0083] In the second round of search:

[0084] low = 0, high = 1, mid=(0 + 1) / 2 = 0.5;

[0085] qs(0.5)=2.6 > qs(0.4)=2.5, at this time it is in an increasing interval;

[0086] Since qs(mid)=2.6 > qs(low)=0, let low = mid = 0.5.

[0087] In the third round of search:

[0088] low = 0.5, high = 1, mid=(0.5 + 1) / 2 = 0.75;

[0089] qs(0.75)=2 < qs(0.65)=2.75, at this time it is in a decreasing interval;

[0090] Since qs(mid)=2 > qs(high)=1.2, let high = mid = 0.75.

[0091] In the fourth round of search:

[0092] low = 0.5, high = 0.75, mid = (0.75 + 1) / 2 = 0.625;

[0093] qs(0.625) = 2.79 > qs(0.525) = 2.6, at this time it is in the increasing interval;

[0094] Since qs(mid) = 2.79 > qs(low) = 2.6, let low = mid = 0.625.

[0095] During the fifth round of search:

[0096] low = 0.625, high = 0.75, mid = (0.625 + 0.75) / 2 = 0.6875;

[0097] qs(0.6875) = 2.4 > qs(0.6775) = 2.3, at this time it is in the increasing interval;

[0098] qs(mid) = 2.4 < qs(low) = 2.79, increasing mid is less than low, indicating that the extreme value has been passed; the search ends, T = low = 0.625, and let the optimal temperature parameter corresponding to this customer be 0.625.

[0099] And so on, the optimal temperature parameter of each target sample customer can be obtained according to the above search method.

[0100] Step S40, according to the optimal temperature parameter corresponding to each target sample customer, cyclically adjust the temperature parameters of the remaining sample customers in each customer group until the optimal temperature parameter corresponding to each sample customer is obtained.

[0101] It should be noted that for each customer group, the optimal temperature parameter corresponding to each target sample customer has been obtained in step S30. Taking the optimal temperature parameter corresponding to each target sample customer as a reference, dynamically adjusting the temperature parameters of the remaining sample customers in each customer group can quickly obtain the optimal temperature parameter corresponding to each sample customer, without having to input each temperature parameter into the target large language model to try to obtain the corresponding customer satisfaction, thus improving the search efficiency for obtaining the optimal temperature parameter of a large number of sample customers.

[0102] In addition, after obtaining the optimal temperature parameters corresponding to all sample customers, a temperature parameter table can be formed, enabling the target large language model to select the corresponding temperature parameter according to the target object to meet the diverse needs of different customers for the model output.

[0103] The technical solution provided in this embodiment has at least the following beneficial effects:

[0104] (1) This application adjusts the temperature parameters of the large language model according to the customer satisfaction under different temperature parameters, so as to obtain the optimal temperature parameters corresponding to each sample customer, so that the output of the model has personalized differences for different people, thereby improving the satisfaction of banking services and the artificial replacement rate.

[0105] (2) The present application groups a large number of sample customers according to their customer satisfaction under the same temperature parameters, and divides the massive sample customers into multiple groups, so that the sample customers in each group have similar performance habits. This can narrow the search range of the temperature parameters for each customer group, thereby improving the search efficiency of the temperature parameters.

[0106] (3) For each customer group, the present application uses the optimal temperature parameters corresponding to each target sample customer as a reference to dynamically adjust the temperature parameters of the remaining sample customers in each customer group. This allows the optimal temperature parameters corresponding to the remaining sample customers to be quickly obtained without the need to input each temperature parameter into the target large language model to try to obtain the corresponding customer satisfaction, thereby further improving the search efficiency for obtaining the optimal temperature parameters for a large number of sample customers.

[0107] In one embodiment of the present application, Figure 6 As shown, according to the optimal temperature parameter corresponding to each target sample customer, the temperature parameters of the remaining sample customers in each customer group are cyclically adjusted until the optimal temperature parameter corresponding to each sample customer is obtained, which specifically includes the following steps:

[0108] Step S410: Obtain a first probability density function of a normal distribution according to the optimal temperature parameter corresponding to each target sample customer.

[0109] In this embodiment, after step S30, there are initial w sample customers who have obtained the optimal temperature parameter T. Most people have similar requirements for the temperature parameter T. It can be considered that the existing samples obey the normal distribution. The mean and standard deviation of these samples are calculated, and then the first probability density function p(T) of the normal distribution is obtained according to the mean and standard deviation. The specific formula is:

[0110]

[0111] In formula (3), u1 represents the first mean, and σ1 represents the first standard deviation.

[0112] For example: Assume that the above search completes the initial 30 customers u1 = 0.25, σ1 = 0.1 to obtain the first probability density function of the normal distribution Among them, the waveform of the first probability density function is as follows Figure 4 shown.

[0113] Step S420: extract a preset number of search sample customers from the current customer group for the second time based on the initial sliding window.

[0114] It should be noted that, for the current customer group, after taking out a preset number of target sample customers according to the initial sliding window in step S30, a preset number of sample customers are taken out from the remaining sample customers according to the initial sliding window, and the sample customers taken out for the first time are defined as target sample customers, and the sample customers taken out for the second time are defined as search sample customers.

[0115] Step S430: Obtain a target temperature parameter corresponding to the extreme point according to the first probability density function.

[0116] It should be noted that by calculating the definite integral Figure 4 The shaded area shown is searched only when the shaded area is greater than C, because the shaded area (the definite integral between the T value of 0-a and b-2 on the probability density function p(T)) represents the data range where qs is too low under mathematical expectation. The formula based on the relationship between area C and a and b is as follows:

[0117] By integrating the first probability density function p(T), the lower limit a and upper limit b of the search interval can be calculated. This embodiment only searches for T values ​​between a and b, thereby improving search efficiency. If a=b, the search is stopped and the customer's largest T is taken as the search result.

[0118] Further, Figure 4 Point A in the figure represents the extreme value of the first probability density function p(T). The T value when p′(T)=0 obtained by differentiating p(T) is the target T value of this round of search. The T at the extreme value is the highest possible T value for customer satisfaction qs in the current sample.

[0119] Example: Calculate the search range (a, b), set C to 0.1, and recalculate the search range

[0120]

[0121] Solve the definite integral to obtain a=0.2178,b=1.3028; calculate the extreme point of p(T) and find the derivative p ′ (T) = 0, and we obtain T = 0.66.

[0122] Step S440: Obtain the optimal temperature parameter corresponding to each search sample customer according to the target temperature parameter.

[0123] like Figure 7 As shown, according to the target temperature parameter, obtaining the optimal temperature parameter corresponding to each search sample customer specifically includes the following steps:

[0124] Step S441, obtaining the reference satisfaction level corresponding to each target sample customer under the target temperature parameter;

[0125] Step S442: using the reference satisfaction level as a grouping basis, dividing the preset number of target sample customers into a plurality of reference subsets;

[0126] Step S443: Obtain a reference probability density function corresponding to each reference subset according to the mean and standard deviation corresponding to each reference subset;

[0127] Step S444: Obtain the optimal reference temperature parameter corresponding to each reference subset according to each reference probability density function;

[0128] Step S445, obtaining the first search satisfaction level corresponding to each search sample customer under the target temperature parameter;

[0129] Step S446: using the first search satisfaction level as a grouping basis, dividing the preset number of search sample customers into a plurality of search subsets;

[0130] Step S447: Make a one-to-one correspondence between the optimal reference temperature parameter corresponding to each reference subset and the multiple search subsets, and obtain the second search satisfaction level corresponding to each customer in each search subset under the corresponding optimal reference temperature parameter;

[0131] Step S448: If the differences between all the second search satisfaction levels are within a preset range, the optimal reference temperature parameters corresponding to each reference subset are used as the optimal temperature parameters corresponding to the corresponding search sample customers.

[0132] In one embodiment, after obtaining the reference probability density function corresponding to each reference subset based on the mean and standard deviation corresponding to each reference subset, the method further includes: obtaining the current search interval based on the reference probability density function corresponding to the current reference subset; if the lower limit value of the current search interval is equal to the upper limit value of the current search interval, using the optimal reference temperature parameter corresponding to each reference subset as the optimal temperature parameter corresponding to the corresponding search sample customer.

[0133] It should be noted that, assuming that n customers have been searched (the initial 30 customers when entering step S410 for the first time), according to T (assuming it is 0.66) obtained in step S430, the qs of the searched customer set A (i.e., the preset number of target sample customers) is as shown in Table 1:

[0134] Table 1. Reference satisfaction qs of searched customer set A at T = 0.66

[0135] Optimal temperature parameters Customer 1 Customer 2 Customer 3 … Customer T=0.3 qs=2.5 qs=1.2 qs=1.4 … qs=2.8

[0136] The searched customer set A can be divided into multiple reference subsets according to the difference in qs at T=0.66. In this embodiment, the three groups of qs of 0.5, 1.5, and 2.5 are grouped by ±0.5. The grouping results are shown in Table 2:

[0137] Table 2: The searched customer set A is grouped into sets A1, A2, and A3 according to qs at T = 0.3

[0138]

[0139] Recalculate the mean and standard deviation of T when qs is the highest for each group, and obtain the reference probability density functions corresponding to each reference subset: p A1 (T), p A2 (T), p A3 (T). If the searched customer set A can classify all customers into the same group according to qs under T = 0.66, and a new probability density function cannot be iterated, the search ends, and the customer group can take T with the best qs that has been searched so far.

[0140] The preset number of search sample customers taken out for the second time is taken as the customer set B to be searched. For all customers in the set B, the first search satisfaction qs1 under T=0.66 is searched. The results are shown in Table 3:

[0141] Table 3: The first search satisfaction qs1 of the customer set B to be searched under T = 0.66

[0142] Customer n+1 Customer n+2 Customer n+3 … Customer n+w T=0.3 qs1=1.5 qs1=1.3 qs1=2.6 … qs1=2.7

[0143] The customer set B to be searched is divided into a plurality of search sub-sets according to the difference of qs1 under T=0.66. In this embodiment, the customer set B is divided into a plurality of search sub-sets according to the difference of qs1 of 0.5, 1.5, 2.5 ±0.5. The grouping results are shown in Table 4:

[0144] Table 4: The customer set B to be searched is grouped into B1, B2, and B3 subsets according to qs1 at T = 0.66

[0145]

[0146] For each search subset B1, B2, B3 of the search customer, take the corresponding reference subset new probability density function p A1 (T), p A2 (T), p A3(T) Re-execute steps S410, S420, and steps S441 to S448 until each search subset can no longer iterate a new probability density function, thereby taking the optimal reference temperature parameters corresponding to each reference subset as the optimal temperature parameters corresponding to the corresponding search sample customers.

[0147] Step S450: Continue to extract a preset number of search sample customers from the current customer group according to the initial sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained.

[0148] In one embodiment of the present application, Figure 8 As shown, according to the initial sliding window, a preset number of search sample customers are continuously taken out from the current customer group until the optimal temperature parameters of all sample customers in the current customer group are obtained. Specifically, the following steps are included:

[0149] Step S451: Obtain a second probability density function according to the optimal temperature parameter corresponding to each target sample customer and the optimal temperature parameter corresponding to each search sample customer.

[0150] Step S452: Obtain the difference between the first probability density function and the second probability density function.

[0151] Step S453: modify the initial sliding window according to the difference to obtain an updated sliding window.

[0152] Step S454: Perform a cyclic search on the remaining sample customers in the current customer group based on the updated sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained.

[0153] It should be noted that the optimal temperature parameters corresponding to each target sample customer and the optimal temperature parameters corresponding to each search sample customer are summarized to obtain the second mean u2 and the second standard deviation σ2, and then the second probability density function q(T) of the normal distribution is obtained based on the second mean u2 and the second standard deviation σ2.

[0154] Further, the difference between the first probability density function and the second probability density function is calculated, and the specific calculation formula is:

[0155]

[0156] In formula (5), diff represents the difference, p(T) represents the first probability density function, q(T) represents the second probability density function, u1 represents the first mean, and u2 represents the second mean. represents the first standard deviation, represents the second standard deviation, and T represents the temperature parameter. Generally, the more data is searched, the more accurate the probability density function is, and the smaller the impact of a new round of data on the probability density function is.

[0157] Furthermore, the size of the sliding window is corrected according to the difference. The smaller the difference, the more accurate the probability density function is in describing the whole. That is, more customers can be searched according to this probability density function, and the number of search rounds can be reduced. The correction algorithm of the sliding window is shown in Formula 6:

[0158]

[0159] Among them, w represents the size of the sliding window, k represents the total number of rounds allowed for searching, and C remain Indicates the number of remaining sample customers in the current customer group.

[0160] Further, steps S410 to S450 are repeated according to the new w until C remain =0, the search for all customers is completed.

[0161] For example: Based on the initial 30 customers and the second 30 customers, the latest searched set T is obtained. Based on the latest set T, the probability density function is calculated, assuming that the difference between p(T) and q(T) is calculated as:

[0162]

[0163] Recalculate the sliding window size based on the difference. In this case, C is 0.5, which can be adjusted according to the desired number of iterations. Since there are only 40 customers left in this case, w=40. Take out 40 customers, and the latest probability density function of u2=0.255, σ1=0.05 with T value of 60 customers searched is: Repeat the above steps to complete the search for all customers.

[0164] It can be seen that this application adjusts the temperature parameters of the large language model according to the habits of different customers, so that the output of the model has personalized differences for different people, thereby improving the satisfaction of banking services and the rate of manual replacement; in addition, this application proposes a fast search algorithm for temperature parameters based on a sliding window, which can efficiently search for the temperature parameters with the highest service satisfaction for each customer, thereby improving service quality while also improving search efficiency.

[0165] Fig. 9 FIG. 1 is a schematic diagram of a structure of a device for determining a model temperature parameter provided in an embodiment of the present application; Fig. 9 As shown, the device comprises:

[0166] The customer satisfaction acquisition module 910 is used to acquire the preset customer satisfaction of each sample customer under the preset temperature parameters according to the trained target large language model;

[0167] A customer grouping module 920, configured to obtain multiple customer groups based on the preset customer satisfaction level;

[0168] The first temperature parameter acquisition module 930 is used to extract a preset number of target sample customers from each customer group and obtain the optimal temperature parameter corresponding to each target sample customer;

[0169] The second temperature parameter acquisition module 940 is used to cyclically adjust the temperature parameters of the remaining sample customers in each customer group according to the optimal temperature parameters corresponding to each target sample customer, until the optimal temperature parameters corresponding to each sample customer are obtained.

[0170] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0171] It should be noted that Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0172] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1604. The input / output (I / O) interface 1005 is also connected to the bus 1004.

[0173] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0174] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.

[0175] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0176] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0177] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0178] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A method for determining a model temperature parameter, characterized in that: The method comprises: According to the trained target large language model, the preset customer satisfaction of each sample customer under the preset temperature parameters is obtained; Using the preset customer satisfaction as a grouping basis, a plurality of customer groups are obtained; Taking out a preset number of target sample customers from each customer group, and obtaining the optimal temperature parameter corresponding to each target sample customer; According to the optimal temperature parameter corresponding to each target sample customer, the temperature parameters of the remaining sample customers in each customer group are cyclically adjusted until the optimal temperature parameter corresponding to each sample customer is obtained.

2. The method according to claim 1, characterized in that: Obtaining the optimal temperature parameters corresponding to the target sample customers includes: Get the current upper limit and lower limit of the temperature parameter; If the current lower limit value is less than or equal to the current upper limit value, obtaining a current intermediate value according to the current upper limit value and the current lower limit value; According to the target large language model, a first satisfaction level corresponding to the current middle value, a second satisfaction level corresponding to the current reference value, a third satisfaction level corresponding to the current lower limit value, and a fourth satisfaction level corresponding to the current upper limit value are obtained; the current reference value is the difference between the current middle value and the preset threshold value; If the first satisfaction level is greater than the second satisfaction level, and the first satisfaction level is greater than the third satisfaction level, the current lower limit value is used as the optimal temperature parameter corresponding to the current customer; If the first satisfaction level is less than the second satisfaction level, and the first satisfaction level is less than the fourth satisfaction level, the current upper limit value is used as the optimal temperature parameter corresponding to the current customer.

3. The method according to claim 2, characterized in that The method further comprises: If the first satisfaction level is greater than the second satisfaction level, and the first satisfaction level is less than the third satisfaction level, the current intermediate value is used as the lower limit value of the next round of search; If the first satisfaction level is less than the second satisfaction level, and the first satisfaction level is greater than the fourth satisfaction level, the current intermediate value is used as the upper limit value of the next round of search; If the current lower limit value is greater than the current upper limit value, the current middle value is used as the optimal temperature parameter corresponding to the current customer.

4. The method according to claim 1, characterized in that: According to the optimal temperature parameter corresponding to each target sample customer, the temperature parameters of the remaining sample customers in each customer group are adjusted cyclically until the optimal temperature parameter corresponding to each sample customer is obtained, including: According to the optimal temperature parameter corresponding to each target sample customer, a first probability density function of a normal distribution is obtained; wherein the preset number of target sample customers are sample customers first taken out from the current customer group based on an initial sliding window, and the size of the initial sliding window matches the preset number; Taking out a preset number of search sample customers from the current customer group for the second time based on the initial sliding window; According to the first probability density function, obtaining a target temperature parameter corresponding to the extreme point; According to the target temperature parameter, obtaining the optimal temperature parameter corresponding to each search sample customer; A preset number of search sample customers are continuously taken out from the current customer group according to the initial sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained.

5. The method according to claim 4, characterized in that According to the target temperature parameter, the optimal temperature parameter corresponding to each search sample customer is obtained, including: Obtain the reference satisfaction of each target sample customer under the target temperature parameter; Using the reference satisfaction as a grouping basis, dividing the preset number of target sample customers into a plurality of reference subsets; According to the mean and standard deviation corresponding to each reference subset, obtain the reference probability density function corresponding to each reference subset; According to each reference probability density function, obtaining the optimal reference temperature parameter corresponding to each reference subset; Obtaining the first search satisfaction level corresponding to each search sample customer under the target temperature parameter; Taking the first search satisfaction level as a grouping basis, dividing the preset number of search sample customers into a plurality of search subsets; Matching the optimal reference temperature parameter corresponding to each reference subset with the multiple search subsets one by one, and obtaining the second search satisfaction degree corresponding to each customer in each search subset under the corresponding optimal reference temperature parameter; If the differences between all the second search satisfaction levels are within a preset range, the optimal reference temperature parameters corresponding to each reference subset are used as the optimal temperature parameters corresponding to the corresponding search sample customers.

6. The method according to claim 5, characterized in that After obtaining the reference probability density function corresponding to each reference subset according to the mean and standard deviation corresponding to each reference subset, the method further includes: Obtaining a current search interval according to a reference probability density function corresponding to the current reference subset; If the lower limit value of the current search interval is equal to the upper limit value of the current search interval, the optimal reference temperature parameter corresponding to each reference subset is used as the optimal temperature parameter corresponding to the corresponding search sample customer.

7. The method according to claim 4, characterized in that Continuously taking out a preset number of search sample customers from the current customer group according to the initial sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained, including: Obtaining a second probability density function according to the optimal temperature parameter corresponding to each target sample customer and the optimal temperature parameter corresponding to each search sample customer; Obtaining a difference between the first probability density function and the second probability density function; Correcting the initial sliding window according to the difference to obtain an updated sliding window; A cyclic search is performed on the remaining sample customers in the current customer group based on the updated sliding window until the optimal temperature parameters of all sample customers in the current customer group are obtained.

8. The method according to claim 7, characterized in that The calculation formula for obtaining the difference between the first probability density function and the second probability density function is: Among them, diff represents the difference, p(T) represents the first probability density function, q(T) represents the second probability density function, u1 represents the first mean, u2 represents the second mean, σ1 represents the first standard deviation, σ2 represents the second standard deviation, and T represents the temperature parameter.

9. The method according to claim 7, characterized in that: The calculation formula for modifying the initial sliding window according to the difference is as follows: Among them, w represents the size of the sliding window, k represents the total number of rounds allowed for searching, and C remain Indicates the number of remaining sample customers in the current customer group.

10. An electronic device, characterized in that: include: processor; as well as A memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to enable the electronic device to implement the method for determining the model temperature parameters as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Entity grouping model optimization method and device, processor and equipment

    CN121524692A