Large model response and training method and device, equipment, medium and program product

By employing pre-trained models with user-specific profiles and prompt words, the method addresses the inefficiencies of dialog models, providing personalized and accurate responses, thus improving marketing interactions.

CN120317399APending Publication Date: 2025-07-15SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510378450.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

Existing dialogue models are poorly targeted when generating responses, have a long training cycle, and lack gradual logic for responses, making it difficult to meet the accuracy requirements in practical applications.

Method used

By obtaining user portraits, determining the response portraits, and combining pre-trained large models and external databases, dynamically adjusting the response strategy to generate highly targeted responses.

Benefits of technology

It improves the accuracy and efficiency of large-scale model responses, reduces the development cycle, and improves the conversion rate of orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120317399A_ABST
    Figure CN120317399A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a large model response and training method and device, equipment, a medium and a program product, and the large model response method comprises the steps: obtaining a first user portrait corresponding to a first user; based on the first user portrait, determining a first response portrait corresponding to the first user portrait; the first response portrait is used for determining characteristics of a response of a first large model to the first user; and based on the first response portrait, enabling the first large model to generate a response for the question of the first user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence, and particularly relates to a large model response, training method, device, equipment, medium and program product. Background Art

[0002] Based on the given historical conversation and context information, the dialogue large model can generate coherent natural language responses. Currently, in order to enable the dialogue large model to generate responses that meet requirements, a large number of relevant conversations are usually collected as training corpus to train the dialogue large model, so that the dialogue large model can have the ability to obtain more appropriate next sentences based on the user's previous sentences. This implementation method for training the dialogue large model has a long development cycle. In practical applications, the trained dialogue large model has poor pertinence during the response process. Summary of the Invention

[0003] Embodiments of this application provide a large model response, training method, device, equipment, medium and program product.

[0004] Embodiments of this application provide a large model response method, and the method includes:

[0005] Obtain a first user portrait corresponding to a first user;

[0006] Based on the first user portrait, determine a first response portrait corresponding to the first user portrait; the first response portrait is used to determine the characteristics of the response of the first large model to the first user.

[0007] Based on the first response portrait, enable the first large model to generate a response to the question of the first user.

[0008] In some embodiments, the determining the first response portrait corresponding to the first user portrait based on the first user portrait includes: based on the first user portrait, in the corresponding relationship, determine the first response portrait corresponding to the first user portrait; wherein, the corresponding relationship includes multiple second user portraits, and a second response portrait corresponding to each second user portrait; the second response portrait is obtained by the second large model pre-processing the second user portrait through a first prompt.

[0009] It can be seen that by setting the corresponding relationship and directly determining the first response portrait corresponding to the first user portrait in the corresponding relationship, the efficiency of determining the response portrait can be improved. Further, making a response based on the determined response portrait is beneficial to improving the accuracy of the response to the user.

[0010] In some embodiments, determining the first response portrait corresponding to the first user portrait in the corresponding relationship based on the first user portrait includes: determining the first similarity between the first user portrait and each second user portrait; determining the target second user portrait corresponding to the first user portrait through multiple first similarities; determining the target second response portrait corresponding to the target second user portrait in the corresponding relationship based on the target second user portrait; and using the target second response portrait as the first response portrait.

[0011] In some embodiments, making the first large model generate a response to the question of the first user based on the first response portrait includes: in the case where it is necessary to retrieve data from an external database to respond to the question of the first user, obtaining first external data from the external database through a second prompt; and making the first large model generate a response to the question of the first user through the first external data based on the first response portrait.

[0012] It can be seen that in the response process, by retrieving data from an external database to generate a response to the question of the first user, it is beneficial to improve the response accuracy and generate a response that meets the actual requirements of the user.

[0013] The embodiment of the present application also provides a large model training method, and the method includes:

[0014] Training the first large model based on a training data set so that the trained first large model can automatically generate a response to a question corresponding to the first user portrait; the training data set includes a response portrait corresponding to the user portrait, a question corresponding to the user portrait, and a response corresponding to the question.

[0015] The embodiment of the present application also provides a large model response method, and the method includes:

[0016] Obtaining multiple different second user portraits;

[0017] Based on a first prompt, obtaining a second response portrait corresponding to each second user portrait through a second large model;

[0018] Constructing a corresponding relationship through each second user portrait and the second response portrait corresponding to each second user portrait; the corresponding relationship is used to determine the first response portrait corresponding to the first user portrait; the first response portrait is used to make the first large model respond to the question corresponding to the first user portrait.

[0019] In some embodiments, after obtaining, based on the first prompt, the second response portraits corresponding to each second user portrait through the second large model, the method further includes: obtaining second external data corresponding to the second response portraits in an external database; based on a third prompt, combining, through the second large model, the second response portraits with the second external data, and updating the second response portraits according to the combination result.

[0020] It can be seen that updating the second response portraits by combining the data in the external database is beneficial to reducing the frequency of obtaining external data and improving the response efficiency of the large model in subsequent response processes.

