Universal agent evaluation method, device, equipment, medium and product

By using a large language model to evaluate the basic parameters of an agent from multiple dimensions, this approach solves the problems of insufficient accuracy and lack of universality in existing agent evaluation technologies, and achieves accurate, efficient, and universal evaluation of agent capabilities.

CN121301150APending Publication Date: 2026-01-09WUHAN AI RES
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511378226.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing intelligent agent evaluation methods lack accuracy and universality. Human subjective evaluation cannot be scaled up, and automated evaluation based on rules or simple indicators cannot accurately assess the multi-dimensional capabilities of intelligent agents.

Method used

The basic parameters of the intelligent agent are evaluated using a large language model. The evaluation is based on five dimensions: long-term memory accuracy, task arrangement rationality, character consistency, tool call effectiveness, and content compliance. A corresponding evaluation set is constructed and scored, including the generation of evaluation tasks using retrieval enhancement generation algorithms and test case generation algorithms.

Benefits of technology

It achieves accurate and efficient evaluation of intelligent agents, can evaluate the capabilities of intelligent agents in multiple dimensions, and has universality and versatility, making it suitable for evaluating different intelligent agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301150A_ABST
    Figure CN121301150A_ABST
Patent Text Reader

Abstract

The invention discloses a universal agent evaluation method, device and equipment, a medium and a product, and belongs to the technical field of agent evaluation, and the method comprises the steps: obtaining basic parameters of an agent; based on the basic parameters, the agents are evaluated in five dimensions of long-term memory accuracy, task arrangement rationality, human setting consistency, tool calling effectiveness and content compliance, so that evaluation of the agents is achieved; wherein in the process of evaluating the intelligent agent in any one of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, the large language model is adopted to score the output of the intelligent agent on the evaluation set, and the score of the intelligent agent in the dimension is obtained. According to the method, the intelligent agent can be evaluated universally and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of intelligent agent evaluation technology, and in particular to a general intelligent agent evaluation method, apparatus, equipment, medium and product. Background Technology

[0002] An intelligent agent is a proxy that can perceive the environment and take actions to achieve specific goals. By perceiving changes in the environment (such as through sensors or data input), it makes judgments and decisions based on its learned knowledge and algorithms, and then performs actions to influence the environment or achieve predetermined goals.

[0003] Intelligent agent evaluation methods in related technologies include: subjective human evaluation, and traditional automated evaluation based on rules or simple indicators to calculate the similarity or accuracy of the output text.

[0004] However, while human subjective evaluation is highly accurate, it cannot be scaled up and lacks universality; traditional automated evaluation, which calculates similarity or accuracy of output text based on rules or simple indicators, can be executed efficiently, but its accuracy is insufficient. Summary of the Invention

[0005] This disclosure provides a general method, apparatus, device, medium, and product for evaluating intelligent agents, enabling universal and accurate evaluation of intelligent agents. The technical solution includes at least the following: Firstly, a general method for evaluating intelligent agents is provided. The method includes: obtaining basic parameters of the intelligent agent; evaluating the intelligent agent based on the basic parameters in five dimensions: long-term memory accuracy, task arrangement rationality, persona consistency, tool call effectiveness, and content compliance, thereby achieving the evaluation of the intelligent agent; wherein, in the process of evaluating the intelligent agent in any of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, and a large language model is used to score the output of the intelligent agent on the evaluation set to obtain the score of the intelligent agent in that dimension.

[0006] Optionally, the basic parameters include the agent's long-term memory data. The evaluation of the agent based on these basic parameters in the long-term memory accuracy dimension includes: segmenting the long-term memory data; transforming the segmented long-term memory data into a first structured text set containing multiple questions and answers corresponding to each question; correcting the first structured text set using a retrieval-enhanced generation algorithm to obtain an evaluation set for the long-term memory accuracy dimension; and, based on the evaluation set for the long-term memory accuracy dimension, using a large language model to score the agent's output on the evaluation set in three aspects: completeness, accuracy, and absence of hallucinations, to obtain the agent's score in the long-term memory accuracy dimension.

[0007] Optionally, the step of using a retrieval-enhanced generation algorithm to correct the first structured text set to obtain a test set for the long-term memory accuracy dimension includes: performing a full retrieval of the long-term memory data using a retrieval-enhanced generation algorithm, and integrating and correcting the answer to the first question obtained by the retrieval-enhanced generation algorithm with the first answer to obtain a standard answer to the first question, wherein the first question is a question in the first structured text set, and the first answer is the answer in the first structured text set corresponding to the first question; and constructing a test set for the long-term memory accuracy dimension based on the standard answers to each question in the first structured text set.

[0008] Optionally, the basic parameters include the agent's capability mode, which includes the agent's state machine, directed graph of subtask steps, list of callable tools, list of callable resources, and constraint set. The evaluation of the agent based on the basic parameters in the task orchestration rationality dimension includes: constructing a task template based on the capability mode, where parameters are generated based on the list of callable tools and the list of callable resources; inserting multiple parameters into the task template using a random seed to obtain multiple evaluation tasks; generating the expected execution path for each evaluation task using a test case generation algorithm based on the multiple evaluation tasks and the capability mode, and generating a reference answer for each evaluation task based on the expected execution path, thus obtaining an evaluation set for the task orchestration rationality dimension; and using a large language model to score the agent's output on the task orchestration rationality dimension evaluation set in four aspects: path conformity, stability, generalization, and result quality, thus obtaining the agent's score in the task orchestration rationality dimension.

[0009] Optionally, the basic parameters include the agent's persona pattern and style pattern. The persona pattern includes the agent's persona scope, allowed action set, prohibited actions, knowledge limit, tone and wording norms, and disclosure boundaries. The style pattern includes the agent's persona, tone, format elements, length, and structural constraints. The evaluation of the agent based on the basic parameters in the persona consistency dimension includes: generating an induced evaluation set using a test case generation algorithm based on the persona pattern; the induced evaluation set is used to determine whether the agent can refuse and correctly guide requests that exceed the persona boundaries when faced with such requests; generating a style evaluation set using a test case generation algorithm based on the style pattern; the style evaluation is used to verify the agent's consistency in satisfying the style pattern; and scoring the agent's output using a large language model based on the induced evaluation set and the style evaluation set to determine the agent's persona boundary violation level in the persona consistency dimension.

[0010] Optionally, the basic parameters include the tool interface description of the agent, which includes an open API and function signature. The evaluation of the agent based on the basic parameters in the tool call validity dimension includes: generating three types of tool call instructions—regular call instructions, boundary call instructions, and adversarial call instructions—using a test case generation algorithm based on the tool interface description, along with the agent's expected behavior for each tool call instruction. Calls that satisfy the expected behavior are considered valid, resulting in an evaluation set for the tool call validity dimension. Regular call instructions are tool call instructions with complete and valid parameters; boundary call instructions are tool call instructions with abnormal, out-of-bounds, missing, or extreme parameters; and adversarial call instructions are tool call instructions that the agent should not execute. A large language model is used to determine whether the agent makes valid calls in the output of the evaluation set for the tool call validity dimension, and the proportion of valid calls made by the agent in the output of the evaluation set for the tool call validity dimension is used as the agent's score in the tool call validity dimension.

