Model evaluation method and device, computer device, storage medium and program product

By performing semantic matching in large language model evaluation, extracting specificity indicators and factual elements, and generating a weighted harmonic mean of recall and precision, the problem of insufficient semantic correctness in traditional evaluation methods is solved, achieving higher evaluation accuracy and efficiency.

CN123178255APending Publication Date: 2026-11-27CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611285165.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional word overlap index methods struggle to guarantee semantic accuracy when evaluating large language models, leading to significant discrepancies between evaluation results and actual needs. This is particularly true in industries with high semantic accuracy requirements, such as law and medicine, where evaluation accuracy is low.

Method used

By extracting specific indicators from standard answers and factual elements from response information, semantic matching is performed to generate evaluation results, including a weighted harmonic mean of recall and precision, ensuring the semantic accuracy of the evaluation results.

Benefits of technology

It improves the accuracy of model evaluation, reduces the deviation between evaluation results and actual needs, is applicable to evaluation in multiple fields, improves evaluation efficiency, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178255A_ABST
    Figure CN123178255A_ABST
Patent Text Reader

Abstract

The application relates to a model evaluation method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises: obtaining inquiry information, a standard answer corresponding to the inquiry information and reply information; the reply information is output by a to-be-evaluated model in response to the input inquiry information; at least one specificity index corresponding to the inquiry information is extracted from the standard answer, and at least one factual element included in the reply information is extracted; semantic matching is performed based on the reply information, the standard answer, the specificity indexes and the factual elements, and an evaluation result of the to-be-evaluated model is generated. The evaluation is no longer dependent on the surface lexical overlap degree of the text, but judges at the semantic level, effectively captures the correctness and integrity of the reply information of the to-be-evaluated model at the semantic level, reduces the deviation between the evaluation result and the actual demand, and improves the evaluation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of model training technology, and in particular to a model evaluation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] A comprehensive and objective evaluation of Large Language Models (LLMs) helps to quickly understand their overall performance or guide their improvement. Among related technologies, traditional lexical overlap metrics can be used to evaluate Large Language Models.

[0003] However, traditional word overlap index methods evaluate models based on the surface overlap of text, which can only capture the similarity in the form of text, but it is difficult to guarantee semantic correctness. As a result, in industries with high requirements for semantic correctness, such as law and medicine, the evaluation results of large language models deviate greatly from actual needs, and the evaluation accuracy is low. Summary of the Invention

[0004] Therefore, it is necessary to provide a model evaluation method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems, so as to capture semantic correctness during the model evaluation process, reduce the deviation between the evaluation results of large language models and actual needs, and improve the evaluation accuracy of large language models.

[0005] Firstly, this application provides a model evaluation method, wherein: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information; Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information; Based on the response information, the standard answer, each of the specific indicators, and each of the factual elements, semantic matching is performed to generate the evaluation result of the model to be evaluated.

[0006] In one embodiment, the step of generating an evaluation result for the model to be evaluated by semantic matching based on the response information, the standard answer, each of the specific indicators, and each of the factual elements includes: Based on the response information and each of the specificity indicators, semantic matching is performed to determine the recall rate of the model to be evaluated; The accuracy of the model to be evaluated is determined by semantic matching based on each factual element and the standard answer. Based on the recall rate and the precision rate, the evaluation result of the model to be evaluated is calculated.

[0007] In one embodiment, determining the recall rate of the model to be evaluated by performing semantic matching based on the response information and each of the specificity indicators includes: The response information is semantically matched with each of the specific indicators, and the ratio of the number of successfully matched specific indicators to the total number of specific indicators is calculated to obtain the recall rate of the model to be evaluated.

[0008] In one embodiment, the step of determining the accuracy of the model to be evaluated by performing semantic matching based on each of the fact elements and the standard answer includes: Semantic matching is performed on each of the stated fact elements and the standard answer, and the ratio of the number of successfully matched fact elements to the total number of fact elements is calculated to obtain the accuracy of the model to be evaluated.

[0009] In one embodiment, calculating the evaluation result of the model to be evaluated based on the recall rate and the precision rate includes: Based on preset weighting coefficients, the weighted harmonic mean of the recall rate and the precision rate is calculated as the evaluation result of the model to be evaluated.