[0021] An embodiment of the present application also provides a large model response device, and the device includes:

[0022] A first acquisition module, configured to acquire a first user portrait corresponding to a first user;

[0023] A first processing module, configured to determine, based on the first user portrait, a first response portrait corresponding to the first user portrait; the first response portrait is used to determine the characteristics of the response of the first large model to the first user; and based on the first response portrait, cause the first large model to generate a response to the question of the first user.

[0024] An embodiment of the present application also provides a large model training device, and the device includes:

[0025] A second acquisition module, configured to acquire a training data set;

[0026] A training module, configured to train the first large model based on the training data set, so that the trained first large model can automatically generate a response to a question corresponding to the first user portrait; the training data set includes a response portrait corresponding to the user portrait, the question corresponding to the user portrait, and the response corresponding to the question.

[0027] An embodiment of the present application also provides a large model response device, and the device includes:

[0028] A third acquisition module, configured to acquire a plurality of different second user portraits;

[0029] A second processing module, configured to obtain, based on the first prompt, a second response portrait corresponding to each second user portrait through the second large model; construct a corresponding relationship through each second user portrait and the second response portrait corresponding to each second user portrait; the corresponding relationship is used to determine a first response portrait corresponding to the first user portrait; the first response portrait is used to cause the first large model to respond to the question corresponding to the first user portrait.

[0030] An embodiment of the present application provides an electronic device, which includes a processor and a memory for storing a computer program that can run on the processor; wherein,

[0031] The processor is configured to run the computer program to execute any one of the above-mentioned large model response methods or large model training methods.

[0032] An embodiment of the present application provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any one of the above-mentioned large model response methods or large model training methods.

[0033] An embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements any one of the above-mentioned large model response methods or large model training methods.

[0034] An embodiment of the present application provides a large model response, training method, device, equipment, medium and program product. By obtaining a response portrait of a user portrait for the user portrait, the first large model can generate responses for different users based on the response portrait. By using the second large model to pre-determine the response portrait corresponding to the user portrait based on the first prompt word, the efficiency of pre-determining the user portrait and the corresponding response portrait can be improved. Based on the method provided by the embodiment of the present application, targeted responses for different users can be obtained, reducing the large model development cycle and improving the response accuracy of the large model. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flowchart of a large model response method provided by an embodiment of the present application;

[0036] Figure 2 It is a flowchart of a large model training method provided by an embodiment of the present application;

[0037] Figure 3 It is a flowchart of another large model response method provided by an embodiment of the present application;

[0038] Figure 4 It is a flowchart of a large model response provided by an embodiment of the present application;

[0039] Figure 5 It is a schematic structural diagram of a large model response device provided by an embodiment of the present application;

[0040] Figure 6 It is a schematic structural diagram of a large model training device provided by an embodiment of the present application;

[0041] Figure 7 It is a schematic structural diagram of another large model response device provided by an embodiment of the present application;

[0042] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The big dialogue model can generate coherent natural language responses based on given historical dialogues, contextual information, etc. Since the big dialogue model has rich and diverse knowledge and can generate humanized responses, it is currently widely used in marketing fields such as e-commerce and financial insurance products to assist marketers in responding to customers' questions about product details and introduce more interactive methods. By applying the big dialogue model, it can also help junior marketers directly use the responses of experienced marketing experts, greatly reducing the labor costs of merchants.

[0044] However, the current technical principle of the dialogue model to generate the next context is to generate the next context based on the training samples. The next context generated by the dialogue model is strongly correlated with the distribution of the training samples. To address this problem, the current common approach is to start with the training sample data set of the dialogue model. By collecting a large amount of sales talk as the training corpus in the training sample data set, the dialogue model is expected to be able to obtain a more appropriate next context based on the customer's previous context, achieve a more human-like response, and encourage customers to complete the purchase of goods.

[0045] Regarding the above method, on the one hand, this implementation method relies on large model training, and the development cycle of the dialogue large model training method is long; on the other hand, the trained dialogue large model generates corresponding responses, which are just a pile of sales words and lack of step-by-step logic. In actual applications, there are general discussions and poor pertinence, which is not conducive to the development of sales business and the conversion of single value.

[0046] In response to the above problems, the embodiment of the present application proposes a large model response method, which directly uses the pre-trained large model and applies the large model to the marketing field in combination with prompt words. It automatically adjusts the inference response portrait according to the user portraits of different users, realizes targeted product introduction, accurately captures user needs, and obtains targeted responses that stimulate potential purchasing intentions, thereby ultimately improving the order conversion rate on the business side.

[0047] The following is a further detailed description of the embodiments of the present application in conjunction with the accompanying drawings and examples. It should be understood that the embodiments provided herein are only used to explain the embodiments of the present application and are not intended to limit the embodiments of the present application. In addition, the embodiments provided below are partial embodiments for implementing the present application, rather than providing all embodiments for implementing the present application. In the absence of conflict, the technical solutions recorded in the embodiments of the present application can be implemented in any combination.