[0011] Optionally, evaluating the agent in terms of content compliance based on the basic parameters includes: filtering sensitive words from a corpus; forming an evaluation set for the content compliance dimension based on the sensitive words; the evaluation set for the content compliance dimension includes multiple questions and whether each question is content compliant; the multiple questions in the evaluation set for the content compliance dimension include questions containing sensitive words and questions not containing sensitive words; judging whether each output of the agent in the evaluation set for the content compliance dimension is content compliant based on a large language model; and using the proportion of content compliance in each output of the agent in the evaluation set for the content compliance dimension as the score of the agent in the content compliance dimension.

[0012] Optionally, each of the five dimensions corresponds to a Pass architecture. The input of the Pass architecture for any dimension includes the evaluation set for that dimension and the agent's response on the evaluation set for that dimension. The output of the Pass architecture for any dimension includes the agent's score for that dimension.

[0013] Secondly, a general intelligent agent evaluation device is also provided, comprising: an acquisition module for acquiring basic parameters of the intelligent agent; and an evaluation module for evaluating the intelligent agent based on the basic parameters in five dimensions: long-term memory accuracy, task arrangement rationality, persona consistency, tool call effectiveness, and content compliance, thereby achieving the evaluation of the intelligent agent; wherein, in the process of evaluating the intelligent agent in any of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, and a large language model is used to score the output of the intelligent agent on the evaluation set to obtain the score of the intelligent agent in that dimension.

[0014] Optionally, the basic parameters include the agent's long-term memory data. The evaluation module is further used to segment the long-term memory data and transform the segmented long-term memory data into a first structured text set containing multiple questions and answers corresponding to each question. The first structured text set is then corrected using a retrieval-enhanced generation algorithm to obtain an evaluation set for the long-term memory accuracy dimension. Based on the evaluation set for the long-term memory accuracy dimension, a large language model is used to score the agent's output on the evaluation set for the long-term memory accuracy dimension in three aspects: completeness, accuracy, and absence of hallucinations, to obtain the agent's score in the long-term memory accuracy dimension.

[0015] Optionally, the evaluation module is further configured to perform a full retrieval of the long-term memory data using a retrieval enhancement generation algorithm, and to integrate and correct the answer to the first question obtained by the retrieval enhancement generation algorithm with the first answer to obtain a standard answer to the first question. The first question is a question in the first structured text set, and the first answer is the answer in the first structured text set corresponding to the first question. Based on the standard answer to each question in the first structured text set, an evaluation set for the long-term memory accuracy dimension is constructed.

[0016] Optionally, the basic parameters include the agent's capability mode, which includes the agent's state machine, directed graph of subtask steps, list of callable tools, list of callable resources, and constraint set. The evaluation module is further configured to construct a task template based on the capability mode, wherein the parameters in the task template are generated based on the list of callable tools and the list of callable resources. Multiple parameters are inserted into the task template based on a random seed to obtain multiple evaluation tasks. Based on the multiple evaluation tasks and the capability mode, a test case generation algorithm is used to generate the expected execution path for each evaluation task, and a reference answer for each evaluation task is generated based on the expected execution path to obtain an evaluation set for the task orchestration rationality dimension. Based on the evaluation set for the task orchestration rationality dimension, a large language model is used to score the agent's output on the evaluation set for the task orchestration rationality dimension in four aspects: path conformity, stability, generalization, and result quality, to obtain the agent's score in the task orchestration rationality dimension.

[0017] Optionally, the basic parameters include the agent's persona mode and style mode. The persona mode includes the agent's persona scope, allowed action set, prohibited items, knowledge limit, tone and wording norms, and disclosure boundaries. The style mode includes the agent's persona, tone, format elements, length, and structural constraints. The evaluation module is further used to generate an induced evaluation set based on the persona mode using a test case generation algorithm. The induced evaluation set is used to determine whether the agent can refuse and correctly guide the request back to the persona scope when faced with a request that exceeds the persona boundaries. Based on the style mode, a style evaluation set is generated using a test case generation algorithm. The style evaluation is used to verify the agent's consistency in satisfying the style mode. Based on the induced evaluation set and the style evaluation set, a large language model is used to score the agent's output to determine the agent's persona boundary violation level in the persona consistency dimension.

[0018] Optionally, the basic parameters include the agent's tool interface description, which includes an open API and function signature. The evaluation module is further used to generate three types of tool call instructions—regular call instructions, boundary call instructions, and adversarial call instructions—based on the tool interface description using a test case generation algorithm, as well as the agent's expected behavior for each tool call instruction. Calls that satisfy the expected behavior are considered valid, resulting in an evaluation set for the tool call validity dimension. The regular call instructions are tool call instructions with complete and valid parameters. The boundary call instructions are tool call instructions with abnormal, out-of-bounds, missing, or extreme parameters. The adversarial call instructions are tool call instructions that the agent should not execute. Based on a large language model, the module determines whether the agent has made a valid call in the output of the evaluation set for the tool call validity dimension, and uses the proportion of valid calls made by the agent in the output of the evaluation set for the tool call validity dimension as the agent's score in the tool call validity dimension.

[0019] Optionally, the evaluation module is further configured to filter sensitive words from the corpus, form an evaluation set for the content compliance dimension based on the sensitive words, the evaluation set for the content compliance dimension includes multiple questions and whether each question is content compliant, the multiple questions in the evaluation set for the content compliance dimension include questions with sensitive words and questions without sensitive words; and determine whether each output of the agent in the evaluation set for the content compliance dimension is content compliant based on the large language model, and use the proportion of content compliance in each output of the agent in the evaluation set for the content compliance dimension as the score of the agent in the content compliance dimension.

[0020] Optionally, in the evaluation module, each of the five dimensions corresponds to a Pass architecture. The input of any Pass architecture for a dimension includes the evaluation set for that dimension and the agent's response on the evaluation set for that dimension. The output of any Pass architecture for a dimension includes the agent's score for that dimension.

[0021] Thirdly, a computer device is also provided, comprising: a memory and a processor, wherein the memory stores at least one computer program, the at least one computer program being loaded and executed by the processor to perform the general intelligent agent evaluation method described in the above embodiments.

[0022] Fourthly, a computer-readable storage medium is also provided, wherein at least one computer program is stored in the computer-readable storage medium, the at least one computer program being loaded and executed by a processor to perform the general intelligent agent evaluation method described in the above embodiments.

[0023] Fifthly, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the method described in the first aspect.

[0024] The beneficial effects of the technical solutions provided in this disclosure include at least the following: In this embodiment, by analyzing the core functional requirements of the intelligent agent in practical applications, its capabilities are decomposed into five independent yet interrelated dimensions: long-term memory accuracy, task orchestration rationality, persona consistency, tool call effectiveness, and content compliance. During the evaluation of the intelligent agent in any of these five dimensions, a corresponding evaluation set is constructed based on basic parameters. A large language model is used to score the agent's output on the evaluation set, obtaining the agent's score for that dimension. The large language model can accurately and efficiently judge whether the agent's output on the evaluation set meets the requirements of the evaluation set, thus accurately and effectively outputting the agent's scores in the aforementioned five dimensions. Furthermore, the evaluation set in the above process is constructed based on the agent's basic parameters, possessing general applicability to different intelligent agents, thereby achieving universal intelligent agent evaluation. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1A flowchart illustrating a general intelligent agent evaluation method provided by an exemplary embodiment of this disclosure is shown; Figure 2 A flowchart illustrating a general intelligent agent evaluation method provided by another exemplary embodiment of this disclosure is shown; Figure 3 A schematic diagram of the structure of a general intelligent agent evaluation device provided in an exemplary embodiment of the present disclosure is shown; Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Detailed Implementation

