Method and device for constructing intelligent agent, electronic equipment and medium

By generating prompt statements and optimizing the data export process, the problems of high cost and long cycle in the construction of the agent are solved, and efficient, flexible construction and real-time update of the agent are achieved.

CN120278183AActive Publication Date: 2025-07-08BAIDU (CHINA) CO LTD

Patent Information

Application Number
CN202510357603.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-08
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing technology has problems such as high cost, long cycle, and poor effect experience in the construction of agents, especially in the application of large-scale pre-trained models.

Method used

By obtaining the natural language text input by the user, determining the fields and obtaining the associated second user input, generating prompt statements to build the agent, combining intelligent data export and model training optimization process, the efficient construction of the agent is achieved.

Benefits of technology

Real-time updates and full-process optimization of intelligent building are realized, manual intervention is reduced, data processing efficiency is improved, customized needs of different users are met, and system response speed and model flexibility are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278183A_ABST
    Figure CN120278183A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for constructing an intelligent agent, electronic equipment and a medium, and relates to the field of artificial intelligence, in particular to the field of large language models and intelligent agents. The method can comprise the steps that first user input is obtained, wherein the first user input is a natural language text containing agent construction requirements; determining one or more fields based on the first user input; obtaining a second user input associated with the one or more fields; obtaining a prompt statement based on the one or more fields and the second user input; and constructing an intelligent agent according to the prompt statement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and more particularly to large language models and agents, and specifically to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for constructing an agent. Background Art

[0002] With the rapid development of artificial intelligence technology, large-scale pre-trained models and agent technology have shown significant application value in multiple fields. However, there are still many technical bottlenecks in the existing technical solutions at the levels of agent construction and large model application, especially limitations in agent construction.

[0003] 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

[0004] The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for constructing an agent.

[0005] According to one aspect of the present disclosure, there is provided a method for constructing an agent, including: obtaining a first user input, the first user input being a natural language text including an agent construction requirement; determining one or more fields based on the first user input; obtaining a second user input associated with the one or more fields; obtaining a prompt statement based on the one or more fields and the second user input; and constructing an agent according to the prompt statement.

[0006] According to another aspect of the present disclosure, there is provided an apparatus for constructing an agent, including: a first input unit for obtaining a first user input, the first user input being a natural language text including an agent construction requirement; a field determination unit for determining one or more fields based on the first user input; an associated input unit for obtaining a second user input associated with the one or more fields; a prompt statement unit for obtaining a prompt statement based on the one or more fields and the second user input; and a construction unit for constructing an agent according to the prompt statement.

[0007] According to another aspect of the present disclosure, there is 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 when the instructions are executed by the at least one processor, the at least one processor is enabled to execute a method for constructing an agent according to one or more embodiments of the present disclosure.

[0008] 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 for causing the computer to execute a method for constructing an agent according to one or more embodiments of the present disclosure.

[0009] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, wherein the computer program, when executed by a processor, implements a method for constructing an agent according to one or more embodiments of the present disclosure.

[0010] According to one or more embodiments of the present disclosure, an agent can be constructed with intelligent assistance.

[0011] 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 readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] 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 of the 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.

[0013] Figure 1 A schematic diagram of an exemplary system in which various methods described herein can be implemented according to an embodiment of the present disclosure is shown;

[0014] Figure 2 A flowchart of a method for constructing an agent according to an embodiment of the present disclosure is shown;

[0015] Figure 3 A schematic diagram of an exemplary system architecture according to an embodiment of the present disclosure is shown;

[0016] Figure 4 A schematic diagram of a data flow of a method for an agent according to an embodiment of the present disclosure is shown;

[0017] Figure 5 A block diagram of a structure of a device for constructing an agent according to an embodiment of the present disclosure is shown;

[0018] Figure 6 The block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. Detailed implementation manners

[0019] The exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate 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 the sake of clarity and conciseness, the description of well-known functions and structures is omitted below.

[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, temporal 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 description of the context, they may also refer to different instances.

[0021] The terms used in the description of various examples in the present disclosure are only for the purpose of describing specific examples and are not intended to be restrictive. 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 of the listed items and all possible combinations.

[0022] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0023] Figure 1 The schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein can be implemented according to the embodiments of the present disclosure is shown. 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 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.

[0024] In the embodiments of the present disclosure, the server 120 can run one or more services or software applications that enable the execution of the method for building an agent according to the present disclosure.

[0025] In some embodiments, server 120 may also provide other services or software applications, which 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.