[0048] It should be noted that in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or device including a series of elements not only includes the elements clearly recorded, but also includes other elements not explicitly listed, or further includes elements inherent to the implementation of the method or device. Without more limitations, the elements defined by the statement "including..." do not exclude the existence of additional related elements in the method or device including such elements (such as steps in a method or units in a device, for example, a unit in a device can be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0049] The large model response method provided by the embodiments of the present application includes a series of steps, but the large model response method and training method provided by the embodiments of the present application are not limited to the recorded steps. Similarly, the large model response device and training device provided by the embodiments of the present application include a series of modules, but the devices provided by the embodiments of the present application are not limited to including the explicitly recorded modules, and may also include modules required for obtaining relevant information or processing based on information.

[0050] The embodiments of the present application provide a large model response method for online answering questions raised by users. As Figure 1 shown, Figure 1 shows a flowchart of a large model response method, Figure 1 The large model response method shown includes:

[0051] Step 101: Obtain a first user profile corresponding to the first user.

[0052] The first user refers to the user who makes a question, that is, the user who asks a question to the first large model, and the first large model can be the above-mentioned dialogue large model. In the marketing field, the first user can specifically be a marketing customer, and the first user can specifically consult products online.

[0053] A user profile is a comprehensive user model formed based on in-depth mining and analysis of a large amount of user data, and is a unique attribute label for each user. Specifically, the characteristics of the first user can be analyzed through the historical conversation records of the first user, the historical click data of the first user, etc., to obtain the interests, hobbies, behavior patterns, etc. of the first user. Through the characteristics of the first user, the characteristics of the first user can be further analyzed and integrated to obtain the profile of the first user. Another implementation method can also directly obtain the first user profile of the first user based on the trained generation model and the session of the first user.

[0054] For example, in the case where the first user needs to obtain specific product recommendations, by analyzing the first user's consumption information, social platform information, etc., the interest and hobby information of the first user is obtained, and a first user portrait is generated based on the interest and hobby information. Through the first user portrait, accurate product recommendations are made.

[0055] For another example, in the case where the first user needs to understand the current promotion strategy, or the first user expects to purchase goods at a low price, by analyzing the first user's consumption information, such as the purchase channel, purchase frequency, etc., the consumption habit of the first user is determined, and a first user portrait is generated based on the consumption habit of the first user. An accurate marketing strategy can be generated based on the first user portrait.

[0056] For another example, in the case where it is necessary to actively push products to the first user, or it is necessary to promote products, the social activity of the first user can be identified by analyzing the social relationship information of the first user, and a first user portrait is generated based on the social activity. When the first user is a socially active user, promoting products can be indirectly achieved by pushing products to the first user.

[0057] Step 102: Based on the first user portrait, determine a first response portrait corresponding to the first user portrait.

[0058] Among them, the first response portrait is used to determine the characteristics of the response of the first large model to the first user.

[0059] After determining the first user portrait, based on the method provided in the embodiments of the present application, it is necessary to obtain a first response portrait corresponding to the first large model according to the first user portrait, so that the first large model responds to the first user's question from the perspective of the first response portrait.

[0060] In the specific implementation process, the first user portrait can be analyzed to obtain the first interest characteristics, first behavior characteristics, first psychological characteristics, etc. of the first user. Based on the first interest characteristics of the first user, second interest characteristics similar to the first interest characteristics are obtained; based on the first behavior characteristics of the first user, in the first preset feature relationship, second behavior characteristics matching the first behavior characteristics are obtained; based on the first psychological characteristics of the first user, in the second preset feature relationship, second psychological characteristics corresponding to the first psychological characteristics are obtained. The first response portrait corresponding to the first user portrait is jointly constructed through the second interest characteristics, second behavior characteristics, and second psychological characteristics, and the first response portrait is used as the portrait of the first large model, so that the first large model obtains the characteristics for answering the first user. Here, the first preset feature relationship and the second preset feature relationship can be artificially set relationships. In the first preset feature relationship, among the behavior characteristics that match each other, there are similarities and complementarities. For example, a role with the second behavior characteristic can meet the requirements or expectations of a role with the first behavior characteristic. In the second preset feature relationship, emotional resonance can occur between the corresponding psychological characteristics. For example, a role with the second psychological characteristic is more likely to understand the feelings or needs of a role with the first psychological characteristic. Or, the first response portrait corresponding to the first user portrait can also be directly obtained by processing the first user portrait through the second large model.

[0061] Step 103: Based on the first response portrait, enable the first large model to generate a response to the question of the first user.

[0062] After determining the first response portrait corresponding to the first user portrait, the first response portrait is used as a portrait for the first large model to answer questions, so that the first large model generates a response to the question of the first user based on the first response portrait.