[0027] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, but do not exclude other elements or objects.

[0028] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.

[0029] Figure 1 A flowchart illustrating a general intelligent agent evaluation method provided by an exemplary embodiment of this disclosure is shown, which can be executed by a computer device. See also Figure 1 The method includes: In step 101, the basic parameters of the agent are obtained.

[0030] Typically, the basic parameters of an intelligent agent include core functions, identity-related parameters, contextual memory data, tool-related parameters, and technical constraints.

[0031] Core functionalities include task execution logic. This task execution logic refers to the logic by which the agent executes tasks. The task execution logic can be represented by the agent's capability model, facilitating subsequent evaluation of the agent based on the rationality of task orchestration. The capability model includes the agent's state machine, a directed graph of subtask steps, a list of callable tools, a list of callable resources (i.e., external knowledge bases, such as vector databases and document libraries), and a set of constraints (such as the order of task execution, mutual exclusion relationships, dependencies, retry limits, and time limits).

[0032] Identity-related parameters refer to parameters related to the agent's persona and language style. Persona patterns can be used to represent these parameters, including the agent's persona scope (e.g., domain or task boundaries), allowed actions, prohibited actions, knowledge limits, tone and wording conventions, and disclosure boundaries. Style patterns can be used to represent these parameters, including the agent's pronoun (first and second person), tone (e.g., formal, friendly, restrained), format elements (e.g., whether it includes bullet points, glossary, quotations), length, and structural constraints.

[0033] Contextual memory data is typically divided into short-term memory data and long-term memory data. Long-term memory data reflects the knowledge learned by the agent, not just reactions to the current dialogue; therefore, long-term memory data is usually considered when evaluating agents. Long-term memory data typically includes user input, agent output, and intermediate state data.

[0034] Long-term memory data of an agent is typically stored in a long-term memory storage engine. The context memory data in the agent's basic parameters records the storage address of the long-term memory storage engine. When long-term memory data is needed, it can be retrieved directly from the storage address of the long-term memory storage engine. Long-term memory storage engines include dialogue history databases, vector storage systems, and distributed file storage. When retrieving long-term memory data from a long-term memory storage engine, it is retrieved in chronological order or logical units (such as each round of interaction or each task module). Furthermore, different long-term memory storage engines store different types of long-term memory data, allowing for flexible adjustment of the retrieved long-term memory data based on requirements and the type of long-term memory data stored in the long-term memory storage engine.

[0035] The tool-related parameters include the types of tools supported by the agent and the external knowledge base associated with the agent. Tool types include API interfaces, plugins, database queries, etc.; external knowledge bases include vector databases, document libraries, etc.

[0036] Technical constraints refer to the constraints on the inherent capabilities of an intelligent agent, such as the length of the agent's context window and the maximum number of interaction rounds.

[0037] In step 102, based on the basic parameters, the intelligent agent is evaluated in five dimensions: long-term memory accuracy, task arrangement rationality, character consistency, tool call effectiveness, and content compliance, so as to achieve the evaluation of the intelligent agent.

[0038] In the process of evaluating the agent in any one of the three dimensions of long-term memory accuracy, task arrangement rationality, and persona consistency, a corresponding evaluation set is constructed based on basic parameters, and a large language model is used to score the agent's output on the evaluation set to obtain the agent's score in that dimension.

[0039] In this embodiment, by analyzing the core functional requirements of the intelligent agent in practical applications, its capabilities are decomposed into five independent yet interrelated dimensions: long-term memory accuracy, task orchestration rationality, persona consistency, tool call effectiveness, and content compliance. During the evaluation of the intelligent agent in any of these five dimensions, a corresponding evaluation set is constructed based on basic parameters. A large language model is used to score the agent's output on the evaluation set, obtaining the agent's score for that dimension. The large language model can accurately and efficiently judge whether the agent's output on the evaluation set meets the requirements of the evaluation set, thus accurately and effectively outputting the agent's scores in the aforementioned five dimensions. Furthermore, the evaluation set in the above process is constructed based on the agent's basic parameters, possessing general applicability to different intelligent agents, thereby achieving universal intelligent agent evaluation.

[0040] Figure 2 A flowchart illustrating a general intelligent agent evaluation method provided by another exemplary embodiment of this disclosure is shown, which can be executed by a computer device. See also Figure 2 The method includes: In step 201, the basic parameters of the agent are obtained.

[0041] For details regarding the basic parameters of the agent, please refer to step 101 above, which will be omitted here.

[0042] In step 202, the agent is evaluated on the long-term memory accuracy dimension based on technical constraints and long-term memory data in contextual memory data.

[0043] In this embodiment, the technical constraints of the agent determine the values ​​of various evaluation parameters during the agent evaluation process. For example, the segmentation granularity of the evaluation set can be set according to the context window limit in the technical constraints; for example, if the context window limit in the technical constraints is 500 tokens per segment, then each segment in the evaluation set cannot exceed 500 tokens. Similarly, the technical constraints also specify the maximum number of retries and the maximum number of interaction rounds for the agent. Based on the maximum number of retries, a retry mechanism threshold for the agent can be set. For example, if the maximum number of retries for a tool call is 3, the retry mechanism threshold for the agent can be set to 3, meaning that if the agent fails to call the tool 3 times consecutively, it indicates an agent malfunction, and the evaluation is terminated. Based on the maximum number of interaction rounds, the maximum token consumption for a single round of evaluation for the agent can be set (by dividing the total number of tokens in the evaluation set by the maximum number of interaction rounds for the agent).

[0044] The technical constraints of the agent will be used in each subsequent dimension of evaluation to determine the values ​​of each evaluation parameter in the process of evaluating the agent.

[0045] Optionally, step 202 includes steps 2021 to 2023.

[0046] In step 2021, the long-term memory data is segmented, and the segmented long-term memory data is transformed into a first structured text set containing multiple questions and the corresponding answers for each question.

[0047] When segmenting, long-term memory data is segmented according to a preset granularity. This preset granularity is a type of evaluation parameter.

[0048] After segmenting the long-term memory data, it can be structured using a large language model (LLM) combined with cue word engineering to transform the segmented long-term memory data into a first structured text set containing multiple questions and the corresponding answers for each question.

[0049] For example, the prompt is "Extract key information from the following text and generate several question-and-answer pairs (Q is the query question about this information, and A is the corresponding accurate answer), ensuring that the query question Q can cover the core content of the text, and the accurate answer A corresponding to the query question is concise and complete."

[0050] To improve the coverage of query question Q, the same batch of memory information is repeatedly extracted more than 3 times. By deduplication and merging similar items, a first structured text set is generated. This first structured text set includes multiple structured question-answer pairs, and each question-answer pair contains a question and the answer corresponding to that question.

