Intelligent agent recommendation method and device based on large model and electronic equipment

Through the large-model-based agent recommendation method, input information is obtained, intention categories are determined, the agent recommendation needs are detected, the target agent is determined and the recommendation text is generated, which solves the problem of inaccurate agent recommendation in the existing technology, and efficient and natural agent recommendation is achieved, and the user experience is improved.

CN119622092APending Publication Date: 2025-03-14BAIDU COM TIMES TECH (BEIJING) CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411700155.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively recommend agents, especially when dealing with complex tasks and diverse user needs, and lacks accurate agent matching and recommendation mechanisms.

Method used

Through the agent recommendation method based on the big model, input information is obtained, its intention category is determined, the agent recommendation needs are detected, the target agent is determined, and recommendation text is generated to achieve accurate recommendation of the agent.

Benefits of technology

It improves the accuracy and naturalness of agent recommendations, makes dialogue guidance more natural, improves user experience, and adapts to the agent recommendation needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622092A_ABST
    Figure CN119622092A_ABST
Patent Text Reader

Abstract

The invention discloses an agent recommendation method and device based on a large model and electronic equipment, and relates to the technical field of computers, in particular to the field of artificial intelligence such as large models, agents and natural language processing. According to the specific implementation scheme, input information is obtained; determining an intention category to which the input information belongs; according to the intention category, detecting an agent recommendation demand in the input information; in response to the detected agent recommendation demand, determining a target agent according to the intention category; and generating a recommendation text of the target agent according to the description information of the target agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, in particular to artificial intelligence fields such as large models, intelligent agents, and natural language processing, and specifically to an intelligent agent recommendation method, device, and electronic device based on a large model. Background Art

[0002] A big model refers to a machine learning model with large-scale parameters and complex computing structures, which can process massive amounts of data and complete various complex tasks, such as natural language processing, computer vision, and speech recognition. With the development of big model technology, big models have shown powerful capabilities in areas such as dialogue generation and text creation. Summary of the invention

[0003] The present application provides a method, device and electronic device for recommending an intelligent agent based on a large model.

[0004] According to one aspect of the present application, a method for recommending an intelligent agent based on a large model is provided, comprising:

[0005] Get input information;

[0006] Determining the intent category to which the input information belongs;

[0007] Detecting agent recommendation needs in input information based on the intent category;

[0008] In response to detecting an agent recommendation demand, determining a target agent according to the intent category;

[0009] Generate a recommendation text for the target intelligent agent according to the description information of the target intelligent agent.

[0010] According to another aspect of the present application, there is provided an agent recommendation device based on a large model, comprising:

[0011] An acquisition module is used to obtain input information;

[0012] An intent classification module, used to determine the intent category to which the input information belongs;

[0013] A detection module, configured to detect agent recommendation requirements in the input information according to the intent category;

[0014] A determination module, configured to determine a target agent according to the intent category in response to detecting an agent recommendation requirement;

[0015] The first generating module is used to generate a recommendation text for the target intelligent agent according to the description information of the target intelligent agent.

[0016] According to another aspect of the present application, there is provided an electronic device, including:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the method described in the above embodiment.

[0020] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method according to the above embodiment.

[0021] According to another aspect of the present application, a computer program product is provided, including a computer program, wherein the computer program implements the steps of the method described in the above embodiment when executed by a processor.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0024] Figure 1 A schematic diagram of a flow chart of a large model-based agent recommendation method provided in one embodiment of the present application;

[0025] Figure 2 A schematic diagram of a flow chart of an agent recommendation method based on a large model provided in another embodiment of the present application;

[0026] Figure 3 A schematic diagram of a flow chart of an agent recommendation method based on a large model provided in another embodiment of the present application;

[0027] Figure 4 A schematic diagram of the overall process of agent recommendation based on a large model provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of an agent selection process provided in an embodiment of the present application;

[0029] Figure 6 A schematic diagram of a large model application program interface provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of an intelligent agent recommendation device based on a large model provided in one embodiment of the present application;

[0031] Figure 8 It is a block diagram of an electronic device used to implement the large model-based intelligent agent recommendation method of an embodiment of the present application. DETAILED DESCRIPTION

[0032] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0033] In the technical solution of this application, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0034] The following describes the large model-based agent recommendation method, device, electronic device and storage medium of an embodiment of the present application with reference to the accompanying drawings.

[0035] An agent is a software, hardware or other entity with autonomous and adaptive capabilities. Its goal is to recognize and simulate human intelligent behavior. An agent can be regarded as a computing entity that can function continuously and autonomously and interact with the environment. It has characteristics such as residence, responsiveness, sociality and initiative. Agents have broad application prospects in the field of artificial intelligence.

[0036] In some embodiments, when a conversation is conducted using a large model, an intelligent agent may be introduced to make the conversation more vivid.

[0037] Figure 1 A flowchart of a large model-based agent recommendation method provided in one embodiment of the present application.

