System and method for automatic answer rating

CN122964518APending Publication Date: 2026-10-23RAVX INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610510411.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-04-17
Filing Date
2026-04-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

目前没有关于什么样的合适样本量能用于有效评估的指南

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964518A_ABST
    Figure CN122964518A_ABST
Patent Text Reader

Abstract

The present application relates to systems and methods for automatic answer rating. A method of automatically generating a prompt for a large language model, the method comprising receiving a test set comprising a plurality of human ratings and a plurality of large language model ratings. Each of the plurality of human ratings comprises a selection of a first product or a second product, and each of the plurality of large language model ratings comprises a selection of the first product or the second product using a prompt. The method further comprises comparing the plurality of human ratings and the plurality of large language model ratings to a metric. When the metric is satisfied, the method comprises transmitting the prompt as a final prompt. When the metric is not satisfied, the method comprises generating a refined prompt by evaluating a large language model.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This application claims priority to U.S. Provisional Patent Application No. 63 / 790,364, filed April 17, 2025, entitled “System and Method for Automatic Answer Rating”. Background Technology

[0003] Artificial intelligence solutions, such as Large Language Models (LLMs), are increasingly being incorporated into products. For example, question-answering products receive questions from users and generate answers based on one or more trained models. However, such answers may be inadequate due to issues such as illusion and flip bias. Therefore, products incorporating artificial intelligence should be evaluated across multiple dimensions, such as accuracy and usefulness.

[0004] Manual rating processes are costly, time-consuming, and produce inconsistent results. Currently, there is interest in "LLM as a Judge" systems, which use a large language model as a judge to evaluate the outcomes of two different products to determine which product is better. For example, product A might be a previous or current generation product, while product B might be a newer, updated version of product A. To ensure that product B is an improvement, it should be evaluated against product A. A large language model can be used to determine which outcome is better across one or more dimensions.

[0005] However, LLM as a refereeing system faces significant technical challenges in various automated rating fields, such as the legal field. The first challenge is cost. Generating large sample sizes to evaluate and rate different products is expensive. In some cases, excessively large sample sizes may be used, while using smaller sample sizes that are equally effective can save time and costs. Currently, there are no guidelines on what constitutes an appropriate sample size for effective evaluation.

[0006] Second, the rating quality of LLM as a judge currently does not match that of human rating processes. This may be due to technical challenges of large language models (such as the existence of illusion and flip bias), which are phenomena where large language models produce different results based on the position of words in the prompt.

[0007] Third, generating prompts for LLM as a referee is typically very time-consuming, and the results from LLM as a referee need to be aligned with the results of the human rating process. Over many iterations, a significant amount of time is required to modify and update the prompts to achieve alignment.

[0008] Therefore, it may be desirable to replace the automatic large language model rating system. Summary of the Invention

[0009] In one embodiment, a method for evaluating a first product and a second product includes: testing the first product to generate a first product score using a single sample as an initial sample size in the initial test; testing the second product to generate a second product score using a single sample as an initial sample size in the initial test; determining an increase rate between the first product score and the second product score in the initial test; and determining a confidence level for the first product score and the second product score in the initial test, wherein the confidence level is associated with the increase rate based on a mapping table. The method further includes: incrementally increasing the size of the initial sample size, determining the increase rate, and determining an updated confidence level until the confidence level is greater than or equal to the threshold, while the confidence level is less than a threshold. The method also includes selecting an initial sample size as a minimum sample size when the confidence level is greater than or equal to the threshold.

[0010] In another embodiment, a method for evaluating a large language model includes: receiving a test answer from a test product including a test large language model, receiving a control answer from a control product including a control large language model, and receiving a first evaluation request and a second evaluation request via an evaluation model, wherein each of the first evaluation request and the second evaluation request includes a test answer and a control answer, and the test answer is provided prior to the control answer. The method further includes: receiving a third evaluation request and a second evaluation request via the evaluation model, wherein each of the third evaluation request and the second evaluation request includes a control answer and a test answer, and the control answer is provided prior to the test answer. The method further includes: via the evaluation model, for each of the first evaluation request, the second evaluation request, the third evaluation request, and the fourth evaluation request, outputting a test answer selection when the test answer is a preferred answer, outputting a control answer selection when the control answer is a preferred answer, or outputting a tie when neither the test answer nor the control answer is a preferred answer.

[0011] In another embodiment, a method for hallucination prevention for a large language model includes: for each sentence in a document generated by the large language model, evaluating the model to output the sentence as a concluding / transitional sentence or a non-concluding / non-transitional sentence; when the sentence is a non-concluding / non-transitional sentence, evaluating the model to output a sentence directly supported by one or more citations or not directly supported by one or more citations; when the sentence is a non-concluding / non-transitional sentence and not directly supported by one or more citations, evaluating the model to output a sentence indirectly supported by one or more citations or not indirectly supported by one or more citations; and transmitting a hallucination warning to the user when the sentence is a non-concluding / non-transitional sentence, not directly supported by one or more citations, and not indirectly supported by one or more citations.

