Information updating method and device, and electronic device
By automating the acquisition and analysis of agent outputs to update their capability descriptions, the problem of mismatched descriptions caused by manual writing is solved, achieving accuracy and dynamic adaptability in agent capability descriptions, and improving the efficiency of invocation and collaboration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the capability descriptions of intelligent agents are mostly written manually, which leads to low efficiency and difficulty in real-time synchronization. This results in a mismatch between the capability descriptions and the actual functions of the intelligent agents, affecting the efficiency of invocation and multi-agent collaboration.
The system automatically acquires the agent's capability description, generates test input and sends it to the agent, updates the capability description based on the output, and uses a large language model to analyze the output to generate a more accurate capability description, thus achieving automation and iterative updates.
It improves the accuracy of agent capability description, reduces manual maintenance costs, ensures successful invocation and multi-agent collaboration efficiency, and adapts to the dynamic changes in agent functions.
Smart Images

Figure CN122240153A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically to an information updating method, apparatus, and electronic device. Background Technology
[0002] With the development of artificial intelligence technology, intelligent agents are widely used in various scenarios. Capability descriptions, as the core basis for declaring the functions of intelligent agents and enabling callers to identify their capability boundaries, directly affect the efficiency of intelligent agent invocation.
[0003] In related technologies, the capability descriptions of intelligent agents are mostly written and updated manually. However, this manual approach is not only inefficient but also prone to human oversight, leading to a mismatch between the capability descriptions and the actual functions of the intelligent agent. Furthermore, the capabilities of intelligent agents change dynamically with model iterations, making real-time synchronization difficult and often resulting in lagging capability descriptions. Summary of the Invention
[0004] In view of the above problems, this application provides an information updating method, apparatus and electronic device.
[0005] According to a first aspect of this application, an information updating method is provided, comprising: obtaining a first capability description, the first capability description being used to declare the functionality of the target intelligent agent to an object that invokes the target intelligent agent; generating at least one first test input based on the first capability description; sending the first test input to the target intelligent agent to obtain at least one first output generated by the target intelligent agent in response to the first test input; and updating the first capability description based on the at least one first output to generate a second capability description.
[0006] According to an embodiment of this application, the method further includes: generating at least one second test input, the second test input being different from the first test input; sending the second test input to the target agent to obtain at least one second output generated by the target agent in response to the second test input; and updating the second capability description based on the at least one second output to generate a third capability description.
[0007] According to an embodiment of this application, updating the first capability description based on the at least one first output to generate a second capability description includes: determining an evaluation result based on the at least one first output and the first capability description, wherein the evaluation result characterizes the actual capability of the target agent; and updating the first capability description based on the evaluation result to obtain the second capability description.
[0008] According to an embodiment of this application, the method further includes generating at least one third test input based on the evaluation result and the second capability description; wherein the third test input is used as the first test input or a part of the first test input in the next round of operation.
[0009] According to an embodiment of this application, determining the evaluation result based on the at least one first output and the first capability description includes: analyzing the at least one first output to determine at least one actual function implemented by the target agent; determining the matching relationship between the at least one actual function and the function declared in the first capability description; and determining the evaluation result based on the matching relationship, wherein the evaluation result includes at least one of the following: function matching information, newly added function information, function missing information, or function restricted information.
[0010] According to an embodiment of this application, generating at least one third test input based on the evaluation result and the second capability description includes: in response to the evaluation result indicating an inconsistency between the functions declared in the first capability description and the first output, generating a test input for verifying a first type of function as the third test input based on the second capability description, wherein the first type of function is a function that is inconsistent with the first output in the first capability description; and / or, in response to the evaluation result indicating an consistency between the functions declared in the first capability description and the first output, generating a test input for verifying a second type of function as the third test input based on the second capability description, wherein the second type of function is a function that exists in the first output but does not exist in the first capability description.
[0011] According to an embodiment of this application, the method further includes extracting an output data structure from the at least one first output; generating an input / output template containing an input format specification and an output format specification based on the format of the first test input and the output data structure, wherein the input / output template is used to declare the input / output specification of the target intelligent agent to the object that calls the target intelligent agent.
[0012] According to an implementation of this application, updating the first capability description based on the at least one first output includes: generating update prompt information, the update prompt information including at least the first capability description and the at least one first output; inputting the update prompt information into a large language model to obtain a natural language response; and updating the first capability description based on the natural language response.
[0013] A second aspect of this application provides an information updating apparatus, comprising: an acquisition module for acquiring a first capability description, the first capability description being used to declare the functionality of the target intelligent agent to an object that invokes the target intelligent agent; a generation module for generating at least one first test input based on the first capability description; a sending module for sending the first test input to the target intelligent agent to acquire at least one first output generated by the target intelligent agent in response to the first test input; and an updating module for updating the first capability description based on the at least one first output to generate a second capability description.
[0014] A third aspect of this application provides an electronic device including a memory and a processor, on which an intelligent agent is disposed. The memory stores a computer program executable on the processor. When the processor executes the computer program, it performs the following operations: obtaining a first capability description, the first capability description being used to declare the functionality of the target intelligent agent to an object that invokes the target intelligent agent; generating at least one first test input based on the first capability description; sending the first test input to the target intelligent agent to obtain at least one first output generated by the target intelligent agent in response to the first test input; and updating the first capability description based on the at least one first output to generate a second capability description. Attached Figure Description
[0015] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0016] Figure 1 The illustrations depict application scenarios of the information updating method, apparatus, and electronic device according to embodiments of this application.
[0017] Figure 2 A flowchart illustrating an information update method according to an embodiment of this application is shown schematically;
[0018] Figure 3 A flowchart illustrating an iterative information update method according to an embodiment of this application is shown schematically.
[0019] Figure 4 A flowchart illustrating an information update method for introducing evaluation results according to an embodiment of this application is shown schematically.
[0020] Figure 5 A flowchart illustrating an input / output template generation method according to an embodiment of this application is shown schematically.
[0021] Figure 6 A schematic diagram illustrating the structure of an information updating apparatus according to an embodiment of this application is shown; and
[0022] Figure 7 A block diagram suitable for an electronic device according to an embodiment of this application is illustrated schematically. Detailed Implementation
[0023] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0026] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0027] Figure 1 The illustration shows an application scenario diagram of the information update method, apparatus and electronic device according to embodiments of this application.
[0028] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first intelligent agent 110, a second intelligent agent 120, a third intelligent agent 130, a network 140, and an intelligent agent management platform 150. The network 140 is used to provide a communication link between the first intelligent agent 110, the second intelligent agent 120, the third intelligent agent 130, and the intelligent agent management platform 150. The network 140 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0029] First agent 110, second agent 120, and third agent 130 interact with agent management platform 150 via network 140. First agent 110, second agent 120, and third agent 130 refer to callable program units capable of receiving input and generating output, such as dialogue agents based on large language models, task execution agents, data analysis agents, code generation agents, and image processing agents. Different agents have different functions; for example, some agents excel at text processing, some at data querying, and some at task planning.
[0030] The agent management platform 150 is used to receive registration information submitted by agent developers, including descriptions of the agent's functions. Simultaneously, the platform also receives invocation requests from users or other agents and, based on its understanding of the target agent's functions, routes the invocation requests to the appropriate agent to obtain execution results.
[0031] In practical applications, the first intelligent agent 110, the second intelligent agent 120, and the third intelligent agent 130 need to be registered with the platform so that they can be discovered and invoked by other systems or users. However, the functional descriptions submitted by developers may be inaccurate, incomplete, or inconsistent with the actual capabilities of the intelligent agents. During the invocation process, the intelligent agent management platform 150 needs to accurately understand the functional boundaries, input requirements, and output format of the target intelligent agent to ensure successful execution of the invocation. Because the declared functional descriptions may differ from the actual capabilities of the target intelligent agent, invocation failures, unexpected execution results, or failure to fully utilize the potential capabilities of the target intelligent agent may occur.
[0032] For example, the first agent 110 may actually be able to handle multiple input formats, but the developer has only declared one of them, causing the caller to be unable to use other valid calling methods; or, the first agent 110 may have functional boundaries (such as only being able to handle specific types of data), but the developer has not specified them in the functional description, causing the caller to get incorrect results when calling outside the boundary conditions; or, the first agent 110 may exhibit additional functions that the developer has not declared in actual operation, but because the functional description has not been updated, these capabilities cannot be discovered and utilized by the caller.
[0033] Furthermore, in multi-agent collaborative scenarios, the output of one agent may directly serve as the input of another. In this case, the caller not only needs to understand the target agent's capabilities but also needs to accurately grasp the format specifications of its input and output in order to correctly construct the call request and parse the returned results. If the input and output formats are unclear or do not conform to reality, it will lead to a break in the multi-agent collaboration chain, affecting the overall task execution efficiency and quality.
[0034] It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. On the contrary, the embodiments of this application can be applied to any scenario that requires verification and description updates of the intelligent agent's functions.
[0035] It should be noted that the information update method provided in this application embodiment can be executed by the agent management platform 150. After receiving the function description submitted by the agent developer, the agent management platform 150 can automatically verify and update the function description to ensure that the function description of the agent registered in the platform matches its actual capabilities, thereby improving the success rate of subsequent calls and the efficiency of multi-agent collaboration.
[0036] Figure 2 A flowchart illustrating an information update method according to an embodiment of this application is shown schematically.
[0037] like Figure 2 As shown, the information update method 200 of this embodiment includes operations S210 to S240.
[0038] During operation of S210, obtain the first capability description.
[0039] According to embodiments of this application, the first capability description is used to declare the functionality of the target intelligent agent to the object that invokes the target intelligent agent. The first capability description can be a structured data file, such as a configuration file in JSON, XML, or YAML format, used to describe information such as the functions supported by the target intelligent agent, invocation methods, input parameters, and output formats.
[0040] According to the embodiments of this application, in practical applications, the first capability description can be submitted by the agent developer when registering the agent, used to announce its capabilities to other agents or calling platforms; it can also be read from an existing agent registration library; or it can be automatically generated by parsing the agent's interface documentation. The content of the first capability description may include the agent's name, version, author, function tags, function description text, input parameter definitions, output result definitions, etc. It should be noted that the first capability description only represents the developer's subjective declaration of the agent's functions and may differ from the agent's actual capabilities.
[0041] In operation S220, at least one first test input is generated based on the first capability description.
[0042] According to embodiments of this application, the purpose of generating the first test input is to verify whether the functions declared in the first capability description match the actual capabilities of the target agent. The first test input can be specific request data used to invoke the target agent, and its format can match the input format expected by the target agent. For example, if the target agent is a conversational agent, the first test input can be a natural language question; if the target agent is a data analysis agent, the first test input can be a structured request containing a data file and query instructions; if the target agent is a code generation agent, the first test input can be a problem description or functional requirement.
[0043] According to the embodiments of this application, the specific method for generating the first test input can be constructed based on the functions declared in the first capability description, and can follow explicit generation rules: based on the input parameter types and format requirements in the first capability description, test inputs covering normal scenarios, boundary scenarios, and abnormal scenarios are automatically constructed through a preset rule base or intelligent generation model, ensuring that the test inputs are strongly correlated with the functions declared in the first capability description. For example, if the first capability description declares that the target agent supports text summarization, a request containing long text can be generated as the first test input; if it declares that it supports sentiment analysis, a request containing text with unclear sentiment can be generated as the first test input. In addition, the first test input can also include boundary cases or abnormal cases, such as empty input, excessively long input, and incorrectly formatted input, to test the robustness and functional boundaries of the target agent.
[0044] In operation S230, a first test input is sent to the target agent to obtain at least one first output generated by the target agent in response to the first test input.
[0045] According to an embodiment of this application, sending the first test input to the target agent can be achieved by calling the application programming interface provided by the target agent. After receiving the first test input, the target agent processes the input according to its internal logic and generates a corresponding output. This output is the first output, and its form can be text, structured data, file, image, or any other data type supported by the target agent.
[0046] According to the embodiments of this application, when sending the first test input, different processing methods can be applied depending on the deployment method of the target agent. If the target agent is deployed on a remote server, it can be sent via HTTP request, RPC call, or message queue; if the target agent is deployed locally, it can be sent via function call, inter-process communication, or local API. The method of receiving the first output should correspond to the method of sending, such as receiving via HTTP response, RPC return, or message queue.
[0047] According to the embodiments of this application, during the process of obtaining the first output, information such as request details, response details, response time, and status code for each call can be recorded as a basis for subsequent analysis. If the call fails, such as due to network error, timeout, or returned error code, the failure information can also be processed as a special form of the first output.
[0048] In operation S240, the first capability description is updated based on at least one first output to generate a second capability description.
[0049] According to embodiments of this application, the actual functions supported by the target agent can be inferred by analyzing the correspondence between the first output and the first test input, combined with explicit judgment criteria. For example, if the target agent returns a successful execution response to a test input for a certain function declaration, it can be confirmed that the function is indeed supported; if an error or unprocessable response is returned, it may indicate that the function does not exist or has usage restrictions. Furthermore, if the first output contains information or behaviors not declared in the first capability description, new functions or potential capabilities of the target agent can be identified from it.
[0050] According to the embodiments of this application, the first capability description can be updated in various ways. For example, functions that are not included in the first capability description but actually exist can be added; inaccurate descriptions of functions in the first capability description, such as parameter types and return value formats, can be corrected; functions declared in the first capability description but not actually exist can be deleted; restrictive conditions can be added to clarify the usage boundaries of certain functions, such as only supporting specific languages or only being able to process data of a specific size; and the function description can be refined by breaking down vague functions into multiple specific sub-functions.
[0051] According to embodiments of this application, the second capability description can be output in the same format as the first capability description, so that it can be read and used by other systems or users. Compared with the first capability description, the second capability description is closer to the actual capabilities of the target intelligent agent, and can provide a more reliable basis for subsequent intelligent agent invocation, orchestration, and management.
[0052] According to embodiments of this application, the declared functions of a target intelligent agent can be automatically verified and a more accurate capability description can be generated based on the actual invocation results of the target intelligent agent. Specifically, firstly, targeted test inputs are generated based on the first capability description; then, the actual response of the target intelligent agent is obtained through actual invocation; and finally, the actual capabilities of the intelligent agent are inferred based on the response, and the capability description is updated. The entire process requires no manual intervention. Therefore, on the one hand, the accuracy of the capability description is improved, avoiding invocation failures or collaboration errors caused by discrepancies between the declaration and reality; on the other hand, the generation and updating of capability descriptions are automated, adapting to scenarios of dynamic changes in intelligent agent functions or large-scale registration, and reducing manual maintenance costs.
[0053] It should be noted that the operations S210~S240 described above only describe a single verification and update process. In practical applications, these operations can be repeated multiple times to gradually approximate the true capabilities of the target agent. Each iteration can use the second capability description generated in the previous round as the first capability description in the current round, and generate new test inputs based on the output of the previous round, thereby achieving continuous exploration and optimization of the agent's capabilities and descriptions.
[0054] Figure 3 A flowchart illustrating an iterative information update method according to an embodiment of this application is shown.
[0055] like Figure 3 As shown, the iterative information update method 300 in this embodiment may include operations S310 to S340.
[0056] In operation S310, at least one second test input is generated.
[0057] According to embodiments of this application, the second test input differs from the aforementioned first test input. For example, in order to enable multi-round verification to cover more comprehensive scenarios, the difference between the second test input and the first test input may be in the test scenario, the input parameters, or at least one aspect of the functional verification dimension, so as to expand the scope of exploration of the actual capabilities of the target intelligent agent and avoid incomplete capability description due to a single test input.
[0058] For example, the above differences can be specifically manifested in boundary scenario testing. If the first test input is a text summarization request under normal scenario conditions, such as a 500-word text summary, then the second test input can be set as a text summarization request under boundary scenario conditions, such as a 100-word short text summary, a 5000-word long text summary, or a summary request for different types of text, such as news text or technical document text; if the first test input is positive sentiment text in sentiment analysis, then the second test input can be negative sentiment text, neutral sentiment text, or mixed sentiment text.
[0059] In operation S320, a second test input is sent to the target agent to obtain at least one second output generated by the target agent in response to the second test input.
[0060] In operation S330, the second capability description is updated based on at least one second output to generate a third capability description.
[0061] According to the embodiments of this application, the capability description generated in the previous round can be modified, supplemented, or refined based on the actual behavior exhibited by the target agent in the second round of testing. For example, if the second test input is a long text summary request, and the second output returned by the target agent meets the summary requirements, then the functional details regarding "long text summary" in the second capability description are supplemented; if the second output cannot process long text summaries, then the scope of application of the text summarization function in the second capability description is modified, explicitly marking "only supports text summaries within 5000 characters".
[0062] By repeating the above operations multiple times, iterative verification and updates of the target agent's capabilities can be achieved. Each round of test input targets scenarios not covered in the previous round, gradually narrowing the gap between the capability description and the agent's actual capabilities, making the final capability description more accurate and complete.
[0063] In some embodiments of this application, an iteration termination condition can be preset, such as reaching the maximum number of iteration rounds, the capability description remaining unchanged for multiple consecutive rounds, or the capability coverage exceeding a preset threshold. When the preset condition is met, operation S340 is executed to stop the iteration and the currently generated capability description is output as the final capability description.
[0064] Figure 4 A flowchart illustrating an information update method for introducing evaluation results according to an embodiment of this application is shown schematically.
[0065] like Figure 4 As shown, the information update method 400 for introducing evaluation results provided in this embodiment includes operations S410 to S420.
[0066] In operation S410, the evaluation result is determined based on at least one first output and a first capability description.
[0067] According to an embodiment of this application, the evaluation result is used to characterize the difference between the actual capabilities of the target agent and the functions declared in the first capability description. The evaluation result can be structured data, such as information including functional verification status, capability matching degree, list of newly added functions, list of missing functions, etc.
[0068] In operation S420, the first capability description is updated based on the evaluation result to obtain the second capability description.
[0069] For example, if the evaluation result indicates that a function declared in the first capability description has been successfully verified, the function declaration can be retained in the second capability description; if the evaluation result indicates that a function is not supported, the function declaration can be deleted or corresponding restrictions can be added in the second capability description; if the evaluation result indicates that there is a function not declared in the first capability description, the declaration of the function can be added in the second capability description.
[0070] According to the embodiments of this application, by introducing the evaluation results as an intermediate step, the update process of capability description can be made more reliable, avoiding misjudgments that may be caused by simple matching based on the original output.
[0071] In some embodiments of this application, at least one third test input can be generated based on the evaluation results and the second capability description. This third test input differs from the aforementioned first test input, and its generation can be based on the capability state of the target agent revealed in the evaluation results.
[0072] For example, if the evaluation results indicate that a certain function declared in the first capability description is inconsistent with the first output, such as the function being absent or behaving abnormally, test inputs can be generated as third test inputs to further verify the function and explore the specific failure conditions or boundaries of the function. If the evaluation results indicate that the function declared in the first capability description is consistent with the first output, but there are potential functions not declared in the first capability description, test inputs can be generated as third test inputs to verify these potential functions.
[0073] This third test input is used in the next round of operations as either the first test input or part of the first test input. In other words, in the next round of verification, the first test input will be integrated with the third test input generated in this round, thereby enabling continuous exploration and verification of the target agent's capabilities. This feedback-based test input generation mechanism makes the testing process more intelligent and efficient, avoiding the waste of resources caused by blindly generating test inputs.
[0074] In some embodiments of this application, at least one first output can be analyzed to determine at least one actual function implemented by the target intelligent agent. The actual function can refer to a task or operation that can be inferred from the output and that the target intelligent agent is indeed capable of performing. For example, if the first output is the correct answer to a question, it can be inferred that the target intelligent agent has the function of answering the question; if the first output is the analysis result of some data, it can be inferred that the target intelligent agent has data analysis capabilities. The determination of the actual function can be based on semantic analysis, structural analysis, or the correspondence between the output content and the input.
[0075] In some embodiments of this application, a matching relationship can be determined between at least one implemented actual function and the function declared in the first capability description. The matching relationship can include various cases such as: complete match (the actual function is consistent with the declared function), partial match (the actual function is a subset or variant of the declared function), mismatch (the actual function is unrelated to the declared function), missing (the declared function is not implemented), and added (the actual function is not declared).
[0076] In some implementations of this application, the evaluation results can be determined based on the above matching relationships. These evaluation results may include at least one of the following: functional matching information (e.g., which functions matched successfully), newly added functional information (e.g., which actual functions were not declared), missing functional information (e.g., which declared functions were not implemented), and functional limitation information (e.g., some functions are only available under specific conditions). This structured information provides a clear basis for subsequent capability description updates and test input generation.
[0077] In some embodiments of this application, the operation of generating test inputs based on evaluation results can adopt different strategies depending on different evaluation states.
[0078] In one example, in response to an evaluation result indicating an inconsistency between the functionality declared in the first capability description and the first output, a third test input can be generated based on the second capability description to verify the first type of functionality. The first type of functionality refers to the functionality that is inconsistent with the first output in the first capability description.
[0079] For example, if the first capability description states that the target agent supports "text translation," but returns an error for the translation test input, a new translation test input can be generated as a third test input to further verify whether the function is completely absent or only fails under specific conditions (such as specific language pairs or specific text lengths). Such test inputs can include texts from different language combinations, different text lengths, and different professional fields to explore the specific boundaries of the function.
[0080] In another example, in response to an evaluation result indicating consistency between the functionality declared in the first capability description and the first output, a third test input can be generated based on the second capability description to verify a second type of functionality. The second type of functionality refers to functionality present in the first output but not in the first capability description.
[0081] For example, if the first output includes a chart automatically generated by the target agent, but the first capability description only declares the data analysis function and not the visualization function, then a new test input for chart generation can be generated as a third test input to verify whether the function exists stably, which chart types it supports, and what input conditions are required.
[0082] Through the two strategies described above, the embodiments of this application can dynamically adjust the testing direction according to different evaluation states, which can both explore the problematic functions in depth and actively explore the undeclared potential capabilities, thereby achieving comprehensive and efficient intelligent agent capability verification.
[0083] Figure 5 A flowchart illustrating an input / output template generation method according to an embodiment of this application is shown schematically.
[0084] like Figure 5 As shown, the input / output template generation method 500 provided in this embodiment includes operations S510 to S520.
[0085] In operation S510, an output data structure is extracted from at least one first output.
[0086] In some embodiments of this application, the output data structure refers to the organization format of the response data returned by the target intelligent agent, such as the field names, field types, and nesting structure of a JSON object. Extracting the output data structure can be achieved by parsing the format of the output content, such as performing key-value pair analysis on JSON format output, node analysis on XML format output, and pattern recognition on text format output.
[0087] In operation S520, an input / output template containing input format specifications and output format specifications is generated based on the format of the first test input and the extracted output data structure.
[0088] In some embodiments of this application, input / output templates are used to declare the input / output format specifications of the target agent to the object that invokes the target agent. The input format specification can describe how the request should be constructed when invoking the target agent, such as the field names, field types, required fields, and optional parameters. The output format specification can describe the data format returned by the target agent, such as the meaning, type, and possible value range of the returned fields.
[0089] The input / output template is used for subsequent calls to the target agent, enabling the caller to accurately construct requests and correctly parse responses. In multi-agent collaborative scenarios, the output template of one agent can serve as a reference for the input template of another agent, thereby achieving seamless connection between agents. Through the embodiments of this application, the input / output template can be automatically generated based on the actual call results, avoiding the format mismatch or information omission problems that may occur due to manually writing templates.
[0090] In some embodiments of this application, update prompt information can be generated. This update prompt information includes at least a first capability description and at least one first output. The update prompt information can be organized according to a preset template, for example, including an instruction section (such as "Please update the agent's capability description based on the following test output"), a context section (such as the original content of the first capability description), and a data section (such as the first test input and the corresponding first output).
[0091] In some embodiments of this application, the update prompt information can be input into a large language model to obtain a natural language response. A large language model refers to a natural language processing model that has undergone large-scale pre-training, such as the GPT series models or the BERT series models, capable of understanding complex instructions and generating text output that meets the requirements. After receiving the update prompt information, the large language model, based on its internal knowledge and reasoning ability, analyzes the relationship between the first output and the first capability description, and generates a natural language response containing update suggestions.
[0092] In some embodiments of this application, the first capability description can be updated based on the natural language response. This can include parsing the natural language response to extract modifications to the first capability description, such as newly added function declarations, deleted function declarations, and corrected descriptive text. Then, based on the extracted modifications, the first capability description is updated accordingly to generate a second capability description.
[0093] By introducing a large language model, the embodiments of this application can leverage its powerful natural language understanding and generation capabilities to achieve in-depth analysis of complex, unstructured outputs, thereby more accurately identifying the actual capabilities of the target intelligent agent and generating high-quality capability descriptions.
[0094] Based on the above information updating method, this application also provides an information updating device. The following will be combined with... Figure 6 The information updating device is described in detail.
[0095] Figure 6 A schematic block diagram of an information updating apparatus according to an embodiment of this application is shown.
[0096] like Figure 6 As shown, the information update device 600 of this embodiment includes an acquisition module 610, a generation module 620, a sending module 630, and an update module 640.
[0097] The acquisition module 610 is used to acquire a first capability description, which is used to declare the functionality of the target intelligent agent to the object that calls the target intelligent agent. In one embodiment, the acquisition module 610 can be used to perform the operation S210 described above, which will not be repeated here.
[0098] The generation module 620 is used to generate at least one first test input based on the first capability description. In one embodiment, the generation module 620 can be used to perform the operation S220 described above, which will not be repeated here.
[0099] The sending module 630 is used to send a first test input to the target agent to obtain at least one first output generated by the target agent in response to the first test input. In one embodiment, the sending module 630 may be used to perform the operation S230 described above, which will not be repeated here.
[0100] The update module 640 is used to update the first capability description based on at least one first output to generate a second capability description. In one embodiment, the update module 640 may be used to perform the operation S640 described above, which will not be repeated here.
[0101] According to an embodiment of this application, it further includes: an iteration module, configured to generate at least one second test input, the second test input being different from the first test input; send the second test input to a target agent to obtain at least one second output generated by the target agent in response to the second test input; and update the second capability description based on the at least one second output to generate a third capability description.
[0102] According to an embodiment of this application, the update module 640 further includes: an evaluation determination module, configured to determine an evaluation result based on at least one first output and a first capability description, wherein the evaluation result characterizes the actual capability of the target intelligent agent; and a capability update module, configured to update the first capability description based on the evaluation result to obtain a second capability description.
[0103] According to an embodiment of this application, it further includes: a test input generation module, configured to generate at least one third test input based on the evaluation result and the second capability description; wherein the third test input is used as a first test input or a part of the first test input in the next round of operation.
[0104] According to an embodiment of this application, the evaluation and determination module includes an analysis submodule for analyzing at least one first output to determine at least one actual function implemented by the target intelligent agent; a first determination submodule for determining the matching relationship between at least one actual function and the function declared in the first capability description; and a second determination submodule for determining the evaluation result based on the matching relationship, wherein the evaluation result includes at least one of the following: function matching information, newly added function information, function missing information, or function restricted information.
[0105] According to an embodiment of this application, the test input generation module includes a first generation submodule, configured to generate a third test input based on a second capability description to verify a first type of function as a function in response to an evaluation result indicating an inconsistency between the function declared in the first capability description and the first output; or a second generation submodule, configured to generate a third test input based on a second capability description to verify a second type of function as a function in the first output but not in the first capability description, in response to an evaluation result indicating an consistency between the function declared in the first capability description and the first output.
[0106] According to an embodiment of this application, it further includes: an extraction module, used to extract an output data structure from at least one first output; and a template generation module, used to generate an input / output template containing an input format specification and an output format specification based on the format of the first test input and the output data structure, wherein the input / output template is used to declare the input / output specification of the target intelligent agent to the object that calls the target intelligent agent.
[0107] According to an embodiment of this application, the update module 640 includes: a prompt generation submodule, used to generate update prompt information, the update prompt information including at least a first capability description and at least one first output; an input submodule, used to input the update prompt information into a large language model to obtain a natural language response; and an update submodule, used to update the first capability description based on the natural language response.
[0108] According to embodiments of this application, any multiple modules among the acquisition module 610, generation module 620, transmission module 630, and update module 640 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the acquisition module 610, generation module 620, transmission module 630, and update module 640 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), programmable logic array (PLA), system-on-a-chip, system-on-a-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the acquisition module 610, generation module 620, transmission module 630, and update module 640 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0109] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing an information updating method according to an embodiment of this application.
[0110] like Figure 7 As shown, an electronic device 700 according to an embodiment of this application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0111] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 702 and / or RAM 703. It should be noted that programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.
[0112] According to embodiments of this application, the electronic device may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0113] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0114] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 702 and / or RAM 703 and / or one or more memories other than ROM 702 and RAM 703 described above.
[0115] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the information update method provided in the embodiments of this application.
[0116] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0117] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0118] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0119] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0120] 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 application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated 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 a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0121] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. An information updating method, comprising: Obtain a first capability description, which is used to declare the functionality of the target intelligent agent to the object that invokes the target intelligent agent; Based on the first capability description, generate at least one first test input; The first test input is sent to the target agent to obtain at least one first output generated by the target agent in response to the first test input; The first capability description is updated based on the at least one first output to generate a second capability description.
2. The method of claim 1, wherein, The method further includes: Generate at least one second test input, which is different from the first test input; Send the second test input to the target agent to obtain at least one second output generated by the target agent in response to the second test input; The second capability description is updated based on the at least one second output to generate a third capability description.
3. The method according to claim 1, wherein, The step of updating the first capability description based on the at least one first output to generate a second capability description includes: An evaluation result is determined based on the at least one first output and the first capability description, the evaluation result characterizing the actual capability of the target agent; Based on the evaluation results, the first capability description is updated to obtain the second capability description.
4. The method according to claim 3, wherein, The method further includes: Based on the evaluation results and the second capability description, at least one third test input is generated; The third test input is used in the next round of operation as the first test input or a part of the first test input.
5. The method according to claim 3, wherein, The step of determining the evaluation result based on the at least one first output and the first capability description includes: Analyze the at least one first output to determine at least one actual function implemented by the target intelligent agent; Determine the matching relationship between the at least one actual function and the function declared in the first capability description; Based on the matching relationship, the evaluation result is determined, and the evaluation result includes at least one of the following: function matching information, newly added function information, function missing information, or function restricted information.
6. The method according to claim 4, wherein, The step of generating at least one third test input based on the evaluation result and the second capability description includes: In response to the evaluation result indicating an inconsistency between the functionality declared in the first capability description and the first output, a third test input is generated based on the second capability description to verify a first type of functionality, wherein the first type of functionality is the functionality that is inconsistent with the first output in the first capability description; and / or, In response to the evaluation result indicating that the functions declared in the first capability description are consistent with the first output, a third test input is generated based on the second capability description to verify a second type of function, wherein the second type of function is a function that exists in the first output but does not exist in the first capability description.
7. The method according to claim 1, wherein, The method further includes: Extract the output data structure from the at least one first output; Based on the format of the first test input and the output data structure, an input / output template containing input format specifications and output format specifications is generated. The input / output template is used to declare the input / output specifications of the target intelligent agent to the object that calls the target intelligent agent.
8. The method according to claim 1, wherein, The step of updating the first capability description based on the at least one first output includes: Generate update prompt information, the update prompt information including at least the first capability description and the at least one first output; The update prompt information is input into the large language model to obtain a natural language response; The first capability description is updated based on the natural language response.
9. An information updating device, comprising: The acquisition module is used to acquire a first capability description, which is used to declare the functionality of the target intelligent agent to the object that invokes the target intelligent agent; A generation module is configured to generate at least one first test input based on the first capability description; A sending module is configured to send the first test input to the target agent in order to obtain at least one first output generated by the target agent in response to the first test input; An update module is configured to update the first capability description based on the at least one first output to generate a second capability description.
10. An electronic device comprising a memory and a processor, wherein an intelligent agent is disposed on the electronic device, the memory storing a computer program executable on the processor, the processor performing the following operations when executing the computer program: Obtain a first capability description, which is used to declare the functionality of the target intelligent agent to the object that invokes the target intelligent agent; Based on the first capability description, generate at least one first test input; The first test input is sent to the target agent to obtain at least one first output generated by the target agent in response to the first test input; The first capability description is updated based on the at least one first output to generate a second capability description.