[0038] The large model-based intelligent agent recommendation method of the embodiment of the present application can be executed by the large model-based intelligent agent recommendation device of the embodiment of the present application, and the device can be configured in an electronic device.

[0039] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0040] like Figure 1As shown, the agent recommendation method based on the large model includes:

[0041] Step 101, obtaining input information.

[0042] In this application, the user can input information in the dialogue interface of the large model application, so that the server can obtain the user's input information. The input information may include but is not limited to text, voice, pictures, etc., which are not limited to this.

[0043] For example, the input information may be "a landscape painting with a waterfall, a boat on the river, people rowing, birds flying in the sky, and trees on the mountain."

[0044] Step 102, determining the intent category to which the input information belongs.

[0045] As a possible implementation method, a preset trained intent classification model can be used to perform intent classification on the input information to determine the intent category to which the input information belongs.

[0046] For example, the intent classification model is an initial intent classification model with a model structure of BERT (Bidirectional Encoder Representations from Transformers), which is trained with the following five intent categories: "text creation", "picture creation", "language", "chat dialogue", and "knowledge question and answer" as labels. Assuming that the input information is "landscape painting, there is a waterfall, there is a boat on the river, someone rowing, there are birds flying in the sky, and there are trees on the mountain", the input information is input into the intent classification model, and it can be determined that the input information belongs to picture creation among the five intent categories.

[0047] Exemplarily, the intent classification model can use a multi-head network structure to perform intent classification. The multi-head structure with parameter sharing can effectively reduce network parameters and improve the model representation capability.

[0048] Therefore, using a pre-trained intent classification model to classify the input information by intent can improve the accuracy of intent classification.

[0049] As a possible implementation method, the discrimination conditions for each intent category can be set in advance, and the input information can be matched with the discrimination conditions for each intent category to determine whether the input information meets the discrimination conditions of the preset intent category. If the input information meets the discrimination conditions of one of the intent categories, the intent category can be determined as the intent category to which the input information belongs.

[0050] For example, the discrimination condition of the intent category "picture creation" is that the input information includes the keyword "draw a picture", or the phrase "draw a picture", or the phrase "draw xx picture". Assuming that the input information is "draw a landscape painting", the input information meets the discrimination condition of the intent category "picture creation", then the intent category of the input information is "picture creation".

[0051] For example, the discriminant condition for the intent category is the matching of the input information with the discriminant of the intent category. Assume that the corresponding relationship between the intent category "picture creation" and the discriminant is [draw a picture of xxx, picture creation], and the corresponding relationship between the intent category "language category" and the discriminant is [xxx chatting in English, language category]. If the input information matches the discriminant "draw a picture of xxx" of the intent category "picture creation", it can be determined that the intent category of the input information is "picture creation".

[0052] Therefore, by using the preset intention category discrimination conditions to determine the intention category to which the input information belongs, the amount of calculation can be reduced and resources can be saved.

[0053] Step 103, detect the agent recommendation requirements in the input information according to the intent category.

[0054] In this application, the input information can be used for intent recognition to determine the user's intent, and then the need to detect intelligent agent recommendations in the input information can be determined based on the intent category and the user's intent.

[0055] For example, if the input information is "I feel bad and want to chat with my sister", the user's intention is to have a conversation with a sister-like character. The input information is classified and the intention category is determined to be a small talk conversation. Based on the user's intention and the intention category of the input information, the recommendation demand for a sister-like agent can be detected in the input information. Here, the sister-like agent can be understood as an agent that plays the role of a sister.

[0056] Step 104, in response to detecting an agent recommendation requirement, determining a target agent according to the intent category.

[0057] In the present application, if a need for agent recommendation is detected in the input information, then the agent to be recommended to the user can be determined based on the intent category to which the input information belongs, that is, the target agent can be determined.

[0058] Exemplarily, different intent categories have corresponding agents, and the target agent can be determined from the agents corresponding to the intent category to which the input information belongs. The agent corresponding to the intent category is an agent associated with the intent category and capable of completing the intent category task.

[0059] For example, the agents corresponding to the intent category "picture creation" include "ancient style", "comic style", "sketch style", "realistic style", "natural dream style", etc.

[0060] Optionally, if no agent recommendation requirement is detected in the input information, the input information can be processed using a large model to generate a reply text for the input information and display the reply text to the user.

[0061] Step 105: Generate a recommendation text for the target agent based on the description information of the target agent.

[0062] In the present application, the description information of the agent may include information used to describe the functions of the agent, and prompt information may be generated based on input information, description information of the target agent, etc. The prompt information may be input into the big model, and the big model may be used to generate recommendation text for the target agent.

[0063] In an embodiment of the present application, by determining the intent category to which the input information belongs, the need for agent recommendation is detected in the input information based on the intent category. If the need for agent recommendation is detected, the agent to be recommended is determined based on the intent category to which the input information belongs. By determining the agent to be recommended based on the intent category to which the input information belongs, the accuracy of agent recommendation can be improved, and based on the description information of the target agent, a recommendation text for the target agent is generated, thereby guiding the conversation content through the recommendation text, which can make the conversation guidance more natural and improve the user experience.