[0063] By sending the first response portrait to the first large model, the first large model understands based on the first response portrait. It can be understood that the first response portrait can include the characteristics of the role given to the first large model, and the characteristics of the role of the first large model can include the behavior characteristics, preference information, etc. given to the first large model.

[0064] After receiving the question from the first user, the first large model analyzes the question to identify the user's intention and the required information. After understanding the first response portrait and obtaining the intention of the user's question, the first large model can generate a response to the question of the first user in combination with the first response portrait. When the first large model responds to different users, as the user portraits of different users are different, the response portraits given to the first large model are also different. The first large model can adjust the response strategy and content for different users based on different response portraits. Here, the first large model can be a large language model (LLM) in the pre-trained model, which consists of a neural network with hundreds of millions or billions of parameters, is pre-trained on a large amount of text data, learns the complex patterns in the language data, and is capable of performing a wide range of natural language understanding and generation tasks.

[0065] For example, when the first user portrait is obtained as "anxious", the corresponding first response portrait is determined as "compassion". When the first user needs to understand the specific solution of the product, based on the first response portrait, the first large model may give a response such as "In this era full of changes and challenges, I understand that you may be experiencing various uncertainties. Here, I would like to share [product / service name] with you, a solution designed specifically for those seeking peace of mind and stability. We deeply understand that in times of anxiety, a reliable and caring partner is more precious than any flowery words. [Product / service name] starts from your needs and carefully creates a series of functions aimed at helping you relieve stress and regain inner peace. We provide [specific functions or advantages, such as '24-hour online support', 'personalized customization solutions', 'access to professional psychological counseling', etc.] to ensure that you can get timely and effective help at any time."

[0066] When the user portrait is "beginner", the corresponding first response portrait is determined as "expert". When the first user needs to understand the specific solution of the product, based on the first response portrait, the first large model may give a response such as "We know that when you first come into contact with [product or service area], you may feel a bit strange and confused. But rest assured, we fully understand the concerns and needs of you as a new user, and here, we are committed to making everything simple and easy to understand. Imagine if you could get started easily, without complex steps or professional knowledge, and enjoy the convenience and fun brought by [product or service]. That's exactly what we [product or service name] is striving for - to enable everyone to be the master of their own lives, enjoy the charm of technology without being an expert. Our team is always on standby. Whether it's through phone, online chat or face-to-face consultation, we are willing to provide you with one-on-one support until you are completely satisfied."

[0067] Corresponding to the example in step 101 above, after determining the first user portrait based on the first user's hobby information, the first response portrait corresponding to the first user portrait can be a portrait similar to the first user's hobbies. The first response portrait can accurately recommend product models that meet the first user's preferences to the first user based on the first user's hobbies.

[0068] Corresponding to the example in step 101 above, after determining the first user portrait based on the first user's consumption information, when the first user expects to purchase goods at a low price, the first response portrait corresponding to the first user portrait can include the characteristics of a promoter. The first response portrait can generate a purchase strategy that meets the low-price purchase demand for the first user according to the current sales strategy.

[0069] Corresponding to the example in step 101 above, when it is necessary to actively push products to the first user for product promotion, based on the first user portrait, when it is determined that the first user is a socially active user, the corresponding first response portrait can introduce the details and advantages of the product to be pushed to the first user from the perspective of social relationships, and introduce the promoting effect of the product on the first user's social relationships, etc.

[0070] It can be seen that based on the method given in the above steps, by determining the response portrait of the first large model based on the user portrait of the user, enabling the first large model to understand through the response portrait and respond to the user's questions based on the response portrait, it is possible to obtain responses that meet the user's needs, and at the same time generate response words that meet the user's emotions, and specifically achieve responses to the questions of different users. At the same time, by directly using the first large model combined with the response portrait for response, without further training of the large model, the response accuracy of the large model is improved, and the development cycle of the large model is reduced.

[0071] In practical applications, steps 101 to 103 can be implemented based on a processor, and the processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor.

[0072] In some embodiments, determining the first response portrait corresponding to the first user portrait based on the first user portrait includes: determining the first response portrait corresponding to the first user portrait in the corresponding relationship; wherein the corresponding relationship includes multiple second user portraits and the second response portrait corresponding to each second user portrait; the second response portrait is obtained by the second large model preprocessing the second user portrait through the first prompt.

[0073] Before performing an online response through the first large model, multiple different second user portraits obtained based on historical data, through the first prompt "prompt", and the second large model, can directly obtain the second response portrait corresponding to each second user portrait, thereby obtaining the corresponding relationship between the user portrait and the response portrait.

[0074] In the specific implementation process, when it is determined that the second user portrait is "beginner", based on the first prompt, for example: "Suppose you are a psychoanalysis and counseling expert. Based on the user portrait of 'beginner', the following is the response portrait you summarized", the second large model can generate the corresponding second response portrait of "expert" for the second user portrait of "beginner". Through the first prompt and the second large model, the second response portrait corresponding to each second user portrait is obtained, and the corresponding relationship between the user portrait and the response portrait is obtained. After obtaining the first user portrait corresponding to the first user based on step 101, the first response portrait corresponding to the first user portrait can be directly obtained based on the previously obtained corresponding relationship. In the specific implementation process, the first large model and the second large model can be the same model or different models.