[0010] In one embodiment, the standard answer includes necessary information and auxiliary information; the step of extracting at least one specific indicator corresponding to the query information from the standard answer includes: Extract at least one specific indicator corresponding to the query information from the necessary information; If the necessary information indicates that the auxiliary information includes example information, then a specific indicator corresponding to the example information is generated.

[0011] Secondly, this application also provides a model evaluation device, the device comprising: The acquisition module is used to acquire query information, the standard answer corresponding to the query information, and response information; the response information is the output of the model to be evaluated in response to the input query information. An extraction module is used to extract at least one specific indicator corresponding to the query information from the standard answer, and to extract at least one factual element included in the response information; The evaluation module is used to perform semantic matching based on the response information, the standard answer, each of the specific indicators, and each of the factual elements to generate the evaluation result of the model to be evaluated.

[0012] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps described in any of the above method embodiments.

[0013] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps described in any of the above method embodiments.

[0014] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps described in any of the above method embodiments.

[0015] The aforementioned model evaluation methods, devices, computer equipment, computer-readable storage media, and computer program products extract specific indicators corresponding to the query information from the standard answer and extract at least one factual element included in the response information. Based on semantic matching of each factual element, each specific indicator, the standard answer, and the response information of the model to be evaluated, evaluation results are generated. This makes the evaluation no longer dependent on the word overlap on the surface of the text, but delves into the semantic level to make judgments. It effectively captures the semantic correctness and completeness of the response information of the model to be evaluated, reduces the deviation between the evaluation results and actual needs, and improves the accuracy of the evaluation. Attached Figure Description

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

[0017] Figure 1 Here is a flowchart of a model evaluation method in one embodiment; Figure 2 This is a flowchart of another model evaluation method in one embodiment; Figure 3 This is a structural block diagram of a model evaluation device in one embodiment; Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0020] Before introducing specific embodiments of the present invention, the technical terms involved in the present invention will be explained: Specificity indicators: Personalized evaluation criteria extracted from standard answers for specific inquiry information. Different inquiry information can correspond to different specificity indicators. In this embodiment, the standard answer is required to cover each specificity indicator, such as core principles, specific conditions, and procedural steps in the legal field.

[0021] Fact elements: Key, independently verifiable elements extracted from the response information of the model to be evaluated. Each fact element is information explicitly stated in the response information, such as core domain principles, specific conditions, and authoritative sources cited. The extraction of fact elements does not involve any missing information in the response information, nor does it involve any quality assessment of the extracted content.

[0022] This application provides a model evaluation method that can be applied to computer devices in a communication network architecture. These computer devices can be servers or terminal devices, etc., without specific limitations. For example, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server can be a backend server for the target application, providing backend services to the client of the target application. The terminal device can include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. A client of the target application can be installed and running on the terminal device. The target application can be an application for model evaluation, an application providing model evaluation functionality, or an application with the function of calling model evaluation; this application does not limit this. Furthermore, this application does not limit the form of the target application, including but not limited to Apps (Applications), mini-programs, etc., installed on the terminal device, and can also be in web page form.

[0023] like Figure 1 As shown, this model evaluation method can implement the following process: Step 101: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information.

[0024] Computer devices can acquire query information, the standard answer corresponding to that query information, and the response information output by the model to be evaluated in response to that query information. This information can be represented as a triple: Where q∈Q represents the query information. This is the standard answer, which contains the necessary information. and auxiliary information , This is a reply message.

[0025] The query information can be specific questions raised by users in industries such as law, medicine, or finance. The standard answer includes necessary and supplementary information corresponding to the question. The necessary information contains the mandatory elements that must be covered in answering the question, while the supplementary information contains background knowledge, case examples, or supplementary explanations related to the question. The response information is the long text answer generated by the model to be evaluated in response to the query information. The standard answer and response information can be obtained by retrieving them from a local database or by receiving them from an external server via a network interface. After obtaining the above data, the computer device first performs format validation and standardization processing, converting text of different formats into a standard string format to facilitate subsequent automated processing.

[0026] Step 102: Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information.