[0064] Figure 2 A flowchart of a large model-based agent recommendation method provided in accordance with another embodiment of the present application.

[0065] like Figure 2 As shown, the agent recommendation method based on the large model includes:

[0066] Step 201, obtaining input information.

[0067] In the present application, step 201 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0068] Step 202, determining the intent category to which the input information belongs.

[0069] In the present application, step 202 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0070] Since some intent categories are easy to distinguish, illustratively, the discrimination conditions of some intent categories can be pre-set, and the input information can be matched with the discrimination conditions of the preset intent categories first, wherein the preset intent categories can be one or more, and there is no limitation on this. If the input information meets the discrimination conditions of a preset intent category, the preset intent category can be determined as the intent category to which the input information belongs. If the input information does not meet the discrimination conditions of the preset intent category, the intent classification model is used to classify the input information to determine the intent category to which the input information belongs. Among them, the classification categories of the intent classification model include all intent categories including the preset intent categories.

[0071] Therefore, we can first use the preset intent category discrimination conditions to determine whether the intent category to which the input information belongs is the preset intent category. If not, we can then use the intent classification model to determine the intent category to which the input information belongs. This can not only save computing resources but also improve the accuracy of intent classification.

[0072] Step 203, based on the intent category, detect the agent recommendation requirement.

[0073] In the present application, step 203 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0074] Step 204, in response to detecting an agent recommendation demand, using an agent classification model corresponding to the intent category to obtain the probability of an agent associated with the intent category.

[0075] In the present application, each intent category has a corresponding intelligent agent, that is, each intent category has an associated intelligent agent, and for each intent category, an intelligent agent classification model corresponding to each intent category can be pre-trained.

[0076] If the need for agent recommendation is detected in the input information, the input information can be input into the agent classification model corresponding to the intent category, and the probability of the agent associated with the intent category can be obtained by using the agent classification model corresponding to the intent category. The higher the probability of the associated agent, the higher the matching degree between the input information and the associated agent.

[0077] Exemplarily, the intelligent agent classification model can use a multi-head network structure for multi-label classification. The multi-head structure with parameter sharing can effectively reduce network parameters and improve the model representation capability.

[0078] For example, the intent category to which the input information belongs is "picture creation", and the agents associated with the intent category "picture creation" include "ancient style", "comic style", "sketch style", "realistic style", and "natural fantasy style". By inputting the input information into the agent classification model corresponding to the intent category "picture creation", the probabilities of the five agents "ancient style", "comic style", "sketch style", "realistic style", and "natural fantasy style" output by the agent classification model can be obtained.

[0079] Step 205 , in response to the probability of any associated agent being greater than a preset threshold, determining a target agent based on any associated agent.

[0080] In the present application, if the probability of any associated agent among the agents associated with the intent category to which the input information belongs is greater than a preset threshold, the target agent can be determined based on the associated agent. Exemplarily, if there is one associated agent with a probability greater than the preset threshold, the associated agent can be determined as the target agent, and if there are multiple associated agents with a probability greater than the preset threshold, the associated agent with the highest probability can be determined as the target agent.

[0081] Step 206 , in response to the probabilities of the associated agents being all less than a preset threshold, a first candidate agent is obtained according to the input information, and a target agent is determined from the first candidate agents.

[0082] In the present application, if the probabilities of the agents associated with the intent category to which the input information belongs are all less than a preset threshold, it can be considered that the specific agent cannot be accurately matched. Then, an agent search can be performed based on the input information to obtain the first candidate agent, and the target agent can be determined from the first candidate agents.

[0083] As a possible implementation method, the first similarity between the input information and the description information of the agent associated with the intent category to which the input information belongs can be calculated, and based on the first similarity, the first candidate agent can be determined from the highly associated agents. For example, a preset number of agents with the highest first similarities among the associated agents can be selected as the first candidate agents.

[0084] Exemplarily, the input information may be vectorized to obtain a first vector of the input information, the description information of the associated intelligent agent may be vectorized to obtain a second vector, and the first similarity may be determined based on the distance between the first vector and the second vector.

[0085] Exemplarily, the description information of the agent associated with each intent category can be vectorized and stored in a vector library, and the first candidate agent can be retrieved from the vector library according to the vector of the input information. In other words, the first candidate agent can be recalled through vector retrieval.

[0086] Therefore, based on the similarity between the input information and the description information of the agent associated with the intention category, the first candidate agent can be recalled from the associated agents, thereby improving the accuracy of agent recall.

[0087] Exemplarily, historical evaluation information, historical recommendation information, etc. of the first candidate intelligent agent can be obtained, and the recommendation score of the first candidate intelligent agent can be determined based on the first similarity, historical evaluation information and historical recommendation information of the first candidate intelligent agent. The first candidate intelligent agent with the highest recommendation score can be used as the target intelligent agent.

[0088] Among them, the historical evaluation information of the first candidate intelligent agent may include but is not limited to the number of likes, dislikes, praises, and criticisms received by the first candidate intelligent agent.