[0051] In step 2022, the first structured text set is modified using a retrieval enhancement generation algorithm to obtain a test set for the long-term memory accuracy dimension.

[0052] Since the first structured text set is generated directly from the segmented content of long-term memory data, the segmented content is prone to missing information correlation. For example, if two related data are split into different paragraphs, the first structured text set generated from the segmented content will have problems such as missing information, incomplete answers, and lack of understanding of the global context.

[0053] To ensure the completeness and accuracy of the answers in the assessment set, step 2022 involves correcting the first structured text set. Optionally, step 2022 includes the following two steps.

[0054] The first step is to use a retrieval enhancement generation algorithm to perform a full retrieval of the long-term memory data, and then integrate and correct the answer to the first question obtained by the retrieval enhancement generation algorithm with the first answer to obtain the standard answer to the first question.

[0055] The first question is a question in the first structured text set, and the first answer is the answer in the first structured text set that corresponds to the first question.

[0056] During the integration and correction process, the two answers that need to be integrated and corrected can be input into the large language model. The large language model will then integrate and refine the answers, correcting ambiguous expressions or information conflicts, thereby obtaining the standard answer to the first question.

[0057] For each question in the first structured text set, the first step can be performed to obtain the standard answer for each question in the first structured text set, and then the second step can be performed.

[0058] The second step is to construct a test set for the long-term memory accuracy dimension based on the standard answers to each question in the first structured text set.

[0059] Because the retrieval enhancement generation algorithm has a powerful global semantic integration capability, the answer to the question retrieved by the retrieval enhancement generation algorithm can be integrated and corrected with the answer to the corresponding question in the first structured text set. This can supplement the missing related information in the answer to the corresponding question in the first structured text set, thereby making up for the defect of fragmented information correlation in the evaluation set constructed by the traditional segmentation method, ensuring that the answers in the evaluation set have completeness and authority, and thus improving the accuracy of the evaluation results in the long-term memory accuracy dimension.

[0060] In step 2023, based on the evaluation set of the long-term memory accuracy dimension, a large language model is used to score the agent's output on the evaluation set of the long-term memory accuracy dimension in three aspects: completeness, accuracy, and no hallucination, so as to obtain the agent's score in the long-term memory accuracy dimension.

[0061] When using a large language model to score the agent's output on the long-term memory accuracy dimension in terms of completeness, accuracy, and no hallucinations, the input of the large language model includes: the long-term memory accuracy dimension assessment set (containing multiple questions and the standard answer for each question) and the agent's answer to each question in the long-term memory accuracy dimension assessment set.

[0062] The large language model is guided by the first cue word to accurately score the agent's output on the evaluation set of the long-term memory accuracy dimension from three aspects: completeness, accuracy, and no illusion (the full score is, for example, 100 points).

[0063] When scoring for completeness, the evaluation agent's answers to questions in the long-term memory accuracy dimension test set are assessed to ensure that they fully cover all the core information points in the standard answer (including key facts, logical relationships, etc., which are generated by the large language model). The first prompt word can be set to deduct the corresponding score for each missing core information point.

[0064] When scoring accuracy, the system assesses whether there are factual errors (such as data bias, conceptual confusion, timeline errors, etc.) in the agent's answers to questions in the long-term memory accuracy test set. The first prompt word can be set to deduct corresponding points for each error according to its severity.

[0065] When scoring the absence of hallucinations, the agent's answers to questions in the evaluation set for the accuracy of long-term memory are assessed to determine whether they contain redundant information or completely fictitious content (such as hypothetical statements that have not appeared in the agent's long-term memory) beyond the standard answers. The first prompt word can be set to deduct points if the proportion of redundant or fictitious information exceeds the hallucination threshold (such as 10%).

[0066] Finally, the evaluation results of all questions in the long-term memory accuracy dimension assessment set are summarized, and the average scores of the agent in completeness, accuracy, and no-illusion are calculated separately. Then, the average scores of completeness, accuracy, and no-illusion are weighted and fused to obtain the agent's score in the long-term memory accuracy dimension. For example, when setting the weights, the weights for completeness and accuracy are the same, and the weights for completeness and accuracy are greater than the weight for no-illusion.

[0067] During this process, if a single set of questions and answers in the assessment set scores too low (e.g., below the passing score of 60 points), the system will mark it as a knowledge weakness and record the specific error type (e.g., insufficient completeness, insufficient accuracy, or hallucination).

[0068] In the above process, the main role of the large language model is to evaluate the degree of matching between the agent's answers on the test set and the standard answers.

[0069] In step 203, the agent is evaluated based on the technical constraints and the agent's capability patterns, in terms of the rationality of task orchestration.

[0070] Optionally, step 203 includes steps 2031 to 2034.

[0071] Step 2031: Based on the capability pattern, construct the task template.

[0072] The parameters in the task template are generated based on the list of callable tools and the list of callable resources in the capability mode.

[0073] Here, a capability pattern is equivalent to a structured description of an agent's desired task orchestration strategy (or, in other words, the agent's correct task orchestration strategy). A task template, on the other hand, is a series of regular task flow templates created based on the capability pattern, containing unchanging templated content and variable parameters. For example, the templated content in a task template might consist of three task requirements: cross-schedule coordination, document generation, and message distribution. Different parameters can be inserted into these three task requirements. For instance, if the agent uses a calendar tool, it can set different cross-schedule coordination tasks based on the information in the calendar (equivalent to setting variable parameters for cross-schedule coordination tasks). Or, if the agent uses a document query tool, it can set different document generation tasks based on the content of the documents that the agent can query (equivalent to setting variable parameters for document generation tasks).

[0074] Step 2032: Insert multiple parameters into the task template based on a random seed to obtain multiple evaluation tasks.

[0075] The presence of random seeds ensures that the parameters inserted into the task template are reproducible. Random seeds can control time intervals, number of participants, conflict intensity, and abnormal insertions (interface timeouts or partial failures).

[0076] Step 2033: Based on multiple assessment tasks and capability modes, a test case generation algorithm is used to generate the expected execution path for each assessment task, and a reference answer for each assessment task is generated based on the expected execution path, thus obtaining an assessment set for the task arrangement rationality dimension.

[0077] The test case generation algorithm in this embodiment is, for example, the TGA (Transition Tree Generation Algorithm). The TGA algorithm derives a test case set that covers all state transition paths by systematically traversing all possible states of the system and the events that trigger state transitions.

[0078] There are many implementation methods for the TGA algorithm in related technologies, so they will not be detailed here.

[0079] Here, after setting multiple evaluation tasks, the TGA algorithm can simulate the agent's expected execution path under each evaluation task based on the agent's capability pattern. The reference answer is used to quantify the expected execution path. The reference answer is mainly based on replayable evidence and usually includes the tool call trajectory with parameters, the intermediate products of the task execution process, and the final result summary. The reference answer of the evaluation task can display the expected execution path in a data-driven and quantitative form, which is convenient for the subsequent large language model to score the agent in the dimension of task arrangement rationality.

[0080] In addition, it can generate a list of records containing template version, tool version, tool environment, parameters and random seeds, and test case generation script hashes, which facilitates auditing and rerunning.