[0012] In another embodiment, a method for automatically generating prompts for a large language model includes receiving a test set comprising multiple human ratings and multiple large language model ratings. Each of the multiple human ratings includes a selection of a first product or a second product, and each of the multiple large language model ratings includes using a prompt to select the first product or the second product. The method further includes comparing the multiple human ratings and the multiple large language model ratings with a metric. When the metric is met, the method includes transmitting the prompt as a final prompt. When the metric is not met, the method includes generating a refined prompt by evaluating the large language model. Attached Figure Description

[0013] To facilitate the identification of any particular element or action in discussion, the most prominent bit in the figure reference numerals refers to the figure number in which the element was first introduced.

[0014] Figure 1A The figure illustrates an example mapping table based on one or more embodiments described and illustrated herein.

[0015] Figure 1B The figure illustrates an example process for determining the sample size for product evaluation according to one or more embodiments described and illustrated herein.

[0016] Figure 2A The figure illustrates a graph showing the accuracy of subject matter experts, point-wise rating, pair-wise rating, and robust pair-wise rating according to one or more embodiments described and illustrated herein.

[0017] Figure 2B The diagram illustrates the consistency of subject matter experts, point-by-point ratings, pairwise ratings, and robust pairwise ratings according to one or more embodiments described and illustrated herein.

[0018] Figure 3 The figure illustrates an example robust pairwise rating workflow based on one or more embodiments described and illustrated herein.

[0019] Figure 4 The figure illustrates an example illusion detection workflow based on one or more embodiments described and illustrated herein.

[0020] Figure 5A The figure illustrates a graph comparing the accuracy of a sample set evaluation performed by a human subject matter expert, a general approach of directly asking an LLM whether hallucinations exist, and a fine-grained hallucination detection method according to one or more embodiments described and illustrated herein.

[0021] Figure 5BThe figure illustrates a graph comparing the accuracy of a sample set evaluation performed by a human subject matter expert, a general approach of directly asking an LLM whether hallucinations exist, and a fine-grained hallucination detection method according to one or more embodiments described and illustrated herein.

[0022] Figure 6 The figure illustrates an example workflow for cue refinement for human-LLM alignment according to one or more embodiments described and illustrated herein.

[0023] Figure 7 The figure illustrates one aspect of the subject matter according to one embodiment. Detailed Implementation

[0024] Embodiments of this disclosure relate to an automated rating framework based on Large Language Models (LLM), designed to evaluate the answer quality of question-answering systems (particularly legal question-answering systems) across various dimensions, including usefulness, relevance, illusion, fluency, comprehensiveness, etc. The embodiments address challenges encountered by existing "LLM as judge" platforms in general domains. More specifically, the embodiments provide statistically optimized sample test sizes for rating, an LLM-driven automated rating framework across multiple dimensions, and guidance for AI-human alignment through semi-automated prompts with a continuously evolving process.

[0025] To rate or otherwise evaluate the quality of answers from a question-answering system, a sample set with a large number of test samples should be run. However, too small a sample size may produce unreliable results, while too large a sample size may be unnecessarily expensive. Currently, there are no guidelines that allow people to balance sample size for reliability while controlling costs.

[0026] The embodiments of this disclosure employ a unique method for determining the minimum test sample size required to provide the desired reliability. More specifically, the embodiments utilize a unique and reliable mapping table that plots the correlation between the test sample size and the reliability of the rating results across variations in the rate of quality increase, offering a significant advantage over existing assessment frameworks.

[0027] Figure 1A The diagram illustrates an example mapping table that allows users to quickly determine the optimal sample size required to achieve a specific confidence level while analyzing different LLM products. This ensures that any rating differences between products are statistically significant, rather than attributable to random chance. Applying this statistical analysis to the overall evaluation framework optimizes the balance between the cost of conducting experiments and the reliability of its results.

[0028] The vertical axis represents the test sample size, and the horizontal axis represents the rate of quality improvement between the first product (i.e., product A) and the second product (i.e., product B). The test sample size is the number of observations or data points collected for testing. The rate of improvement is the degree of difference in rating between the products. For example, product A might be an older version of a question-and-answer product in production, while product B might be a subsequent, and therefore a newer, question-and-answer product being evaluated. Therefore, the horizontal axis represents the percentage by which product B performs better (i.e., more useful) in testing than product A. For example, if product B performs better than product A in 4% of the sample size, then product B will have a 4% rate of quality improvement along the horizontal axis.

[0029] The colored areas in the mapping table represent confidence level zones. Dark brown-red includes results with a confidence level of 0.00%–20.00%, brown-red includes results with a confidence level of 20.00%–40.00%, and so on. Confidence level is a measure used to determine the reliability of a result. As a non-limiting example, a commonly accepted threshold for statistical significance is a confidence level of 0.95 or higher (which corresponds to a p-value of 0.05 or lower).

[0030] The confidence level was calculated using a t-test, a statistical hypothesis test used to determine whether there is a significant difference between the means of two groups. Embodiments of this disclosure compare the quality of responses to the same set of queries across different products (e.g., product A and product B). The embodiments use independent t-tests instead of paired t-tests because they focus on the difference in average ratings between the two groups and plan to generate a mapping table based on historical rating data for future experiments, which excludes the possibility of pre-obtaining specific rating differences for each sample pair.