[0089] Among them, the historical recommendation information of the first candidate agent may include the number of times the first candidate agent is recommended to the current user.

[0090] For example, the recall score can be determined based on the first similarity of the first candidate agent, and then the recommendation score of the first candidate agent can be determined based on the recall score, the number of likes, the number of dislikes, and the number of times the first candidate agent is recommended to the current user. For example, the recommendation score of the first candidate agent can be calculated using the following formula (1):

[0091] R score =P score *(L number -C number )*w1-H number *w2(1)

[0092] Among them, R score represents the recommendation score, P score represents the recall score, L number Indicates the number of likes, C number Indicates the number of thumbs-downs, H number It indicates the number of times it is recommended to the current user, and w1 and w2 indicate the weights.

[0093] Therefore, based on the first similarity between the input information and the description information of the first candidate agent, combined with the historical evaluation information and historical recommendation information of the first candidate agent, the target agent is screened out from the first candidate agents, thereby improving the accuracy of agent recommendation.

[0094] As another possible implementation method, the input information can be segmented to obtain the segmented words contained in the input information and determine the weights of the segmented words. Based on the weights of the segmented words, a target segmented word can be determined from the segmented words contained in the input information. Based on the target segmented word, an agent search is performed in the inverted index from keywords to agents to obtain the first candidate agent.

[0095] Exemplarily, a set number of segmentations with the highest weights among the segmentations included in the input information may be used as target segmentations.

[0096] Exemplarily, if the weight of each segmentation word is greater than the weight threshold, a set number of segmentations with the highest weight among the segmentations contained in the input information are used as target segmentations.

[0097] Exemplarily, the agent corresponding to the target segmentation can be used as the first candidate agent. If there are multiple target segmentations, the agents recalled by the multiple target segmentations can be deduplicated and the deduplicated agents can be used as the first candidate agent.

[0098] Therefore, based on the weight of the word segmentation of the input information, the first candidate agent is retrieved through the inverted index, which improves the accuracy of the recall.

[0099] When determining the target intelligent agent, the recommendation score of the first candidate intelligent agent can be determined based on the inverted index score, historical evaluation information and historical recommendation information of the first candidate intelligent agent, and the first candidate intelligent agent with the highest recommendation score can be determined as the target intelligent agent.

[0100] Among them, the inverted index score can be determined according to the number of times the first candidate agent is recalled by the target word segmentation.

[0101] For example, the input information is "I am in a bad mood and want to chat with my intimate sister", the target word segmentation includes "intimate" and "sister", the word segmentation "intimate" recalls the agent "intimate sister", and the word segmentation "sister" also recalls the agent "intimate sister", then the inverted index score of the agent "intimate sister" is 2.

[0102] Exemplarily, the inverted index score of the first candidate agent can be used as the recall score of the first candidate agent, and then the recommendation score of the first candidate agent can be calculated using the above formula (1) based on the recall score of the first candidate agent, the number of likes, the number of dislikes, and the number of times it has been recommended to the current user.

[0103] Therefore, according to the inverted index score of the first candidate agent, combined with the historical evaluation information and historical recommendation information of the first candidate agent, the target agent is screened out from the first candidate agents, thereby improving the accuracy of agent recommendation.

[0104] As another possible implementation, a second candidate agent can be determined from agents associated with the intent category to which the input information belongs according to the first similarity, and an agent search is performed in the inverted index from keywords to agents according to the target segmentation to obtain a third candidate agent, and then the second candidate agent and the third candidate agent are merged to obtain the first candidate agent. In other words, the agent recalled based on vector retrieval and the agent recalled based on inverted index can be used as the final recalled agent.

[0105] Therefore, the accuracy of agent recall can be improved by recalling agents based on vector retrieval and inverted index.

[0106] Exemplarily, the vector recall score can be determined based on the similarity of the first candidate agent, the recall score of the first candidate agent can be determined based on the vector recall score and inverted index score of the first candidate agent, and then the fourth candidate agent can be determined from the first candidate agents based on the recall score of the first candidate agent, and then the recommendation score of the fourth candidate agent can be determined based on the recall score of the fourth candidate agent, the historical evaluation information of the fourth candidate agent, and the historical recommendation information of the fourth candidate agent, and the fourth candidate agent with the highest recommendation score can be used as the target agent.

[0107] For example, the recall score of the first candidate agent can be calculated using formula (2) based on the vector recall score and inverted index score of the first candidate agent:

[0108] P score =embedding_score*w3+keyword_score*w4(2)

[0109] Among them, embedding_score represents the vector recall score, keyword_score represents the inverted index score, and w3 and w4 represent weights.

[0110] For example, if agent A is recalled by vector retrieval but not by inverted index, the inverted index score of agent A can be set to zero, and if agent B is recalled by inverted index but not by vector retrieval, the vector recall score of agent B can be set to zero.