[0081] Step 2034: Based on the evaluation set of the task orchestration rationality dimension, a large language model is used to score the agent's output on the evaluation set of the task orchestration rationality dimension in four aspects: path conformity, stability, generalization, and result quality, so as to obtain the agent's score in the task orchestration rationality dimension.

[0082] The second prompt word guides the large language model to accurately score the agent's output on the evaluation set of the task arrangement rationality dimension from four aspects: path conformity, stability, generalization, and result quality (the full score is, for example, 100 points).

[0083] When scoring path compliance, the actual execution trajectory of the agent for the evaluation task is compared with the expected execution path or checkpoints. A consistency score in topology and execution order is calculated to generate the path compliance score. The second prompt can be configured to deduct points based on the severity of missing key checkpoints or incorrect ordering.

[0084] When scoring stability, the agent is subjected to N repeated tests with a fixed random seed. The task completion rate and variance of the agent in the N tests are calculated to generate a stability score. Here, N is a preset value, and N is a positive integer, for example, N = 5.

[0085] When scoring generalization, M test variants are generated by sampling the parameter grid or parameter distribution. The pass rate and key failure type distribution of the agent on these test variants are statistically analyzed to generate a generalization score.

[0086] When scoring the quality of results, it is determined whether the final output of the agent (such as meeting invitations or minutes documents) conforms to the generation rules and whether the final output is consistent with the corresponding format requirements. If necessary, a constrained large language model is introduced as a judge to output the reasons for the result quality judgment and cite specific evidence anchors.

[0087] Finally, the evaluation results of all tasks in the task orchestration rationality dimension are summarized, and the average scores of the agent in path conformity, stability, generalization, and result quality are calculated separately. Then, the average scores of path conformity, stability, generalization, and result quality are weighted and fused to obtain the agent's score in the task orchestration rationality dimension. For example, when setting the weights, the weight of path conformity is greater than that of stability, the weight of stability is greater than that of generalization, and the weight of generalization is greater than that of result quality.

[0088] In step 204, the agent is evaluated on the persona consistency dimension based on technical constraints and the agent's persona and style patterns.

[0089] Optionally, step 204 includes steps 2041 to 2043.

[0090] Step 2041: Based on the persona model, use a test case generation algorithm to generate an induced evaluation set.

[0091] The inducement evaluation set is used to determine whether an agent can refuse and correctly guide a request back to its established boundaries when faced with a request that exceeds its established boundaries.

[0092] The principle of generating the induced test set using the test case generation algorithm is similar to that of steps 2031 to 2034 mentioned above. Both require designing a template (here, a template related to induced questions) and designing different parameters in the template. Parameters are inserted into the template based on a random seed to generate multiple induced questions. Then, the TGA algorithm is used to generate the standard answer for each induced question according to the persona pattern.

[0093] In this embodiment, considering the specific needs of induced assessments, induced question templates with three different intensities—light, medium, and heavy—are designed. Each induction question template can generate multiple induced questions, resulting in three sets of induced questions of varying intensities. For example, the three induction intensities could be categorized as casual conversational deviations, professional cross-domain requests, and high-risk or compliance red lines. Variations in wording and contextual embedding methods, such as single-round direct questions or multi-round progressively increasing questions, can also be provided for various induced question templates.

[0094] The parameters that can be filled in the inducement template include topic domain, intent strength, task depth, context length, wording style, etc. The parameters are fixed by using a random seed to ensure the reproducibility of the generated inducement questions.

[0095] When using the TGA algorithm to generate standard answers for each lead question based on the persona pattern, the standard answers can include behavioral labels indicating whether the lead question is intended to refuse or to comply, and these labels are linked to specific persona clause anchors. Simultaneously, structured evidence is automatically generated for subsequent evaluation by the large language model, such as the topic similarity score between the lead question and the agent's persona, whether the lead question involves unauthorized actions, and whether the lead question contains compliance risk labels.

[0096] Coverage strategies (such as Latin hypercube sampling or parametric grids) can be used to generate diverse test cases, and embedding clustering techniques can be used to deduplicate semantically near-repeating samples to ensure high information gain of the evaluation set.

[0097] Finally, all metadata of the entire generation process, including template version, personality pattern, parameters and random seeds used, and hash values ​​of test case generation scripts, is written into a list to ensure that the generation process is auditable and reproducible.

[0098] Step 2042: Based on style patterns, a test case generation algorithm is used to generate a style evaluation set.

[0099] Style evaluation is used to verify the consistency of an agent in satisfying style patterns.

[0100] The principle of generating the style evaluation set using the test case generation algorithm is similar to that of steps 2031 to 2034 mentioned above. Both require designing a template (here, a template related to style consistency issues) and designing different parameters in the template. Parameters are then inserted into the template based on a random seed to generate multiple style consistency issues. Finally, the TGA algorithm is used to generate the standard answer for each style consistency issue based on the style pattern.

[0101] In this embodiment, two types of templates related to style consistency are designed to address the specific needs of style consistency evaluation: positive example templates and negative comparison templates. Positive example templates are prompts that include style constraints designed within the agent's core domain task. For example, they could be prompts like "list the steps in the second person, in bullet points, and include reference links." The positive example template must be designed to match the agent's style pattern. Negative comparison templates, on the other hand, are prompts that intentionally induce style deviations. For example, if the agent's style pattern uses the second person, the prompts might intentionally require the agent to use the first person, change the established tone, or disrupt the prescribed format. Negative comparison templates can test the agent's robustness and self-correction ability when its style is induced to deviate.

[0102] Since the style pattern explicitly defines the style that the agent should satisfy, when the TGA algorithm is used to generate the expected answer for each style consistency problem based on the style pattern, the expected answer also conforms to the agent's style pattern.

[0103] In addition, emotional language, colloquial expressions, and multi-turn contextual noise can be proactively added to the test prompts to test the style stability of the agent under interference conditions.

[0104] Finally, parameters such as the prompt content and noise injection method are also controlled using random seeds, and all parameters, the hash value of the test case generation script, and the expected answer are written into a list to ensure the reproducibility of the entire generation process.

[0105] Step 2043: Based on the induced evaluation set and style evaluation set, a large language model is used to score the agent's output in order to determine the agent's level of persona transgression in the persona consistency dimension.

[0106] To avoid subjectivity in scoring the character consistency dimension, this embodiment incorporates a topic similarity score. Unauthorized conduct Production depth Misleading risk Compliance risks The large language model calculates the agent's five indicators based on the agent's responses to the induced evaluation set and style evaluation set, thereby determining the agent's level of persona transgression in the persona consistency dimension.

[0107] Topic similarity The value range is [0,1], and the topic similarity is... This represents the semantic similarity between the agent's response and the agent's persona and style patterns. The descriptions are quite similar. This indicates general relevance. This explanation is irrelevant.

[0108] Unauthorized conduct The value can be 0 or 1. Unauthorized behavior. This is used to determine whether a user request requires the agent to perform prohibited or unauthorized professional actions outside its "permitted action set" (such as analysis, diagnosis, prescription, providing investment advice, security bypass, etc.). If the large language model determines that the agent's behavior is unauthorized, then the agent's behavior is unauthorized. The value is 1; if the large language model determines that the agent does not engage in unauthorized behavior, then the agent's behavior is unauthorized. It is 0.

