Large language model evaluation method and device, electronic equipment and storage medium

Through large language model cross-evaluation and iterative calculation of evaluation score weight values, the problem of low accuracy of large language model evaluation in the existing technology is solved, automated and objective evaluation results are achieved, and evaluation efficiency and accuracy are improved.

CN118569694APending Publication Date: 2024-08-30INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410499575.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing large language model evaluation methods have low accuracy and subjective factors, making it impossible to achieve objective and repeatable evaluation results.

Method used

By obtaining the evaluation question set, inputting it into multiple large language models, conducting cross-evaluation, calculating multiple evaluation scores for each model, updating the evaluation score weight value based on the initial comprehensive score and convergence conditions, and iteratively calculating the target comprehensive score to ensure the evaluation results. objectivity and impartiality.

Benefits of technology

It improves the accuracy and efficiency of large language model evaluation, realizes automated evaluation, and ensures the objectivity and fairness of evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569694A
    Figure CN118569694A
Patent Text Reader

Abstract

The invention provides a large language model evaluation method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. Respectively inputting the evaluation question set into the plurality of large language models to obtain answer results output by the plurality of large language models; performing large language model cross evaluation based on the evaluation question set and each answer result to obtain a plurality of evaluation scores of each large oracle model; and based on the plurality of evaluation scores of each large language model, determining a target comprehensive score of each large language model. According to the large language model evaluation method provided by the invention, large language model cross scoring is performed based on the answer results output by various large language models, and finally the target comprehensive score of each large language model is determined, so that an automatic large language model evaluation mode is realized, the objectivity and fairness of the evaluation result are ensured, and the evaluation efficiency is improved. Therefore, the accuracy of large language model evaluation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a large language model evaluation method, device, electronic device and storage medium. Background Art

[0002] The rapid development of generative artificial intelligence technology in the current era has brought new technological dividends to the development of the digital economy. Among them, the capabilities demonstrated by large language models have emerged, making them popular both in academia and industry. As large language models continue to move towards commercial use and are widely used in daily work and life, how to effectively evaluate their performance, security, and other aspects has become crucial.

[0003] Existing evaluation methods are mainly divided into two categories: standard question bank evaluation and expert experience evaluation. The standard question bank evaluation method mainly uses a large-scale question bank for evaluation. It completes the scoring by comparing the standard answers of the question bank with the answers returned by the large language model. It is currently the most mainstream evaluation method. The test scope is limited to the content in the question bank, and it is difficult to evaluate the answers to open-ended questions. The expert experience evaluation method mainly scores the answers generated by the large language model through the subjective judgment of human experts. This method cannot achieve automated evaluation, and there may be differences in the scores of different experts, making it difficult to ensure the objectivity and repeatability of the evaluation results. Therefore, the existing evaluation methods all have subjective factors and cannot obtain more objective large language model evaluation results, resulting in low accuracy of existing large language model evaluations. Summary of the invention

[0004] The present invention provides a large language model evaluation method, device, electronic device and storage medium, which are used to solve the problem of low accuracy of large language model evaluation in the prior art.

[0005] In a first aspect, the present invention provides a large language model evaluation method, comprising:

[0006] Get the evaluation question set;

[0007] Inputting the evaluation question set into a plurality of large language models respectively to obtain answer results output by the various large language models;

[0008] Performing a large language model cross-evaluation based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model;

[0009] Based on multiple evaluation scores of each large language model, a target comprehensive score for each large language model is determined.

[0010] In one embodiment, when a large language model cross-evaluation is performed based on the evaluation question set and each answer result to obtain multiple evaluation scores of each large prediction model, the following steps are performed for each large language model:

[0011] The evaluation question set, the answer results of the large language model and the preset prompt words are input into various other large language models to obtain the evaluation scores output by the various other large language models respectively; the other large language models refer to the large language models other than the large language model in all large language models used for cross-evaluation; the preset prompt words at least include the evaluation task description and the evaluation score output format requirements.

[0012] In one embodiment, when determining the target comprehensive score of each large language model based on multiple evaluation scores of each large language model, the following steps are performed for each large language model:

[0013] Initializing the evaluation score weight value of the large language model;

[0014] Multiplying the evaluation score weight value by the multiple evaluation scores respectively to obtain multiple products;

[0015] Summing the products to obtain an initial comprehensive score of the large language model;