[0027] Computer devices can leverage the semantic understanding capabilities of large language models to extract at least one specific indicator corresponding to the query information from the standard answer. In the legal field, for example, the extracted specific indicators might include whether a specific legal provision is accurately cited, whether it covers the determination of specific conditions, whether it includes procedural steps or time limits, and whether it involves evidentiary standards or jurisdictional elements. In the medical field, for example, the extracted specific indicators might include whether it covers key symptom descriptions, whether it includes necessary examination indicators, and whether it follows standard diagnostic and treatment procedures. Each specific indicator is a unique and verifiable assessment point specific to the current query, rather than a universal scoring dimension applicable to all queries. The extracted specific indicators are output in a structured format, such as a list of specific indicators generated in JSON format, facilitating subsequent quantitative comparison and calculation.

[0028] For example, one can use LLM to extract the necessary information from the standard answer. Extract specific indicator set This process can be represented as function:

[0029] in For the i-th specific indicator, the corresponding The necessary information that needs to be covered.

[0030] The computer equipment can also extract factual elements from the response information output by the evaluation model. It identifies and extracts independently verifiable statements, citations, or inferences from the response information, forming several discrete, verifiable factual elements. It is important to note that the extraction process only includes explicitly stated content from the response information; it does not introduce mentions of missing content, nor does it evaluate the quality of the response information. The extracted factual elements are then structured according to their respective domain categories to facilitate subsequent item-by-item verification.

[0031] For example, response information can be based on LLM. Decomposed into a set of fact elements This process can be represented as function:

[0032] in For the j-th fact element, it contains Verifiable units such as statements, citations, and inference conclusions.

[0033] Step 103: Based on the response information, standard answer, various specific indicators, and various factual elements, perform semantic matching to generate the evaluation results of the model to be evaluated.

[0034] Specifically, semantic matching can be performed based on response information, standard answers, various specific indicators, and factual elements. The specific indicators are semantically compared with their corresponding content in the response information to determine whether the response information semantically covers the mandatory points represented by each specific indicator. Simultaneously, each factual element is semantically verified against the standard answer to determine whether each factual element is supported by the standard answer factually or logically. This generates the evaluation results for the model under evaluation. These results reflect the model's performance in responding to the current query, particularly in terms of the coverage of core points and the accuracy of factual statements, providing a basis for subsequent model optimization or application decisions.

[0035] After the computer device generates the evaluation results for the model to be evaluated, it can further determine whether the evaluation results meet the review criteria. In one example, the review criteria could be that the recall or precision rate in the evaluation results is lower than a preset threshold, indicating that the model response has significant deficiencies in core information coverage or factual accuracy, requiring further expert confirmation of the specific nature of the deficiencies. Alternatively, the review criteria could be that the evaluation results as a whole trigger a preset review flag on the computer device. For example, when the response information contains domain-specific terms or references to novel cases that the computer device cannot accurately verify, the computer device automatically marks the evaluation result as pending review. When the evaluation results are determined to meet the above review criteria, the computer device sends the query information, the corresponding standard answer, the response information of the model to be evaluated, and the evaluation results generated by the computer device to the expert terminal. After receiving the above information, the expert terminal can review and revise it, and then feed the revised results back to the computer device. After receiving the revised results returned by the expert terminal, the computer device can update the original evaluation results according to the revised results, and generate a revised evaluation report based on the expert's final decision.

[0036] By introducing an expert review mechanism when the evaluation results meet the preset conditions, computer equipment can reduce disputes when processing complex evaluation samples with ambiguous boundaries, semantic ambiguity, or requiring complex professional judgment by introducing the judgment of expert terminals.

[0037] As can be seen from the above, the solution provided in this application extracts specific indicators corresponding to the query information from the standard answer and extracts at least one factual element included in the response information. Based on semantic matching of each factual element, each specific indicator, the standard answer, and the response information of the model to be evaluated, it generates evaluation results. This allows the evaluation to move beyond relying on the surface-level lexical overlap of the text and instead delve into the semantic level for judgment, effectively capturing the semantic correctness and completeness of the response information of the model to be evaluated, reducing the deviation between the evaluation results and actual needs, and improving evaluation accuracy. Furthermore, the automated process provided in this application can improve evaluation efficiency, reduce labor costs, and solve the problem of scaling up manual evaluation. In addition, the solution provided in this application has a flexible system architecture, requiring only minor adjustments to achieve cross-domain migration, exhibiting high adaptability and low cost.