[0026] In Figure 1 In the depicted configuration, 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 executable 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 various different system configurations are possible, which may be different from system 100. Thus, Figure 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.

[0027] Users may use client devices 101, 102, 103, 104, 105, and / or 106 to interact, such as building agents or interacting with agents, etc. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via this 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.

[0028] Client devices 101, 102, 103, 104, 105, and / or 106 may 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 may 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 may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may 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 may use various communication protocols.

[0029] Network 110 may be any type of network known to those skilled in the art, which may 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 may be a local area network (LAN), an Ethernet-based network, token ring, wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (such as Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0030] Server 120 may include one or more general-purpose computers, dedicated server computers (such as PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may 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 of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functions described below.

[0031] The computing units 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.

[0032] In some embodiments, server 120 can include one or more applications to analyze and merge 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.

[0033] 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 deficiencies of high management difficulty and weak business scalability existing in traditional physical hosts and virtual private server (VPS) services.

[0034] 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, for example, relational databases. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.

[0035] 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.

[0036] Figure 1The system 100 can be configured and operated in various ways to enable the application of various methods and devices described according to the present disclosure.

[0037] Reference is made below Figure 2 to describe a method 200 for constructing an agent according to an exemplary embodiment of the present disclosure.

[0038] At step S201, a first user input is obtained, and the first user input is a natural language text containing agent construction requirements.

[0039] At step S202, one or more fields are determined based on the first user input.

[0040] Exemplarily, one or more fields related to the agent construction requirements can be determined based on the first user input. For example, the one or more fields can be one or more fields for normalizing the description of the agent construction requirements. For example, the one or more fields can be one or more fields associated with the data required for constructing the agent, such as some of a plurality of pre-determined fields for constructing the agent.

[0041] At step S203, a second user input associated with the one or more fields is obtained.

[0042] Exemplarily, the second user input can be used to generate requirement information, such as more normalized requirement information.

[0043] At step S204, a prompt statement is obtained based on the one or more fields and the second user input.

[0044] The prompt statement can be a prompt statement for a large language model. For example, a prompt statement and a large model can be used to construct an agent.

[0045] At step S205, an agent is constructed according to the prompt statement.

[0046] The method according to the embodiment of the present disclosure can intelligently assist in constructing an agent. In particular, corresponding fields can be determined based on the requirement description statement from the user. For example, one or more fields corresponding to the category can be obtained based on the category of the requirement description statement. Thus, the requirement description statement can be formatted and normalized, and the user does not need to describe all information completely and comprehensively, but can input it in association with the generated fields, thus facilitating the user operation and generating a prompt statement in a normalized manner.

[0047] According to some embodiments, determining one or more fields based on the first user input includes: obtaining a requirement form based on the first user input, and the requirement form includes the one or more fields.

[0048] For example, the requirements form can be interactive for the user. For example, the requirements form can be obtained for display to the user to facilitate the user's refinement of the requirements.

[0049] In some examples, the requirements form can be pre-filled, for example, one or more of the field values therein have been automatically generated based on the requirements description statement. The generated field values can be modifiable.

[0050] According to some embodiments, obtaining a requirements form based on the first user input includes: determining a requirements category based on the first user input; and selecting a form corresponding to the requirements category from a predetermined form library as the requirements form.

[0051] For example, templates or forms corresponding to different categories can be maintained in advance. For example, determining at least a part of the identified requirements content based on the requirements category includes: obtaining a form associated with the requirements category, the form including at least one field associated with the requirements category. Exemplarily but not restrictively, the requirements category can be extracting content, retrieving content, generating content, etc., and different requirements categories can correspond to different normalized fields for description.

[0052] According to some embodiments, the method can further include obtaining identified field values corresponding to at least one of the one or more fields based on the first user input.

[0053] In such an embodiment, a part of the field content can be extracted to convert the user description into a normalized form format.

[0054] According to some embodiments, the second user input includes modifying at least a part of the identified field values.

[0055] The generated field values can be supplemented, modified or confirmed by the user, and the form of the field and the field value facilitates the user's modification or supplementation.

[0056] According to some embodiments, the second user input includes confirming at least a part of the identified field values.

[0057] The user can perform explicit or implicit confirmation. As a specific example, if all the required field values have been extracted from the requirements text and the user does not make further supplementation, the user can confirm the field values by clicking "generate prompt", "next step", "build", etc.

[0058] According to some embodiments, the one or more fields include a requirement category field, and wherein modification of the requirement category field is used to trigger presentation of a form of a different category to the user as an updated requirement form.

[0059] The automatically extracted category may be wrong, or the user may want to use a different type of requirement type. In such a case, the user input includes a modification of the field value of the requirement category field. By modifying the requirement category, different field values ​​(i.e., different forms) can be presented. In such a case, the method may exemplarily include re-extracting based on the updated form, thereby pre-filling the field values ​​of at least a portion of the fields therein.

[0060] According to some embodiments, the second user input comprises a field value input corresponding to at least a portion of the one or more fields.

[0061] For fields that are not successfully extracted or are optional, users can enter them, and the standardized form of fields and field values ​​is convenient for users to fill in.

[0062] According to some embodiments, obtaining a prompt statement based on the one or more fields and the second user input includes: in response to determining that the second user input indicates confirmation of a corresponding field value of at least one of the one or more fields, determining requirement information based on the at least one field and the corresponding field value; and obtaining the prompt statement based on the requirement information.

[0063] According to such an embodiment, standardized requirement information can be obtained. For example, in the case where the fields are organized into a requirement form, the second user input can indicate confirmation of a corresponding field value of at least one field of the requirement form. In such an embodiment, the determined requirement information can be, for example, standardized requirement information, for example, form-based requirement information.

[0064] According to some embodiments, the method may further include determining a data source corresponding to the first user input, wherein constructing the agent based on the prompt statement includes constructing the agent based on the prompt statement and the data source.

[0065] In addition to generating prompts, the corresponding data source can also be matched based on the user's demand description, so that the intelligent agent can be built in a more targeted and user-friendly manner.

[0066] According to some embodiments, determining the data source corresponding to the first user input includes determining the data source corresponding to the data field by determining a data field based on the first user input.

[0067] Thus, it is possible to determine the corresponding field based on the user's needs and specifically determine the data source.

[0068] According to some embodiments, the method may further include obtaining an enhanced dataset as the data source based on the data field.

[0069] Thus, enhancement can be performed based on the data field, so that the constructed agent is more targeted.

[0070] According to some embodiments, the method may further include: determining a data range; and constructing the agent according to the data corresponding to the data range.

[0071] Thus, the data range can be determined based on the user's selection, such as the hottest data, ordinary data, or all data, etc., and the agent is constructed based on the data range, so that different effects of constructing data in different ranges can be achieved according to the user's needs.

[0072] With the rapid development of artificial intelligence technology, agents have been widely used in many fields. However, in the prior art, the construction of agents often faces problems such as high cost, long cycle, and poor effect experience. According to one or more embodiments of the present disclosure, a large model system architecture solution supporting real-time update is provided.

[0073] As a specific non-limiting embodiment, refer to Figure 3 Describe the agent construction system 300 according to one or more embodiments of the present disclosure. As Figure 3 shown, the agent construction system architecture may for example include Prompt generation, data export, and optional update and training.

[0074] The Prompt generation module may also be referred to as the prompt intelligent generation module, and is used to convert the original query (the first user input) into the programming language of the large model. Exemplarily, the automatic generation of the structured Prompt can be achieved through steps such as business requirement portrait construction, information extraction and backfilling, advanced configuration interaction, and Prompt synthesis and verification.

[0075] The business requirement portrait construction can be based on the original query statement input by the user, and the matching Agent template is selected through a classifier. Multiple structured tables corresponding to various business types can be preset in the template library. Exemplarily, the first level of the table is the domain classification identifier. For example, the requirement portrait information of the business can be generated through the key background information of the business system.

[0076] Information extraction and filling can use natural language processing techniques to extract key information from user input, including but not limited to: the entity recognition component extracts core parameters, the semantic analysis component analyzes format requirements, the sentiment analysis module determines the tone style, and the extraction results are automatically filled into predefined table fields. For unrecognized fields, the following processing strategies can be adopted: required fields trigger highlighting prompts, optional fields provide default parameters, and extended fields generate interactive options.

[0077] Advanced configuration interaction can provide a multi-modal interaction interface for complex scenarios. For example, optional additional boxes can be added to meet personalized needs. For example, a conditional branch selector can be used to provide an interactive selection interface for preset options. Exemplarily, a multi-turn dialogue engine can be used, which can be implemented, for example, through a requirement recognition model. Exemplarily, context guidance can be performed through the dialogue engine. For example, through multi-turn dialogue to guide style requirements, the user can be output with "Which style do you want to choose from these?" It can be understood that the present disclosure is not limited thereto. A user-defined parameter input module can be used to support open-ended parameter supplementation.

[0078] Prompt synthesis and verification can convert structured table data into a standard Prompt format, including but not limited to: the role domain: includes identity identification, skill description, and constraint rules; the workflow domain: defines the task execution logic chain; the tool call domain: declares accessible APIs and usage specifications. The generated results can be submitted to the execution engine after passing compliance checks by a syntax checker.

[0079] Thus, the user can complete the construction of the intelligent agent by following the steps of selecting a template, filling out a form, advanced configuration (optional), and submitting requirements.

[0080] As a specific non-limiting example, information in the following format can be finally generated:

[0081]

[0082]

[0083]

[0084] Data export can be achieved through a data intelligent export module or subsystem, which may include a data import layer, a hierarchical storage layer, an intelligent export engine, etc. This subsystem can utilize a large amount of high-quality data in the search scenario to generate sub-library data in the business domain. It can automatically export the public library data to the search data center, and then export and use it for users through the core data of the data center. To improve professionalism and effectiveness, according to the exemplary form of the present disclosure, the data required by the industry can be fine-tuned, refined trained, and RAG retrieved. Exemplarily, based on the original query, i.e., the first user input, the data domain and / or industry classification can be extracted, which is used here as the industry classification of the data required by the industry.

[0085] The data import layer may include a real-time crawling component: obtaining raw data from multiple sources based on a distributed crawler framework; a streaming processing pipeline: including a deduplication filter, a format standardizer, and a quality assessment model. Exemplarily, the core may be the data provided by the search.

[0086] Exemplarily, the data import layer may include a search data acquisition module and a data cleaning and preprocessing module. The search data acquisition module can collect raw data from the search engine in real time. The data cleaning and preprocessing module can clean, deduplicate, and standardize the format of the collected data to ensure data quality.

[0087] Data can be stored through the data storage layer. As an example, various methods can be used to classify and store data. As an example, various methods can be used to classify and store data. As an example, it can be stored according to the industry, for example, it can be industry data with secondary classification, including large industry classification and small industry classification. As another example, the data can include data quality or data popularity classification, for example, each data is classified as the hottest data, general data, cold data, etc. according to the user's click and search behavior.

[0088] Exemplarily, the data storage layer may include a public data warehouse and sub-libraries in the business domain. The public data warehouse can store the cleaned high-quality data as the centralized management center of the data. The sub-libraries in the business domain can classify and store the public data according to different business requirements according to the domain to form multiple business sub-libraries.

[0089] Hierarchical storage can be implemented using a hierarchical storage architecture: public data warehouse: storing the basic data set and establishing a unified metadata standard; business sub-library cluster: establishing physically isolated sub-databases according to industry classification; dynamic hierarchical system: performing data quality grading based on the user behavior analysis model (click-through rate, dwell time, conversion rate) and establishing a hot data index.

[0090] Exemplarily, in addition to user content data, the data collected and stored may also include user feedback data, search behavior, user clicks, browsing, etc.

[0091] Exemplarily, the data export layer may include an automatic export Agent module and a permission and security control module. The automatic export Agent module can automatically export the corresponding business sub-library data according to preset rules or user requirements. The permission and security control module can ensure the permission management and security of data export and prevent unauthorized data access.

[0092] The intelligent export engine of the data export layer may include: a requirement parser: associating user queries with business sub-libraries through a semantic matching algorithm; a permission control gateway: implementing an attribute-based access control (ABAC) policy; an adaptive transmission module: providing a differentiated transmission solution according to data classification.

[0093] The differentiated transmission solution may include, for example, an economy mode: only transmitting a subset of hot data; a standard mode: transmitting hot data + ordinary data; a full mode: transmitting all data.

[0094] Exemplarily, a data center layer and a user service layer may also be provided.

[0095] The data center layer may include: a search data center for aggregating the data of all business sub-libraries and providing a unified data service interface for users; and a core data processing module for deeply processing and analyzing the imported data to enhance the value of the data.

[0096] Exemplarily, the user service layer may include: a data sales platform for providing sales services for sub-library data and supporting users to purchase the required business domain data; a user interface module through which users can request and obtain the required data sets through APIs or interfaces.

[0097] Return reference Figure 3 For decision-intensive scenarios, optional model intelligent training is also provided, which includes, for example, a training sample generator, a hybrid training controller, and a deployment monitoring system. For example, for certain fields, such as fields with strong decision-making attributes, a part of high-quality data can be exported for decision-making.

[0098] The training sample generator may include: a template parsing unit: deconstructing the semantic framework of the original Prompt. A data augmentation unit: generating derivative samples using a random replacement strategy; a distribution balancer: ensuring the consistency of feature distribution through chi-square tests.

[0099] The hybrid training controller may include: a full-scale training unit: initializing the model based on the basic dataset; an incremental update unit: processing new data using a sliding window mechanism; a verification feedback loop: implementing K-fold cross-validation and online A / B testing.

[0100] The deployment monitoring system may include: a version management library: maintaining the model iteration history; an anomaly detector: monitoring the deviation of inference results; a rollback mechanism: automatically switching to the previous version when the accuracy drops below a threshold.

[0101] The full-scale and incremental SFT cooperation method can be adopted, combined with randomly shuffling and replacing the original template information and core data, to intelligently generate diverse training samples, thereby achieving fast and effective model update and training.

[0102] By combining the full-scale and incremental SFT (Structured Fine-Tuning) techniques, it is possible to significantly reduce the amount of data and time required for training while ensuring the training effect of the model. Full-scale SFT is used for the comprehensive training of the initial model, while incremental SFT quickly adapts to newly added or changed data, improving the flexibility and real-time performance of the model.

[0103] Exemplarily, a strategy for intelligently generating training samples can be provided, that is, a strategy of randomly shuffling and replacing the original template information and core data to automatically generate diverse training samples. This method not only increases the diversity of training data but also effectively avoids the overfitting problem and improves the generalization ability of the model.

[0104] As an optional exemplary embodiment, when generating training samples, in order to maintain the diversity of data, data distribution inspection and statistical tests (such as chi-square test, Kolmogorov-Smirnov test) can be first performed during data extraction to quantitatively evaluate whether the feature distribution is consistent in different datasets, and then stratified sampling is performed to ensure that the categories have the same proportion in different data sets. Finally, the use of a verification and validation method (K-fold cross-validation) is performed to ensure that the data during the model training process can represent all data.

[0105] Figure 4 Shows a data flow schematic diagram according to one or more exemplary non-limiting embodiments of the present disclosure. As Figure 4 shown, the data export layer is responsible for data export. The Prompt intelligent system generates a basic training template and interacts with the data intelligent system. After the data is exported, it goes through the data screening and generation process, and then template filling and replacement are performed. The processed data is finally submitted for training. In addition, the user service layer (data intelligent system) can perform data cross-validation to ensure data quality. Exemplarily, between template filling and replacement and submitting training data, a data verification / confirmation link may also be included.

[0106] According to one or more embodiments of the present disclosure, the full - process optimization of agent construction is achieved.

[0107] According to one or more embodiments of the present disclosure, the full automation of data export is realized, reducing manual intervention and improving data processing efficiency.

[0108] According to one or more embodiments of the present disclosure, a large amount of data is innovatively managed by sub - databases according to business fields to meet the customized needs of different users.

[0109] According to one or more embodiments of the present disclosure, from data collection, processing to export and sale, the entire process realizes automated linkage, improving the system response speed.

[0110] According to one or more embodiments of the present disclosure, it is possible to ensure the authenticity, accuracy, and integrity of a large amount of data obtained from search scenarios. Using all - volume website basic data and user behavior click model scoring to score all data, and further optimizing the rules for scoring business data according to the reverse click recommendation behavior of the user portrait.

[0111] Now refer to Figure 5 Describe an apparatus 500 for constructing an agent according to an embodiment of the present disclosure. The apparatus 500 for constructing an agent may include a first input unit 501, a field determination unit 502, a second input unit 503, a prompt statement unit 504, and a construction unit 505. The first input unit 501 may be configured to obtain a first user input, where the first user input is a natural - language text containing agent construction requirements. The field determination unit 502 may be configured to determine one or more fields based on the first user input. The second input unit 503 may be configured to obtain a second user input associated with the one or more fields. The prompt statement unit 504 may be configured to obtain a prompt statement based on the one or more fields and the second user input. The construction unit 505 may be configured to construct an agent according to the prompt statement.

[0112] The apparatus according to the embodiment of the present disclosure can intelligently assist in constructing an agent.

[0113] In the technical solution of the present disclosure, the collection, acquisition, storage, use, processing, transmission, provision, and public application, etc., of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0114] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.