[0016] Based on the initial comprehensive score, a target comprehensive score of the large language model is determined.

[0017] In one embodiment, determining the target comprehensive score of the large language model based on the initial comprehensive score includes:

[0018] Determine whether the initial comprehensive score satisfies any convergence condition; the convergence condition at least includes a maximum number of iterations, a comprehensive score change condition being less than a first preset threshold, and a variance of the comprehensive scores of the most recent multiple iterations being less than a second preset threshold;

[0019] If the initial comprehensive score satisfies any convergence condition, determining the initial comprehensive score as the target comprehensive score of the large language model;

[0020] If the initial comprehensive score does not satisfy any convergence condition, the evaluation score weight value is updated to obtain an updated weight value of the large language model;

[0021] The updated weight value is updated to an evaluation score weight value, and the step of multiplying the evaluation score weight value by a plurality of evaluation scores is iteratively performed until the initial comprehensive score satisfies any convergence condition, thereby obtaining a target comprehensive score of the large language model.

[0022] In one embodiment, updating the evaluation score weight value to obtain the updated weight value of the large language model includes:

[0023] Get the initial comprehensive scores of various other large language models;

[0024] Summing the initial comprehensive score of the large language model and the initial comprehensive scores of the remaining large language models to obtain a total score;

[0025] The initial comprehensive score of the large language model is divided by the total score to obtain an updated weight value of the large language model.

[0026] In one embodiment, the comprehensive score change condition is less than the first preset threshold, which is determined by the following formula:

[0027]

[0028] Among them, n represents n large language models, Represents the initial comprehensive score of the i-th large language model in the t-th round of iterations, Represents the initial comprehensive score obtained by the i-th large language model in the t-1th round of iteration, and T1 is the first preset threshold.

[0029] In one embodiment, the variance of the comprehensive scores of the most recent multiple iterations is less than the second preset threshold, which is determined by the following formula:

[0030] max i∈(1,n) (δ i ) <T2;

[0031]

[0032] Among them, n represents n large language models, Represents the initial comprehensive score obtained by the i-th large language model in the t0th round of iteration, represents the initial comprehensive score of the i-th large language model obtained during the t0-k round of iterations, T2 is the second preset threshold, Represents the average of all initial comprehensive scores obtained by the i-th large language model in the most recent k rounds of iterations.

[0033] In a second aspect, the present invention further provides a large language model evaluation device, comprising:

[0034] An acquisition module is used to obtain a set of evaluation questions;

[0035] A large language model reply module is used to input the evaluation question set into a plurality of large language models respectively to obtain answer results output by various large language models;

[0036] A large language model evaluation module, used to perform a large language model cross-evaluation based on the evaluation question set and each answer result, and obtain multiple evaluation scores for each large prediction model;

[0037] The comprehensive evaluation module is used to determine a target comprehensive score for each large language model based on multiple evaluation scores of each large language model.

[0038] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the large language model evaluation methods described above are implemented.

[0039] In a fourth aspect, the present invention further provides a storage medium, comprising a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the large language model evaluation methods described above are implemented.

[0040] The large language model evaluation method, device, electronic device and storage medium provided by the present invention respectively input the acquired evaluation question sets into various large language models to obtain the answer results output by various large language models, covering the large language model's understanding and answering ability of the question, and further cross-scoring the large language models based on the answer results, and finally determining the target comprehensive score of each large language model, realizing an automated large language model evaluation method, ensuring the objectivity and fairness of the evaluation results, thereby improving the accuracy of the large language model evaluation, and also improving the efficiency of the large language model evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 It is a flowchart of the large language model evaluation method provided by the present invention;

[0043] Figure 2 It is a schematic diagram of the system architecture provided by the present invention;

[0044] Figure 3 It is a structural schematic diagram of a large language model evaluation device provided by the present invention;

[0045] Figure 4It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited, for example, the first object can be one or more.

[0048] Combine the following Figure 1-Figure 4 The present invention describes a large language model evaluation method, device, electronic device and storage medium.

[0049] Figure 1 It is a flow chart of the large language model evaluation method provided by the present invention.

[0050] like Figure 1 As shown, the large language model evaluation method provided by the present invention includes but is not limited to the following steps:

[0051] Step 100: Obtain a set of evaluation questions;