[0111] Therefore, based on the similarity and inverted index score of the first candidate agent, the recall score of the first candidate agent is determined, and the fourth candidate agent is screened out based on the recall score. Then, based on the recall score of the fourth candidate agent and combined with the historical evaluation information and historical recommendation information of the fourth candidate agent, the final agent to be recommended is screened out, thereby improving the accuracy of agent recommendation.

[0112] Step 207: Generate a recommendation text for the target agent based on the description information of the target agent.

[0113] In the present application, step 207 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0114] For example, the macro model can be used to process the input information, generate a reply text for the input information, generate reply information based on the reply text, the target agent, and the recommended text of the target agent, and display the reply information to the user. Thus, while displaying the reply text of the macro model to the input information to the user, the recommended agent and the recommended text can be displayed to the user, so that the user can directly use the recommended agent.

[0115] In the embodiment of the present application, by using the agent classification model corresponding to the intent category, the probability of the agent associated with the intent category is determined. If the probability of the associated agent is greater than the preset threshold, the target agent can be directly determined, thereby improving the accuracy and efficiency of the agent recommendation. If the probability of the associated agents is less than the preset threshold, when the agent classification model cannot match a specific agent, the agent retrieval and selection can be used to determine the final agent to be recommended, thereby expanding the scope of application. Furthermore, different intent categories have corresponding agent classification models, which can meet the agent recommendation needs of different scenarios.

[0116] Figure 3 A flowchart of a large model-based agent recommendation method provided in accordance with another embodiment of the present application.

[0117] like Figure 3 As shown, the agent recommendation method based on the large model includes:

[0118] Step 301, obtaining input information.

[0119] Step 302, determining the intent category to which the input information belongs.

[0120] Step 303, detect the agent recommendation requirements in the input information according to the intent category.

[0121] In the present application, steps 301 to 303 may be implemented in any of the embodiments of the present application, and therefore will not be described in detail here.

[0122] Step 304, in response to detecting an agent recommendation requirement, determining a second similarity between the input information and the description information of each agent in the agent library.

[0123] Among them, the intelligent agent library can include intelligent agents associated with each intent category.

[0124] In this application, if an agent recommendation requirement is detected in the input information, a second similarity between the input information and the description information of each agent in the agent library can be calculated. The calculation method of the second similarity is similar to the calculation method of the first similarity, so it will not be repeated.

[0125] Step 305: Determine a fifth candidate agent from the agent library according to the second similarity.

[0126] Exemplarily, an agent in the agent library whose second similarity is greater than a similarity threshold may be used as the fifth candidate agent.

[0127] For example, the agents in the agent library may be sorted in descending order according to the second similarity, and a preset number of agents with the highest sorting results may be used as the fifth candidate agents. For example, the top five agents may be used as the fifth candidate agents.

[0128] Step 306, determining a target agent from the fifth candidate agents based on the matching degree between the intention category and the fifth candidate agent.

[0129] Exemplarily, the fifth candidate agent with the highest matching degree with the intent category may be selected as the target agent.

[0130] Exemplarily, the target agent can be determined from the candidate agents based on the degree of match between the intent category and the fifth candidate agent, combined with the historical evaluation information and historical recommendation information of the fifth candidate agent.

[0131] Step 307: Generate a recommendation text for the target agent based on the description information of the target agent.

[0132] In the present application, step 307 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.

[0133] In an embodiment of the present application, if a need for agent recommendation is detected in determining input information, a fifth candidate agent can be first retrieved from the agent library, and then the target agent can be determined from the fifth candidate agents based on the degree of match between the intent category and the fifth candidate agent, so that the agent to be recommended matches the intent category, thereby improving the accuracy of the agent recommendation.

[0134] In one embodiment of the present application, the above-mentioned determination of the target intelligent agent based on the intent category can also be achieved by the following method: performing word segmentation processing on the input information and determining the key words in the input information, recalling the sixth candidate intelligent agent through the inverted index based on the key words, and then determining the target intelligent agent from the sixth candidate intelligent agent based on the matching degree between the intent category and the sixth candidate intelligent agent.

[0135] In one embodiment of the present application, after obtaining the input information, it can be determined whether the input information meets the preset requirements. If the input information meets the preset requirements, the agent associated with the preset requirements can be directly recommended to the user. For example, if the input information meets a certain business requirement, the agent associated with the business requirement can be directly recommended to the user.

[0136] In order to facilitate the understanding of the agent recommendation method based on the large model of this application, Figure 4 , Figure 5 , Figure 6 Provide explanation. Figure 4 A schematic diagram of the overall process of agent recommendation based on a large model provided in an embodiment of the present application, Figure 5 A schematic diagram of an agent selection process provided in an embodiment of the present application, Figure 6 A schematic diagram of a large model application program interface provided in an embodiment of the present application.

[0137] like Figure 4 As shown, the input information can be first classified and identified for intent, for example, the intent categories can include painting, document processing, teaching, etc. If it is determined based on the intent category of the input information that no agent recommendation requirement is detected in the input information, the reply text for the input information can be directly displayed. If the agent recommendation requirement is detected, agent selection can be performed to select the agent to be recommended, wherein the agent selection includes recall and sorting, and the reply text, recommended text and the agent to be recommended are displayed to the user. If no agent to be recommended is selected, the reply text can be directly displayed.