[0075] In some embodiments, determining the first response portrait corresponding to the first user portrait in the corresponding relationship based on the first user portrait includes: determining the first similarity between the first user portrait and each second user portrait; determining the target second user portrait corresponding to the first user portrait through multiple first similarities; determining the target second response portrait corresponding to the target second user portrait in the corresponding relationship based on the target second user portrait; and using the target second response portrait as the first response portrait.

[0076] Since the characteristics of each user are different, the corresponding user portraits also vary. Among the multiple second user portraits obtained based on the above embodiments, there may not be a second user portrait that is exactly the same as the first user portrait. In this case, the first similarity between the first user portrait and each second user portrait can be calculated, and the target second user portrait can be determined based on the first similarity. For example, among the multiple first similarities, the target similarity with the first similarity greater than the first threshold can be determined, and the second user portrait corresponding to the target similarity can be used as the target second user portrait. Here, the first threshold can be determined based on empirical values or based on the first similarity. For example, when there are multiple first similarities greater than the first threshold, the second user portrait with the largest first similarity to the first user portrait can be determined as the target second user portrait, and the second response portrait corresponding to the target second user portrait can be used as the target second response portrait to obtain the first response portrait.

[0077] When each of the multiple first similarities is less than the first threshold, a prompt can be issued, and the answer to the first user's question can be provided manually. At the same time, the first user portrait of the first user can be recorded and analyzed, and the corresponding relationship can be updated based on the first user portrait and the first response portrait, so that in subsequent response processes, the response portrait corresponding to the user can be obtained based on the updated corresponding relationship to achieve subsequent responses.

[0078] In some embodiments, the above method of enabling the first large model to generate a response to the first user's question based on the first response portrait includes: in the case where it is necessary to retrieve data from an external database to answer the first user's question, the first external data can be obtained from the external database through the second prompt word; based on the first response portrait, the first large model can generate a response to the first user's question through the first external data.

[0079] In practical applications, for the first question raised by the first user, when the first large model cannot obtain an answer based on its own response ability and there is no knowledge required to answer the first question in the internal database, it is necessary to retrieve data from the external database to answer the first question. Here, the internal database refers to the database in the response system, and the first large model can directly generate an answer to the first user's question through the data in the internal database during the real-time conversation with the user. The external database refers to a database independent of the entire response system, and the external database can be the database of other systems different from the response system.

[0080] Combined with the method given in the above embodiments, in this case, the first large model can obtain the first external data based on methods such as the second prompt word and RAG, and based on the obtained first external data, combined with the first response portrait, generate an answer to the first user's question.

[0081] The embodiments of the present application provide a large model response method, which can generate a response portrait corresponding to the user portrait, so that the pre-trained first large model can directly obtain an accurate response to the user's question based on the response portrait. This improves the response efficiency of the large model, enables the large model to dynamically adjust the corresponding response portrait based on the user's portrait, and makes targeted responses to improve response accuracy.

[0082] The embodiments of the present application also provide a large model training method, as Figure 2 shown, Figure 2 which shows a flowchart of a large model training method. Figure 2 The large model training method shown includes:

[0083] Step 201: Train the first large model based on the training data set, so that the trained first large model can automatically generate responses to the questions corresponding to the first user portrait; the training data set includes the response portraits corresponding to the user portraits, the questions corresponding to the user portraits, and the responses corresponding to the questions.

[0084] In this embodiment, the first large model can also be trained to enable the first large model to automatically generate the first response portrait corresponding to the first user portrait according to the first user portrait, and automatically generate responses to the questions corresponding to the first user portrait based on the first response portrait.

[0085] In the specific training process, the training data set includes the response portraits corresponding to the user portraits, the questions corresponding to the user portraits, and the responses corresponding to the questions. The training data set may also include user portraits. Here, the responses corresponding to the questions in the training data set are obtained based on the response portraits corresponding to the user portraits. By combining the corresponding relationship between the user portraits and the response portraits, training the first large model can enable the first large model to directly obtain the response portraits corresponding to the user portraits, and generate responses to the questions corresponding to the user portraits by generating response portraits.

[0086] Based on the large model response method given in the above embodiments, in the specific implementation process, in order to improve the response ability of the first large model to common user portraits and fully combine the characteristics of historical response data with higher response accuracy, after the large model response is performed based on the method given in the above embodiments, in the historical response data, determine the historical portraits with the number of occurrences greater than the number threshold, and / or the historical portraits with the response accuracy greater than the accuracy threshold as the target historical portraits. Based on the questions and responses corresponding to the target historical portraits, as well as the user portraits and response portraits corresponding to the target historical portraits, construct a training dataset. Here, the historical portraits include at least one of historical user portraits and historical response portraits. Training the first large model based on the constructed training dataset can improve the response ability of the first large model for the first user portrait.