[0031] The independent samples t-test is as follows:

[0032] Where: X1 and X2 are the average rating results of two different groups; S1 and S2 are the standard deviations of the rating results; n1 and n2 are the sample sizes of two different groups; and t′ is the t-statistic.

[0033] After calculating the t-statistic, the corresponding p-value is determined by consulting the t-distribution table. The confidence level used in the mapping table is determined by subtracting the p-value from 1; this confidence level represents the reliability of the rating result.

[0034] A p-value ≤ 0.05 is a commonly used criterion for determining whether observed differences are “statistically significant.” Therefore, a confidence level greater than 0.95 is considered to indicate “high confidence.” Low confidence (e.g., <55%) indicates that the rating conclusion may be due to random chance. Moderate confidence (e.g., 55%–95%) means that the rating result is moderately reliable but not entirely guaranteed. High confidence (e.g., >95%) means that the rating result is statistically significant. In studies, an 80% confidence level is generally agreed upon, corresponding to a p-value of approximately 0.2.

[0035] Figure 1A The mapping table illustrates the correlation between test sample size and the reliability of rating results across different quality increase rates. The mapping table is used to select the minimum sample size to generate a threshold confidence level. In other words, the mapping table is used to select the minimum test sample size to ensure the reliability of compared rating results, thereby reducing costs. By selecting the minimum sample size, computational resources and time are saved, thus preventing the use of unnecessarily large sample sizes.