[0052] Step 200: inputting the evaluation question set into a plurality of large language models respectively to obtain answer results output by the various large language models;

[0053] Step 300: Perform a large language model cross-evaluation based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model;

[0054] Step 400: Determine a target comprehensive score for each large language model based on multiple evaluation scores of each large language model.

[0055] It should be noted that the large language model evaluation method provided in the embodiment of the present invention is implemented based on the large language model evaluation device. The large language model evaluation method provided in the embodiment of the present invention uses a cross-evaluation method between multiple large language models to evaluate the answering ability of the large language model, and completes the automatic evaluation of the large language model in the absence of standard answers and manual evaluation. Therefore, the embodiment of the present invention takes the large language model evaluation device as an example to describe the large language model evaluation method.

[0056] It should be noted that the large language model evaluation device mainly includes an evaluation question library, a large model interface module, an inference service module, a model evaluation module and a comprehensive scoring module. The evaluation question library mainly contains a set of questions for evaluating the large language model, including basic ability tests, IQ tests and EQ tests. The large model interface module is mainly used to adapt to the interface of the commonly used large language model to realize the call of question and answer capabilities. The inference service module is mainly used to store and manage the answer results of the large language model by reading the questions in the evaluation question library and then calling the large model interface. The model evaluation module is mainly used to cross-evaluate the answer results of various large language models, and send scoring requests to various large language models by calling the large model interface to realize the cross-evaluation of the large language model and obtain the cross-scoring results. The comprehensive scoring module is mainly used to initiate evaluation to the model evaluation module and obtain the cross-scoring results reported by the model evaluation module, and further weight and update the cross-scoring results to obtain the target comprehensive score. Figure 2 As shown, Figure 2 It is a schematic diagram of the system architecture provided by the present invention.

[0057] Specifically, the large language model evaluation device includes an evaluation question library, which is mainly used to store a set of questions for evaluating the large language model. There is no need to store the standard answers corresponding to the questions. The question set covers common sense questions and answers, logical reasoning, and mathematical operations, and can test the basic capabilities, IQ, EQ, and security of the large language model. Therefore, the large language model evaluation device can obtain the evaluation question set from the evaluation question library through the reasoning service module.

[0058] Furthermore, the large language model evaluation device can call the large model interface through the inference service module, and input the evaluation question set into multiple large language models respectively, to obtain the answer results output by various large language models. The answer results cover the basic capabilities, IQ, EQ, and security of the large language model.

[0059] Furthermore, the large language model evaluation device can perform large language model cross-evaluation based on the answer results output by various large language models through the model evaluation module to obtain multiple evaluation scores for each large language model.

[0060] Furthermore, the large language model evaluation device can determine a target comprehensive score for each large language model based on multiple evaluation scores of various large language models through a comprehensive scoring module.

[0061] The large language model evaluation method provided by the present invention inputs the acquired evaluation question sets into various large language models respectively to obtain answer results output by various large language models, covering the large language model's understanding and answering capabilities of the questions, and further performs cross-scoring of the large language models based on the answer results. Finally, the target comprehensive score of each large language model is determined, and an automated large language model evaluation method is implemented, which ensures the objectivity and fairness of the evaluation results, thereby improving the accuracy of the large language model evaluation, and also improving the efficiency of the large language model evaluation.

[0062] Further, based on step 300, when a large language model cross-evaluation is performed based on the evaluation question set and each answer result to obtain multiple evaluation scores of each large prediction model, the following steps are performed for each large language model:

[0063] The evaluation question set, the answer results of the large language model and the preset prompt words are input into various other large language models to obtain the evaluation scores output by the various other large language models respectively; the other large language models refer to the large language models other than the large language model in all large language models used for cross-evaluation; the preset prompt words at least include the evaluation task description and the evaluation score output format requirements.

[0064] Specifically, the large language model evaluation device inputs the evaluation question set, the answer results of the large language model and the preset prompt words into various other large language models, and obtains the evaluation scores output by the various other large language models respectively, wherein the other large language models refer to the large language models other than the large language model among all the large language models used for cross-evaluation.