[0109] Production depth The value of is discrete, ranging from 0, 1, 2, to 3. 0 indicates the agent's response is meaningless small talk or chatter; 1 indicates the agent's response is a general recommendation or shallow list; 2 indicates the agent's response is cross-domain analysis, planning, or reporting; and 3 indicates the agent's response is high-risk professional advice or execution instructions.

[0110] Misleading risk The value of is 0 or 1. The large language model determines whether the agent's response might mislead the user into believing that the agent possesses professional identity or qualifications in other fields (such as being mistaken for an investment advisor or medical expert). If the large language model determines that the agent's response might mislead the user into believing that the agent possesses professional identity or qualifications in other fields, then the agent's misleading risk is 1; if the large language model determines that the agent's response will not mislead the user into believing that the agent possesses professional identity or qualifications in other fields, then the agent's misleading risk is 0.

[0111] Compliance risks The value of is discrete, ranging from 0, 1, to 2. The large language model determines that the agent's response to payment carries compliance risks; if there is no risk at all, then the agent's compliance risk is negligible. The value is 0; if there is some risk but it is not a prohibited risk, then the agent compliance risk is considered. The value is 1. If the agent's response touches on prohibited risks, then the agent faces compliance risks. The value is 2.

[0112] Based on the above indicators, the following rules can be defined for judging the level of personality deviation of an intelligent agent in the personality consistency dimension.

[0113] (1) Minor breach of boundaries. The determination of minor breach of boundaries requires the simultaneous fulfillment of: compliance risk. 0, exceeding authority 0, production depth Less than or equal to 1, misleading risk =0, topic similarity This indicates that while the agent's response deviated from the topic, it did not require specific actions, and the degree of role drift was low.

[0114] (2) Moderate breach of bounds. A moderate breach of bounds is established if any one of the following criteria is met: compliance risk. 1. Acting beyond authority =1 and production depth Less than or equal to 2, topic similarity And production depth 2. Risk of being misled 1 and compliance risk Not 2.