[0115] Refer to Figure 6, a block diagram of an electronic device 600 that can be a server or a client of the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as, laptop computers, desktop computers, workstations, 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 processors, 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 disclosure described and / or claimed herein.

[0116] As Figure 6 shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0117] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 can be any type of device that can input information into the electronic device 600. The input unit 606 can receive input digital or character information, and generate key signal inputs related to the 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 track pad, a track ball, a joystick, a microphone, and / or a remote control. The output unit 607 can be any type of device that can present 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 608 can include, but is not limited to, magnetic disks, optical disks. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices via 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 chip set, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0118] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 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 601 executes the various methods and processes described above, such as method 200 and its variants. For example, in some embodiments, method 200 and its variants can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of method 200 and its variants described above can be executed. Alternatively, in other embodiments, the computing unit 601 can be configured to execute method 200 and its variants in any other suitable manner (e.g., by means of firmware).

[0119] 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 (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system-on-a-chip systems (SOC), complex programmable logic devices (CPLD), 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 dedicated or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0120] 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 flowchart and / or block diagram 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.

[0121] 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.

[0122] 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).

[0123] The systems and techniques described herein can be implemented in a computing system that includes back-end 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 front-end 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 that includes any combination of such back-end components, middleware components, or front-end 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.

[0124] 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, a server of a distributed system, or a server incorporating a blockchain.