[0065] It should be noted that the preset prompt words at least include the evaluation task description and the evaluation score output format requirements, where the evaluation task description can describe the background and purpose of the evaluation task to help the large language model used for evaluation understand the context and application scenario of the evaluation, and the evaluation score output format requirements can limit the output to numeric variables, and the score output is based on a percentage system, and the number of decimal places retained by the output numeric variables can also be set. Therefore, the evaluation task description and evaluation score output format requirements can be set according to actual conditions. If the evaluation results obtained by the large language model based on the evaluation question set, the results of each answer, the evaluation task description and the evaluation score output format requirements are unreasonable, the large language model score output can be corrected through multiple rounds of dialogue.

[0066] Therefore, through the above cross-evaluation method, each large language model can obtain the evaluation scores of multiple other large language models on its answer results, which can be expressed in a matrix form, as shown in Table 1. Table 1 is the evaluation score matrix. In Table 1, five large language models are cross-evaluated, S ij Representing the large language model M i For a large language model M j The score of the answer result.

[0067] Table 1 Evaluation score matrix

[0068]

[0069]

[0070] The embodiment of the present invention inputs the evaluation question set, the answer results of the large language model and the preset prompt words into various other large language models, and evaluates the response results through various other large language models, thereby realizing an automated large language model evaluation method to ensure the objectivity and fairness of the evaluation results, thereby improving the accuracy of the large language model evaluation, and also improving the efficiency of the large language model evaluation.

[0071] Further, based on step 400, when determining the target comprehensive score of each large language model based on the multiple evaluation scores of each large language model, the following steps are performed for each large language model:

[0072] Initializing the evaluation score weight value of the large language model;

[0073] Multiplying the evaluation score weight value by the multiple evaluation scores respectively to obtain multiple products;

[0074] Summing the products to obtain an initial comprehensive score of the large language model;

[0075] Based on the initial comprehensive score, a target comprehensive score of the large language model is determined.

[0076] Specifically, the large language model evaluation device initializes the evaluation score weight value of the large language model, wherein the evaluation score weight value represents the reliability of the large language model scoring result. In one embodiment, the initialized evaluation score weight value may be 1 / n, wherein n represents n large language models.

[0077] Furthermore, the large language model evaluation device multiplies the evaluation score weight value by the multiple evaluation scores to obtain multiple products.

[0078] Furthermore, the large language model evaluation device sums up the products to obtain an initial comprehensive score of the large language model.

[0079] Therefore, through the above method, each large language model can obtain an initial comprehensive score of weighted sum. Therefore, the initial comprehensive score of each large language model can be expressed by the following formula:

[0080]

[0081] Among them, n represents n large language models, S j Representing the large language model M j The initial comprehensive score, S ij Representing the large language model M i For a large language model M j The score of the answer, W j Representing the large language model M j The evaluation score weight.

[0082] Furthermore, the large language model evaluation device determines a target comprehensive score of the large language model based on the initial comprehensive score.

[0083] The embodiment of the present invention first performs weighted summation of multiple evaluation scores through initialized evaluation score weight values ​​to obtain an initial comprehensive score, and further determines the target comprehensive score of the large language model based on the initial comprehensive score. The obtained target comprehensive score is objective and accurate, and can quickly compare the capabilities of different large language models to obtain a relatively strong target comprehensive score.

[0084] Further, determining a target comprehensive score of the large language model based on the initial comprehensive score includes:

[0085] Determine whether the initial comprehensive score satisfies any convergence condition; the convergence condition at least includes a maximum number of iterations, a comprehensive score change condition being less than a first preset threshold, and a variance of the comprehensive scores of the most recent multiple iterations being less than a second preset threshold;

[0086] If the initial comprehensive score satisfies any convergence condition, determining the initial comprehensive score as the target comprehensive score of the large language model;

[0087] If the initial comprehensive score does not satisfy any convergence condition, the evaluation score weight value is updated to obtain an updated weight value of the large language model;

[0088] The updated weight value is updated to an evaluation score weight value, and the step of multiplying the evaluation score weight value by a plurality of evaluation scores is iteratively performed until the initial comprehensive score satisfies any convergence condition, thereby obtaining a target comprehensive score of the large language model.

[0089] Specifically, the large language model evaluation device determines whether the initial comprehensive score meets any convergence condition, wherein the convergence condition includes at least the maximum number of iterations, the comprehensive score change condition being less than a first preset threshold, and the variance of the comprehensive scores of the most recent multiple iterations being less than a second preset threshold, and the maximum number of iterations, the first preset threshold, and the second preset threshold are all set according to actual conditions.