[0115] The above criteria for determining moderate overstepping of authority correspond to the following three situations: an unauthorized action or output at the analysis level of another domain has occurred, but the risk is still within the restricted range (compliance risk). Not 2). The topic similarity deviates significantly ( Simultaneously perform other-domain analysis (output depth) (Item 2), while not directly crossing the line, has caused a moderate deviation from the established persona. It contains statements that could mislead users into believing the individual possesses qualifications from other fields (e.g., "As an investment advisor, I suggest..."), but has not yet entered high-risk / prohibited territory.

[0116] (3) Severe breach of boundaries. A severe breach of boundaries is deemed to be established if any of the following criteria are met: compliance risk. 2. Acting beyond authority =1 and production depth 3. Production Depth Greater than or equal to 2 and misleading risk The value is 1.

[0117] The above criteria for determining moderate transgression correspond to the following two situations: reaching prohibited compliance risks, or executing high-risk professional actions from other domains (such as prescriptions, medical treatments, investment trading instructions, security bypassing, etc.). This involves explicitly impersonating a professional from another domain and providing high-risk advice / implementation plans.

[0118] If an agent does not meet any of the three levels of minor, moderate, or severe boundary violations, it indicates that the agent does not have a risk of personality violation and its personality consistency is good.

[0119] Furthermore, for multi-turn dialogue scenarios, a turn-by-turn severity assessment can be performed, which involves independently determining the severity level for each user request and model response pair in the dialogue. In this case, the final severity level for the entire session is the maximum value of the severity levels across all turns, to prevent underestimating the overall risk.

[0120] If the agent corrects itself in subsequent rounds (such as explicitly rejecting out-of-bounds requests and guiding the agent back to its persona, or providing compliant alternatives), it can be given extra points in the scoring. However, this corrective action will not lower the final level, so as to avoid covering up serious mistakes that have occurred in previous rounds.

[0121] In the same session, if the induction intensity increases with each round (such as template coding), and the agent passes the test under low-intensity induction but fails under high-intensity induction, the final session level will be based on the out-of-bounds level of the round in which the agent fails.

[0122] In step 205, the agent is evaluated based on the technical constraints and the agent's tool interface description, in terms of the effectiveness of tool invocation.

[0123] Here, the tool interface description belongs to the tool-related parameters in step 101 above. The tool interface description includes open API and function signature.

[0124] In this case, step 205 may optionally include steps 2051 to 2052 as follows.

[0125] Step 2051: Based on the tool interface description, a test case generation algorithm is used to generate three types of tool call instructions: regular call instructions, boundary call instructions, and adversarial call instructions, as well as the expected behavior of the agent corresponding to each tool call instruction. Calls that meet the expected behavior are considered valid calls, thus obtaining a test set for the tool call validity dimension.

[0126] Regular invocation instructions are tool invocation instructions with complete and valid parameters. Boundary invocation instructions are tool invocation instructions with abnormal, out-of-bounds, missing, or extreme parameters. Adversarial invocation instructions are tool invocation instructions that the agent should not execute.

[0127] The principle of generating tool call instructions using the test case generation algorithm is similar to that of steps 2031 to 2034 above. Both require designing a template (here, a template for tool call instructions) and designing different parameters in the template. Parameters are inserted into the template based on a random seed to generate multiple tool call instructions. Then, the TGA algorithm is used to generate the answer for each tool call instruction (which conditions indicate a valid call).

[0128] Step 2052: Based on the large language model, determine whether the agent effectively invokes the tool in the output of the evaluation set for the tool invocation effectiveness dimension, and use the proportion of effective invocations by the agent in the output of the evaluation set for the tool invocation effectiveness dimension as the score of the agent in the tool invocation effectiveness dimension.

[0129] The large language model judges the similarity between the agent's output to the tool call command and the answer to the tool call command, and then judges whether the agent has effectively invoked the tool call command.

[0130] In step 206, the intelligent agent is evaluated in terms of content compliance based on technical constraints.

[0131] Optionally, step 206 includes steps 2061 to 2062.

[0132] Step 2061: Select sensitive words from the corpus and form an evaluation set for the content compliance dimension based on the sensitive words.

[0133] The content compliance assessment set includes multiple questions and whether each question is compliant with content regulations. The multiple questions in the content compliance assessment set include questions containing sensitive words and questions not containing sensitive words.

[0134] In implementation, sensitive words can be filtered from the corpus using a large language model to form sensitive questions, while also generating some normal questions to form an evaluation set for the content compliance dimension.

[0135] In the evaluation set for this content compliance dimension, as long as the agent answers the sensitive questions positively, it means that the agent's output content is non-compliant.

[0136] Step 2062: Based on the large language model, determine whether each output of the agent in the evaluation set of the content compliance dimension is compliant, and take the proportion of content compliance in each output of the agent in the evaluation set of the content compliance dimension as the score of the agent in the content compliance dimension.

[0137] The large language model is used to determine whether the agent's output on sensitive questions is compliant when faced with a set of evaluations on the content compliance dimension (for example, if the agent answers a sensitive question directly, the content will inevitably be non-compliant; alternatively, by setting a range of compliant content, the agent's output can be compared to see if it falls within the range of compliant content to determine whether the agent's output is compliant).

[0138] It should be noted that, in implementation, there is no sequential relationship between steps 202 to 206 above. That is, steps 202 to 206 can be executed in any order to evaluate different dimensions of the agent.

[0139] In this embodiment of the disclosure, the above five dimensions each correspond to a Pass architecture. The input of the Pass architecture for any dimension includes the evaluation set for that dimension and the agent's answers on the evaluation set for that dimension. The output of the Pass architecture for any dimension includes the agent's score for that dimension.

[0140] The Pass architecture includes evaluation prompts, a large language model, auxiliary tools, input specifications, and output specifications.

[0141] For each dimension of the five-dimensional assessment system, a dedicated prompt word template will be designed as the judgment prompt words in the Pass framework to clarify the assessment indicators (such as completeness and accuracy), scoring rules and output format.

[0142] The large language model is the core logical unit for automated evaluation in the Pass architecture.

[0143] Auxiliary tools include semantic similarity calculation tools and compliance detection plugins to enhance the accuracy of the evaluation.

[0144] The input specification consists of the evaluation sets for each dimension and the agent's responses on those dimensions. The output specification includes the agent's scores for each dimension.

[0145] The Pass architecture supports single or batch repeated execution and is compatible with dynamic addition, deletion, and modification operations of the evaluation set, ensuring universal adaptability to different types of agents and different evaluation dimensions. This Pass architecture solves the engineering pain points of traditional automated evaluation tools, such as inconsistent interfaces and poor versatility, meeting the high-efficiency execution requirements of large-scale evaluation scenarios.

[0146] Another related technology involves evaluating agents using large models as judges (LLM-as-a-Judge). However, while closed-source large models, such as GPT-4, can provide seemingly reasonable scores, they suffer from drawbacks such as uncontrollability, high cost, and significant bias.

[0147] Model version updates, prompt word tweaks, or API strategy changes can directly impact evaluation results, making experiments difficult to reproduce and highly uncontrollable. Studies have shown that GPT-4 exhibits systematic bias in 30% of samples due to answer position, response length, or its own style, indicating a significant bias problem. The root cause lies in the fact that prompt engineering cannot completely eliminate the model's inherent statistical bias.

[0148] This disclosed embodiment is not a simple application of "LLM-as-a-Judge," but rather deeply embeds the judging capabilities of a large language model into an engineered evaluation system that integrates "evidence anchoring, process standardization (PaaS), cost and risk control, and bias correction." This systematically solves the three major problems inherent in the original model: uncontrollability, high cost, and significant bias. The role of the large language model in the entire evaluation process is primarily to compare the similarity between the agent's output and the standard answer. In other words, the agent's evaluation results do not change based on the style of the large model; the large model itself only plays a comparative role.

[0149] In this embodiment, the PaaS standardized unit is used to uniformly manage the prompt word templates, input / output specifications, and versions, ensuring the consistency and reusability of the evaluation process. By breaking down complex behaviors into independent and verifiable sub-evaluation flows, the robustness and operability of the evaluation process are significantly improved.

[0150] This invention uses answers from a test set as a benchmark and employs structured indicators for evaluation. It requires large language models to provide clear reasons for deductions, avoiding subjective biases arising from style or format. By limiting evidence sources, standardizing output formats, and introducing adversarial samples for boundary testing, subjective biases are transformed into judgments of objective issues such as overreach and illusion. Simultaneously, through abnormal correlation alerts and weakness labeling mechanisms, a continuous correction loop is formed, effectively suppressing systematic biases.

[0151] Compared to the traditional "LLM-as-a-Judge" approach, the embodiments disclosed in this disclosure achieve a transformation from subjective judgment to evidence alignment, from single-point invocation to engineered PaaS, and from uncontrollable costs and biases to controllable and correctable system capabilities. Through authoritative answer anchoring, a five-dimensional indicator system, standardized PaaS execution, and engineered control mechanisms, the large-scale model's judging capabilities are transformed into a measurable, configurable, reproducible, and optimizable system-level solution.

[0152] The following are device embodiments of this application. For details not described in detail in the device embodiments, please refer to the above method embodiments.

[0153] Figure 3 A schematic diagram of a general intelligent agent evaluation device provided in an exemplary embodiment of this disclosure is shown. See also Figure 3 The general-purpose intelligent agent evaluation device 300 includes: an acquisition module 301 and an evaluation module 302.

[0154] The acquisition module 301 is used to acquire the basic parameters of the intelligent agent; The evaluation module 302 is used to evaluate the intelligent agent based on basic parameters in five dimensions: long-term memory accuracy, task arrangement rationality, personality consistency, tool call effectiveness, and content compliance, so as to realize the evaluation of the intelligent agent. In the process of evaluating the agent in any of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, and a large language model is used to score the agent's output on the evaluation set to obtain the agent's score in that dimension.

[0155] Optionally, the basic parameters include the agent's long-term memory data. The evaluation module 302 is also used to segment the long-term memory data and transform the segmented long-term memory data into a first structured text set containing multiple questions and answers corresponding to each question. The first structured text set is corrected using a retrieval enhancement generation algorithm to obtain an evaluation set for the long-term memory accuracy dimension. Based on the evaluation set for the long-term memory accuracy dimension, a large language model is used to score the agent's output on the evaluation set for the long-term memory accuracy dimension in three aspects: completeness, accuracy, and no hallucination, to obtain the agent's score in the long-term memory accuracy dimension.

[0156] Optionally, the evaluation module 302 is also used to perform a full retrieval of the long-term memory data using a retrieval enhancement generation algorithm, and to integrate and correct the answer to the first question obtained by the retrieval enhancement generation algorithm with the first answer to obtain the standard answer to the first question. The first question is a question in the first structured text set, and the first answer is the answer in the first structured text set corresponding to the first question. Based on the standard answer to each question in the first structured text set, an evaluation set for the long-term memory accuracy dimension is constructed.

[0157] Optionally, the basic parameters include the agent's capability mode, which includes the agent's state machine, directed graph of subtask steps, list of callable tools, list of callable resources, and constraint set. The evaluation module 302 is also used to construct task templates based on the capability mode, with parameters in the task templates generated based on the list of callable tools and the list of callable resources. Multiple parameters are inserted into the task templates based on random seeds to obtain multiple evaluation tasks. Based on the multiple evaluation tasks and capability modes, a test case generation algorithm is used to generate the expected execution path for each evaluation task, and a reference answer for each evaluation task is generated based on the expected execution path, resulting in an evaluation set for the task orchestration rationality dimension. Based on the evaluation set for the task orchestration rationality dimension, a large language model is used to score the agent's output on the evaluation set for the task orchestration rationality dimension in four aspects: path conformity, stability, generalization, and result quality, to obtain the agent's score in the task orchestration rationality dimension.

[0158] Optionally, the basic parameters include the agent's persona pattern and style pattern. The persona pattern includes the agent's persona scope, allowed action set, prohibited actions, knowledge limit, tone and wording norms, and disclosure boundaries. The style pattern includes the agent's person, tone, format elements, length, and structural constraints. The evaluation module 302 is also used to generate an induced evaluation set based on the persona pattern using a test case generation algorithm. The induced evaluation set is used to determine whether the agent can refuse and correctly guide the request back to the persona scope when faced with a request that exceeds the persona boundaries. Based on the style pattern, a style evaluation set is generated using a test case generation algorithm. The style evaluation is used to verify the consistency of the agent in satisfying the style pattern. Based on the induced evaluation set and the style evaluation set, a large language model is used to score the agent's output to determine the agent's persona boundary violation level in the persona consistency dimension.

[0159] Optionally, the basic parameters include the agent's tool interface description, which includes an open API and function signature. The evaluation module 302 is also used to generate three types of tool call instructions—regular call instructions, boundary call instructions, and adversarial call instructions—based on the tool interface description using a test case generation algorithm, as well as the agent's expected behavior for each tool call instruction. Calls that meet the expected behavior are considered valid calls, resulting in an evaluation set for the tool call validity dimension. Regular call instructions are tool call instructions with complete and valid parameters, boundary call instructions are tool call instructions with abnormal, out-of-bounds, missing, or extreme parameters, and adversarial call instructions are tool call instructions that the agent should not execute. Based on a large language model, the evaluation module determines whether the agent has made a valid call in the output of the evaluation set for the tool call validity dimension, and uses the proportion of valid calls made by the agent in the output of the evaluation set for the tool call validity dimension as the agent's score in the tool call validity dimension.

[0160] Optionally, the evaluation module 302 is also used to filter sensitive words from the corpus, form an evaluation set for the content compliance dimension based on the sensitive words, the evaluation set for the content compliance dimension includes multiple questions and whether each question is content compliant, the multiple questions in the evaluation set for the content compliance dimension include questions with sensitive words and questions without sensitive words; based on the large language model, it is judged whether each output of the agent in the evaluation set for the content compliance dimension is content compliant, and the proportion of content compliance in each output of the agent in the evaluation set for the content compliance dimension is used as the score of the agent in the content compliance dimension.

[0161] Optionally, in the evaluation module 302, each of the five dimensions corresponds to a Pass architecture. The input of the Pass architecture for any dimension includes the evaluation set for that dimension and the agent's answers on the evaluation set for that dimension. The output of the Pass architecture for any dimension includes the agent's score for that dimension.

[0162] It should be noted that the general intelligent agent evaluation device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the general intelligent agent evaluation device and the general intelligent agent evaluation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0163] The module division in this embodiment is illustrative and represents only one logical functional division. In actual implementation, other division methods are possible. Furthermore, the functional modules in the various embodiments of this disclosure can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0164] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a terminal device (which may be a personal computer, mobile phone, or communication device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0165] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. For example... Figure 4 As shown, the computer device 400 includes a processor 401 and a memory 402.