[0125] It should be understood that the various forms of the process 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.

[0126] 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. A method for constructing an agent, comprising: Obtaining a first user input, where the first user input is a natural language text containing agent construction requirements; Determining one or more fields based on the first user input; Obtaining a second user input associated with the one or more fields; Obtaining a prompt statement based on the one or more fields and the second user input; And Constructing an agent according to the prompt statement.

2. The method according to claim 1, wherein Determining one or more fields based on the first user input includes: obtaining a requirements form based on the first user input, where the requirements form includes the one or more fields.

3. The method according to claim 2, wherein Obtaining a requirements form based on the first user input includes: Determining a requirements category based on the first user input; and Selecting a form corresponding to the requirements category from a predetermined form library as the requirements form.

4. The method according to any one of claims 1 - 3, further comprising obtaining recognized field values corresponding to at least one of the one or more fields based on the first user input.

5. The method according to claim 4, wherein The second user input includes a modification of at least a part of the recognized field values.

6. The method according to claim 4 or 5, wherein The second user input includes a confirmation of at least a part of the recognized field values.

7. The method according to any one of claims 2-6, wherein, The one or more fields include a requirements category field, and a modification to the requirements category field is used to trigger presenting a different category of form to the user as an updated requirements form.

8. The method according to any one of claims 1-7, wherein, The second user input includes field value inputs corresponding to at least a part of the one or more fields.