[0038] like Figure 2 As shown, in an exemplary embodiment, step 103 includes: Step 1031: Based on the response information and various specific indicators, perform semantic matching to determine the recall rate of the model to be evaluated; Step 1032: Perform semantic matching based on each fact element and the standard answer to determine the accuracy of the model to be evaluated; Step 1033: Calculate the evaluation results of the model to be evaluated based on recall and precision.

[0039] First, each extracted specific indicator can be compared with the response information output by the model under test. Semantic matching is used to determine whether the response information satisfies each specific indicator. Specifically, a semantic understanding model or a large language model can be used to perform in-depth analysis of the semantic content of the response information to determine whether the response information completely covers the core requirements pointed to by a specific indicator, including both explicit statements and implicit inferences. For each specific indicator, if the response information is determined to cover the core requirements of the indicator through semantic matching, the indicator is considered a successful match; if the response information fails to cover the core requirements of the indicator, it is considered a failed match. After completing the above semantic matching judgment for each specific indicator, the number of successfully matched specific indicators is divided by the total number of all specific indicators. The resulting ratio is the recall rate of the model under test. This recall rate measures the completeness of the model's response in terms of core information coverage; a higher recall rate indicates that the model's response covers more comprehensive core information.

[0040] Then, semantic matching is performed based on the response information and the standard answer to determine the precision of the model under evaluation. Specifically, the computer compares each information unit in the response information output by the model under evaluation with the entire content of the standard answer one by one, determining whether each information unit can be supported by the standard answer through semantic matching. This semantic matching is also based on the understanding and analysis of semantic content, and the judgment criteria include whether the information unit has an explicit original textual correspondence in the standard answer or can be derived through reasonable logical deduction. For each information unit in the response information, if semantic matching determines that it can be supported by the facts or logic of the standard answer, then the information unit is counted as supported; if it is determined that it cannot be supported by the standard answer, then it is counted as unsupported. After all information units in the response information have undergone the above semantic matching judgment, the number of supported information units is divided by the total number of information units in the response information, and the resulting ratio is the precision of the model under evaluation. This precision is used to measure the performance level of the model's response in terms of factual accuracy and relevance; the higher the precision, the stronger the accuracy and relevance of the model's response.

[0041] Then, a comprehensive evaluation result is calculated using a pre-set comprehensive scoring algorithm. This evaluation result can be a weighted harmonic mean of recall and precision, where the weighting coefficients can be set according to the specific application scenario and evaluation requirements. In this way, the evaluation result can comprehensively reflect the response quality of the model under evaluation from two dimensions: coverage of core information and accuracy of facts.

[0042] Compared to traditional word overlap index methods that can only capture textual similarity but cannot guarantee semantic correctness, this method determines recall and precision separately through semantic matching. It comprehensively evaluates the model response from two independent dimensions: core information coverage and factual accuracy. This accurately locates the specific defects in the response information, improves the interpretability and objectivity of the evaluation results, and avoids the subjective scoring bias of the LLM evaluator, providing a clear direction for model optimization.

[0043] In one implementation, step 1031 includes: Semantic matching is performed on the response information and each specific indicator, and the ratio of the number of successfully matched specific indicators to the total number of specific indicators is calculated to obtain the recall rate of the model to be evaluated.

[0044] Specifically, for each extracted specific indicator, a one-to-one semantic matching can be performed between the specific indicator and the response information output by the model to be evaluated. This semantic matching process can utilize a semantic understanding model to convert the specific indicator and the response information into semantic vectors, and calculate the semantic similarity between the vectors to determine whether the response information covers the core requirement pointed to by the specific indicator; alternatively, a large language model can be used to directly perform semantic analysis and reasoning on the specific indicator and the response information, outputting a judgment result on whether the requirement is met. If the core requirement described by a certain specific indicator is reflected in the response information, whether it appears directly in an explicit statement or indirectly expressed through implicit reasoning, as long as semantic matching determines that the requirement has been covered by the response information, the specific indicator is considered a successful match. Conversely, if the response information does not involve the content pointed to by the specific indicator at all, the match is considered a failure.

[0045] After performing semantic matching judgments on each specific indicator in the manner described above, the number of successfully matched specific indicators is counted. This number is then divided by the total number of all specific indicators; the resulting ratio is the recall rate of the model being evaluated. The calculation process can be represented as:

[0046] in This represents a logical judgment symbol used to evaluate the response information. Does it satisfy the first requirement? i Specific indicators ci The judgment result is quantified using indicator function II[.]. If the response information is received... cover If the core requirement is met, then Ⅱ = 1; otherwise, it is 0.

[0047] By verifying each specific indicator through semantic matching, it is possible to accurately determine whether the response information covers every specific mandatory evaluation element. This ensures that the recall calculation truly reflects the model's performance in covering core information. Compared to traditional word overlap indicators, which only measure textual similarity, this method, by introducing semantic analysis and matching, can effectively identify deeper semantic coverage situations such as synonyms and logical implications. This ensures that even if the model response uses a different expression than the standard answer, as long as its semantic content fully covers the corresponding core requirements, it can still be correctly included in the recall. This significantly improves the accuracy and reliability of the evaluation results at the semantic level, making it particularly suitable for evaluation scenarios in industries such as law and medicine where the completeness of core information is extremely important.

[0048] In one implementation, step 1032 includes: Semantic matching is performed on each fact element and the standard answer, and the ratio of the number of successfully matched fact elements to the total number of fact elements is calculated to obtain the accuracy of the model to be evaluated.

[0049] Specifically, the computer device performs a one-to-one semantic matching between each extracted factual element and the standard answer. This semantic matching process is based on a deep understanding of the semantic content, rather than a superficial comparison of lexical forms. The computer device can use a semantic understanding model to convert factual elements and standard answers into semantic vectors, and calculate the semantic similarity between the vectors to determine whether the factual element is supported by the standard answer; alternatively, it can use a large language model to directly perform semantic analysis and reasoning on factual elements and standard answers, outputting a judgment result on whether they are supported. If the content stated by a factual element has a clear original textual correspondence in the standard answer, or can be derived from the content of the standard answer through reasonable logical deduction, then the factual element is determined to be supported by the standard answer through semantic matching. Conversely, if the content of a factual element cannot be found in the standard answer, or even contradicts the facts or logic of the standard answer, then the factual element is determined to be unsupported.

[0050] After performing semantic matching and judgment on each fact element in the manner described above, the number of supported fact elements is counted. This number is then divided by the total number of fact elements; the resulting ratio is the precision of the model being evaluated. The calculation process can be represented as:

[0051] in Represents logical judgment symbols, used to judge factual elements. Is it the standard answer? Supported, the judgment result is quantized through indicator function II[.]. quilt If the facts or logic support it, then II = 1; otherwise, it is 0.

[0052] By extracting factual elements from the response information and semantically matching them one by one with the standard answer, the veracity and reliability of each specific statement in the model response can be accurately determined. Compared to traditional methods that only assess text similarity as a whole, this approach achieves refined verification of each independent information unit in the model response, accurately pinpointing specific factual errors in the response information. Simultaneously, through the introduction of semantic matching technology, computer devices can effectively identify deep semantic relationships such as synonyms and logical equivalence, ensuring that even if factual elements and the standard answer use different expressions, as long as they are semantically equivalent, they can still be correctly judged as supported. This significantly improves the accuracy and reliability of precision assessment, providing reliable technical support for identifying and preventing model illusion problems, and is particularly suitable for evaluation scenarios in industries such as law and medicine where the accuracy of facts is extremely critical.

[0053] In one implementation, step 1033 calculates the evaluation result of the model to be evaluated based on recall and precision, including: Based on preset weight coefficients, the weighted harmonic mean of recall and precision is calculated as the evaluation result of the model to be evaluated.

[0054] Specifically, the calculated recall and precision can be substituted into the formula for calculating the weighted harmonic mean. This can be expressed as:

[0055] Where P represents precision and R represents recall. Indicates the evaluation results. This represents the preset weighting coefficient. During the calculation process, the computer equipment adjusts the relative importance of recall and precision in the overall score based on the preset weighting coefficient. This preset weighting coefficient can be pre-set according to specific application scenarios and evaluation needs. When the weighting coefficient is greater than 1, it indicates that the overall score focuses more on recall, that is, it pays more attention to whether the model response completely covers the core information. This setting is suitable for scenarios with high requirements for information completeness, such as medical diagnosis assistance and legal opinion review. When the weighting coefficient is less than 1, it indicates that the overall score focuses more on precision, that is, it pays more attention to the factual accuracy of the model response. This setting is suitable for scenarios with low tolerance for factual errors, such as news report generation and official document writing. When the weighting coefficient is equal to 1, it indicates that recall and precision are equally important, and the overall score is the standard harmonic mean of the two.