[0090] Furthermore, the comprehensive score change condition is less than the first preset threshold, which is determined by the following formula:

[0091]

[0092] Among them, n represents n large language models, Represents the initial comprehensive score of the i-th large language model in the t-th round of iterations, Represents the initial comprehensive score obtained by the i-th large language model in the t-1th round of iteration, and T1 is the first preset threshold.

[0093] Furthermore, the variance of the comprehensive scores of the most recent multiple rounds of iterations is less than the second preset threshold, which is determined by the following formula:

[0094] max i∈(1,n) (δ i ) <T2;

[0095]

[0096] Among them, n represents n large language models, Represents the initial comprehensive score obtained by the i-th large language model in the t0th round of iteration, represents the initial comprehensive score of the i-th large language model obtained during the t0-k round of iterations, T2 is the second preset threshold, Represents the average of all initial comprehensive scores obtained by the i-th large language model in the most recent k rounds of iterations.

[0097] Furthermore, if the initial comprehensive score satisfies any convergence condition, the large language model evaluation device determines the initial comprehensive score as the target comprehensive score of the large language model.

[0098] Furthermore, if the initial comprehensive score does not satisfy any convergence condition, the large language model evaluation device updates the evaluation score weight value to obtain an updated weight value of the large language model.

[0099] Furthermore, the large language model evaluation device updates the updated weight value to the evaluation score weight value, and iteratively executes the step of multiplying the evaluation score weight value by multiple evaluation scores respectively until the initial comprehensive score satisfies any convergence condition, thereby obtaining the target comprehensive score of the large language model.

[0100] Therefore, through the above iteration method, each large language model can obtain a target comprehensive score that meets the convergence condition, and the target comprehensive score is accurate and objective.

[0101] It should be noted that the above-mentioned iterative process can be terminated when any one of the convergence conditions is met. In practical applications, the iterative process can be terminated when any two of the convergence conditions are met, or when all three convergence conditions are met. The specific setting can be made according to the actual situation.

[0102] The embodiment of the present invention implements the iterative process of the initial comprehensive score of the large language model through convergence conditions, such as the maximum number of iterations, the change in the comprehensive score is less than the first preset threshold, and the variance of the comprehensive score of the most recent multiple iterations is less than the second preset threshold, and the evaluation results are gradually optimized in the continuous iterative update to obtain a precise target comprehensive score, thereby improving the accuracy of the large language model evaluation.

[0103] Furthermore, the updating of the evaluation score weight value to obtain the updated weight value of the large language model includes:

[0104] Get the initial comprehensive scores of various other large language models;

[0105] Summing the initial comprehensive score of the large language model and the initial comprehensive scores of the remaining large language models to obtain a total score;

[0106] The initial comprehensive score of the large language model is divided by the total score to obtain an updated weight value of the large language model.

[0107] Specifically, the large language model evaluation device obtains initial comprehensive scores of various other large language models.

[0108] Furthermore, the large language model evaluation device sums the initial comprehensive score of the large language model with the initial comprehensive scores of various other large language models to obtain a comprehensive score.

[0109] Furthermore, the large language model evaluation device divides the initial comprehensive score of the large language model by the total score to obtain an updated weight value of the large language model.

[0110] It should be noted that the update weight value of each large language model can be calculated by the following formula:

[0111]

[0112] in, The weight value representing the t+1th round (i.e., the next round of the current iteration), i.e., the large language model M iThe updated weight value, n represents n large language models, Representing the large language model M i The initial composite score, Representing the large language model M i The sum of the initial comprehensive scores of and the initial comprehensive scores of various other large language models.

[0113] The embodiment of the present invention updates and adjusts the evaluation score weight value by the proportion of the initial comprehensive score of any large language model in the comprehensive scores of all large language models, and can adjust the influence of each initial comprehensive score in the evaluation, making the evaluation process more flexible. By updating the weight value and continuously iteratively adjusting the initial comprehensive score, a precise target comprehensive score is finally obtained, thereby improving the accuracy of the large language model evaluation.

[0114] Furthermore, the present invention also provides a large language model evaluation device.

[0115] Reference Figure 3 , Figure 3 It is a structural schematic diagram of the large language model evaluation device provided by the present invention.

[0116] The large language model evaluation device comprises:

[0117] An acquisition module 310 is used to acquire a set of evaluation questions;