[0138] like Figure 5 As shown in the figure, the agent selection process is as follows:

[0139] Step 501, obtaining input information.

[0140] Step 502, determine whether the number of words in the input information is greater than the preset number of words. If it is greater than the preset number of words, return null, that is, there is no agent to be recommended; otherwise, execute step 503.

[0141] For example, the preset word count is 30, and if the word count of the input information is less than 30, step 503 is executed.

[0142] Step 503, retrieve and recall.

[0143] In this embodiment, the agent can be recalled through retrieval. Figure 6 Shown in FIG. 1 is the recall of agents through vector retrieval and inverted index.

[0144] Step 504, vectorize the input information.

[0145] Step 505, vectorize the description information of the agent.

[0146] In this embodiment, the description information of the agent associated with each intent category in the agent library can be vectorized and then stored in the vector library to facilitate vector retrieval.

[0147] Step 506, vector indexing.

[0148] In this embodiment, the similarity between the input information and each agent in the agent library can be calculated based on the vector of the input information and all the vectors in the vector library, or the similarity between the input information and the associated agent can be calculated based on the vector of the description information of the agent associated with the intent category to which the input information belongs. Then, based on the similarity, the search result of the vector search is obtained.

[0149] Step 507: Check whether the word segmentation weights of the input information are all greater than the weight threshold. If they are all greater than the weight threshold, execute step 509; otherwise, do not recall the agent.

[0150] Step 508: extract keywords from the input information.

[0151] Step 509, searching the agent in the inverted index by using the keywords of the input information.

[0152] In this embodiment, the agent can be retrieved in the inverted index from keywords to agents based on the keywords of the input information.

[0153] Step 510, sort the search results.

[0154] In this embodiment, the recall scores of the retrieved agents may be calculated, and the retrieved agents may be sorted in descending order according to the recall scores.

[0155] Step 511, whether the recall score is greater than the score threshold. If the recall score is greater than the score threshold, execute step 512. If the recall score of the agent is less than or equal to the score threshold, return null.

[0156] Step 512, obtaining related agents.

[0157] In this application, the relevant agents here refer to agents whose recall scores are greater than the score threshold.

[0158] Step 513, select an agent.

[0159] In this embodiment, an agent can be selected as the agent recommended to the user based on the recall score of the relevant agent combined with the historical evaluation information, historical recommendation information, etc. of the relevant agent.

[0160] for example, Figure 6 In the example, the user inputs “what can anime-style avatar do” in the large model application interface, and based on the above method, it is determined that the intelligent agent to be recommended is “anime-style avatar”, then the recommendation text “looking for anime avatar generation tools.... try various anime styles” can be generated, and the reply text “dynamic style avatars can be used to show... interesting ways!”, the recommendation text “looking for anime avatar generation tools.... try various anime styles” and the intelligent agent to be recommended “anime-style avatar” are displayed in the interface.

[0161] In order to implement the above embodiment, the embodiment of the present application also proposes an intelligent agent recommendation device based on a large model. Figure 7 A schematic diagram of the structure of an intelligent agent recommendation device based on a large model provided in one embodiment of the present application.

[0162] like Figure 7 As shown, the intelligent agent recommendation device 700 based on the large model includes:

[0163] An acquisition module 710 is used to acquire input information;

[0164] An intent classification module 720, for determining the intent category to which the input information belongs;

[0165] A detection module 730, for detecting agent recommendation requirements in input information according to the intent category;

[0166] A determination module 740 is used to determine a target agent according to the intent category in response to detecting an agent recommendation requirement;

[0167] The first generating module 750 is used to generate a recommendation text of the target agent according to the description information of the target agent.

[0168] Optionally, the determination module 740 is configured to:

[0169] Using the agent classification model corresponding to the intent category, the probability of the agent associated with the intent category is obtained;

[0170] In response to a probability of any associated agent being greater than a preset threshold, determining a target agent based on any associated agent;

[0171] In response to the probabilities of the associated agents being all less than a preset threshold, obtaining a first candidate agent according to the input information;

[0172] A target agent is determined from the first candidate agents.

[0173] Optionally, the determination module 740 is configured to:

[0174] Determining a first similarity between the input information and the description information of the associated agent;

[0175] According to the first similarity, a first candidate agent is determined from the associated agents.

[0176] Optionally, the determination module 740 is configured to:

[0177] Perform word segmentation processing on the input information to obtain each word segmentation contained in the input information;

[0178] Determine the weight of the segmentation;

[0179] According to the weight, determine the target participle from each participle;

[0180] According to the target word segmentation, the agent is retrieved in the inverted index from keywords to agents to obtain the first candidate agent.

[0181] Optionally, the determination module 740 is configured to:

[0182] Determining a first similarity between the input information and the description information of the associated agent;

[0183] Determine a second candidate agent from the associated agents based on the first similarity;