[0056] By integrating recall and precision into a single comprehensive score using a weighted harmonic mean, the evaluation results not only include sub-indicators from two independent dimensions but also provide a comprehensive assessment of the overall performance. This avoids situations where a score is only average despite one indicator being extremely high and another extremely low. Furthermore, through flexible adjustment of preset weighting coefficients, this method can adaptively adjust the evaluation focus according to the actual needs of different industry scenarios, balancing the universality and domain adaptability of the evaluation method, and enhancing the practical value and decision-making reference significance of the evaluation results.

[0057] In one exemplary embodiment, the standard answer includes necessary information and auxiliary information; step 102 includes: Extract at least one specific indicator corresponding to the query information from the necessary information; If the necessary information indicates that the auxiliary information includes example information, then a specific indicator corresponding to the example information is generated.

[0058] Specifically, the computer device inputs the user's query and the standard answer containing necessary and auxiliary information into the large language model. Combined with the preset extraction rule template, the large language model automatically identifies and extracts the mandatory evaluation elements for the specific query from the necessary information of the standard answer based on understanding the query context, forming at least one specific indicator.

[0059] By extracting specific indicators from necessary information, we can ensure that the extracted specific indicators have strong domain adaptability, focusing on the core mandatory elements that must be covered to answer the question, thereby ensuring the accuracy of specific indicators and the rigor of evaluation, and avoiding the limitations of traditional general evaluation standards in different fields.

[0060] Building upon this, the system further determines whether the necessary information explicitly indicates that the auxiliary information contains referable example information. If the necessary information indicates the existence of such example information, an additional specificity indicator corresponding to the example citation requirement is generated. This additional specificity indicator is used to verify whether the response information of the model under evaluation appropriately cites or reflects relevant examples, thereby assessing the richness of the model's response and its ability to support examples, improving the comprehensiveness of the evaluation, and avoiding the omission of important reference information.

[0061] Through the above method, this embodiment can make full use of the structured characteristics of the standard answer. While ensuring the complete extraction of specific indicators, it can adaptively supplement example-type evaluation indicators according to the guidance of necessary information. This makes the extracted specific indicators not only cover the mandatory key points, but also specifically examine the reference of supplementary examples in the model's answer, further improving the comprehensiveness of specific indicators and the ability to adapt to different scenarios.

[0062] The following example, using a specific scenario of marriage and family legal dispute consultation, illustrates the complete process of the model evaluation method.

[0063] Suppose we are given an evaluation instance, which includes a user query, the standard answer to that query, and the response output by the model to be evaluated. The user query is: "If a pre-marital property is added to a spouse's name after marriage, how should it be divided in a divorce? If the house belongs to the original owner, what factors need to be considered in the compensation?" The standard answer contains necessary and supplementary information. The necessary information records three core points: "According to Article 1065 of the Civil Code, adding a spouse's name to pre-marital property is considered a gift and becomes joint property of the couple"; "It can be awarded to the original owner during division, but the other party must be compensated"; "The compensation should be determined by comprehensively considering factors such as the length of the marriage, the contributions of both families, and the market price of the house." The supplementary information provides a reference case: "In the divorce case between Cui and Chen, after more than ten years of marriage and with the original owner bearing the main expenses, a 6 million yuan house was compensated with 1.2 million yuan." The response from the model to be evaluated is: "According to the Civil Code, property acquired before marriage and whose name is added to the property title is not considered joint property. In the event of a divorce, the property can be returned to the original owner, who must compensate the other party. The amount of compensation should take into account the time of marriage and the value of the property."