[0118] A large language model reply module 320 is used to input the evaluation question set into a plurality of large language models respectively to obtain answer results output by various large language models;

[0119] A large language model evaluation module 330 is used to perform a large language model cross-evaluation based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model;

[0120] The comprehensive evaluation module 340 is used to determine a target comprehensive score for each large language model based on multiple evaluation scores of each large language model.

[0121] The large language model evaluation device provided by the present invention inputs the acquired evaluation question sets into various large language models respectively, obtains the answer results output by various large language models, covers the large language model's understanding and answering ability of the question, further performs cross-scoring of the large language models based on the answer results, and finally determines the target comprehensive score of each large language model, thereby realizing an automated large language model evaluation method, ensuring the objectivity and fairness of the evaluation results, thereby improving the accuracy of the large language model evaluation, and also improving the efficiency of the large language model evaluation.

[0122] Furthermore, the large language model evaluation module 330 is also used for:

[0123] The evaluation question set, the answer results of the large language model and the preset prompt words are input into various other large language models to obtain the evaluation scores output by the various other large language models respectively; the other large language models refer to the large language models other than the large language model in all large language models used for cross-evaluation; the preset prompt words at least include the evaluation task description and the evaluation score output format requirements.

[0124] Furthermore, the comprehensive evaluation module 340 is also used for:

[0125] Initializing the evaluation score weight value of the large language model;

[0126] Multiplying the evaluation score weight value by the multiple evaluation scores respectively to obtain multiple products;

[0127] Summing the products to obtain an initial comprehensive score of the large language model;

[0128] Based on the initial comprehensive score, a target comprehensive score of the large language model is determined.

[0129] Furthermore, the comprehensive evaluation module 340 is also used for:

[0130] Determine whether the initial comprehensive score satisfies any convergence condition; the convergence condition at least includes a maximum number of iterations, a comprehensive score change condition being less than a first preset threshold, and a variance of the comprehensive scores of the most recent multiple iterations being less than a second preset threshold;

[0131] If the initial comprehensive score satisfies any convergence condition, determining the initial comprehensive score as the target comprehensive score of the large language model;

[0132] If the initial comprehensive score does not satisfy any convergence condition, the evaluation score weight value is updated to obtain an updated weight value of the large language model;

[0133] The updated weight value is updated to an evaluation score weight value, and the step of multiplying the evaluation score weight value by a plurality of evaluation scores is iteratively performed until the initial comprehensive score satisfies any convergence condition, thereby obtaining a target comprehensive score of the large language model.

[0134] Furthermore, the comprehensive evaluation module 340 also includes:

[0135] Get the initial comprehensive scores of various other large language models;

[0136] Summing the initial comprehensive score of the large language model and the initial comprehensive scores of the remaining large language models to obtain a total score;

[0137] The initial comprehensive score of the large language model is divided by the total score to obtain an updated weight value of the large language model.

[0138] It should be noted that the large language model evaluation device provided by the present invention can execute the large language model evaluation method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0139] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the large language model evaluation method, which includes: obtaining an evaluation question set; inputting the evaluation question set into a plurality of large language models respectively to obtain answer results output by the various large language models; performing a large language model cross-evaluation based on the evaluation question set and each answer result to obtain a plurality of evaluation scores of each large prediction model; and determining a target comprehensive score of each large language model based on the plurality of evaluation scores of each large language model.

[0140] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the large language model evaluation method provided in the above-mentioned embodiments, and the method includes: obtaining an evaluation question set; inputting the evaluation question set into multiple large language models respectively to obtain answer results output by various large language models; performing a large language model cross-evaluation based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model; and determining a target comprehensive score for each large language model based on the multiple evaluation scores of each large language model.

[0142] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the large language model evaluation method provided in the above-mentioned embodiments, the method comprising: obtaining an evaluation question set; inputting the evaluation question set into a plurality of large language models respectively to obtain answer results output by the various large language models; performing a large language model cross-evaluation based on the evaluation question set and the answer results to obtain a plurality of evaluation scores for each large prediction model; and determining a target comprehensive score for each large language model based on the plurality of evaluation scores for each large language model.