[0184] Segment the input information to obtain each segmentation contained in the input information;

[0185] Determine the weight of the segmentation;

[0186] According to the weight of the segmentation, the target segmentation is determined from each segmentation;

[0187] According to the target segmentation, an agent is retrieved in the inverted index from keywords to agents to obtain a third candidate agent;

[0188] According to the second candidate agent and the third candidate agent, the first candidate agent is obtained.

[0189] Optionally, the determination module 740 is configured to:

[0190] Determine the recall score of the first candidate agent according to the similarity and the inverted index score of the first candidate agent;

[0191] According to the recall score, a fourth candidate agent is determined from the first candidate agent;

[0192] Obtaining historical evaluation information and historical recommendation information of the fourth candidate agent;

[0193] A target agent is determined from the fourth candidate agents according to the recall score, historical evaluation information and historical recommendation information of the fourth candidate agent.

[0194] Optionally, the determination module 740 is configured to:

[0195] Determine a second similarity between the input information and the description information of each agent in the agent library;

[0196] According to the second similarity, determining a fifth candidate agent from the agent library;

[0197] According to the matching degree between the intention category and the fifth candidate agent, a target agent is determined from the fifth candidate agents.

[0198] Optionally, the intent classification module 720 is used to:

[0199] In response to determining that the input information satisfies a discrimination condition of a preset intention category, determining the preset intention category as the intention category to which the input information belongs;

[0200] In response to determining that the input information does not satisfy the discrimination condition, the input information is subjected to intent classification using an intent classification model to determine an intent category to which the input information belongs.

[0201] Optionally, the device may further include:

[0202] A second generation module is used to generate a reply text for the input information using the large model;

[0203] The third generation module is used to generate reply information according to the reply text, the target agent and the recommended text;

[0204] Display module, used to display reply information.

[0205] It should be noted that the explanation of the aforementioned embodiment of the intelligent agent recommendation method based on a large model is also applicable to the intelligent agent recommendation device based on a large model of this embodiment, so it will not be repeated here.

[0206] In an embodiment of the present application, by determining the intent category to which the input information belongs, the need for agent recommendation is detected in the input information based on the intent category. If the need for agent recommendation is detected, the agent to be recommended is determined based on the intent category to which the input information belongs. By determining the agent to be recommended based on the intent category to which the input information belongs, the accuracy of agent recommendation can be improved, and based on the description information of the target agent, a recommendation text for the target agent is generated, thereby guiding the conversation content through the recommendation text, which can make the conversation guidance more natural and improve the user experience.

[0207] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

[0208] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0209] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 802 or a computer program loaded from a storage unit 808 to a RAM (Random Access Memory) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An I / O (Input / Output) interface 805 is also connected to the bus 804.

[0210] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0211] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a large model-based agent recommendation method. For example, in some embodiments, the large model-based agent recommendation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the large model-based agent recommendation method described above may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the large model-based agent recommendation method in any other appropriate manner (eg, by means of firmware).

[0212] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0213] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0214] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0215] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0216] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0217] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0218] According to an embodiment of the present application, the present application also provides a computer program product, which, when an instruction processor in the computer program product executes, executes the large model-based intelligent agent recommendation method proposed in the above embodiment of the present application.

[0219] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0220] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. An agent recommendation method based on a large model, comprising: Get input information; Determining the intent category to which the input information belongs; detecting an agent recommendation requirement in the input information according to the intent category; In response to detecting the agent recommendation demand, determining a target agent according to the intent category; Generate a recommendation text for the target intelligent agent according to the description information of the target intelligent agent.

2. The method of claim 1, wherein: Determining the target agent according to the intention category includes: Using the agent classification model corresponding to the intent category, obtaining the probability of the agent associated with the intent category; In response to a probability of any associated agent being greater than a preset threshold, determining the target agent based on the any associated agent; In response to the probabilities of the associated agents being all less than the preset threshold, obtaining a first candidate agent according to the input information; The target agent is determined from the first candidate agents.

3. The method of claim 2, wherein: The step of obtaining a first candidate agent according to the input information comprises: Determining a first similarity between the input information and the description information of the associated agent; According to the first similarity, the first candidate agent is determined from the associated agents.

4. The method of claim 2, wherein: The step of obtaining a first candidate agent according to the input information comprises: Performing word segmentation processing on the input information to obtain each word segmentation contained in the input information; Determining the weight of the word segmentation; According to the weights, determining a target participle from each of the participles; According to the target word segmentation, an agent search is performed in the inverted index from keywords to agents to obtain the first candidate agent.

5. The method of claim 2, wherein: The step of obtaining a first candidate agent according to the input information comprises: Determining a first similarity between the input information and the description information of the associated agent; Determine a second candidate agent from the associated agents according to the first similarity; Performing word segmentation on the input information to obtain each word segmentation contained in the input information; Determining the weight of the word segmentation; According to the weights, determining a target participle from each of the participles; Performing agent retrieval in the inverted index from keywords to agents according to the target segmentation to obtain a third candidate agent; The first candidate agent is obtained according to the second candidate agent and the third candidate agent.