[0064] After obtaining the aforementioned inquiry information, standard answer, and response information, the specific indicators corresponding to the inquiry information are first extracted from the necessary information in the standard answer. In this embodiment, the computer device extracts four specific indicators. The first specific indicator is whether Article 1065 of the Civil Code is accurately cited as the legal basis, and whether it is clearly stated that this article applies to the determination that "adding a name to premarital property is considered a gift and converted into marital property." The second specific indicator is whether it is clearly stated that marital property with a name added before marriage can be "judged to belong to the original owner" during divorce division, and whether the core requirement of the original owner paying compensation to the other party is mentioned. The third specific indicator is whether it includes relevant content on the discretionary factors for compensation, and at least covers one or more key factors such as the duration of the marriage, the contributions of both families, and the market price of the house. The fourth specific indicator is whether the statements on "the nature of the property with a name added before marriage," "the ownership in divorce division," and "the basis for calculating compensation" are consistent with the core logic of the standard answer, and without significant factual deviations.

[0065] Next, semantic matching is performed based on the response information and each specific indicator to determine the recall rate of the model to be evaluated. In this embodiment, the computer device performs semantic comparison between the response information and the four specific indicators mentioned above one by one. For the first specific indicator, the response information only vaguely mentions "according to the Civil Code," without accurately citing Article 1065 of the Civil Code, nor does it explicitly state that this article applies to the determination that "adding a name to premarital property is considered a gift and converted into marital property," so the semantic matching is not satisfied. For the second specific indicator, the response information explicitly mentions "the property can be returned to the original owner in a divorce, and compensation must be given to the other party," so the semantic matching is satisfied. For the third specific indicator, the response information mentions "marriage time and house price," covering two key factors: the duration of the marriage and the market price of the house, so the semantic matching is satisfied. For the fourth specific indicator, the core logic of the response information is basically consistent with the standard answer, with no obvious factual deviation, so the semantic matching is satisfied. The number of successful matches among the four specific indicators is three, and the total number of specific indicators is four, so the recall rate is three-quarters, or 0.75.

[0066] Simultaneously, factual elements can be extracted from the response information. In this embodiment, three factual elements are extracted from the response information. The first factual element is a statement of core principles of the domain: "Adding a spouse's name to a pre-marital property after marriage does not constitute joint property; if a spouse's name is added to a pre-marital property after marriage, the property belongs to the original owner upon divorce, and the original owner must pay compensation to the other party." The second factual element is a statement of specific conditions: "Upon divorce, a property with a spouse's name added before marriage belongs to the original owner, and the original owner's payment of compensation must consider both the marriage time and the property price." The third factual element is a statement of citation: "The basis is the Civil Code; the citation context is an analysis of the property nature of adding a spouse's name to a pre-marital property after marriage and the issue of divorce division; the specific claim supported is that adding a spouse's name to a pre-marital property constitutes joint property, and upon divorce, the property belongs to the original owner, who must compensate the other party."

[0067] After extracting the aforementioned factual elements, each element was semantically matched against the entire content of the standard answer to determine whether it was supported by the standard answer. For the first factual element, the statement "adding a name to premarital property does not constitute joint property" clearly contradicts the standard answer's statement "adding a name to premarital property is considered a gift and becomes joint property," thus the semantic matching determined it was not supported. For the second factual element, the two compensation considerations, "marriage time and house price," have corresponding bases in the standard answer's "duration of marriage and house market price," thus the semantic matching determined it was supported. For the third factual element, the citation of the Civil Code as a basis is consistent with the legal basis cited in the standard answer, thus the semantic matching determined it was supported. Since two of the three factual elements were supported, and the total number of factual elements is three, the precision rate is two-thirds, approximately 0.67.

[0068] Based on the calculated recall of 0.75 and precision of 0.67, a weighted harmonic mean was calculated using a preset weighting coefficient as the evaluation result. In this embodiment, the preset weighting coefficient is set to 2, indicating that the evaluation focuses more on recall, that is, on whether the model response fully covers the core information. Substituting these values ​​into the formula for calculating the weighted harmonic mean, the overall evaluation result is approximately 0.73.

[0069] The output evaluation report includes a recall rate of 0.75, a precision rate of 0.67, and an overall score of 0.73. The report further shows that the model's response performs reasonably well in terms of core information coverage, with most mandatory elements covered, but it omits the crucial information of accurately citing specific legal clauses. While generally correct in factual accuracy, it has some missing details; the factual error of misrepresenting jointly owned property as not belonging to jointly owned property is accurately identified by the precision metric. Users or model developers can optimize the model based on these evaluation results, for example, by strengthening the model's ability to accurately cite legal clauses during model training, or by guiding the model through prompt word engineering to pay attention to the accurate description of the nature of property in its responses.