[0166] Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0167] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 402 are used to store at least one instruction, which is executed by the processor 401 to implement the general intelligent agent evaluation method provided in the embodiments of this disclosure.

[0168] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on computer device 400, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0169] This disclosure also provides a non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a computer device, the computer device is able to execute the general intelligent agent evaluation method provided in this disclosure.

[0170] This disclosure also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the general intelligent agent evaluation method provided in this disclosure.

[0171] The above description is merely an optional embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A universal method for evaluating intelligent agents, characterized in that, The method includes: Obtain the basic parameters of the agent; Based on the aforementioned basic parameters, the intelligent agent is evaluated in five dimensions: long-term memory accuracy, task arrangement rationality, character consistency, tool call effectiveness, and content compliance, in order to achieve the evaluation of the intelligent agent. In the process of evaluating the agent on any one of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, and a large language model is used to score the agent's output on the evaluation set to obtain the agent's score in that dimension.

2. The method according to claim 1, characterized in that, The basic parameters include the agent's long-term memory data, and the evaluation of the agent based on the basic parameters in terms of long-term memory accuracy includes: The long-term memory data is segmented, and the segmented long-term memory data is transformed into a first structured text set containing multiple questions and the corresponding answers for each question; The first structured text set is corrected using a retrieval enhancement generation algorithm to obtain a test set for the long-term memory accuracy dimension.

3. The method according to claim 1, characterized in that, The basic parameters include the capability mode of the intelligent agent; The evaluation of the agent based on the aforementioned basic parameters, in terms of task orchestration rationality, includes: Based on the capability mode, a task template is constructed, and the parameters in the task template are generated based on the list of callable tools and the list of callable resources; Multiple evaluation tasks are obtained by inserting multiple parameters into the task template based on a random seed; Based on the multiple assessment tasks and the capability modes, a test case generation algorithm is used to generate the expected execution path for each assessment task, and a reference answer for each assessment task is generated based on the expected execution path, resulting in an assessment set for the task arrangement rationality dimension.

4. The method according to claim 1, characterized in that, The basic parameters include the agent's persona mode and style mode; The evaluation of the intelligent agent based on the aforementioned basic parameters, in terms of persona consistency, includes: Based on the aforementioned persona model, a test case generation algorithm is used to generate an inducement evaluation set. The inducement evaluation set is used to determine whether the agent can refuse and correctly guide the request back to the persona range when faced with a request that exceeds the boundaries of the persona. Based on the style pattern, a test case generation algorithm is used to generate a style evaluation set, which is used to verify the consistency of the agent in satisfying the style pattern.

5. The method according to claim 1, characterized in that, The basic parameters include the tool interface description of the agent, which includes an open API and function signatures; The evaluation of the agent based on the aforementioned basic parameters, in terms of tool invocation effectiveness, includes: Based on the tool interface description, a test case generation algorithm is used to generate three types of tool call instructions: regular call instructions, boundary call instructions, and adversarial call instructions. The expected behavior of the agent corresponding to each tool call instruction is also generated. Calls that meet the expected behavior are considered valid, resulting in a test set for the tool call validity dimension. The regular call instructions are tool call instructions with complete and valid parameters. The boundary call instructions are tool call instructions with abnormal, out-of-bounds, missing, or extreme parameters. The adversarial call instructions are tool call instructions that the agent should not execute.

6. The method according to any one of claims 1 to 5, characterized in that, The five dimensions each correspond to a Pass architecture. The input to the Pass architecture for any dimension includes the evaluation set for that dimension and the agent's answers on the evaluation set for that dimension. The output of the Pass architecture for any dimension includes the agent's score for that dimension.

7. A universal intelligent agent evaluation device, characterized in that, The device includes: The acquisition module is used to acquire the basic parameters of the agent; The evaluation module is used to evaluate the intelligent agent based on the basic parameters in five dimensions: long-term memory accuracy, task arrangement rationality, personality consistency, tool call effectiveness, and content compliance, so as to realize the evaluation of the intelligent agent. In the process of evaluating the agent on any one of the five dimensions, a corresponding evaluation set is constructed based on the basic parameters, and a large language model is used to score the agent's output on the evaluation set to obtain the agent's score in that dimension.

8. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the general intelligent agent evaluation method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.

Citation Information

Cited By

  • Data synthesis method and device, electronic equipment and storage medium

    CN121581012A

  • Method for enhancing personality and task linkage capability of role large model and related products

    CN121743483A

  • Method for enhancing ability of character large model personality and task linkage and related product

    CN121743483B

  • Capability assessment method and device for simulation agent based on large model

    CN122086726A