[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A large language model evaluation method, characterized in that: include: Get the evaluation question set; Inputting the evaluation question set into a plurality of large language models respectively to obtain answer results output by the various large language models; Performing a large language model cross-evaluation based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model; Based on multiple evaluation scores of each large language model, a target comprehensive score for each large language model is determined.

2. The large language model evaluation method according to claim 1, characterized in that: When a large language model cross-evaluation is performed based on the evaluation question set and each answer result to obtain multiple evaluation scores for each large prediction model, the following steps are performed for each large language model: The evaluation question set, the answer results of the large language model and the preset prompt words are input into various other large language models to obtain the evaluation scores output by the various other large language models respectively; the other large language models refer to the large language models other than the large language model in all large language models used for cross-evaluation; the preset prompt words at least include the evaluation task description and the evaluation score output format requirements.

3. The large language model evaluation method according to claim 1, characterized in that: When determining the target comprehensive score of each large language model based on multiple evaluation scores of each large language model, the following steps are performed for each large language model: Initializing the evaluation score weight value of the large language model; Multiplying the evaluation score weight value by the multiple evaluation scores respectively to obtain multiple products; Summing the products to obtain an initial comprehensive score of the large language model; Based on the initial comprehensive score, a target comprehensive score of the large language model is determined.

4. The large language model evaluation method according to claim 3, characterized in that: The step of determining a target comprehensive score of the large language model based on the initial comprehensive score includes: Determine whether the initial comprehensive score satisfies any convergence condition; the convergence condition at least includes a maximum number of iterations, a comprehensive score change condition being less than a first preset threshold, and a variance of the comprehensive scores of the most recent multiple iterations being less than a second preset threshold; If the initial comprehensive score satisfies any convergence condition, determining the initial comprehensive score as the target comprehensive score of the large language model; If the initial comprehensive score does not satisfy any convergence condition, the evaluation score weight value is updated to obtain an updated weight value of the large language model; The updated weight value is updated to an evaluation score weight value, and the step of multiplying the evaluation score weight value by a plurality of evaluation scores is iteratively performed until the initial comprehensive score satisfies any convergence condition, thereby obtaining a target comprehensive score of the large language model.

5. The large language model evaluation method according to claim 4, characterized in that: The step of updating the evaluation score weight value to obtain the updated weight value of the large language model includes: Get the initial comprehensive scores of various other large language models; The initial comprehensive score of the large language model is summed with the initial comprehensive scores of the remaining large language models to obtain a total score; The initial comprehensive score of the large language model is divided by the total score to obtain an updated weight value of the large language model.

6. The large language model evaluation method according to claim 4, characterized in that: The comprehensive score change condition is less than the first preset threshold, which is determined by the following formula: Among them, n represents n large language models, Represents the initial comprehensive score of the i-th large language model in the t-th round of iterations, Represents the initial comprehensive score obtained by the i-th large language model in the t-1th round of iteration, and T1 is the first preset threshold.

7. The large language model evaluation method according to claim 4, characterized in that: The variance of the comprehensive scores of the most recent multiple rounds of iterations is less than the second preset threshold, which is determined by the following formula: max i∈(1,n) (d i ) <T2; Among them, n represents n large language models, Represents the initial comprehensive score obtained by the i-th large language model in the t0th round of iteration, represents the initial comprehensive score of the i-th large language model obtained during the t0-k round of iterations, t2 is the second preset threshold, Represents the average of all initial comprehensive scores obtained by the i-th large language model in the most recent k rounds of iterations.

8. A large language model evaluation device, characterized in that: include: An acquisition module is used to obtain a set of evaluation questions; A large language model reply module is used to input the evaluation question set into a plurality of large language models respectively to obtain answer results output by various large language models; A large language model evaluation module, used to perform a large language model cross-evaluation based on the evaluation question set and each answer result, and obtain multiple evaluation scores for each large prediction model; The comprehensive evaluation module is used to determine a target comprehensive score for each large language model based on multiple evaluation scores of each large language model.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the large language model evaluation method according to any one of claims 1 to 7 are implemented.

10. A storage medium, comprising a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the large language model evaluation method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and device for testing multi-round dialogue ability of large model

    CN119066182A

  • Cloud platform fault diagnosis method and device, computer equipment and storage medium

    CN119322695A

  • Method and system for automatically inspecting semiconductor factory by intelligent agent

    CN121235680A

  • Method and system for evaluating multi-dimensional ability of Chinese large language model

    CN121681392A

  • Model evaluation and testing method and apparatus, and electronic device and storage medium

    WO2026144764A1