Template generation method and device for agent behaviors, equipment, medium and product
By generating intelligent agent templates with multi-dimensional configurations, the problems of narrow application scope and poor accuracy of traditional templates are solved, enabling efficient and accurate execution of intelligent agent tasks and flexible configuration of content creation.
Patent Information
- Application Number
- CN202511236400.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-31
- Publication Date
- 2025-12-02
AI Technical Summary
Traditional intelligent agent prompt word templates have a narrow application scope, cannot incorporate the knowledge expected by users, and cannot be configured with lower-level execution strategies and decision-making logic, resulting in poor accuracy of prompt word information and affecting task execution efficiency.
A template generation method is provided, which presents configurable items in multiple dimensions, receives interactive operations, determines configuration information in multiple dimensions, and generates a template for content creation, which is used to generate prompt word information.
It improves the efficiency and accuracy of intelligent agent task execution, allows users to flexibly configure templates to meet personalized needs, and enhances the efficiency and quality of content creation.
Smart Images

Figure CN121052235A_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein generally relate to the field of computers, and particularly to template generation methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for intelligent agent behavior. Background Technology
[0002] With the development of information technology, various terminal devices can provide people with a variety of services in work and life. For example, applications that provide services can be deployed on terminal devices. Terminal devices or applications can utilize intelligent agents to provide services to users. Users can complete diverse operations through various interactions with intelligent agents. Summary of the Invention
[0003] In a first aspect of this disclosure, a template generation method for agent behavior is provided. The method includes: a configuration item presentation module configured to, in response to receiving a template generation instruction for content creation, present corresponding configurable items across multiple dimensions, the multiple dimensions constraining the behavior of at least one agent in content creation; a configuration information determination module configured to, based on received interactive operations for the corresponding configurable items across the multiple dimensions, determine corresponding configuration information for the multiple dimensions; and a template generation module configured to, based on the corresponding configuration information across the multiple dimensions, generate a template for content creation, the generated template being used at least to generate prompt word information in content creation.
[0004] In a second aspect of this disclosure, a template generation apparatus for agent behavior is provided. The apparatus includes: in response to receiving a template generation instruction for content creation, presenting corresponding configurable items for multiple dimensions, the multiple dimensions constraining the behavior of at least one agent in content creation; determining corresponding configuration information for the multiple dimensions based on received interactive operations for the corresponding configurable items for the multiple dimensions; and generating a template for content creation based on the corresponding configuration information for the multiple dimensions, the generated template being used at least to generate prompt word information in content creation.
[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processor.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, which, when executed by a processor, cause the processor to perform the method according to a first aspect of this disclosure.
[0007] In a fifth aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored in a computer storage medium and includes computer-executable instructions that, when executed by a device, cause the device to perform the method of the first aspect.
[0008] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0009] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0011] Figure 2 A flowchart is shown of a template generation method for agent behavior according to some embodiments of the present disclosure;
[0012] Figures 3A to 3D A schematic diagram of an example interface according to some embodiments of the present disclosure is shown;
[0013] Figure 3E Examples of signaling flows according to some embodiments of this disclosure are shown;
[0014] Figure 4 An exemplary structural block diagram of a template generation apparatus for agent behavior according to some embodiments of the present disclosure is shown; and
[0015] Figure 5 A block diagram of an electronic device that can implement one or more embodiments of the present disclosure is shown. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0018] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.
[0019] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0020] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0021] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information, thereby enabling the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that perform the operation of the technical solution disclosed herein, based on the prompt message.
[0022] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0023] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0024] In this disclosure, "trigger" refers to one or more interactive actions performed by a user on a terminal device. Furthermore, these interactive actions may be triggered within the same user interface / pop-up window or within different user interfaces / pop-up windows. This disclosure is not limited in this respect.
[0025] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training samples, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
[0026] As mentioned earlier, users can perform diverse operations through various interactions with the agent. Traditionally, prompt word templates for agents are typically scenario-specific, resulting in a narrow scope and often being quite simple, failing to incorporate the knowledge users expect. Furthermore, traditional templates usually only support basic configuration of the agent's output tone and length, preventing users from configuring lower-level execution strategies and decision-making logic. The accuracy of prompt word information determined by such templates may be poor, affecting the accuracy of the agent's task execution.
[0027] In view of this, according to embodiments of the present disclosure, an improved scheme for template generation for agent behavior is provided. According to the scheme of the embodiments of the present disclosure, in response to receiving a template generation instruction for content creation, multiple configurable items of various dimensions are presented, and these multiple dimensions constrain the behavior of at least one agent in content creation. Based on the received interactive operations for the corresponding configurable items of the multiple dimensions, corresponding configuration information for the multiple dimensions is determined. Based on the corresponding configuration information of the multiple dimensions, a template for content creation is generated, and the generated template is used at least to generate prompt word information in content creation.
[0028] This method allows users to easily and quickly configure templates, and subsequently determine prompts for the agent based on the templates, thereby improving the efficiency of using the agent to perform tasks.
[0029] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In this example environment 100, an application 125 is installed on a terminal device 110. A user 140 can interact with the application 125 via the terminal device 110 and / or an attached device of the terminal device 110.
[0030] In some embodiments, application 125 can be downloaded and installed on terminal device 110. In some embodiments, application 125 can also be accessed in other ways, such as through a web page. Figure 1In environment 100, in response to application 125 being launched, terminal device 110 can display the interface 150 of application 125.
[0031] In some embodiments, terminal device 110 communicates with server 130 to provide services to application 125. Terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry). Server 130 can be various types of computing systems / servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc. Server 130 can provide background services for application 125 in terminal device 110.
[0032] In embodiments of this disclosure, application 125 can provide interaction functionality with an intelligent agent. Application 125 can be an application dedicated to providing intelligent agent services, or an application integrated with an intelligent agent (i.e., it can provide functions or services other than those of an intelligent agent). Although Figure 1 The image shows a single application, but in reality, multiple applications can be installed on the terminal device 110.
[0033] In this disclosure, agents 160-1, 160-2, ..., 160-N (collectively or individually referred to as agent 160) can be deployed locally on terminal device 110 or remotely. In the case of remote deployment, terminal device 110 can directly invoke the agent or invoke the agent via server 130.
[0034] In embodiments of this disclosure, agent 160 may possess intelligent dialogue and task processing capabilities. Terminal device 110 provides an interface 150 that can present interactions with agent 160. In interface 150, user 140 can initiate task requests to agent 160 by inputting natural language (text input or voice input). Alternatively or additionally, user 140 can upload online or offline file conversations to instruct agent 160 to assist in completing various tasks.
[0035] In embodiments of this disclosure, during interaction with user 140, agent 160 can respond to user 140's requests and handle tasks instructed by the user. In some embodiments, during task processing, agent 160 can invoke one or more tools 165-1, 165-2, ... 165-M (collectively or individually referred to as tools 165) to assist in task execution and the provision of task results, as needed for the task. These tools 165 can be any type of tool, such as text generation tools, file reading tools, information search tools, online or offline databases, image processing tools, chart generation tools, web page creation tools, etc.
[0036] In some embodiments, environment 100 may further include a management node for a plurality of agents 160-1, 160-2, ... 160-N, which can interact with the agents 160-1, 160-2, ... 160-N. In some examples, the management node may, in response to a task request from user 140, determine the task requirements corresponding to the task request. The management node may then, based on the task requirements, assign the task request to the agent 160 that matches the task requirements, requesting that agent 160 to execute the task. In other examples, the management node may also determine an execution plan for the task based on the task requirements. The execution plan may indicate one or more subtasks required to complete the task. The management node may assign the one or more subtasks to one or more agents 160, which will then execute their respective subtasks. Regarding the management node, in some examples, the management node may be implemented by one of the agents 160-1, 160-2, ... 160-N (in this case, agent 160 is also referred to as scheduling agent 160). In other examples, management nodes can be implemented using machine learning models, such as language models (LM).
[0037] In some embodiments, agent 160 may be constructed based on one or more machine learning models. In some embodiments, the machine learning model upon which agent 160 is based may include at least a language model (LM), such as a large language model (LLM). In some embodiments, the machine learning model upon which agent 160 is based may include a multimodal model capable of handling multiple modalities of input, such as text input, visual input (e.g., images, videos), audio input, etc. These machine learning models may include content-generating models capable of generating corresponding outputs based on model inputs. In some embodiments, the machine learning model may receive text-modal model inputs (e.g., natural language and / or machine language) and / or non-text-modal model inputs (e.g., images, speech, videos, etc.), and may obtain corresponding model outputs based on model inputs and prompts, thereby completing the task execution.
[0038] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Some exemplary embodiments of this disclosure will continue to be described below with reference to the accompanying drawings.
[0039] It should be understood that the interface shown in the accompanying drawings is merely an example, and various interface designs may exist in practice. The various graphic elements in the interface may have different arrangements and different visual representations, one or more elements may be omitted or replaced, and one or more other elements may also be present. The embodiments of this disclosure are not limited in this respect. Furthermore, in the following description, the exemplary embodiments will be described primarily with respect to terminal device 110. It should be understood that the actions described with respect to terminal device 110 may also be performed by an application on terminal device 110 (e.g., application 125), or may be performed by the application in conjunction with its server (e.g., server 130).
[0040] Figure 2 A flowchart of a template generation method 200 for agent behavior according to some embodiments of the present disclosure is shown. Method 200 can be implemented at a terminal device 110. It should be noted that the operations performed by the terminal device 110 may specifically be performed by a related application (e.g., application 125) installed on the terminal device 110. Some operations described with reference to the terminal device 110 may require the assistance of the server 130. The terminal device 110 can be used for interaction by receiving operations from a related user (e.g., user 140).
[0041] In box 210, in response to receiving a template generation instruction for content creation, terminal device 110 presents corresponding configurable items across multiple dimensions. These multiple dimensions constrain the behavior of at least one agent in content creation. In some embodiments, in addition to the aforementioned configurable items across multiple dimensions, terminal device 110 may also present other configurable items, such as the template name, template description, etc. The template description can be used to describe the purpose, scenario, etc., of the generated template. If the template is published, the template description can be presented to other users so that they understand the purpose of the template.
[0042] In embodiments of this disclosure, terminal device 110 may present interface 150 of application 125. For example, terminal device 110 may receive a template generation instruction via interface 150. Terminal device 110 may present a template generation control on interface 150, and may determine that a template generation instruction has been received in response to triggering the template generation control. Terminal device 110 may also present an input control, which may include an input box for receiving text information, a microphone for receiving audio information, or any suitable control. As an example only, terminal device 110 may determine that a template generation instruction has been received in response to receiving the text "Create Template" or the voice "Create Template".
[0043] refer to Figure 3A , Figure 3A A schematic diagram of an example interface 300A according to some embodiments of the present disclosure is shown. The example interface 300A includes an input box 310 and at least one interactive control (e.g., controls 301 to 303 shown in the figure). The at least one interactive control may be presented within or near the input box 310. The at least one interactive control may have different functions. The at least one interactive control may include at least a template viewing control (e.g., control 303 shown in the figure), and the terminal device 110 may, for example, determine that a template viewing instruction has been received in response to a triggering of control 303.
[0044] In some embodiments, terminal device 110 may present panel 305 in response to a trigger on control 303. Terminal device 110 may present templates and template generation controls (e.g., the "Add Template" control shown in panel 305) that the user (e.g., user 140) has access to in panel 305. It is understood that this is merely an example; in some embodiments, the template generation control may also be presented together with controls 301 to 303. In this case, terminal device 110 may directly receive a trigger on the template generation control. Templates that user 140 has access to may include various types of templates, such as templates previously created by user 140, default templates, public templates, templates shared with user 140 by other users, and templates from the user group to which user 140 belongs. It should be noted that, limited by the size of panel 305, if the number of templates that user 140 has access to is large, terminal device 110 may only present a portion of the multiple templates that the user has access to in the panel. Terminal device 110 can determine that it has received a template generation instruction in response to the triggering of the "Add Template" control in panel 305.
[0045] In some embodiments, to avoid accidental user touches, the terminal device 110 may also respond to the triggering of the "Add Template" control in the panel 305 and present... Figure 3B The example interface 300B is shown. Terminal device 110 can present multiple templates (e.g., templates 1-3 shown in the figure) that user 140 has access to in the example interface 300B. Since the multiple templates that user 140 has access to can include various types of templates, in some embodiments, to facilitate user 140's understanding of the type of each template, terminal device 110 can also present corresponding type labels for each template (e.g., the type labels shown in box 311 in the figure). Each type label can present any appropriate information such as text, symbols, numbers, or images.
[0046] For example, taking the text displayed by the type label as an example, if the type label displays the text "Private," then the type label indicates that the corresponding template is a private template created by user 140 and whose usage rights have not been disclosed to others. If the type label displays the text "Public," then the type label indicates that the corresponding template is a public template (which can be a template created by the user and disclosed to other users, or a template created by other users and disclosed for use). If the type label displays the text "XX User Group," then the type label indicates that the corresponding template is a template that can be used by users within the XX user group.
[0047] In the example interface 300B, the terminal device 110 may also present edit controls (e.g., the controls shown in box 312 in the figure) and delete controls (e.g., the controls shown in box 313 in the figure) associated with each template. The terminal device 110 may determine that it has received a template editing instruction for a template in response to receiving a trigger on an edit control associated with a template. The terminal device 110 may determine that it has received a delete instruction for a template in response to receiving a trigger on a delete control associated with a template. The terminal device 110 may also present controls 314 and 315 in the example interface 300B. The terminal device 110 may present templates that user 140 can add in response to a trigger on control 314, which may include, for example, public templates, templates shared by other users with user 140, templates belonging to the user group to which user 140 belongs, etc. The terminal device 110 may determine that it has received a template generation instruction in response to a trigger on control 315.
[0048] Terminal device 110 may, for example, respond to receiving a template generation instruction and present a template configuration interface, displaying corresponding configurable items for multiple dimensions in the configuration interface. It is understood that in the scenario of creating a template, the configurable items for each of the multiple dimensions in the template configuration interface may all be blank configuration information (i.e., no corresponding configuration information) or default configuration information. In some embodiments, terminal device 110 may also respond to receiving a template editing instruction for a certain template and present a template configuration interface. In the scenario of template editing, since the template has been created, at least one configurable item among the multiple configurable items for its corresponding multiple dimensions has corresponding configuration information. For example, the multiple configurable items corresponding to multiple dimensions may include a configuration item for configuring the template name. In the scenario of editing template 1, the configuration information of the configuration item for configuring the template name in the template configuration interface may be "Template 1".
[0049] In some embodiments, at least one agent may include a planning agent for generating a content creation plan and at least one creation agent for generating content based on the content creation plan. If only one creation agent is included for generating content, it may be a general creation agent for multiple types of content. If multiple creation agents are included for generating content, they may include multiple creation agents for generating multiple types of content, such as a text creation agent for generating text-type content, a visual creation agent for generating visual-type content (visual-type content may include images, videos, image sets, etc.), an audio creation agent for generating audio-type content, and so on.
[0050] In some embodiments, multiple dimensions may include one or more of the following dimensions for agent behavior: policy dimension, knowledge dimension, control dimension, and performance dimension. It is understood that only some examples are shown here, and any other suitable dimensions may be included in practice. As examples only, the policy dimension can be used to constrain how the planning agent generates plans and how the creative agent generates content; the knowledge dimension can constrain the domain, norms, background, reference cases, etc., in which the agent performs its actions; the control dimension can constrain what functions the agent has, which tools it can call, and the scope of its application; and the performance dimension can constrain the agent's prompts, user suggestions, output style, and output format. Multiple dimensions of a template constrain the behavior of at least one agent in content creation. Multiple dimensions can be viewed as multiple layers, such as a policy layer, a knowledge layer, a control layer, and a performance layer. These layers or dimensions are used to define the agent's behavior from different angles or aspects, thereby enabling content creation to meet the specific needs of the user.
[0051] In box 220, terminal device 110 determines the corresponding configuration information for multiple dimensions based on the interactive operations received for the corresponding configurable items of multiple dimensions.
[0052] As mentioned above, terminal device 110 can present a template configuration interface and display corresponding configurable items across multiple dimensions within that interface. For example, terminal device 110 can receive interactive operations on each configurable item via the template configuration interface. For instance, for a specific configurable item, terminal device 110 can present multiple options for that configurable item on the template configuration interface. Upon receiving a selection of an option, terminal device 110 can determine the information corresponding to that option as the configuration information for that configurable item. As another example, for a specific configurable item, terminal device 110 can present an input box for that configurable item on the template configuration interface. Upon receiving user input information via this input box, terminal device 110 can determine the received input information as the configuration information for that configurable item. It is understood that only two examples are shown here; terminal device 110 can also receive interactive operations to determine configuration information based on any other appropriate method.
[0053] refer to Figure 3C , Figure 3C The example interface 300C shown illustrates an example of a template configuration interface. As shown, the template configuration interface may include a return control 321, and the terminal device 110 may, for example, respond to a triggering of the return control to return a view as shown below. Figure 3A The example interface shown is 300A or the return value is as follows: Figure 3BThe example interface 300B is shown. The template configuration interface may include an input box 322 for receiving the template name. The terminal device 110 can determine the template name from the user's input information received via the input box 322. For example, if the terminal device 110 receives the text "template 1" via the input box 322, the terminal device 110 can determine that the template name is template 1.
[0054] The template configuration interface may include an input box 323 for receiving template description information. The terminal device 110 can determine the input information received via the input box 323 as the template description information. The description information may briefly describe the template's function, purpose, etc. For example, if the terminal device 110 receives the text "used to generate articles" via the input box 323, the terminal device 110 can determine that the template description information is "used to generate articles," that is, the template is a template for generating articles.
[0055] The template configuration interface may include an input box 324 for receiving template prompts. The terminal device 110 can determine the input information received via the input box 324 as the template prompt. After the template is created, the terminal device 110 can display the template prompt in response to the template being selected to guide the user to input the corresponding information. For example, if the terminal device 110 receives the text "Help me write an article, the topic is:" via the input box 323, the terminal device 110 can determine that the template prompt is "Help me write an article, the topic is:". The terminal device 110 can then display the prompt in response to the template being selected to guide the user to input their desired topic.
[0056] The template configuration interface may include a switch control 325. The terminal device 110 can determine whether to disclose the currently edited template to other users based on the state of the switch control 325. For example, if the switch control 325 is in the off state, the terminal device 110 may determine not to disclose the template to other users; in this case, the currently edited template can only be used or edited by the current user. Alternatively, if the switch control 325 is in the on state, the terminal device 110 may determine to disclose the template to other users; in this case, the currently edited template can be used by other users in the application 125.
[0057] In some embodiments, where multiple dimensions include a policy dimension, terminal device 110 can receive multiple types of instructions issued for configurable items of the policy dimension, each of which corresponds to one of multiple agents. Terminal device 110 can generate configuration information for the policy dimension by associating the multiple types of instructions with multiple agents respectively. For example, the template configuration interface shown in example interface 300C may include an input box 326 for receiving instructions of one type and an input box 327 for receiving instructions of another type. The type corresponding to input box 326 may correspond to a planning agent, and the type corresponding to input box 327 may correspond to a creating agent. Terminal device 110 can generate configuration information for the policy dimension by associating the instructions received via input box 326 with the planning agent and the instructions received via input box 327 with the creating agent.
[0058] In some embodiments, where multiple dimensions include a knowledge dimension, the terminal device 110 can receive a knowledge addition request for a configurable item of the knowledge dimension. This knowledge addition request can indicate one or more knowledge sources. Knowledge sources can include any suitable knowledge source such as files, documents, and datasets. Knowledge sources can indicate the knowledge, domain, scope, etc., required for the agent to perform its task. As an example only, knowledge sources can include content created historically by the agent, input text including domain knowledge, user-uploaded files, etc. The terminal device 110 can generate configuration information for the knowledge dimension based on one or more knowledge sources.
[0059] refer to Figure 3C The template configuration interface shown in example interface 300C may include an add control 328. Terminal device 110 can respond to the triggering of the add control to determine that a knowledge addition request has been received. Terminal device 110 can then display panel 331, which may include the controls "Manual Input" and "Page Add," which can correspond to different knowledge source addition methods. The "Manual Input" control can correspond to the user manually inputting knowledge sources, while the "Page Add" control can correspond to adding knowledge sources via the knowledge addition interface. For example, terminal device 110 can respond to the triggering of the "Page Add" control to display... Figure 3D The example interface 300D is shown. Example interface 300D illustrates an example of a knowledge addition interface. For example... Figure 3D As shown, the example interface 300D includes a return control 341. The terminal device 110 can respond to the triggering of the return control 341 and return to the template configuration interface shown in the example interface 300C.
[0060] Example interface 300D may include an input box 342 for receiving the title of a knowledge source and an input box 343 for receiving the detailed content of the knowledge source. Terminal device 110 may determine the input information received via input box 342 as the title of the knowledge source and the input information received via input box 343 as the content of the knowledge source. Example interface 300D may include a cancel control 344 and an add control 345. Terminal device 110 may, in response to triggering the cancel control 344, cancel the addition of the knowledge source, and terminal device 110 may, for example, return to display example interface 300C. Terminal device 110 may, for example, in response to triggering the add control 345, determine the knowledge source based on the content received via input boxes 342 and 343, and add the knowledge source to the template.
[0061] Return to continue reading Figure 3C The example interface 300C may include an input box 329, and the terminal device 110 may, for example, present knowledge sources that have been added to the template in the input box 329. In some embodiments, the terminal device 110 may also receive editing, deletion, or update operations on the knowledge sources that have been added to the template, which is not limited in this disclosure. For example, the terminal device 110 may generate configuration information for knowledge dimensions based on the knowledge sources presented in the input box 329.
[0062] In some embodiments, the terminal device 110 can extract structured knowledge points from one or more knowledge sources by parsing their structures. The structured knowledge points may include databases, tables, knowledge graphs, vectors, etc. Where multiple dimensions also include a policy dimension, the terminal device 110 can determine reference instructions for one or more knowledge sources from the configuration information of the policy dimension, and then construct a knowledge graph as the configuration information for the knowledge dimension based on the structured knowledge points and the reference instructions.
[0063] refer to Figure 3E , Figure 3E Example 300E of signaling flow according to some embodiments of the present disclosure is illustrated. Example 300E relates to user 140, template system 350, knowledge management system 360, and intelligent agent 160. Template system 350, knowledge management system 360, and intelligent agent 160 may be deployed locally on terminal device 110 or deployed at a remote device (e.g., server 130). Template system 350 may be configured to receive interactions with templates to create or edit templates. Knowledge management system 360 may be configured to process knowledge sources or knowledge.
[0064] In Example 300E, Template System 350 can receive (371) user creation or editing operations on templates. During the creation or editing of a template, if the user adds knowledge sources to the template, Knowledge Management System 360 can receive (372) documents uploaded by the user, and in response to receiving the documents, parse (373) the document structure and extract (374) key concepts (i.e., knowledge points) of the structured representation. Knowledge Management System 360 can return (375) the parsed key concepts to Template System 350. Template System 350 can receive (376) reference instructions for knowledge sources configured by User 140, which can be determined from the configuration information of the strategy dimension. Template System 350 can construct (377) a knowledge graph based on the reference instructions and key concepts.
[0065] It is understandable that when agent 160 needs to apply the current template, agent 160 can respond to receiving (381) an instruction from user 140 to perform content creation using the current template and send (382) a request to load the template to template system 350. Template system 350 can return (383) a complete configuration including the knowledge source to agent 160 based on the request. This complete configuration can be, for example, all configuration information of the template. Agent 160 can perform (384) the content creation task based on the configuration information of the knowledge dimension indicated by the template and, in response to the completion of the task, output (385) the created content to user 140.
[0066] In some embodiments, where multiple dimensions include a control dimension, terminal device 110 can receive one or more user selections for configurable items in the control dimension, where the one or more user selections define the range of actions to be taken by one or more agents. The one or more user selections may include at least one of enabling an interactive creation mode, enabling a human-computer collaboration mode, and selecting one or more information sources for searching. In interactive creation mode, intermediate results of content creation are presented step-by-step. In human-computer collaboration mode, content creation is performed based on user confirmation of key nodes. Information sources may include any suitable information source such as databases, web pages, applications, and third-party platforms. Terminal device 110 can then generate configuration information for the control dimension based on one or more user selections.
[0067] Continue to refer to Figure 3CThe example interface 300C may also include a switch control 332, and the terminal device 110 can determine whether to enable the selection of interactive authoring mode based on the state of the switch control 332. For example, the terminal device 110 may determine not to enable interactive authoring mode in response to the switch control 332 being in the off state. For example, the terminal device 110 may determine to enable interactive authoring mode in response to the switch control 332 being in the on state.
[0068] The example interface 300C may also include a switch control 333, and the terminal device 110 can determine whether to enable the selection of the human-machine collaboration mode based on the state of the switch control 333. For example, the terminal device 110 may determine that the human-machine collaboration mode is not enabled in response to the switch control 333 being in the off state. For example, the terminal device 110 may determine that the human-machine collaboration mode is enabled in response to the switch control 333 being in the on state.
[0069] Example interface 300C may also include area 334, where terminal device 110 may present multiple information sources. Terminal device 110 may, for example, present a "View More" control in area 334, and may, in response to a trigger on the "View More" control, present more information sources. Terminal device 110 may present a selection control (e.g., the selection control shown in box 335 in the figure) associated with each information source. Terminal device 110 may, in response to receiving a trigger on the selection control corresponding to one or more information sources in area 334, determine these one or more information sources as the selected information sources.
[0070] In box 230, terminal device 110 generates a template for content creation based on corresponding configuration information from multiple dimensions. The generated template is used at least to generate prompt word information in content creation.
[0071] In some embodiments, the terminal device 110 may generate a template based on configuration information in response to receiving a template generation instruction. (See reference...) Figure 3C The example interface 300C may include controls 336 and 337. Terminal device 110 may, in response to a trigger on control 336, determine whether to cancel generating or editing the template. Terminal device 110 may, in response to a trigger on control 337, generate or update the template based on corresponding configuration information from multiple dimensions.
[0072] In some embodiments, the terminal device 110 may store corresponding configuration information for multiple dimensions according to a predetermined data structure, serving as template data. The predetermined data structure includes corresponding data blocks for multiple dimensions. The predetermined data structure can be any suitable data structure, which may be a code block that meets specific format requirements. For example, the code block may include multiple lines of code, which may sequentially indicate the template name, template description, configuration information for the knowledge dimension, configuration information for the strategy dimension, configuration information for the control dimension, and control information for the performance.
[0073] In some embodiments, terminal device 110 may also determine whether to publish the template based on user interaction or configuration. For example, terminal device 110 may determine to publish the template in response to receiving a selection to publish the template via example interface 300C. Terminal device 110 may publish the template using the description information configured in the template in response to the generated template being configured to be publishable. The published template can be directly used by other users.
[0074] In some embodiments, after a template is created, the creating user or other users can use the template. For example, in response to receiving an instruction to use the template for content creation, terminal device 110 can present the prompts configured in the template to obtain a theme for content creation. Terminal device 110 can, in response to receiving user input indicating a theme, generate prompt information for at least one agent based on the user input and corresponding configuration information across multiple dimensions, and utilize at least one agent to generate content with the theme based on the prompt information. For example, terminal device 110 can present... Figure 3A The example interface 300A shown, in response to a template being selected, displays the text "Help me write an article, the topic is:" in input box 310. Terminal device 110 can, in response to receiving the text "Environmental Protection" entered by the user in input box 310, generate prompt information based on the template configuration information. This prompt information may include, for example, at least the text "Help me write an article, the topic is: Environmental Protection". Terminal device 110 can utilize at least one agent to generate an article with the topic "Environmental Protection" based on the prompt information.
[0075] As an example, based on the prompts and the topic entered by the user, the terminal device 110 can generate user prompts as part of the prompt information. Configuration information (i.e., instructions) at the policy dimension can be included in the prompt information as at least part of the system prompts. In the case of multiple agents, different instructions can be provided to the corresponding agents. For example, instructions for planning constraints can be used as system prompts for the planning agent, and instructions for content creation constraints can be used as system prompts for the content creation agent. Configuration information at the control dimension can be included in the prompt information to indicate what actions or functions the agent or its utilized machine learning model can take.
[0076] Setting templates can significantly improve users' content creation efficiency, especially for scenarios with repetitive, multiple, and long-term creation needs. Users can create templates based on their own needs and utilize them in subsequent creations. Solidifying these needs into templates avoids unnecessary interaction cycles and workloads during each creation process. Furthermore, using templates to solidify needs also helps improve the consistency and quality of content creation.
[0077] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 4 An exemplary structural block diagram of a template generation apparatus 400 for agent behavior according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in a terminal device 110. The various modules / components in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0078] like Figure 4 As shown, device 400 includes a configuration item presentation module 410, configured to present corresponding configurable items in multiple dimensions in response to receiving a template generation instruction for content creation. These multiple dimensions constrain the behavior of at least one agent in content creation. Device 400 also includes a configuration information determination module 420, configured to determine corresponding configuration information for multiple dimensions based on received interactive operations for the corresponding configurable items in those dimensions. Device 400 further includes a template generation module 430, configured to generate a template for content creation based on the corresponding configuration information in the multiple dimensions. The generated template is used at least to generate prompt information during content creation.
[0079] In some embodiments, the template generation module 430 is further configured to: store corresponding configuration information for multiple dimensions according to a predetermined data structure, wherein the predetermined data structure includes corresponding data blocks for multiple dimensions as template data.
[0080] In some embodiments, at least one agent includes multiple agents implementing different functions, multiple dimensions include a policy dimension for agent behavior, and the configuration information determination module 420 is further configured to: receive multiple types of instructions issued for configurable items of the policy dimension, each of the multiple types corresponding to one of the multiple agents; and generate configuration information for the policy dimension by associating the multiple types of instructions with the multiple agents respectively.
[0081] In some embodiments, the plurality of agents include at least: a planning agent for generating content creation plans and a creation agent for generating content based on the content creation plans.
[0082] In some embodiments, the multiple dimensions include a knowledge dimension for agent behavior, and the configuration information determination module 420 is further configured to: receive a knowledge addition request for a configurable item of the knowledge dimension, the knowledge addition request indicating one or more knowledge sources; and generate configuration information for the knowledge dimension based on one or more knowledge sources.
[0083] In some embodiments, the multiple dimensions also include a policy dimension for agent behavior, and the configuration information determination module 420 is further configured to: extract structured representations of knowledge points from one or more knowledge sources by parsing the structure of one or more knowledge sources; determine reference instructions about one or more knowledge sources from the configuration information of the policy dimension; and construct a knowledge graph as configuration information for the knowledge dimension based on the structured representations of knowledge points and reference instructions.
[0084] In some embodiments, the multiple dimensions include control dimensions for agent behavior, and the configuration information determination module 420 is further configured to: receive one or more user selections for configurable items of the control dimensions, the one or more user selections defining the range of actions to be taken by one or more agents; and generate configuration information for the control dimensions based on the one or more user selections.
[0085] In some embodiments, one or more user choices include at least one of the following: whether to enable an interactive creation mode in which intermediate results of content creation are presented step by step; whether to enable a human-computer collaboration mode in which content creation is performed based on user confirmation of key nodes; or the selection of one or more information sources for search.
[0086] In some embodiments, the apparatus 400 further includes a template publishing module configured to publish the template using the description information configured in the template in response to the generated template being configured to be publishable.
[0087] In some embodiments, the apparatus 400 further includes: a guidance presentation module configured to, in response to receiving an instruction to use the generated template for content creation, present guidance text configured on the template to obtain a theme for content creation; a prompt word information generation module configured to, in response to receiving user input indicating the theme, generate prompt word information used by at least one agent based on the user input and corresponding configuration information of multiple dimensions; and a content generation module configured to, using at least one agent, generate content with a theme based on the prompt word information.
[0088] The units and / or modules included in device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units and / or modules in device 400 can be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.
[0089] It should be understood that one or more steps in the above methods can be performed by suitable electronic devices or combinations of electronic devices. Such electronic devices or combinations of electronic devices may include, for example, […]. Figure 1 Terminal device 110 in the middle.
[0090] Figure 5 A block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 5 The electronic device 500 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to achieve Figure 1 Terminal equipment 110 or Figure 4 Device 400.
[0091] like Figure 5As shown, electronic device 500 is in the form of a general-purpose electronic device. Components of electronic device 500 may include, but are not limited to, one or more processing units or processors 510, memory 520, storage devices 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. Processor 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 520. In a multiprocessor system, multiple processors execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 500.
[0092] Electronic device 500 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data and can be accessed within electronic device 500.
[0093] Electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 5 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0094] Communication unit 540 enables communication with other electronic devices via a communication medium. Additionally, the functionality of components of electronic device 500 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, electronic device 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0095] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 500 can also communicate with one or more external devices (not shown) via communication unit 540 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 500, or with any device that enables electronic device 500 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0096] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0097] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0098] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0099] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some, as newer, implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0101] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A template generation method for agent behavior, comprising: In response to receiving a template generation instruction for content creation, the system presents corresponding configurable items in multiple dimensions, which constrain the behavior of at least one agent in the content creation process. Based on the interactive operations received for the corresponding configurable items of the multiple dimensions, determine the corresponding configuration information for the multiple dimensions; as well as Based on the corresponding configuration information of the multiple dimensions, a template for the content creation is generated, and the generated template is used at least to generate prompt word information in the content creation.
2. The method according to claim 1, wherein generating the template comprises: According to a predetermined data structure, the corresponding configuration information of the multiple dimensions is stored as the template data, and the predetermined data structure includes the corresponding data blocks of the multiple dimensions.
3. The method according to claim 1, wherein the at least one agent comprises multiple agents implementing different functions, the multiple dimensions include policy dimensions for agent behavior, and determining the corresponding configuration information of the multiple dimensions includes: Receive multiple types of instructions issued for configurable items of the policy dimension, each of the multiple types corresponding to one of the multiple agents; as well as Configuration information for the policy dimension is generated by associating the various types of instructions with the various intelligent agents.
4. The method of claim 3, wherein the plurality of agents comprises at least: A planning agent for generating content creation plans and a creation agent for generating content based on the content creation plans.
5. The method according to claim 1, wherein the plurality of dimensions includes a knowledge dimension for agent behavior, and determining the corresponding configuration information for the plurality of dimensions includes: A knowledge addition request is received for a configurable item of the knowledge dimension, the knowledge addition request indicating one or more knowledge sources; as well as The configuration information for the knowledge dimension is generated based on the one or more knowledge sources.
6. The method of claim 5, wherein the plurality of dimensions further includes a policy dimension for agent behavior, and generating configuration information for the knowledge dimension based on the one or more knowledge sources includes: By parsing the structure of the one or more knowledge sources, structured representations of knowledge points are extracted from the one or more knowledge sources; Determine reference instructions for the one or more knowledge sources from the configuration information of the strategy dimension; as well as Based on the knowledge points represented by the structured representation and the reference instructions, a knowledge graph is constructed as the configuration information for the knowledge dimension.
7. The method of claim 1, wherein the plurality of dimensions includes control dimensions for agent behavior, and determining the corresponding configuration information for the plurality of dimensions includes: Receive one or more user selections for configurable items of the control dimension, the one or more user selections defining the range of actions to be taken by the one or more agents; and Based on the selections of one or more users, configuration information for the control dimension is generated.
8. The method of claim 7, wherein the one or more user selections include at least one of the following: The option to enable interactive creation mode, in which intermediate results of content creation are presented step by step. The option to enable or disable the human-computer collaboration mode, in which content creation is based on user confirmation at key points, or The selection of one or more information sources for the search.
9. The method according to claim 1, further comprising: In response to the generated template being configured to be publishable, the template is published using the description information configured in the template.
10. The method according to claim 1, further comprising: In response to receiving an instruction to use the generated template for content creation, the guide configured in the template is presented to obtain a theme for content creation; In response to receiving user input indicating the topic, based on the user input and the corresponding configuration information of the multiple dimensions, prompt word information used by the at least one agent is generated; as well as Using the at least one intelligent agent, content with the topic is generated based on the prompt word information.
11. A template generation device for agent behavior, comprising: The configuration item presentation module is configured to present corresponding configurable items in multiple dimensions in response to receiving a template generation instruction for content creation. These multiple dimensions constrain the behavior of at least one agent in the content creation process. The configuration information determination module is configured to determine the corresponding configuration information for the multiple dimensions based on the interactive operations received for the corresponding configurable items of the multiple dimensions. as well as The template generation module is configured to generate a template for the content creation based on the corresponding configuration information of the multiple dimensions. The generated template is used at least to generate prompt word information in the content creation process.
12. An electronic device, comprising: At least one processor; as well as At least one memory, coupled to the at least one processor and storing instructions for execution by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having stored thereon computer-executable instructions that can be executed by a processor to implement the method according to any one of claims 1 to 10.
14. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 10.