[0070] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0071] Based on the same inventive concept, this application also provides a model evaluation apparatus for implementing the model evaluation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more model evaluation apparatus embodiments provided below can be found in the limitations of the model evaluation method described above, and will not be repeated here.

[0072] In one exemplary embodiment, such as Figure 3 As shown, a model evaluation device is provided, comprising: The acquisition module 201 is used to acquire query information, the standard answer corresponding to the query information, and response information; the response information is the output of the model to be evaluated in response to the input query information. Extraction module 202 is used to extract at least one specific indicator corresponding to the query information from the standard answer, and to extract at least one fact element included in the response information; Evaluation module 203 is used to perform semantic matching based on the response information, the standard answer, each of the specific indicators and each of the factual elements to generate the evaluation result of the model to be evaluated.

[0073] Each module in the aforementioned model evaluation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0074] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores measurement data and / or positioning information. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a model evaluation method.

[0075] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0076] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information; Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information; Based on the response information, the standard answer, each of the specific indicators, and each of the factual elements, semantic matching is performed to generate the evaluation result of the model to be evaluated.

[0077] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information; Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information; Based on the response information, the standard answer, each of the specific indicators, and each of the factual elements, semantic matching is performed to generate the evaluation result of the model to be evaluated.

[0078] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information; Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information; Based on the response information, the standard answer, each of the specific indicators, and each of the factual elements, semantic matching is performed to generate the evaluation result of the model to be evaluated.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0081] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0082] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A model evaluation method, characterized in that, The method includes: Obtain the query information, the standard answer corresponding to the query information, and the response information; the response information is the output of the model to be evaluated in response to the input query information; Extract at least one specific indicator corresponding to the query information from the standard answer, and extract at least one factual element included in the response information; Based on the response information, the standard answer, each of the specific indicators, and each of the factual elements, semantic matching is performed to generate the evaluation result of the model to be evaluated.

2. The method according to claim 1, characterized in that, The step of generating an evaluation result for the model to be evaluated by semantic matching based on the response information, the standard answer, each of the specific indicators, and each of the factual elements includes: Based on the response information and each of the specificity indicators, semantic matching is performed to determine the recall rate of the model to be evaluated; The accuracy of the model to be evaluated is determined by semantic matching based on each factual element and the standard answer. Based on the recall rate and the precision rate, the evaluation result of the model to be evaluated is calculated.

3. The method according to claim 2, characterized in that, The step of determining the recall rate of the model to be evaluated by performing semantic matching based on the response information and each of the specificity indicators includes: The response information is semantically matched with each of the specific indicators, and the ratio of the number of successfully matched specific indicators to the total number of specific indicators is calculated to obtain the recall rate of the model to be evaluated.

4. The method according to claim 2, characterized in that, The step of determining the accuracy of the model to be evaluated by semantic matching based on each fact element and the standard answer includes: Semantic matching is performed on each of the stated fact elements and the standard answer, and the ratio of the number of successfully matched fact elements to the total number of fact elements is calculated to obtain the accuracy of the model to be evaluated.

5. The method according to claim 2, characterized in that, The step of calculating the evaluation result of the model under evaluation based on the recall rate and the precision rate includes: Based on preset weighting coefficients, the weighted harmonic mean of the recall rate and the precision rate is calculated as the evaluation result of the model to be evaluated.

6. The method according to claim 1, characterized in that, The standard answer includes necessary information and auxiliary information; the extraction of at least one specific indicator corresponding to the query information from the standard answer includes: Extract at least one specific indicator corresponding to the query information from the necessary information; If the necessary information indicates that the auxiliary information includes example information, then a specific indicator corresponding to the example information is generated.

7. A model evaluation device, characterized in that, The device includes: The acquisition module is used to acquire query information, the standard answer corresponding to the query information, and response information; the response information is the output of the model to be evaluated in response to the input query information. An extraction module is used to extract at least one specific indicator corresponding to the query information from the standard answer, and to extract at least one factual element included in the response information; The evaluation module is used to perform semantic matching based on the response information, the standard answer, each of the specific indicators, and each of the factual elements to generate the evaluation result of the model to be evaluated.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.