[0036] Figure 1B The diagram illustrates the use of Figure 1A The flowchart describes the process of creating a mapping table. In box S1, the first and second products are tested to generate scores for the first and second products with an initial sample size (e.g., 100). Then, in box S2, the process determines the initial observed rate of increase in the sample size, which could be, for example, 4%. In box S3, the process is further refined by referencing a mapping table (e.g., ... Figure 1A The mapping table shown in the diagram is used to determine the confidence level of the initial sample. (Reference) Figure 1A The mapping table shows that a 4% increase yields confidence levels between 40% and 55%.

[0037] At box S3, the confidence level is compared to a threshold. As a non-limiting example, the confidence level threshold could be 95%. When the confidence level falls below the threshold (e.g., between 40% and 55%), the process moves to box S6, where the sample size is gradually increased. As a non-limiting example, the sample size could be increased by 100. The process then moves back to box S1, where boxes S1-S4 are repeated until the increased sample size produces a confidence level greater than or equal to the threshold. For example, after several iterations, a sample size of 400 could produce a 6% increase, depending on... Figure 1A The mapping table produces a confidence level of at least 95%.

[0038] When the confidence level is above the threshold, the sample size is selected as the minimum sample size in box S5. This minimum sample size is the minimum sample size that ensures the reliability of the comparison rating results.

[0039] The embodiments also employ robust pairwise rating to achieve a 25% increase in rating accuracy compared to general pointwise rating, while also providing high stability to eliminate flip noise and positional bias. Pointwise rating simply rates a single answer as good or bad. Pairwise rating, on the other hand, evaluates two answers, which in this application could be a comparison between answers generated by a first product (e.g., product A) and a second product (product B). Pairwise rating selects which of the two provides the better answer. However, the pointwise rating process faces the challenge of low rating accuracy, primarily because Large Language Models (LLMs) find it difficult to make precise ratings that discern microsecond differences in lengthy and complex text passages. This often results in identical overall rating scores, ignoring subtle differences in context. Simultaneously, the pairwise rating process exhibits lower rating stability, which can be caused by flip noise and positional bias in the Large Language Models used to generate the answers.

[0040] The embodiments of this disclosure employ a unique robust pairwise rating process to increase stability and accuracy. Traditional pointwise rating methods rate answers individually as complete or incomplete. However, pointwise rating has low accuracy.

[0041] Figure 2A The figure illustrates the accuracy of subject matter experts, point-by-point ratings, pair-by-pair ratings, and robust pair-by-pair ratings according to embodiments of this disclosure. Figure 2B The diagram illustrates the consistency between subject matter experts, point-by-point ratings, pair-by-pair ratings, and robust pair-by-pair ratings.

[0042] refer to Figure 2A For Subject Matter Expert (SME) rating, three human subject matter experts (SME1, SME2, ​​and SME3) independently evaluated the entire answer set for comparison. For point-by-point rating, the sample answer set was rated three times using a point-by-point method. Each time, the accuracy of the sample answer set rated by the point-by-point method was less than 54%, which is not suitable for most applications.

[0043] In pairwise rating methods, answers are evaluated in pairs. For each pair of answers, it is determined which answer is more comprehensive. While pairwise rating methods offer increased accuracy compared to pointwise rating methods, they suffer from stability issues. (See again...) Figure 2A The sample answer set was rated multiple times using a pairwise rating method. The accuracy of the pairwise rating method was significantly higher than that of the pointwise rating method.

[0044] However, as Figure 2B As shown in the chart, the consistency of the pairwise rating method is almost 10% lower than that of the pointwise rating method. Therefore, both pointwise and pairwise rating methods have undesirable properties that affect the performance of LLM-based automatic rating.

[0045] refer to Figure 3 Embodiments of this disclosure include robust pairwise ratings that provide high accuracy and high stability / consistency. In this method, four general queries are provided to the rating LLM model. A first query 10A asks the rating LLM model, “Which answer is more comprehensive, the control answer, or the test answer?” As an example, the control answer may be generated from a previous product, and the test answer may be generated from a new product or an updated version of a previous product. A second query 10B is presented to the rating LLM model identical to the first query. Third queries 12A and fourth queries 12B switch the positions of the control and test answers in the first query 10A and the second query 10B by asking, “Which answer is more comprehensive, the test answer, or the control answer?” The switching of the positions of the control and test answers aims to address the positional bias problem of the rating LLM model.

[0046] The outputs of the four queries are then fed into the strategy voting box 14. The output (i.e., the answer provided by the rating LLM model regarding which answer is more comprehensive) can be control (the control answer is more comprehensive), tie (neither the control nor the test answer is more comprehensive than the other), or test (the test answer is more comprehensive). The strategy voting box 14 receives "votes" as output and selects control, test, or tie as the most relevant answer and the stable winner 16. As an unrestricted answer, if control receives two votes, test receives one vote, and tie receives one vote, the control answer is selected as the most relevant (i.e., the stable winner 16). If both control and test receive the same number of votes, the strategy voting box outputs tie as the stable winner 16.

[0047] Refer again Figure 2A and Figure 2B The robust pairwise rating method disclosed herein exhibits both high accuracy and high consistency. The robust pairwise rating method increases the consistency of human subject matter expert ratings by 31%. The inherent properties of LLM introduce problems such as flip noise and preference bias, affecting rating stability. Without theoretical constraints, querying the rating LLM model twice with the same query resolves flip noise, where the LLM model can generate two different answers under the same repeated query. Furthermore, switching the positions of the control and test answers within the query resolves positional bias, where changing the position of characters in the query may lead to variations in the LLM model's answer. For example, the robust pairwise rating method can be used to determine whether a new version or product performs better than an older version or product.

[0048] Embodiments of this disclosure also address low accuracy through fine-grained hallucination detection. By breaking down the answer into fine-grained components and evaluating the confirmation of each component using ground truth references, fine-grained hallucination detection surpasses conventional LLM evaluation. A general solution is to ask the LLM itself whether the answer involves hallucination. However, the LLM's answer to the question of whether the answer involves hallucination may itself involve hallucination. Furthermore, long answers may not be hallucinatory overall, but small parts of the answer may actually involve hallucination.

[0049] exist Figure 4 The document provides a flowchart 100 of an example fine-grained hallucination detection method. At box 102, the answer is broken down into individual sentences. At box 104, the sentence to be evaluated is considered. At box 106, the LLM determines whether the sentence being evaluated is a concluding sentence or a transitional sentence. If so, the process moves to box 112. At box 112, the sentence is skipped and the process moves to box 120, where it is determined whether there are more sentences to evaluate. If more sentences exist, the evaluation of the next sentence begins from box 104.

[0050] If the LLM indicates at box 106 that the sentence being evaluated is neither a concluding sentence nor a transitional sentence (i.e., a non-concluding / non-transitional sentence), the process moves to box 108. At box 108, the LLM is asked whether the sentence being evaluated is directly supported by a citation. If so, the process moves to box 114, where the LLM outputs the sentence, the index of the directly supporting citation, and the evidence of direct support from the citation. The process then moves to box 120, and subsequently to box 104 if more sentences are to be evaluated.

[0051] If the LLM indicates that the sentence being evaluated is not directly supported by a reference, the process moves to box 110. At box 110, the LLM is asked whether the sentence being evaluated is indirectly supported by a reference. If so, the process moves to box 116, where the LLM outputs the sentence, the index of the indirectly supporting reference, the indirect supporting content, and the LLM's reasoning on why it believes these are indirectly supporting references. The process then moves to box 120, and subsequently to box 104 if more sentences are available for evaluation.

[0052] If the LLM indicates that the sentence being evaluated is not indirectly supported by references, the process moves to box 118. At box 118, the LLM outputs the sentence, a warning about the unsupported claim, and the LLM's reasoning for why it considers the sentence unsupported. The process then moves to box 120, and subsequently to box 104 if more sentences are available for evaluation.

[0053] In some embodiments, execution can be performed via a single prompt provided to the LLM. Figure 4 The steps are as follows. The input to the prompt is the original answer and supporting content, and the output of the prompt is the LLM's judgment for each sentence ("skip" / "direct" / "indirect" / "not supported") and reasoning. If any sentence is marked as "not supported", the answer is considered to be at risk of being a hallucination.

[0054] In this way, each sentence in the answer is checked one by one, and once a sentence is marked as an unsupported statement, the answer is considered to be at risk of hallucination. Therefore, a comprehensive analysis of the answers is performed to determine whether there are (multiple) hallucinations.

[0055] Figure 5A This compares the evaluation of a sample set of answers performed by human subject matter experts, the general method of directly asking LLMs whether they experience hallucinations, and... Figure 4 The diagram illustrates a precision-based fine-grained hallucination detection method. The fine-grained answer set exhibits near-human accuracy and, in one case, outperforms an answer set for a human subject. The fine-grained answer set significantly surpasses human subject matter experts in terms of consistency.

[0056] Figure 5B It is based on consistency to compare with Figure 5A A graph showing the evaluation of the same sample answer set. Figure 5B The figure illustrates that the fine-grained hallucination detection method disclosed in this paper significantly outperforms both subject matter experts and general LLM. In particular, the fine-grained hallucination detection method outperforms subject matter experts by 34% in terms of consistency.

[0057] Rating LLM models can be expected to align with human ratings in dimensions such as, but not limited to, usefulness (e.g., relevance, completeness, illusion, fluency, and accuracy). Therefore, the automatic rating prompts provided to the LLM model should be fine-tuned to produce answers that are comparable to human attributes in the expected dimensions.

[0058] refer to Figure 6The figure illustrates method 130 for refining automated rating hints for a rating LLM model to align with human ratings. In box 132, a test set of human ratings and rating LLM model ratings for the answers is provided. In box 134, human ratings and rating LLM model ratings are applied independently to compare two sets of answers generated by two different versions of the product for the same query set. The comparison aims to determine which version of the answer is rated better on one or more dimensions (e.g., relevance, completeness, etc.). As a non-limiting example, in box 134, the percentage difference between the human rating and the rating LLM model rating for the better rating is calculated. For example, a human rating might determine version A is better in 54% of the answers, while the rating LLM model might determine version A is better in 46% of the answers, resulting in an 8% difference. If the percentage difference between the human rating and the rating LLM model rating for the better rating is too large, it can indicate that the automated rating hints for the rating LLM model need to be updated.

[0059] The comparison metric is provided to box 136, where it is determined whether the rating tip for the rating LLM model is adequate. This can be determined by a comparison metric threshold. Using the example above, the comparison metric threshold could be a percentage difference threshold, such as, but not limited to, 2%. In this example, at box 136, an 8% difference threshold would not meet the comparison metric threshold, and therefore the rating tip would be considered inadequate.

[0060] When the rating prompts are insufficient, the process moves to box 138, which includes the analyst LLM. The analyst LLM (box 138) receives the test sample to be rated (i.e., question-answer pairs), the rating results and their reasoning from the rating LLM model, and the human rating results with expert commentary. The analyst LLM is asked to provide information regarding inconsistencies between the human rating and the LLM rating. In other words, at box 138, the analyst LLM is asked why there are inconsistencies between the human rating and the rating LLM model's rating. The analyst LLM outputs a conclusion regarding the reasoning behind the inconsistencies.

[0061] The rating prompts may include guidelines, instructions, standards, and examples that LLMs can utilize to complete LLM rating tasks. The actual format and content of the rating prompts vary depending on the objectives of the rating task. In Method 130, the original rating prompts are included in the prompt refinement process ( Figure 6 The input to the process (the autonomous process in the process) is taken from the original rating prompts, and the elements within those prompts are considered variables to be modified during the refinement process. In terms of accuracy, the output of this process is an enhanced version of the input rating prompts.

[0062] The Analyst LLM is an LLM whose operational guidelines are established via role definition instructions, designed to analyze discrepancies between LLM ratings and human expert ratings. Inputs to the Analyst LLM can include queries, responses, LLM rating scores, LLM rating inferences, human expert rating scores, and human expert rating comments. The Analyst LLM is instructed to: carefully consider the analysis of the questions and answers, compare LLM rating scores with human expert rating scores, and explain any discrepancies (including identifying potential problems in the LLM assessment). If the LLM rating results are accurate, the Analyst LLM's output should provide positive feedback, indicating that no adjustments to the original rating suggestions are needed. If the LLM rating results are inaccurate, the output should provide negative feedback, explaining the possible errors in the rating suggestions that led to the discrepancy between the LLM and human ratings. The Analyst LLM's output at box 138 includes feedback with inferences (positive or negative), detailing whether the original rating suggestions need refinement.

[0063] At box 140, the output from the analyst LLM, along with the current version of the LLM rating tips, is provided to the consultant LLM. By integrating the output from the analyst LLM and task-oriented instructions, the consultant LLM generates specific guidelines and recommendations aimed at improving the rating tips. These guidelines and recommendations aim to enhance the accuracy and effectiveness of LLM rating tips, thereby reducing inconsistencies between human ratings and LLM-generated ratings.

[0064] The Consultant LLM is an LLM whose operational guidelines are established via role definition instructions, designed to provide guidance for refining rating tips. Sample inputs to the Consultant LLM include questions, answers, the Analyst LLM's output, and the original rating tips. Therefore, the Consultant LLM receives instructions to provide guidance aimed at improving the rating tips based on feedback from the Analyst LLM. These instructions also provide examples of improvement directions and suggestions as a reference for the Consultant LLM in providing guidance for refining rating tips. The Consultant LLM's output at box 140 includes the guidance for refining rating tips.

[0065] At box 142, the consultant LLM's guidance and recommendations are provided to the executor LLM. The executor LLM is instructed not only to use the consultant LLM's guidance and recommendations but also to use modified guidelines that conform to the vertical domain constraints to generate refined rating suggestions 144. The executor LLM also receives the current version of the rating suggestions being evaluated. This refined suggestion is then used to generate a rating for the answer, which is again compared to a human rating. This process continues until the comparison metric is met at box 136 and the rating suggestion is considered sufficient. Introducing domain adaptation instructions at boxes 138 and 140, and domain adaptation constraints at box 142, can further improve the efficiency of auto-suggestions.

[0066] The Enforcer LLM is an LLM whose operational guidelines are established via role definition instructions, designed to accurately refine rating tips. Inputs to the Enforcer LLM can be the output of the Consultant LLM and the original rating tips. The Enforcer LLM receives instructions to generate refined rating tips based on the refinement guidelines provided by the Consultant LLM. These instructions also include implementation methods for certain legal domain-adaptive constraints, such as swapping examples in a predefined list of better examples from a gold standard list when modifying examples in the rating tips, rather than modifying existing examples. The Enforcer LLM's output at box 142 includes the refined rating tips.

[0067] When the rating suggestion at box 136 is deemed sufficient, the process can move to box 148, where a human can validate and select the most promising refined rating suggestion based on domain knowledge, producing the final polished rating suggestion 146. The final polished rating suggestion at box 146 can then be put into production for rating answers.

[0068] Now for reference Figure 7 The illustration schematically depicts an example computing device 170 for performing the functions described herein. Example computing device 170 provides a system for evaluating artificial intelligence products (such as the question-answering products and other functions described herein) according to embodiments shown and described herein, and / or has non-transient computer-usable media for evaluating artificial intelligence products (such as the question-answering products or other functions described herein (embodied in hardware, software, and / or firmware)). It should be understood that... Figure 7 The software, hardware and / or firmware components described herein may also be provided in other computing devices outside of computing device 170 (e.g., data storage devices, remote server computing devices, etc.).

[0069] For example Figure 7As shown, computing device 170 (or other additional computing device) may include one or more processors 184, input / output hardware 186, network interface hardware 188, and data storage unit 190 (which may store model data 192 used for one or more large language models described herein, sample data 194 used for sample size processes, product rating processes, and human-LLM alignment processes described herein, and any other data 196 used to perform the functions described herein), and non-transient memory unit 172. Non-transient memory unit 172 may be configured as volatile and / or non-volatile computer-readable media, and therefore may include random access memory (including SRAM, DRAM, and / or other types of random access memory), flash memory, registers, compact discs (CDs), digital versatile discs (DVDs), and / or other types of storage units. In other embodiments, memory unit 172 may be defined by transient memory and / or signals.

[0070] Furthermore, memory component 172 may be configured to store operation logic 174, sample size logic 176 for determining the minimum sample size for evaluating the product, rating logic 178 for finding illusions and providing robust pairwise ratings, and alignment logic 180 for refining cues to improve human-LLM alignment (each of which may be embodied as computer-readable program code, firmware, or hardware, as an example). It should be understood that data storage component 190 may reside locally and / or remotely on computing device 170 and may be configured to store one or more data segments accessible to computing device 170 and / or other components.

[0071] Local interface 182 is also included. Figure 7 The input / output hardware 186 may be implemented as a bus or other interface to facilitate communication between components of the computing device 170. The input / output hardware 186 may include an electronic display, mouse, touchscreen, microphone, touchpad, speaker, camera, and any other device capable of generating output and receiving input from the user.

[0072] Processor 184 may include any processing unit configured to receive and execute computer-readable code instructions, such as those from data storage unit 190 and / or memory unit 172. Network interface hardware 188 may include any wired or wireless networking hardware, such as a modem, LAN port, Wi-Fi card, WiMax card, mobile communication hardware, and / or other hardware for communicating with other networks and / or devices.

[0073] Figure 7 The components shown are merely exemplary and are not intended to limit the scope of this disclosure. More specifically, although Figure 7The components are shown residing within the computing device 170, but this is a non-limiting example. In some embodiments, one or more of the components may reside outside the computing device 170.

[0074] The various exemplary aspects of this disclosure are described by way of the aspects listed below.

[0075] In a first aspect, a method for evaluating a first product and a second product includes: testing the first product to generate a first product score using a single sample as an initial sample size in the initial test; testing the second product to generate a second product score using a single sample as an initial sample size in the initial test; determining an increase rate between the first product score and the second product score in the initial test; and determining a confidence level for the first product score and the second product score in the initial test, wherein the confidence level is associated with the increase rate based on a mapping table. The method further includes incrementally increasing the size of the initial sample size when the confidence level is less than a threshold, determining the increase rate, and determining an updated confidence level until the confidence level is greater than or equal to the threshold. The method also includes selecting an initial sample size as a minimum sample size when the confidence level is greater than or equal to the threshold.

[0076] According to the second aspect of the first aspect, the y-axis of the mapping table is the sample size, and the x-axis of the mapping table is the rate of increase.

[0077] According to the first or second third aspect, the initial sample size is in the range of 75 to 125 samples, including the endpoints.

[0078] According to the fourth aspect of any one of the first to third aspects, where the first and second products are question-answering products that combine a large language model.

[0079] The fifth aspect is determined based on any of the first to fourth aspects, where the t-test is used to determine the confidence level.

[0080] According to the sixth aspect of any of the first to fifth aspects, where the higher increase rate produces a lower sample size, so that the confidence level is greater than or equal to the threshold.

[0081] According to the seventh aspect of any one of the first to sixth aspects, where the threshold is 95%.

[0082] In the eighth aspect, a method for evaluating a large language model includes: receiving a test answer from a test product including the test large language model, receiving a control answer from a control product including the control large language model, and receiving a first evaluation request and a second evaluation request via an evaluation model, wherein each of the first evaluation request and the second evaluation request includes a test answer and a control answer, and the test answer is provided before the control answer. The method further includes: receiving a third evaluation request and a second evaluation request via the evaluation model, wherein each of the third evaluation request and the second evaluation request includes a control answer and a test answer, and the control answer is provided before the test answer. The method further includes: via the evaluation model, for each of the first evaluation request, the second evaluation request, the third evaluation request, and the fourth evaluation request, outputting a test answer selection when the test answer is the preferred answer; outputting a control answer selection when the control answer is the preferred answer; or outputting a tie when neither the test answer nor the control answer is a preferred answer.

[0083] According to the ninth aspect of the eighth aspect, the evaluation model is the evaluation of the large language model.

[0084] According to the eighth or ninth aspect, the tenth aspect is a subsequent version of the control product.

[0085] According to the eleventh aspect of any one of aspects eight to ten, it further includes: when the number of preferred answers to the test answer is greater than the number of preferred answers to the control answer, selecting the test product as the preferred product, and when the number of preferred answers to the control answer is greater than the number of preferred answers to the test product, selecting the control product as the preferred product.

[0086] According to the twelfth aspect of any one of aspects eight through eleven, it also includes receiving multiple test answers and multiple control answers.

[0087] In the thirteenth aspect, a method for hallucination prevention for large language models includes: for each sentence in a document generated by the large language model, evaluating the model to output the sentence as a concluding / transitional sentence or a non-concluding / non-transitional sentence; when the sentence is a non-concluding / non-transitional sentence, evaluating the model to output a sentence directly supported by one or more citations or not directly supported by one or more citations; when the sentence is a non-concluding / non-transitional sentence and not directly supported by one or more citations, evaluating the model to output a sentence indirectly supported by one or more citations or not indirectly supported by one or more citations; and transmitting a hallucination warning to the user when the sentence is a non-concluding / non-transitional sentence, not directly supported by one or more citations, and not indirectly supported by one or more citations.

[0088] According to aspect fourteen of aspect thirteen, where a sentence is directly supported by one or more citations, the evaluation model outputs the sentence, the index of one or more directly supporting citations, and the direct supporting evidence from one or more directly supporting citations.

[0089] According to aspect 13 or aspect 14, in aspect 15, when a sentence is indirectly supported by one or more citations, the evaluation model also outputs the sentence, the index of one or more indirectly supporting citations, and the indirectly supporting content.

[0090] The sixteenth aspect is based on any one of aspects thirteen through fifteen, where the evaluation model is a large language model.

[0091] In the seventeenth aspect, a method for automatically generating prompts for a large language model includes receiving a test set comprising multiple human ratings and multiple large language model ratings. Each of the multiple human ratings includes a selection of a first product or a second product, and each of the multiple large language model ratings includes using a prompt to select the first product or the second product. The method also includes comparing the multiple human ratings and the multiple large language model ratings with a metric. When the metric is met, the method includes transmitting the prompt as a final prompt. When the metric is not met, the method includes generating a refined prompt by evaluating the large language model.

[0092] According to aspect eighteen of aspect seventeen, generating refined prompts includes: inputting multiple question-answer pairs, multiple human ratings, and multiple large language model ratings into the evaluation large language model, wherein the multiple human ratings and multiple large language model ratings are based on the multiple question-answer pairs; outputting an inconsistency statement from the evaluation large language model regarding inconsistencies between the multiple human ratings and the multiple large language model ratings; inputting the inconsistency statement and prompts into the evaluation large language model; outputting one or more suggestions from the evaluation large language model for improving the prompts; inputting one or more suggestions and prompts into the evaluation large language model; and outputting refined prompts from the evaluation large language model.

[0093] According to the seventeenth or eighteenth aspect, the nineteenth aspect also includes iteratively generating refined hints until the refined hints result in the metric being satisfied.

[0094] According to the twentieth aspect of any one of aspects seventeen through nineteen, where the metric includes the percentage difference between multiple human ratings and multiple large language model ratings.

[0095] It should be noted that the terms “substantially” and “about” may be used herein to indicate the inherent uncertainty attributable to any quantitative comparison, value, measurement, or other representation. These terms are also used herein to indicate the extent to which a quantitative representation may differ from the stated reference without altering the fundamental function of the subject matter.

[0096] While specific embodiments have been illustrated and described herein, it should be understood that various other changes and modifications can be made without departing from the spirit and scope of the claimed subject matter. Furthermore, although various aspects of the claimed subject matter have been described herein, it is not necessary to utilize such aspects in combination. Therefore, the appended claims are intended to cover all such changes and modifications within the scope of the claimed subject matter.

Claims

1. A method for evaluating a first product and a second product, the method comprising: The first product score is generated from a single sample with an initial sample size in the initial test; The second product is tested to generate a score for a single sample of the initial sample size in the initial test. Determine the rate of increase in the first product score and the second product score of the initial test; Determine the confidence levels for the first product score and the second product score in the initial test, wherein the confidence levels are associated with the increase rate based on a mapping table; When the confidence level is less than the threshold, the size of the initial sample size is increased incrementally, the increase rate is determined, and an updated confidence level is determined until the confidence level is greater than or equal to the threshold. as well as When the confidence level is greater than or equal to the threshold, the initial sample size is selected as the minimum sample size.

2. The method according to claim 1, characterized in that, The y-axis of the mapping table represents the sample size, and the x-axis of the mapping table represents the rate of increase.

3. The method according to claim 1, characterized in that, The initial sample size is in the range of 75 to 125 samples, including the endpoints.

4. The method according to claim 1, characterized in that, The first product and the second product are question-answering products that combine a large language model.

5. The method according to claim 1, characterized in that, The confidence level is determined using a t-test.

6. The method according to claim 1, characterized in that, A higher rate of increase results in a lower sample size, so that the confidence level is greater than or equal to the threshold.

7. The method according to claim 1, characterized in that, The threshold is 95%.

8. A method for evaluating large language models, the method comprising: Receive test answers from test products that include testing large language models; Receive control answers from control products that include control of large language models; The evaluation model receives a first evaluation request and a second evaluation request, each of which includes the test answer and the control answer, wherein the test answer is provided before the control answer. The evaluation model receives a third evaluation request and a second evaluation request, each of which includes the control answer and the test answer, wherein the control answer is provided before the test answer; Using the evaluation model, for each of the first evaluation request, the second evaluation request, the third evaluation request, and the fourth evaluation request, when the test answer is the preferred answer, output the test answer selection; when the control answer is the preferred answer, output the control answer selection; or when neither the test answer nor the control answer is the preferred answer, output a tie.

9. The method according to claim 8, characterized in that, The evaluation model is an evaluation of a large language model.

10. The method according to claim 8, characterized in that, The test product is a subsequent version of the control product.

11. The method of claim 8, further comprising: When the number of preferred answers to the test answer is greater than the number of preferred answers to the control answer, the test product is selected as the preferred product; and when the number of preferred answers to the control answer is greater than the number of preferred answers to the test product, the control product is selected as the preferred product.

12. The method of claim 8, further comprising receiving a plurality of test answers and a plurality of control answers.

13. A method for illusion prevention in a large language model, the method comprising, for each sentence of a document generated by the large language model: The evaluation model outputs the sentence as a concluding / transitional sentence or a non-concluding / non-transitional sentence. When the sentence is a non-conclusion sentence / non-transition sentence, the evaluation model outputs a sentence that is directly supported by one or more citations or is not directly supported by one or more citations. When the sentence is a non-concluding / non-transitional sentence and is not directly supported by one or more citations, the evaluation model outputs the sentence that is indirectly supported by one or more citations or not indirectly supported by one or more citations; and When the sentence is a non-concluding / non-transitional sentence, not directly supported by one or more citations, and not indirectly supported by one or more citations, an illusion warning is transmitted to the user.

14. The method according to claim 13, characterized in that, When the sentence is directly supported by one or more citations, the evaluation model also outputs the sentence, the index of one or more directly supporting citations, and the direct supporting evidence from the one or more directly supporting citations.

15. The method according to claim 13, characterized in that, When the sentence is indirectly supported by one or more citations, the evaluation model also outputs the sentence, the index of one or more indirectly supporting citations, and the indirectly supporting content.

16. The method according to claim 13, characterized in that, The evaluation model is a large language model.

17. A method for automatically generating prompts for a large language model, the method comprising: We receive a test set that includes multiple human ratings and multiple large language model ratings, where: Each of the multiple manual ratings includes a selection of either the first product or the second product. Each of the multiple large language model ratings includes using the prompts to select the first product or the second product; Compare the multiple human ratings and the multiple large language model ratings and metrics; When the metric is met, the prompt will be transmitted as the final prompt. When the metric is not met, refined suggestions are generated by evaluating a large language model.

18. The method according to claim 17, characterized in that, Generating the refined prompt includes: The evaluation of the large language model is input with multiple question-answer pairs, multiple human ratings, and multiple large language model ratings, wherein the multiple human ratings and the multiple large language model ratings are based on the multiple question-answer pairs; The evaluation large language model outputs a statement of inconsistency regarding the inconsistencies between the multiple human ratings and the multiple large language model ratings; The inconsistency statement and the prompt are input through the evaluation of the large language model; The evaluation of the large language model outputs one or more suggestions for improving the prompts; Input the one or more suggestions and the prompts into the large language model being evaluated; and The refined hints are output through the evaluation of the large language model.

19. The method of claim 17, further comprising iteratively generating the refined hints until the refined hints result in the metric being satisfied.

20. The method according to claim 17, characterized in that, The metric includes the percentage difference in thresholds between the multiple human ratings and the multiple large language model ratings.