[0087] It can be seen that training the first large model with the training dataset constructed in this embodiment is beneficial to directly obtaining the response portrait corresponding to the user portrait by the trained first large model, and directly obtaining the response corresponding to the user question based on the response portrait, improving the large model response efficiency and response accuracy.

[0088] In practical applications, step 201 can be implemented based on a processor, and the processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0089] The embodiment of the present application also provides a large model response method for presetting the correspondence between user portraits and response portraits in an offline state, so that in the above process of online responding to user questions, the first response portrait corresponding to the first user can be determined through the preset correspondence. As Figure 3 shown, Figure 3 shows another flowchart of the large model response method, Figure 3 The large model response method shown includes:

[0090] Step 301: Obtain multiple different second user portraits.

[0091] Before performing an online response through the first large model, based on the method provided in this embodiment, multiple different second user portraits can be obtained from historical response data or other relevant data in the offline response state. Specifically, based on the method provided in step 101 above, by analyzing the characteristics of the second user through the second user's historical conversation records, historical click data, etc., the interests, hobbies, behavior patterns, etc. of the second user can be obtained. Through the characteristics of the second user, the characteristics of the second user can be further analyzed and integrated to obtain the portrait of the second user. In another implementation, based on the trained generation model, the second user portrait of the second user can be directly obtained based on the conversation of the second user.

[0092] Step 302: Based on the first prompt, obtain the second response portrait corresponding to each second user portrait through the second large model.

[0093] After obtaining multiple second user portraits, based on the first prompt and the second large model, the second response portrait corresponding to each second user portrait can be directly obtained. In the specific implementation process, when it is determined that the second user portrait is "beginner", based on the first prompt, for example: "Suppose you are a psychoanalysis and counseling expert. Based on the user portrait of 'beginner', the following is the response portrait you summarized", the second large model can generate the corresponding second response portrait of "expert" for the second user portrait of "beginner".

[0094] Step 303: Construct a corresponding relationship through each second user portrait and the second response portrait corresponding to each second user portrait.

[0095] Here, the corresponding relationship is used to determine the first response portrait corresponding to the first user portrait; the first response portrait is used to enable the first large model to respond to the question corresponding to the first user portrait.

[0096] It can be seen that by pre-analyzing the historical data of the user, presetting multiple second user portraits, and the second response portraits corresponding to each second user portrait, without model training, the corresponding relationship between the user portrait and the response portrait can be quickly established. Through the pre-established corresponding relationship, during the online response process, the first response portrait corresponding to the first user can be quickly obtained through the corresponding relationship, improving the response efficiency and response accuracy of the first large model.

[0097] In practical applications, steps 301 to 303 can be implemented based on a processor, and the processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0098] In some embodiments, after obtaining the second response portrait corresponding to each second user portrait based on the first prompt word, the method further includes: obtaining second external data corresponding to the second response portrait from an external database; based on a third prompt word, combining the second response portrait with the second external data through the second large model, and updating the second response portrait based on the combination result.

[0099] During the process of obtaining the second response portrait corresponding to the second user portrait, it is pre-judged whether the first large model needs to obtain external data when answering based on the second response portrait. Specifically, when it is determined that the second response portrait is "real-time", it is pre-judged that when the first large model answers questions based on the "real-time" portrait, more real-time information may be needed. In this case, it is necessary to re-obtain information from the external database to ensure the real-time nature of the data. When the second response portrait needs to refer to successful cases of the same historical second response portrait, the second response portrait can also be updated by obtaining external data. In summary, when it is determined that the second response portrait needs to obtain external data, the second external data corresponding to the second response portrait can be first obtained from the external database. Here, the external database refers to a database independent of the entire response system. The external database can be a database of other systems different from the response system, and the response system refers to a system for intelligent answering including the first large model and the second large model.

[0100] During the process of obtaining the second external data, the second external data can be specifically obtained based on methods such as a fourth prompt word and Retrieval-augmented Generation (RAG). When obtaining the second external data through the fourth prompt word, the query requirements can be accurately set in the fourth prompt word, such as time, specific events, etc., so that the second large model obtains the second external data based on the fourth prompt word. For example, by providing sufficient context information in the fourth prompt word, such as "Please query the policy of [event code] during the period from [start date] to [end date]", the second large model can accurately locate and query the relevant second external data. The second external data can also be obtained through RAG by using semantic understanding to retrieve the external database. Here, the fourth prompt word can be constructed based on the above-mentioned second prompt word.

[0101] After obtaining the second external data corresponding to the second response image, based on the third prompt, the second response image is combined with the corresponding second external data through the second large model to update the second response image. Specifically, the third prompt can be a direct association prompt, such as "Match [Feature X] in the second response image with [Field Y] in the second external data and update the value of [Feature X] in the second response image"; the third prompt can also be a comprehensive association prompt, such as "Combine multiple features [Feature X, Feature Y,...] in the second response image with relevant information in the second external data to update the second response image".