6. The method according to claim 5, wherein: Determining the target agent from the first candidate agents comprises: Determining a recall score of the first candidate agent according to the similarity and the inverted index score of the first candidate agent; Determine a fourth candidate agent from the first candidate agents according to the recall score; Obtaining historical evaluation information and historical recommendation information of the fourth candidate agent; The target agent is determined from the fourth candidate agents according to the recall score of the fourth candidate agent, the historical evaluation information and the historical recommendation information.

7. The method of claim 1, wherein: Determining the target agent according to the intention category includes: Determining a second similarity between the input information and the description information of each agent in the agent library; Determine a fifth candidate agent from the agent library according to the second similarity; The target agent is determined from the fifth candidate agents based on the degree of match between the intention category and the fifth candidate agent.

8. The method according to any one of claims 1 to 7, wherein: The determining the intent category to which the input information belongs includes: In response to determining that the input information satisfies a discrimination condition of a preset intention category, determining the preset intention category as the intention category to which the input information belongs; In response to determining that the input information does not satisfy the discrimination condition, the input information is subjected to intent classification using an intent classification model to determine the intent category to which the input information belongs.

9. The method according to any one of claims 1 to 7, further comprising: Generate a response text for the input information using the large model; Generate reply information according to the reply text, the target agent and the recommended text; The reply information is displayed.

10. An intelligent agent recommendation device based on a large model, comprising: An acquisition module is used to obtain input information; An intent classification module, used to determine the intent category to which the input information belongs; A detection module, configured to detect agent recommendation requirements in the input information according to the intent category; A determination module, configured to determine a target agent according to the intent category in response to detecting an agent recommendation requirement; The first generating module is used to generate a recommendation text for the target intelligent agent according to the description information of the target intelligent agent.

11. The device of claim 10, wherein: The determining module is used to: Using the agent classification model corresponding to the intent category, obtaining the probability of the agent associated with the intent category; In response to a probability of any associated agent being greater than a preset threshold, determining the target agent based on the any associated agent; In response to the probabilities of the associated agents being all less than the preset threshold, obtaining a first candidate agent according to the input information; The target agent is determined from the first candidate agents.

12. The device of claim 11, wherein: The determining module is used to: Determining a first similarity between the input information and the description information of the associated agent; According to the first similarity, the first candidate agent is determined from the associated agents.

13. The device of claim 11, wherein: The determining module is used to: Performing word segmentation processing on the input information to obtain each word segmentation contained in the input information; Determining the weight of the word segmentation; According to the weights, determining a target participle from each of the participles; According to the target word segmentation, an agent search is performed in the inverted index from keywords to agents to obtain the first candidate agent.

14. The device of claim 11, wherein: The determining module is used to: Determining a first similarity between the input information and the description information of the associated agent; Determine a second candidate agent from the associated agents according to the first similarity; Performing word segmentation on the input information to obtain each word segmentation contained in the input information; Determining the weight of the word segmentation; According to the weights, determining a target participle from each of the participles; Performing agent retrieval in the inverted index from keywords to agents according to the target segmentation to obtain a third candidate agent; The first candidate agent is obtained according to the second candidate agent and the third candidate agent.

15. The device of claim 14, wherein: The determining module is used to: Determining a recall score of the first candidate agent according to the similarity and the inverted index score of the first candidate agent; Determine a fourth candidate agent from the first candidate agents according to the recall score; Obtaining historical evaluation information and historical recommendation information of the fourth candidate agent; The target agent is determined from the fourth candidate agents according to the recall score of the fourth candidate agent, the historical evaluation information and the historical recommendation information.

16. The device of claim 10, wherein: The determining module is used to: Determining a second similarity between the input information and the description information of each agent in the agent library; Determine a fifth candidate agent from the agent library according to the second similarity; The target agent is determined from the fifth candidate agents based on the degree of match between the intention category and the fifth candidate agent.

17. The device according to any one of claims 10 to 16, wherein: The intention classification module is used to: In response to determining that the input information satisfies a discrimination condition of a preset intention category, determining the preset intention category as the intention category to which the input information belongs; In response to determining that the input information does not satisfy the discrimination condition, the input information is subjected to intent classification using an intent classification model to determine the intent category to which the input information belongs.

18. The device according to any one of claims 10 to 16, further comprising: A second generation module is used to generate a reply text for the input information using the large model; A third generating module, used for generating reply information according to the reply text, the target agent and the recommended text; A display module is used to display the reply information.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.

21. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Recommendation information generation method and device based on anthropomorphic agent and electronic equipment

    CN120508838A

  • Image processing method and device based on artificial intelligence and electronic equipment

    CN120783094A

  • Test question processing method and device based on artificial intelligence and intelligent agent

    CN120973934A

  • Multi-agent-based information processing method and device, electronic equipment and medium

    CN121279411A

  • Multi-agent based information processing method and device, electronic equipment and medium

    CN121279411B