9. The method according to any one of claims 1-8, wherein Obtaining a prompt statement based on the one or more fields and the second user input includes: In response to determining that the second user input indicates a confirmation of the corresponding field values of at least one of the one or more fields, determining requirements information based on the at least one field and the corresponding field values; and Obtaining the prompt statement based on the requirements information.

10. The method according to any one of claims 1-9 further comprises determining a data source corresponding to the first user input, wherein, Constructing an agent based on the prompt statement includes constructing the agent based on the prompt statement and the data source.

11. The method according to claim 10, wherein, Determining a data source corresponding to the first user input includes determining a data domain based on the first user input and determining the data source corresponding to the data domain.

12. The method according to claim 11, further comprising obtaining an enhanced data set as the data source based on the data domain.

13. The method according to any one of claims 1-12 further comprises: Determining a data range; And constructing the agent according to the data corresponding to the data range.

14. An apparatus for constructing an agent, comprising: A first input unit for obtaining a first user input, where the first user input is a natural language text containing agent construction requirements; A field determination unit for determining one or more fields based on the first user input; A second input unit for obtaining a second user input associated with the one or more fields; A prompt statement unit for obtaining a prompt statement based on the one or more fields and the second user input; And A construction unit for constructing an agent according to the prompt statement.

15. 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 method according to any one of claims 1-13.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are for causing the computer to execute the method according to any one of claims 1-13.

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-13.

Citation Information

Patent Citations

  • Method and device for constructing data analysis agent

    CN118296116A

  • Adaptive system and method based on multi-modal cold and hot data recognition algorithm

    CN118349609A

  • Generation method and device of intelligent agent, interaction method and device, medium and equipment

    CN118689347A

  • Intelligent agent generation method, related device, equipment, platform and storage medium

    CN118862973A

  • Intelligent agent configuration method and device, electronic equipment, storage medium and computer program product

    CN119025184A

Cited By

  • Method for intelligent computing cloud platform to generate intelligent agent through computing power and related device

    CN121413606A

  • Educational data analysis methods, devices and electronic equipment

    CN122550331A