[0102] After updating the second response image, the updated second response image can be stored in the internal database. Here, the internal database represents the database in the response system. During the real-time conversation with the user, the first large model can directly generate a response to the question of the first user based on the data in the internal database.

[0103] When it is pre-judged that the first large model does not need to obtain external data when responding based on the second response image, that is, when it is pre-judged that the first large model can respond to the question of the second user portrait based on the pre-trained ability, the second user portrait and the corresponding second response image are directly stored in the internal database.

[0104] It can be seen that by combining the second response image with the corresponding second external data during the process of setting the correspondence relationship, the response image can be more accurately described and improved. At the same time, by combining the second response image with the second external data and storing the updated second user portrait in the internal database, the first large model can respond based on the updated second response image and combined with more comprehensive external data, improving the response efficiency and accuracy.

[0105] Based on the method given in the above embodiment Figure 4 A flowchart of the large model response is shown. Among them, the offline process means that before the first large model responds, first, through the second large model and the first prompt, the second response image corresponding to the second user portrait is obtained, and the correspondence relationship between the user portrait and the response image is obtained. Then, through the second large model and the second prompt, the second external data is obtained. Combining the method given in the above embodiment, the second external data is used to update part of the second response image, and finally the second response image corresponding to each second user portrait is obtained.

[0106] Figure 4The online process shown represents the process of answering the question of the first user through the first large model. After obtaining the corresponding relationship in the offline process, when the first user portrait is obtained during the online answering process, through the method given in the above embodiments, the first user portrait is matched with multiple second user portraits in the corresponding relationship to obtain the target second user portrait. Further, based on the target second response portrait corresponding to the target second user portrait, as the first response portrait corresponding to the first user portrait, the first large model answers the question of the first user based on the first response portrait. During the specific answering process, the prompt words corresponding to the question of the first user can be filled with the first user portrait, so that the first large model obtains the answer to the question of the first user based on the filled prompt words.

[0107] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order that constitutes any limitation to the implementation process, and the specific execution order of each step should be determined by its function and possible internal logic.

[0108] Based on the large model answering method proposed in the foregoing embodiments, the embodiments of the present application also provide a large model answering device, as Figure 5 shown, the large model answering device includes:

[0109] The first acquisition module 501 is configured to acquire the first user portrait corresponding to the first user.

[0110] The first processing module 502 is configured to determine the first response portrait corresponding to the first user portrait based on the first user portrait; the first response portrait is used to determine the characteristics of the answer of the first large model to the first user; based on the first response portrait, the first large model generates an answer to the question of the first user.

[0111] In practical applications, the first acquisition module 501 and the first processing module 502 can be implemented based on a processor and a communication device.

[0112] In some embodiments, the first processing module 502 is specifically configured to determine the first response portrait corresponding to the first user portrait in the corresponding relationship based on the first user portrait; wherein, the corresponding relationship includes multiple second user portraits and the second response portrait corresponding to each second user portrait; the second response portrait is obtained by the second large model preprocessing the second user portrait through the first prompt word.

[0113] In some embodiments, the first processing module 502 is specifically configured to determine the first similarity between the first user profile and each second user profile; determine the target second user profile corresponding to the first user profile based on the multiple first similarities; determine the target second response profile corresponding to the target second user profile in the corresponding relationship; and use the target second response profile as the first response profile.

[0114] In some embodiments, when it is necessary to retrieve data from an external database to respond to the question of the first user, the first processing module 502 is specifically configured to obtain first external data from the external database through a second prompt word; and based on the first response profile, enable the first large model to generate a response to the question of the first user through the first external data.

[0115] Based on the large model training method proposed in the foregoing embodiments, an embodiment of the present application further provides a large model training device, as Figure 6 shown, the large model training device includes:

[0116] A second acquisition module 601, configured to acquire a training data set.

[0117] A training module 602, configured to train the first large model based on the training data set, so that the trained first large model can automatically generate a response to the question corresponding to the first user profile; the training data set includes a response profile corresponding to the user profile, a question corresponding to the user profile, and a response corresponding to the question.

[0118] In practical applications, the second acquisition module 601 and the training module 602 are implemented based on a processor and a communication device.

[0119] Based on the large model response method proposed in the foregoing embodiments, an embodiment of the present application further provides another large model response device, as Figure 7 shown, the large model response device includes:

[0120] A third acquisition module 701, configured to acquire multiple different second user profiles.

[0121] A second processing module 702, configured to obtain a second response profile corresponding to each second user profile through a second large model based on a first prompt word; construct a corresponding relationship through each second user profile and the second response profile corresponding to each second user profile; the corresponding relationship is used to determine the first response profile corresponding to the first user profile; the first response profile is used to enable the first large model to respond to the question corresponding to the first user profile.

[0122] In practical applications, the second acquisition module 701 and the second processing module 702 can be implemented based on a processor and a communication device.

