Intelligent agent-based search method and device, electronic equipment and medium
Through the agent-based search method, combined with large-scale model generation and agent interaction, the problems of search accuracy and personalized recommendations are solved, and efficient and accurate search results and personalized user experience are achieved.
Patent Information
- Application Number
- CN202510353945.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art has problems in the search field with poor search accuracy, poor user experience, and lack of personalized recommendations.
Through the agent-based search method, the agent's configuration information and target QA pair are obtained, and the large model is used to generate the target answers of the candidate search request. When the user enters a real-time search request, the corresponding agent is called for interaction to meet the user's personalized needs.
It improves the accuracy and user experience of searches, and can automatically match agents in related fields based on user search behavior, provide personalized interactions and answers, and meet users' diverse needs.
Smart Images

Figure CN120277122A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technologies, particularly to technologies such as natural language processing, deep learning, large language models, etc. Specifically, it relates to a search method, device, electronic device, computer-readable storage medium, and computer program product based on an agent. Background Art
[0002] Artificial intelligence is a discipline that studies how to make a computer simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It has both hardware-level technologies and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing: Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, and knowledge graph technology.
[0003] An agent is a software or system that can autonomously execute tasks, interact with users, and provide specific services. With the rapid development of artificial intelligence technologies, AI large models and agents have shown great potential in natural language processing, data retrieval, and content generation, especially in the search field. Therefore, it is particularly important to develop a search method based on an agent to utilize the processing power of AI large models in search.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or adopted. Unless otherwise specified, no method described in this section should be considered prior art solely because it is included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered to have been recognized in any prior art. Summary of the Invention
[0005] The present disclosure provides a search method, device, electronic device, computer-readable storage medium, and computer program product based on an agent.
[0006] According to one aspect of the present disclosure, there is provided an agent-based search method, the method comprising: obtaining configuration information of an agent and a target QA pair corresponding to the agent, wherein the target QA pair corresponding to the agent is pre-generated based on the following operations: generating a candidate search request associated with the agent based on a user search pool and the configuration information, wherein the user search pool includes historical search records of historical users; using a large model to generate a target answer corresponding to the candidate search request, and forming the target QA pair corresponding to the agent with the search request; receiving a real-time search request of a current user; and in response to the real-time search request and the target QA pair satisfying a preset relationship, displaying the target answer to the current user and invoking the agent to interact with the current user for the real-time search request.
[0007] According to another aspect of the present disclosure, there is provided an agent-based search device, comprising: an obtaining module configured to obtain configuration information of an agent and a target QA pair corresponding to the agent, wherein the target QA pair corresponding to the agent is pre-generated; a first generating module configured to generate a candidate search request associated with the agent based on a user search pool and the configuration information, wherein the user search pool includes historical search records of historical users; a second generating module configured to use a large model to generate a target answer corresponding to the candidate search request, and form the target QA pair corresponding to the agent with the search request; a receiving module configured to receive a real-time search request of a current user; and an interaction module configured to, in response to the real-time search request and the target QA pair satisfying a preset relationship, display the target answer to the current user and invoke the agent to interact with the current user for the real-time search request.
[0008] According to another aspect of the present disclosure, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 execute the above method.
[0009] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above method.
[0010] According to another aspect of the present disclosure, there is provided a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, implements the above method.
[0011] According to one or more embodiments of the present disclosure, an agent-based search method is provided, which can not only return answers corresponding to a user's search request in the user's search scenario, but also call an agent corresponding to the search scenario to interact with the user, improve search accuracy, and meet the user's personalized needs.
[0012] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings exemplarily illustrate embodiments and form a part of the specification, and are used together with the written description of the specification to explain the exemplary embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 is a schematic diagram showing an example system in which various methods described herein can be implemented according to an exemplary embodiment;
[0015] Figure 2 shows a flowchart of an agent-based search method according to an embodiment of the present disclosure;
[0016] Figure 3 shows a flowchart of a partial process of an agent-based search method according to an embodiment of the present disclosure;
[0017] Figure 4 shows a structural block diagram of an agent-based search device according to an embodiment of the present disclosure; and
[0018] Figure 5 shows a structural block diagram of an exemplary electronic device capable of implementing the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] In the present disclosure, unless otherwise specified, the terms "first", "second", etc. are used to describe various elements and are not intended to limit the positional relationship, timing relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in certain cases, based on the context description, they may also refer to different instances.
[0021] In the description of the various examples in the present disclosure, the terms used are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in the present disclosure covers any one and all possible combinations of the listed items.
[0022] In the related art, most rely on keyword matching and web indexing technologies, and there are problems such as poor search accuracy, poor user experience, and lack of personalized recommendations.
[0023] To solve the above problems, the present disclosure provides an agent-based search method, which can not only return answers corresponding to the user's search request in the user's search scenario, but also call the agent corresponding to the search scenario to interact with the user, which can improve search accuracy and meet the user's personalized needs.
[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0025] Figure 1 FIG. shows a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein can be implemented according to an embodiment of the present disclosure. Refer to Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 that couple the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0026] In an embodiment of the present disclosure, the server 120 can run one or more services or software applications that enable the execution of the agent-based search method.
[0027] In some embodiments, server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0028] In Figure 1 the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that may be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Thus, Figure 1 is an example of a system for implementing the methods described herein and is not intended to be limiting.
[0029] Users may use client devices 101, 102, 103, 104, 105, and / or 106 to perform agent-based search methods. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although Figure 1 only six client devices are depicted, those skilled in the art will be able to understand that the present disclosure may support any number of client devices.
[0030] Client devices 101, 102, 103, 104, 105, and / or 106 can include various types of computing devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices, etc. These computing devices can run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT WindowsMobile OS, iOS, Windows Phone, Android. Portable handheld devices can include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices can include head-mounted displays (such as smart glasses) and other devices. Gaming systems can include various handheld gaming devices, Internet-enabled gaming devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0031] Network 110 can be any type of network known to those skilled in the art, which can support data communication using any one of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, token ring, wide area network (WAN), the Internet, virtual network, virtual private network (VPN), intranet, extranet, public switched telephone network (PSTN), infrared network, wireless network (such as Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0032] Server 120 can include one or more general-purpose computers, dedicated server computers (such as PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframes, server clusters, or any other suitable arrangement and / or combination. Server 120 can include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server). In various embodiments, server 120 can run one or more services or software applications that provide the functions described below.
[0033] The computing unit in server 120 can run one or more operating systems including any of the above-mentioned operating systems and any commercially available server operating systems. Server 120 can also run any one of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0034] In some embodiments, server 120 can include one or more applications to analyze and combine data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 can also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0035] In some embodiments, server 120 can be a server of a distributed system or a server incorporating a blockchain. Server 120 can also be a cloud server or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system to address the defects of high management difficulty and weak business scalability existing in traditional physical hosts and virtual private server (VPS) services.
[0036] System 100 can also include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of databases 130 can be used to store information such as audio files and video files. Databases 130 can reside in various locations. For example, the databases used by server 120 can be local to server 120 or can be remote from server 120 and can communicate with server 120 via a network-based or dedicated connection. Databases 130 can be of different types. In certain embodiments, the databases used by server 120 can be relational databases, for example. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.
[0037] In certain embodiments, one or more of databases 130 can also be used by applications to store application data. The databases used by applications can be different types of databases, such as key-value repositories, object repositories, or conventional repositories supported by a file system.
[0038] Figure 1 System 100 can be configured and operated in various ways to enable the application of the various methods and apparatuses described according to the present disclosure.
[0039] Figure 2 The flowchart of an agent - based search method according to an embodiment of the present disclosure is shown.
[0040] As Figure 2 shown, the agent - based search method 200 includes:
[0041] Step S201, obtaining the configuration information of the agent and the target QA pair corresponding to the agent, wherein the target QA pair corresponding to the agent is pre - generated based on the following operations: generating a candidate search request associated with the agent based on the user search pool and the configuration information, wherein the user search pool includes the historical search records of historical users; using a large - model to generate a target answer corresponding to the candidate search request, and forming the target QA pair corresponding to the agent with the search request;
[0042] Step S202, receiving the real - time search request of the current user; and
[0043] Step S203, in response to the real - time search request and the target QA pair satisfying a preset relationship, displaying the target answer to the current user and invoking the agent to interact with the current user for the real - time search request.
[0044] In step S201, the configuration information of the agent and the target QA pair corresponding to the agent are obtained. The target QA pair corresponding to the agent is pre - generated. Specifically, by combining the user search pool and the configuration information of the agent, a candidate search request related to the agent is generated. The user search pool includes historical search records, which reflect the interests and needs of users. The method 200 analyzes these data to infer the possible search needs of users. Then, using the natural language processing ability of the large - model, an answer corresponding to the candidate search request is generated, thereby generating the target OA pair having a corresponding relationship with the agent.
[0045] Step S202 receives the real - time search requests from users, which usually include immediate query requirements or new questions. Responses need to be generated according to the real - time requests to ensure the relevance and timeliness of the search.
[0046] Step S203 determines whether the real - time search request and the target QA pair satisfy a preset relationship. If so, the answer is displayed and the agent is enabled to interact with the user for the real - time search request. Thus, while returning the answer to the user, the agent associated with the real - time search request can be invoked and interact with the user for the real - time search request of the user to further meet the search needs of the user.
[0047] Thus, the method 200 can not only return an answer corresponding to the user's search request in the user's search scenario, but also call an agent corresponding to the search scenario to interact with the user regarding the user's real-time search request, which can improve search accuracy and further meet the user's search needs and personalized needs during the interaction.
[0048] It can be understood that each agent can focus on a specific field or task, such as medical, financial, e-commerce, legal, etc. Candidate search requests corresponding to the field of the current agent can be generated based on the historical search records in the user's search pool, and then target QA pairs corresponding to the agent can be generated. Thus, the corresponding agent field can be matched according to the current search request input by the current user. If the request involves multiple fields, the actual needs of the user can be judged based on the context, and the optimal agent can be selected for response and interaction.
[0049] Thus, the method 200 can automatically match an agent in a related field according to the user's search request and interact through the agent in this field. This multi-field agent matching and calling scheme can greatly improve the user experience. By accurately matching the search request with the target QA pair, it is ensured that the user can interact with the agent most suitable for their needs.
[0050] In one example, for an agent in the legal consultation field, candidate search requests such as "Solutions to disputes over lease contract deposits" or "Legal channels for disputes over lease contract deposits" can be generated based on the historical search record "My lease contract has expired, but the landlord refuses to return the deposit. What should I do?" in the user's search term. Correspondingly, a large model can be used to generate the following answer: "Before signing the lease contract, ensure there are detailed refund terms; if the deposit is not refunded, you can consider suing through the court or seeking help from consumer rights protection organizations", and target QA pairs can be generated based on the above candidate search requests and answers to correspond to the above legal consultation field agent. When a user inputs a relevant search request again, in response to the user's search request being associated with the above target QA pair, the answer is presented to the user, and the agent in the legal consultation field is called to interact with the user regarding the user's real-time search request. Thus, the improvement of search accuracy is achieved, and the user's personalized needs are met.
[0051] Exemplarily, the configuration information of the agent obtained in step S201 includes at least one of the following: the name of the agent, the introduction of the agent, the persona and response logic of the agent, the opening statement of the agent, and the corresponding knowledge base of the agent.
[0052] It is understandable that the name of the agent can define the basic identity of the agent, facilitating identification in subsequent processes. The introduction of the agent is used to provide background information about the agent, and its functions and purposes can be understood through the introduction. The persona and response logic of the agent are used to define specific contents such as the role setting, behavior pattern of the agent, and how to respond to user input. The knowledge base of the agent is used to store various questions that the agent can answer and knowledge in related fields.
[0053] The above-mentioned configuration information provides an important basis for subsequent search query generation and the interaction between the agent and the user. By obtaining the configuration information of the agent, the characteristics of the agent can be clearly understood, and this information can be applied to the generation of search requests and the customization of answers to ensure the relevance and accuracy of the final results.
[0054] In addition, in the process of pre-generating target QA pairs corresponding to the agent, candidate search requests related to the agent are generated by combining the historical search records of historical users and the configuration information of the agent. The user search pool includes historical search records, which reflect the interests and needs of users. By analyzing this data, the possible future search needs of users can be predicted, and the candidate search needs can be bound to the agents in the corresponding fields or functions.
[0055] According to some embodiments, the user search pool further includes at least one of the following: the search time of the historical user, the search frequency of the historical user, and the search scenario information of the historical user.
[0056] According to some embodiments, generating candidate search requests associated with the agent based on the user search pool and the configuration information includes: retrieving and generating the candidate search requests associated with the agent from the historical search records in the user search pool based on the configuration information. The historical search records reflect the interests and needs of users, and by analyzing this data, the possible search needs of users can be inferred.
[0057] Thus, information such as historical search records, search frequency, search time, and search scenarios (e.g., search types or keywords) is extracted from the user search pool, and combined with the configuration information of the agent to generate candidate search requests suitable for the current agent. By deeply analyzing the historical data of users, the user needs can be predicted more accurately, and relevant search requests can be generated. Combining the configuration information of the agent can ensure that the generated search requests match the functions and fields of the agent, thereby improving the relevance of subsequent searches.
[0058] Figure 3 The flowchart shows a part of the process of pre-generating target QA pairs corresponding to the agent according to an embodiment of the present disclosure.
[0059] As Figure 3 shown, process 300 includes:
[0060] Step S301: Using a large model, generate an initial answer corresponding to the candidate search request;
[0061] Step S302: Edit the initial answer to obtain a target answer corresponding to the candidate search request; and
[0062] Step S303: Combine the candidate search request with the target answer to obtain the target QA pair corresponding to the agent.
[0063] In step S301, the large model can understand and generate various answers related to the candidate search request, ensuring the high relevance and accuracy of the answers.
[0064] In step S302, the initial answer generated by the large model can be edited, supplemented, and optimized to obtain the target answer, ensuring that the target answer better meets the user's needs and context.
[0065] In step S303, the candidate search request is combined with the finally edited target answer to form the target QA pair.
[0066] In the process of pre - generating the above - mentioned target QA pair, the natural language processing ability of the large model is used to generate an initial answer corresponding to the candidate search request. Then, the initial answer can be edited and optimized as needed. Thus, through the deep - learning ability of the large model, high - quality answers can be generated, and the professionalism and accuracy of the answers can be improved through secondary editing, finally forming a complete and practical QA pair corresponding to the agent. This process can ensure that the subsequent search results effectively meet the user's needs.
[0067] According to some embodiments, step S203 includes: using a semantic matching algorithm to determine the relevance between the real - time search request and the target QA pair; in response to the relevance between the real - time search request and the target QA pair meeting a preset threshold, displaying the target answer to the current user and invoking the agent to interact with the current user for the real - time search request.
[0068] Using a semantic matching algorithm, calculate the relevance between the real-time search request and the target QA pair. If the relevance meets the preset threshold, present the answer to the user and enable the agent to interact with the user. Exemplarily, natural language processing (NLP) techniques can be used to match the semantic similarity between the real-time search request and the generated target QA pair. If the matching degree reaches the set threshold, present the target answer to the user and initiate a conversation with the agent. The agent will interact with the user based on its configuration information and the user's real-time search request. Exemplarily, it can perform personalized Q&A according to its role settings and knowledge base for the user's real-time search request, thereby further meeting the user's search request.
[0069] Thus, through semantic matching, the real-time needs of users can be understood more accurately, ensuring that the presented answers can efficiently solve the users' problems. And the agent interaction enables the user to communicate with the agent more deeply for the user's real-time search request, further improving user satisfaction and search experience.
[0070] According to some embodiments, the invoking the agent to interact with the current user includes: expanding a dialog box between the agent and the current user, and interacting with the current user based on the configuration information of the agent and the real-time search request.
[0071] Thus, by invoking the configuration information of the agent to perform personalized interaction with the current user, the agent can provide more accurate answers and suggestions according to the user's real-time search request.
[0072] The agent-based search method provided by this application significantly improves the efficiency and accuracy of search through the combination of the agent and the AI large model. It can automatically distribute QA pairs and associate corresponding agents (such as agents in corresponding fields) according to the user's search behavior and the content of the QA pairs, realizing the function of intelligently distributing agents to search scenarios. By making full use of the user's historical data and the personalized configuration information of the agent, it can automatically generate high-quality search requests and answers, and efficiently interact with the user through the agent. The agent-based search method can improve search accuracy, enhance the user experience, and achieve personalized customization of search, and is applicable to the search needs of multiple industries.
[0073] According to another aspect of the present disclosure, an agent-based search device is provided. As Figure 4As shown, the agent-based search device 400 includes: an acquisition module 401 configured to acquire the configuration information of the agent and the target QA pair corresponding to the agent, wherein the target QA pair corresponding to the agent is pre-generated; a first generation module 402 configured to generate a candidate search request associated with the agent based on the user search pool and the configuration information, wherein the user search pool includes the historical search records of historical users; a second generation module 403 configured to use a large model to generate a target answer corresponding to the candidate search request and form the target QA pair corresponding to the agent with the search request; a receiving module 404 configured to receive the real-time search request of the current user; and an interaction module 405 configured to, in response to the real-time search request and the target QA pair satisfying a preset relationship, display the target answer to the current user and call the agent to interact with the current user for the real-time search request.
[0074] The acquisition module 401 acquires the configuration information of the agent and the target QA pair corresponding to the agent, wherein the target QA pair is pre-generated by the first generation module 402 and the second generation module 403. The first generation module 402 combines the user search pool and the configuration information of the agent to generate a candidate search request related to the agent. The user search pool includes historical search records that reflect the interests and needs of users. The agent-based search device 400 analyzes these data to infer the possible search needs of users.
[0075] The second generation module 403 uses the natural language processing ability of the large model to generate an answer corresponding to the candidate search request and is used to generate the target OA pair corresponding to the agent.
[0076] The receiving module 404 receives the real-time search requests from users, which usually include immediate query requirements or new questions. Responses need to be generated according to the real-time requests to ensure the relevance and timeliness of the search.
[0077] The interaction module 405 determines whether the real-time search request and the target QA pair satisfy a preset relationship. If so, it displays the answer and enables the agent to interact with the user for the real-time search request. Thus, while returning the answer to the user, the agent associated with the real-time search request can be called and interact with the user for the real-time search request of the user to further meet the search needs of the user.
[0078] Therefore, the agent-based search device 400 can not only return an answer corresponding to the user's search request in the user's search scenario, but also call an agent corresponding to the search scenario to interact with the user for the user's real-time search request, which can improve the search accuracy and further meet the user's search needs and personalized needs in the interaction.
[0079] It can be understood that each agent can focus on a specific field or task, such as medical, financial, e-commerce, legal, etc. Candidate search requests corresponding to the field of the current agent can be generated based on the historical search records in the user's search pool, and then target QA pairs corresponding to the agent can be generated. Thus, the corresponding agent field can be matched according to the current search request input by the current user. If the request involves multiple fields, the actual needs of the user can be judged according to the context, and the optimal agent can be selected for response and interaction.
[0080] Therefore, the agent-based search device 400 can automatically match an agent in a related field according to the user's search request and interact through the agent in this field. This multi-field agent matching and calling scheme can greatly improve the user experience. By accurately matching the search request with the target QA pair, it is ensured that the user can interact with the agent most suitable for their needs.
[0081] According to some embodiments, the configuration information includes at least one of the following: the name of the agent, the introduction of the agent, the persona and response logic of the agent, the opening statement of the agent, and the corresponding knowledge base of the agent.
[0082] It can be understood that the name of the agent can define the basic identity of the agent, which is convenient for identification in the subsequent process. The introduction of the agent is used to provide background information about the agent, and its function and purpose can be understood through the introduction of the agent. The persona and response logic of the agent are used to define specific contents such as the role setting, behavior pattern of the agent, and how to respond to user input. The knowledge base of the agent is used to store various questions that the agent can answer and knowledge in related fields.
[0083] The above-mentioned configuration information provides an important basis for subsequent search query generation and interaction between the agent and the user. By obtaining the configuration information of the agent, the agent-based search device 400 can clearly understand the characteristics of the agent and apply this information to the generation of search requests and the customization of answers, ensuring the relevance and accuracy of the final result.
[0084] The first generation module 402 combines the historical search records of historical users and the configuration information of the agent to generate candidate search requests related to the agent. The user search pool includes historical search records, which reflect the interests and needs of users. By analyzing this data, it is possible to predict the possible search needs of future users.
[0085] According to some embodiments, the user search pool further includes at least one of the following: the search time of the historical user, the search frequency of the historical user, and the search scenario information of the historical user.
[0086] According to some embodiments, the first generation module 402 is further configured to: retrieve and generate the candidate search request associated with the agent from the historical search records in the user search pool based on the configuration information.
[0087] Thus, the first generation module 402 extracts information from the user search pool, such as historical search records, search frequency, search time, and search scenarios (e.g., search types or keywords), and combines the configuration information of the agent to generate candidate search requests suitable for the current agent. By deeply analyzing the user's historical data, the first generation module 402 can more accurately predict the user's needs and generate relevant search requests. Combining the configuration information of the agent can ensure that the generated search requests match the functions of the agent, thereby improving the relevance of the search.
[0088] According to some embodiments, the second generation module 403 includes: a generation unit configured to use a large model to generate an initial answer corresponding to the candidate search request; an editing unit configured to edit the initial answer to obtain a target answer corresponding to the candidate search request; and a combination unit configured to combine the candidate search request with the target answer to obtain the target QA pair corresponding to the agent.
[0089] The generation unit can use the large model to understand and generate various answers related to the candidate search request, ensuring that the answers have high relevance and accuracy.
[0090] The editing unit can edit, supplement, and optimize the initial answer generated by the large model to obtain the target answer, ensuring that the target answer better meets the user's needs and context.
[0091] The combination unit combines the candidate search request with the finally edited target answer to form the target QA pair.
[0092] The second generation module 403 uses the natural language processing ability of the large model to generate an initial answer corresponding to the candidate search request. After that, the second generation module 403 can edit and optimize the initial answer as needed. Thus, the second generation module 403 can generate high-quality answers through the deep learning ability of the large model, and improve the professionalism and accuracy of the answers through secondary editing, and finally form a complete and practical QA pair corresponding to the intelligent agent, which can ensure that the subsequent search results effectively meet the user's needs.
[0093] According to some embodiments, the interaction module 405 includes: a determination unit configured to use a semantic matching algorithm to determine the relevance between the real-time search request and the target QA pair; an interaction unit configured to, in response to the relevance between the real-time search request and the target QA pair meeting a preset threshold, display the target answer to the current user and call the intelligent agent to interact with the current user for the real-time search request.
[0094] The determination unit uses a semantic matching algorithm to calculate the relevance between the real-time search request and the target QA pair. If the relevance meets the preset threshold, the interaction unit then presents the answer to the user and enables the intelligent agent to interact with the user. Exemplarily, the determination unit can use natural language processing (NLP) technology to match the semantic similarity between the real-time search request and the generated target QA pair. If the matching degree reaches the set threshold, the interaction unit then presents the target answer to the user and initiates a conversation with the intelligent agent. The intelligent agent will interact with the user according to its configuration information and the user's real-time search request. Exemplarily, it can perform personalized question and answer according to its role setting and knowledge base for the user's real-time search request, so as to further meet the user's search request.
[0095] Thus, through semantic matching, the interaction module 405 can more accurately understand the user's real-time needs and ensure that the presented answer efficiently solves the user's problem. And the intelligent agent interaction enables the user to communicate with the intelligent agent more deeply for the user's real-time search request, further improving the user satisfaction and search experience.
[0096] According to some embodiments, the interaction unit is further configured to: expand the dialog box between the intelligent agent and the current user, and interact with the current user based on the configuration information of the intelligent agent and the real-time search request.
[0097] Thus, by calling the configuration information of the intelligent agent to perform personalized interaction with the current user, the intelligent agent can provide more accurate answers and suggestions according to the user's real-time search request.
[0098] According to another aspect of the present disclosure, there is also provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 execute the foregoing method.
[0099] According to another aspect of the present disclosure, there is also provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the foregoing method.
[0100] According to another aspect of the present disclosure, there is also provided a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the foregoing method.
[0101] As Figure 5 shown, the electronic device 500 includes a computing unit 501, which can execute various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0102] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device capable of inputting information into the electronic device 500. The input unit 506 can receive input digital or character information, and generate key signal inputs related to user settings and / or function controls of the electronic device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output unit 507 can be any type of device capable of presenting information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth TM device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0103] The computing unit 501 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the agent-based search method. For example, in some embodiments, the agent-based search method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the agent-based search method described above may be executed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the agent-based search method in any other suitable manner (e.g., by means of firmware).
[0104] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] The program code for implementing the methods of the present disclosure 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, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0107] In order 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds 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).
[0108] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0109] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, can also be a server of a distributed system, or a server incorporating a blockchain.
[0110] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0111] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only defined by the authorized claims and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, the steps can be executed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. Importantly, with the evolution of technology, many of the elements described herein can be replaced by equivalent elements that emerge after the present disclosure.
Claims
1. An agent-based search method, comprising: Obtaining configuration information of an agent and a target QA pair corresponding to the agent, wherein the target QA pair corresponding to the agent is pre-generated based on the following operations: Generating a candidate search request associated with the agent based on a user search pool and the configuration information, wherein the user search pool includes historical search records of historical users; Using a large model to generate a target answer corresponding to the candidate search request and forming the target QA pair corresponding to the agent with the search request; Receiving a real-time search request of a current user; and In response to the real-time search request and the target QA pair satisfying a preset relationship, displaying the target answer to the current user and invoking the agent to interact with the current user for the real-time search request.
2. The method according to claim 1, wherein The generating a candidate search request associated with the agent based on the user search pool and the configuration information includes: Retrieving and generating the candidate search request associated with the agent from the historical search records in the user search pool based on the configuration information.
3. The method according to claim 1 or 2, wherein The using a large model to generate a target answer corresponding to the candidate search request and forming the target QA pair corresponding to the agent with the search request includes: Using a large model to generate an initial answer corresponding to the candidate search request; Editing the initial answer to obtain a target answer corresponding to the candidate search request; and Combining the candidate search request with the target answer to obtain the target QA pair corresponding to the agent.
4. The method according to any one of claims 1 to 3, wherein The in response to the real-time search request and the target QA pair satisfying a preset relationship, displaying the target answer to the current user and invoking the agent to interact with the current user for the real-time search request includes: Using a semantic matching algorithm to determine the relevance between the real-time search request and the target QA pair; In response to the relevance between the real-time search request and the target QA pair satisfying a preset threshold, displaying the target answer to the current user and invoking the agent to interact with the current user for the real-time search request.
5. The method according to any one of claims 1-4, wherein The invoking the agent to interact with the current user for the real-time search request includes: Expanding a dialog box between the agent and the current user and interacting with the current user based on the configuration information of the agent and the real-time search request.
6. The method according to any one of claims 1-5, wherein, The configuration information includes at least one of the following: The name of the agent, the introduction of the agent, the persona and reply logic of the agent, the opening statement of the agent, and the corresponding knowledge base of the agent.
7. The method according to any one of claims 1-6, wherein, The user search pool further includes at least one of the following: The search time of the historical user, the search frequency of the historical user, the search scenario information of the historical user.
8. An agent-based search device, comprising: An acquisition module, configured to acquire the configuration information of an intelligent agent and the target QA pair corresponding to the intelligent agent, wherein the target QA pair corresponding to the intelligent agent is pre-generated; A first generation module, configured to generate a candidate search request associated with the intelligent agent based on a user search pool and the configuration information, wherein the user search pool includes the historical search records of historical users; A second generation module, configured to use a large model to generate a target answer corresponding to the candidate search request, and form the target QA pair corresponding to the intelligent agent with the search request; A receiving module, configured to receive a real-time search request of a current user; and An interaction module, configured to, in response to the real-time search request and the target QA pair satisfying a preset relationship, display the target answer to the current user and call the intelligent agent to interact with the current user for the real-time search request.
9. The device according to claim 8, wherein The first generation module is further configured to: Based on the configuration information, retrieve and generate the candidate search request associated with the intelligent agent from the historical search records in the user search pool.
10. The device according to claim 8 or 9, wherein, The second generation module includes: A generation unit, configured to use a large model to generate an initial answer corresponding to the candidate search request; An editing unit, configured to edit the initial answer to obtain a target answer corresponding to the candidate search request; and A combination unit, configured to combine the candidate search request with the target answer to obtain the target QA pair corresponding to the intelligent agent.
11. The device according to any one of claims 8-10, wherein, The interaction module includes: A determination unit, configured to use a semantic matching algorithm to determine the relevance between the real-time search request and the target QA pair; An interaction unit, configured to, in response to the relevance between the real-time search request and the target QA pair satisfying a preset threshold, display the target answer to the current user and call the intelligent agent to interact with the current user for the real-time search request.
12. The apparatus according to claim 11, wherein, The interaction unit is further configured to: Expand the dialog box between the intelligent agent and the current user, and interact with the current user based on the configuration information of the intelligent agent and the real-time search request.
13. The device according to any one of claims 8 - 12, wherein, The configuration information includes at least one of the following: The name of the intelligent agent, the brief introduction of the intelligent agent, the persona and reply logic of the intelligent agent, the opening statement of the intelligent agent, and the corresponding knowledge base of the intelligent agent.
14. The device according to any one of claims 8-13, wherein, The user search pool further includes at least one of the following: The search time of the historical user, the search frequency of the historical user, and the search scenario information of the historical user.
15. An electronic device, including: At least one processor; And A memory communicatively connected to the at least one processor; Wherein The memory stores instructions executable 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 execute the method according to any one of claims 1-7.
16. 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-7.
17. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-7.
Citation Information
Cited By
Content generation method and device based on agent, medium, equipment and product
CN122293952A