[0123] In some embodiments, after obtaining the second response portrait corresponding to each second user portrait through the second large model based on the first prompt word, the second acquisition module 701 is further configured to obtain the second external data corresponding to the second response portrait in an external database; the second processing module 702 is further configured to combine the second response portrait with the second external data through the second large model based on the third prompt word, and update the second response portrait according to the combination result.

[0124] It should be noted that the description of the above device embodiments is similar to that of the above method embodiments, and has similar beneficial effects to those of the same method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0125] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a terminal, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), magnetic disks, or optical discs that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0126] The embodiments of the present application further provide an electronic device. Figure 8 As shown in the schematic composition diagram of an electronic device provided by the embodiments of the present application, Figure 8 as shown, the electronic device 80 may include:

[0127] A memory 801 for storing executable instructions.

[0128] A processor 802, when executing the executable instructions stored in the memory 801, implements any of the above large model response methods and large model training methods.

[0129] The above processor 802 may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0130] The above-mentioned computer-readable storage medium or memory 801 can be a read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; it can also be various terminals including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0131] The embodiments of the present application further provide a computer storage medium, on which computer-executable instructions are stored, and the computer-executable instructions are used to implement any one of the large model response methods and large model training methods provided in the above embodiments.

[0132] Correspondingly, the embodiments of the present application further provide a computer program product, which includes computer-executable instructions, and the computer-executable instructions are used to implement any one of the large model response methods and large model training methods provided in the above embodiments.

[0133] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the methods described in the method embodiments above. Its specific implementation can refer to the description of the method embodiments above. For the sake of brevity, it will not be repeated here.

[0134] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated in this article.

[0135] The methods disclosed in the method embodiments provided in the present application can be arbitrarily combined without conflict to obtain new method embodiments.

[0136] The features disclosed in the product embodiments provided in the present application can be arbitrarily combined without conflict to obtain new product embodiments.

[0137] The features disclosed in each method or device embodiment provided by the present application can be combined arbitrarily without conflict to obtain a new method embodiment or device embodiment.

[0138] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0139] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims. All of these are within the protection scope of the present application.

Claims

1. A large model response method, characterized in that, The method includes: Obtain a first user portrait corresponding to a first user; Based on the first user portrait, determine a first response portrait corresponding to the first user portrait; the first response portrait is used to determine the characteristics of the response of the first large model to the first user; Based on the first response portrait, cause the first large model to generate a response to the question of the first user.

2. The method according to claim 1, wherein The determining, based on the first user portrait, the first response portrait corresponding to the first user portrait includes: Based on the first user portrait, in the correspondence relationship, determine the first response portrait corresponding to the first user portrait; wherein, the correspondence relationship includes a plurality of second user portraits, and a second response portrait corresponding to each second user portrait; the second response portrait is obtained by the second large model pre-processing the second user portrait through a first prompt.

3. The method according to claim 2, characterized in that, The determining, based on the first user portrait, the first response portrait corresponding to the first user portrait in the correspondence relationship includes: Determine the first similarity between the first user portrait and each second user portrait; Determine the target second user portrait corresponding to the first user portrait through a plurality of first similarities; Based on the target second user portrait, determine the target second response portrait corresponding to the target second user portrait in the correspondence relationship; Use the target second response portrait as the first response portrait.

4. The method according to any one of claims 1 to 3, characterized in that, The causing the first large model to generate a response to the question of the first user based on the first response portrait includes: In the case where it is necessary to retrieve data from an external database to respond to the question of the first user, obtain first external data from the external database through a second prompt; based on the first response portrait, cause the first large model to generate a response to the question of the first user through the first external data.

5. A large model training method, characterized in that, The method includes: Train the first large model based on a training data set so that the trained first large model can automatically generate a response to a question corresponding to the first user portrait; the training data set includes a response portrait corresponding to the user portrait, the question corresponding to the user portrait, and the response corresponding to the question.

6. A large model response method, characterized in that, The method includes: Obtain a plurality of different second user portraits; Based on a first prompt, obtain a second response portrait corresponding to each second user portrait through a second large model; Construct a correspondence relationship through each second user portrait and the second response portrait corresponding to each second user portrait; the correspondence relationship is used to determine the first response portrait corresponding to the first user portrait; the first response portrait is used to cause the first large model to respond to the question corresponding to the first user portrait.

7. A large model response device, characterized in that, The apparatus includes: A first acquisition module, configured to acquire a first user portrait corresponding to a first user; A first processing module, configured to determine a first response portrait corresponding to the first user portrait based on the first user portrait; the first response portrait is used to determine the characteristics of the response of the first large model to the first user; based on the first response portrait, cause the first large model to generate a response to the question of the first user.

8. An electronic device, characterized in that, The electronic device includes a processor and a memory for storing a computer program that can run on the processor; wherein, The processor is configured to run the computer program to execute the method according to any one of claims 1 to 6.

9. A computer storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.