Model evaluation device, model evaluation method, and model evaluation program
The model evaluation device simplifies the evaluation of generative AI models by using comprehensiveness and accuracy indices, facilitating quick performance assessment and improvement for non-technical developers.
Patent Information
- Application Number
- JP2025082281
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Citizen developers face difficulties in evaluating the performance of generative AI models, particularly when using Retrieval-Augmented Generation (RAG), due to the complexity of interpreting evaluation scores and identifying areas for improvement.
A model evaluation device and method that utilizes first and second indices to assess the comprehensiveness and accuracy of answers generated by text generation models, providing an easy-to-understand evaluation result and improvement plan.
Enables efficient evaluation of generative AI models, allowing non-technical developers to qualitatively assess answer quality and implement improvements quickly.
Smart Images

Figure 0007763987000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to model evaluation techniques. [Background technology]
[0002] In recent years, generative AI (Artificial Intelligence) trained by machine learning, including large language models (LLM), has been increasingly utilized. Along with generative AI, a technology called Retrieval-Augmented Generation (RAG) is sometimes used.
[0003] Typically, LLM generates answers to queries based on internal knowledge, which is knowledge accumulated during machine learning. For this reason, it is difficult to generate answers about information that is not included in the internal knowledge, such as the latest news reports or company-specific internal manuals.
[0004] On the other hand, RAG provides reference information as context to the LLM, allowing it to generate answers based on that information. This allows answers to be generated using information not included in the LLM's internal knowledge, making it possible to automate tasks such as responding to inquiries about a company's code of conduct.
[0005] Regarding LLMs using RAGs, libraries for evaluating answers generated by LLMs are known (see, for example, Non-Patent Document 1 and Non-Patent Document 2). [Prior art documents] [Non-patent literature]
[0006] [Non-Patent Document 1] “Ragas”, [online], Exploding Gradients, January 21, 2025, [Retrieved April 22, 2025], Internet<URL:https: / / docs.ragas.io / en / latest / > [Non-patent document 2] “RAGChecker: A Fine-grained Framework For Diagnosing RAG”, [online], Amazon Science, [Retrieved April 22, 2025], Internet<URL:https: / / github.com / amazon-science / RAGChecker> Summary of the Invention [Problem to be solved by the invention]
[0007] In recent years, the difficulty of implementing generative AI has decreased, making it possible to develop applications using generative AI without writing code. This has made it possible for many citizen developers to get involved in developing applications using generative AI. Furthermore, by using RAG with generative AI, it is possible to generate answers using information that is not included in the generative AI's internal knowledge.
[0008] However, it is difficult for citizen developers who are not familiar with information technology to evaluate the performance of generative AI. For example, methods for evaluating answers generated by generative AI using RAG include manual evaluation and evaluation using libraries such as those described in Non-Patent Document 1 and Non-Patent Document 2. However, neither method of evaluation is easy for citizen developers.
[0009] This problem does not only arise when evaluating answers generated by a generation AI using RAG, but also when evaluating answers generated by various machine learning models using various information.
[0010] In one aspect, the present invention aims to efficiently evaluate answers generated by a text generation model trained by machine learning. [Means for solving the problem]
[0011] According to one embodiment, the first index indicates the degree to which an answer to a query generated by a text generation model trained by machine learning covers all information contained in a correct answer to the query, and the second index indicates the degree to which the answer includes information unrelated to the query. The computer generates an evaluation result of the answer based on the first index and the second index, and outputs the generated evaluation result. [Effects of the Invention]
[0012] In one aspect, answers generated by a text generation model trained by machine learning can be efficiently evaluated. [Brief explanation of the drawings]
[0013] [Figure 1] FIG. 2 is a functional configuration diagram of a model evaluation device according to an embodiment. [Figure 2] 10 is a flowchart of a first model evaluation process. [Figure 3] FIG. 1 is a configuration diagram of a model evaluation system. [Figure 4] FIG. 2 is a functional configuration diagram of a model evaluation device included in the model evaluation system. [Figure 5] FIG. 10 is a diagram showing the correspondence between combinations of coverage A and accuracy B and categories and E2E scores. [Figure 6] FIG. 10 is a diagram showing the inclusion relationship between correct answer information and answer information. [Figure 7] 10 is a flowchart of a second model evaluation process. [Figure 8] FIG. 2 is a hardware configuration diagram of an information processing device. DETAILED DESCRIPTION OF THE INVENTION
[0014] Hereinafter, embodiments will be described in detail with reference to the drawings.
[0015] To utilize RAG, it is important to improve the response performance of the generative AI. One possible method for evaluating the response performance of the generative AI is to create an evaluation dataset based on evaluation data prepared in advance or a collection of actual response examples, and then evaluate the answers generated by the generative AI. However, manually evaluating many answers requires high human and time costs.
[0016] Therefore, in recent years, a method called LLM-as-a-judge has been used. In this method, answers generated by a generative AI are evaluated by an LLM. Libraries used in LLM-as-a-judge include Ragas (Non-Patent Document 1) and RAGChecker (Non-Patent Document 2).
[0017] For example, the score "faithfulness" included in both Ragas and RAGChecker is an index that measures whether the information in the generated answer is included in the reference information given as context. The reference information is information that represents objective facts.
[0018] By using faithfulness, we can analyze whether the answer is generated based on reference information. If faithfulness is low, there is a possibility that the answer contains inaccurate information, such as information based on internal knowledge rather than information based on reference information.
[0019] Calculating and analyzing scores such as faithfulness can reveal problems with answers generated by generative AI, but for citizen developers who are not familiar with information technology, it is not easy to perform a detailed analysis of the scores and consider specific ways to improve them based on the analysis results.
[0020] First, it is difficult for citizen developers to interpret the score values. For example, if the faithfulness is 0.7, it is difficult to understand what the value means. Specifically, it is difficult to know whether the faithfulness needs to be further improved to reach 1.0, or whether 0.7 has already achieved performance that satisfies users.
[0021] Second, it is difficult for citizen developers to identify areas for improvement in the generation AI from the score. For example, if faithfulness is 0.5, citizen developers will understand that half of the information contained in the generated answers is not based on reference information. In this case, citizen developers will need to identify information that is not based on reference information and analyze the cause of the generation of such information, which increases the burden on them in identifying areas for improvement.
[0022] Third, it is difficult for citizen developers to concretize improvement proposals. For example, if citizen developers want to improve faithfulness, they must understand and appropriately adjust the wide range of inputs and parameters of the AI generator, which makes this a difficult task. Specifically, they must consider whether they only need to modify the prompts for the AI generator, whether they should change any of the parameters related to the AI's answer generation, or whether they also need to review the parameter settings for searching for reference information.
[0023] Acquiring analytical skills for such performance improvements requires a lot of time and practical experience, which places a heavy burden on citizen developers.
[0024] 1 shows an example of the functional configuration of a model evaluation device according to an embodiment. The model evaluation device 101 in FIG.
[0025] FIG. 2 is a flowchart showing an example of the first model evaluation process performed by the model evaluation device 101 of FIG.
[0026] The evaluation unit 111 generates an evaluation result of the answer to the query, generated by the text generation model, based on the first index and the second index (step 201), and the output unit 112 outputs the generated evaluation result (step 202).
[0027] A text generation model is an example of generative AI, a machine learning model trained by machine learning. The first metric indicates the degree to which the generated answer covers all the information contained in the correct answer to the query. The second metric indicates the degree to which the answer includes information unrelated to the query.
[0028] The model evaluation device 101 in FIG. 1 can efficiently evaluate answers generated by a text generation model trained by machine learning.
[0029] Fig. 3 shows an example of the configuration of a model evaluation system including the model evaluation device 101 of Fig. 1. The model evaluation system of Fig. 3 includes a terminal device 311, a model evaluation device 312, and a database server 313. The model evaluation device 312 corresponds to the model evaluation device 101 of Fig. 1.
[0030] The terminal device 311 is a developer's information processing device (computer). The developer develops an application including an answer generation model and uses the model evaluation device 101 to evaluate the performance of the application. The answer generation model is an example of a text generation model. The developer may be a citizen developer.
[0031] The database server 313 is an information processing device that stores a database. The database contains reference information that is provided as context to the answer generation model included in the application. The reference information may be the latest news reports, information publicly available on the Internet, a company-specific internal manual, etc. The company-specific internal manual may be a document related to company regulations such as a service code.
[0032] Taking into consideration searchability, each document in the reference information may be divided into chunks of a certain length, and the chunks may be stored in a database. Also, each of multiple documents may be stored in a database as a chunk.
[0033] The model evaluation device 312 communicates with the terminal device 311 and the database server 313 via a communication network 321. The communication network 321 is, for example, a LAN (Local Area Network) or a WAN (Wide Area Network).
[0034] The terminal device 311 transmits an evaluation sample to the model evaluation device 312 in accordance with instructions from the developer. The evaluation sample includes a combination of a query for an application and a correct answer to the query. As the correct answer to the query, for example, an ideal answer to the query (Ground Truth, GT) is used. The terminal device 311 may transmit an evaluation dataset including multiple evaluation samples to the model evaluation device 312.
[0035] Based on the query included in the received evaluation sample, the model evaluation device 312 searches the database server 313 for related information related to the query. Then, the model evaluation device 312 inputs the query and related information into the answer generation model, causing the answer generation model to generate an answer to the query.
[0036] Next, the model evaluation device 312 generates an evaluation result of the generated answer by using the correct answer included in the evaluation sample, and generates an improvement plan for the application based on the evaluation result.The model evaluation device 312 then transmits the evaluation result and the improvement plan to the terminal device 311.
[0037] The terminal device 311 displays the received evaluation results and improvement proposals on the screen, thereby enabling the developer to obtain the evaluation results indicating the response performance of the application and the improvement proposals for the application.
[0038] Fig. 4 shows an example of the functional configuration of the model evaluation device 312 in Fig. 3. The model evaluation device 312 in Fig. 4 includes a communication unit 411, a response generation unit 412, an evaluation unit 413, an improvement plan generation unit 414, and a storage unit 415. The evaluation unit 413 and the communication unit 411 correspond to the evaluation unit 111 and the output unit 112 in Fig. 1, respectively.
[0039] The communication unit 411 communicates with the terminal device 311 and the database server 313 via the communication network 321 .
[0040] The storage unit 415 stores an application 421 to be evaluated, an E2E (end-to-end) evaluation model 422 used to evaluate the application 421, and an improvement plan generation model 423 used to generate an improvement plan for the application 421.
[0041] The application 421 includes a RAG function 441 and an answer generation model 442. The RAG function 441 is a function that searches the database server 313 for information related to input information.
[0042] The answer generation model 442 is a text generation model trained by machine learning. The answer generation model 442 may be an LLM such as a Generative Pre-trained Transformer (GPT), or may be a multimodal model. A publicly available LLM may be used as the answer generation model 442 as is, or an LLM fine-tuned by any method may be used as the answer generation model 442. The parameters of the LLM may be set by any method.
[0043] The E2E evaluation model 422 and the improvement suggestion generation model 423 are text generation models trained by machine learning. The E2E evaluation model 422 and the improvement suggestion generation model 423 may be an LLM such as GPT. The type of LLM used as the E2E evaluation model 422 and the improvement suggestion generation model 423, whether or not fine-tuning is performed, prompts, parameters, and implementation methods are arbitrary.
[0044] The answer generation unit 412 receives an evaluation sample from the terminal device 311 via the communication unit 411, and stores the query 424 and correct answer 425 included in the received evaluation sample in the storage unit 415. The query 424 and correct answer 425 are, for example, text written in a natural language. If the answer generation model 442 is a multimodal model, the query 424 may include images, sounds, etc.
[0045] Next, the answer generation unit 412 uses the RAG function 441 to search the database server 313 for one or more pieces of related information 426 related to the query 424. When searching for the related information 426, the answer generation unit 412 transmits the query 424 to the database server 313 via the communication unit 411.
[0046] The database server 313 may select the relevant information 426 by a keyword search using the words included in the query 424, or may select the relevant information 426 using a word embedding model.
[0047] The database server 313 converts the text contained in the query 424 and the text of each chunk contained in the database into vectors expressed as numerical values, for example, using a word embedding model, and calculates the similarity between the two converted vectors.
[0048] Then, the database server 313 selects one or more chunks in descending order of similarity from among the chunks having a similarity equal to or greater than the threshold as related information 426, and transmits them to the model evaluation device 312. As the similarity between two vectors, for example, an index such as cosine similarity is used.
[0049] The database server 313 may use a Reranker model to select the related information 426. The Reranker model is a machine learning model that calculates the semantic similarity between two given sentences based on deep learning or the like.
[0050] Next, answer generation unit 412 receives related information 426 from database server 313 via communication unit 411 and stores it in storage unit 415. Then, answer generation unit 412 generates answer 427 to query 424 using answer generation model 442 and stores it in storage unit 415. Answer 427 is, for example, text written in a natural language.
[0051] The answer generator 412 generates a prompt in which a query 424 and related information 426 are embedded, and inputs the prompt to the answer generation model 442. The related information 426 is embedded in the prompt as context. The answer generation model 442 generates and outputs an answer 427 according to the input prompt. The input prompt may be in any format. The answer generator 412 may generate the answer 427 using a technology aimed at improving accuracy, such as HyDE (Hypothetical Document Embeddings).
[0052] Next, the answer generation unit 412 generates answer generation parameter information 428 including various parameters of the search settings used to generate the answer 427, the answer generation model 442, various parameters of the answer generation model 442, prompts, etc., and stores the information in the storage unit 415. The various parameters of the search settings include, for example, the type of word embedding model, the similarity threshold, whether or not a reranker model is used, the reranker model, the chunk generation method, etc. The various parameters of the answer generation model 442 include, for example, Temperature, Top-P, Top-K, etc.
[0053] The evaluation unit 413 evaluates the answer 427 using the E2E evaluation model 422 to generate an evaluation result 429 of the answer 427 and stores it in the storage unit 415. At this time, the evaluation unit 413 generates a prompt in which the query 424, the correct answer 425, and the related information 426 are embedded, and inputs the prompt to the E2E evaluation model 422. The E2E evaluation model 422 generates and outputs the evaluation result 429 according to the input prompt.
[0054] Then, the evaluation unit 413 outputs the evaluation result 429 to the terminal device 311 by transmitting the evaluation result 429 to the terminal device 311 via the communication unit 411 .
[0055] The E2E evaluation model 422 performs E2E evaluation to generate an evaluation result 429. In the E2E evaluation, the E2E evaluation model 422 obtains the comprehensiveness A and accuracy B of the answer 427 as evaluation indexes, and determines a category of the answer 427 based on the comprehensiveness A and accuracy B. Then, the E2E evaluation model 422 generates an evaluation result 429 including the category of the answer 427.
[0056] Comprehensiveness A indicates the degree to which answer 427 covers the information included in correct answer 425, and accuracy B indicates the degree to which answer 427 includes information unrelated to query 424. Information unrelated to query 424 is, for example, information that is unnecessary or incorrect as an answer to query 424. Hereinafter, information unrelated to query 424 may simply be referred to as unnecessary information. Comprehensiveness A is an example of a first index, and accuracy B is an example of a second index.
[0057] The comprehensiveness A is expressed as one of the levels A-1, A-2, or A-3, for example. A-1 indicates that the answer 427 includes all of the information included in the correct answer 425. A-2 indicates that the answer 427 includes some of the information included in the correct answer 425. A-3 indicates that the answer 427 does not include any of the information included in the correct answer 425.
[0058] The accuracy B is expressed as a level of either B-1 or B-2, for example. B-1 indicates that the answer 427 does not contain any unnecessary information. B-2 indicates that the answer 427 contains unnecessary information.
[0059] The E2E evaluation model 422 may also generate evidence for the determined coverage A and accuracy B. In this case, the evaluation result 429 may include coverage A, accuracy B, evidence for coverage A, and evidence for accuracy B.
[0060] The basis for completeness A may indicate that answer 427 includes all of the information contained in correct answer 425, that answer 427 includes some of the information contained in correct answer 425, or that answer 427 does not include any of the information contained in correct answer 425. The basis for accuracy B may indicate whether answer 427 includes redundant information.
[0061] When accuracy B is B-2, the E2E evaluation model 422 may determine whether or not the unnecessary information included in the answer 427 is information based on the related information 426. The information based on the related information 426 represents information generated from the related information 426. The information generated from the related information 426 is, for example, information included in the related information 426. When accuracy B is B-2, the basis for accuracy B may include a determination result indicating whether or not the unnecessary information is information based on the related information 426.
[0062] By including the basis for comprehensiveness A and accuracy B in the evaluation result 429, it becomes easier to understand comprehensiveness A and accuracy B.
[0063] As an example of the query 424, the correct answer 425, and the answer 427, the following texts T1 to T3 are assumed.
[0064] T1: "What kind of person was Einstein?"
[0065] T2: "Einstein was a German-born physicist. He proposed the theory of relativity."
[0066] T3: "Einstein was an Italian-born physicist. He proposed the theory of relativity."
[0067] Text T1 represents query 424, text T2 represents correct answer 425, and text T3 represents answer 427. In this case, text T3 of answer 427 contains the information "He is a physicist" and "He proposed the theory of relativity" from text T2 of correct answer 425, but does not contain the information "He was born in Germany" from text T2, so comprehensiveness A is A-2. Furthermore, text T3 of answer 427 contains the unnecessary information "He was born in Italy," so accuracy B is B-2.
[0068] The E2E evaluation model 422 determines a category and an E2E score of the answer 427 according to a combination of the coverage A and accuracy B of the answer 427. The evaluation result 429 may include the category and the E2E score.
[0069] Figure 5 shows an example of the correspondence between the combination of comprehensiveness A and accuracy B, and the category and E2E score. The category of the combination of A-1 and B-1 is correct, and the E2E score is 1.0. The category of the combination of A-1 and B-2 is information overload, and the E2E score is 0.5.
[0070] The combination of A-2 and B-1 is in the category of insufficient information, with an E2E score of 0.5. The combination of A-2 and B-2 is in the category of partially correct answers, with an E2E score of 0.5. The combination of A-3 and B-2 is in the category of incorrect answers, with an E2E score of 0.0.
[0071] If the answer 427 means "I don't know" or "I can't answer," the E2E evaluation model 422 determines that there is no answer. In this case, the category is unanswered, and the E2E score is 0.0. The basis for comprehensiveness A and accuracy B is described as follows: "Even though a correct answer 425 exists, the answer 427 means "I don't know" or "I can't answer," etc."
[0072] If the correct answer 425 is not received from the terminal device 311, the E2E evaluation model 422 assumes that the correct answer 425 means "I don't know," "I can't answer," or the like. In this case, the category is determined to be an incorrect answer, and the E2E score is 0.0. The basis for comprehensiveness A and accuracy B is described as follows: "Although the correct answer 425 means "I don't know," "I can't answer," or the like, the answer 427 does not mean "I don't know," "I can't answer," or the like."
[0073] However, if the correct answer 425 is not received from the terminal device 311 and the answer 427 means "I don't know" or "I can't answer," the category will be correct and the E2E score will be 1.0. The basis for comprehensiveness A and accuracy B is that "both the correct answer 425 and the answer 427 mean "I don't know" or "I can't answer," etc."
[0074] 6 shows an example of the inclusion relationship between the information of the correct answer 425 and the information of the answer 427. Figures 6(a) and 6(b) show an example of the inclusion relationship when the category is the correct answer.
[0075] Answer 427 in FIG. 6(a) matches correct answer 425. Therefore, coverage A is A-1, and accuracy B is B-1. Answer 427 in FIG. 6(b) includes correct answer 425 and includes only additional information related to query 424 as information other than correct answer 425. Therefore, coverage A is A-1, and accuracy B is B-1.
[0076] Figure 6(c) shows an example of an inclusion relationship when a category has too much information. Answer 427 in Figure 6(c) includes correct answer 425 and also contains unnecessary information other than correct answer 425. Therefore, the comprehensiveness A is A-1 and the accuracy B is B-2.
[0077] Figure 6(d) shows an example of an inclusion relationship when a category has insufficient information. The correct answer 425 in Figure 6(d) includes answer 427 and also includes information other than answer 427. Therefore, the comprehensiveness A is A-2 and the accuracy B is B-1.
[0078] Figure 6(e) shows an example of an inclusion relationship when a category is a partial correct answer. Answer 427 in Figure 6(e) partially overlaps with correct answer 425 and also contains unnecessary information other than correct answer 425. Therefore, the comprehensiveness A is A-2 and the accuracy B is B-2.
[0079] Figure 6(f) shows an example of an inclusion relationship when the category is incorrect answers. Answer 427 in Figure 6(f) does not overlap at all with correct answer 425, and also contains unnecessary information other than correct answer 425. Therefore, the comprehensiveness A is A-3, and the accuracy B is B-2.
[0080] In this way, the answer 427 can be efficiently evaluated by classifying the answer 427 into any of the categories of correct answer, excessive information, insufficient information, partially correct answer, incorrect answer, or no answer based on the combination of the comprehensiveness A and the accuracy B. By presenting the category of the answer 427 to the developer as the evaluation result 429, even a developer without specialized knowledge can analyze the quality of the answer 427 qualitatively and intuitively, and can quickly evaluate the performance of the application 421.
[0081] By using the query 424 to evaluate the answer 427, the context information indicating what question was asked and how it was answered is detailed, so the query 424 can be expected to serve as a clue for evaluation.
[0082] Furthermore, by evaluating the answer 427 using related information 426 related to the query 424, if the answer 427 lacks accuracy B, it becomes clear whether the extra information is fact based on the related information 426. This makes it possible to present an easy-to-understand reason for the lack of accuracy B.
[0083] The E2E evaluation model 422 may execute the process of determining the coverage A and accuracy B multiple times, taking into account fluctuations in the content of the answer 427 generated by the answer generation model 442. In this case, the E2E evaluation model 422 generates the evaluation result 429 by integrating the results of the multiple processes.
[0084] For example, the E2E evaluation model 422 can integrate categories generated in each of multiple processes by taking a majority vote of the categories, and can integrate the grounds generated in each of multiple processes by taking a majority vote of the grounds generated in each of multiple processes. Furthermore, the E2E evaluation model 422 can integrate the E2E scores generated in each of multiple processes by calculating the average value of the E2E scores.
[0085] By integrating the results of multiple processes to generate the evaluation result 429, it is possible to reduce fluctuations in the evaluation result 429 that are caused by fluctuations in the content of the answer 427. If the average E2E score is 0.8, it is also possible to interpret it as "Answer 427 is almost correct, but there are minor problems."
[0086] The evaluation unit 413 may obtain other evaluation indices in addition to the comprehensiveness A, accuracy B, and E2E score, and the evaluation result 429 may include the other evaluation indices and their reasons. Examples of the other evaluation indices that may be used include faithfulness C, related information accuracy D, and related information comprehensiveness E.
[0087] Faithfulness C indicates the degree to which answer 427 includes information based on related information 426. Related information accuracy D indicates the degree to which related information 426 is related to correct answer 425. Related information comprehensiveness E indicates the degree to which correct answer 425 includes information based on related information 426. Related information accuracy D and related information comprehensiveness E represent the evaluation results of related information 426. Faithfulness C is an example of a third index, related information accuracy D is an example of a fourth index, and related information comprehensiveness E is an example of a fifth index.
[0088] When determining the fidelity C, the storage unit 415 further stores a fidelity generation model MC. The fidelity generation model MC is a text generation model trained by machine learning. The fidelity generation model MC may be an LLM such as GPT. The type of LLM used as the fidelity generation model MC, whether or not it is fine-tuned, the prompts, parameters, and implementation method are arbitrary.
[0089] The evaluation unit 413 uses the faithfulness generation model MC to determine the faithfulness C of the answer 427, and stores it in the memory unit 415. First, the faithfulness generation model MC excludes elements that are not essentially related to the evaluation of the answer 427 from the answer 427. Elements that are not essentially related to the evaluation represent expressions that can be evaluated even if they are not included in the answer 427, such as "Yes! I'll answer your question" or "If you want to know more, please see the original document."
[0090] Next, the faithful generation model MC divides the answer 427 into multiple short sentences using the query 424 as reference information. At this time, the faithful generation model MC clarifies the relationship between demonstratives and complements the content of each short sentence so that no demonstratives are included, generating a sentence that can be understood by using only the short sentence.
[0091] Next, the faithfulness generation model MC determines for each divided short sentence whether the information of the short sentence is included in the related information 426, and assigns a score of 1 to short sentences that are included in the related information 426, and assigns a score of 0 to short sentences that are not included in the related information 426. The faithfulness generation model MC then calculates the statistical value of the scores for each of the multiple short sentences as faithfulness C. The statistical value may be an average value, a sum total, or the like.
[0092] Furthermore, the faithfulness generation model MC also generates evidence for faithfulness C. In this case, the faithfulness generation model MC may omit evidence for short sentences assigned a score of 1 and generate evidence only for short sentences assigned a score of 0. In this case, the evidence for a score of 0 indicates that the short sentence is not included in the related information 426.
[0093] By outputting the reason for the short sentence that has been given a score of 0, it becomes easy to identify information included in the answer 427 that does not originate from the related information 426. Such information is important for improving the performance of the application 421.
[0094] For example, when the above-mentioned text T3 is generated as the answer 427, the text T3 is divided into sentences S1 to S3 as follows.
[0095] S1: "Einstein was born in Italy."
[0096] S2: "Einstein is a physicist."
[0097] S3: "Einstein proposed the theory of relativity."
[0098] If a score of 0 is assigned to sentence S1 and a score of 1 is assigned to sentences S2 and S3, the average score of each of sentences S1 to S3 is 2 / 3. Therefore, 2 / 3 is output as the faithfulness C.
[0099] The faithfulness generation model MC may execute the process of determining the faithfulness C multiple times and calculate the average value of the faithfulness C generated in each of the multiple processes.
[0100] When the related information accuracy D is calculated, the storage unit 415 further stores a related information accuracy generation model MD. The related information accuracy generation model MD is a text generation model trained by machine learning. The related information accuracy generation model MD may be an LLM such as GPT. The type of LLM used as the related information accuracy generation model MD, whether or not fine-tuning is performed, prompts, parameters, and implementation method are arbitrary.
[0101] The evaluation unit 413 calculates the related information accuracy D of the related information 426 using the related information accuracy generation model MD, and stores it in the storage unit 415 .
[0102] First, the related information accuracy generation model MD determines whether each of the multiple related information 426 retrieved from the database server 313 is related to the correct answer 425. Then, the related information accuracy generation model MD assigns a score of 1 to the related information 426 that is related to the correct answer 425, and assigns a score of 0 to the related information 426 that is not related to the correct answer 425.
[0103] Related information 426 related to the correct answer 425 is, for example, information contained in the correct answer 425. Related information 426 related to the correct answer 425 is useful information, and related information 426 not related to the correct answer 425 is useless information.
[0104] Next, the related information accuracy generation model MD calculates the statistical value of the scores of each of the plurality of related information 426 as the related information accuracy D. As the statistical value, an average value, a sum total, or the like is used.
[0105] Furthermore, the related information accuracy generation model MD also generates a basis for the related information accuracy D. The basis for the related information accuracy D may include a determination result indicating whether each piece of related information 426 is related to the correct answer 425. Including the basis for the related information accuracy D in the evaluation result 429 makes it easier to understand the related information accuracy D.
[0106] For example, if three pieces of related information 426 are retrieved from the database server 313 and a score of 1 is assigned to two of the pieces of related information 426, the average score of each of the three pieces of related information 426 is 2 / 3. Therefore, 2 / 3 is output as the related information accuracy D.
[0107] The related information accuracy generation model MD may execute the process of obtaining the related information accuracy D multiple times and calculate the average value of the related information accuracy D generated in each of the multiple processes.
[0108] When determining the related information comprehensiveness E, the storage unit 415 further stores a related information comprehensiveness generation model ME. The related information comprehensiveness generation model ME is a text generation model trained by machine learning. The related information comprehensiveness generation model ME may be an LLM such as GPT. The type of LLM used as the related information comprehensiveness generation model ME, whether or not it is fine-tuned, prompts, parameters, and implementation method are arbitrary.
[0109] The evaluation unit 413 uses the related information comprehensiveness generation model ME to determine the related information comprehensiveness E of the correct answer 425, and stores it in the memory unit 415. First, the related information comprehensiveness generation model ME excludes elements that are essentially not related to the evaluation of the answer 427 from the correct answer 425, in the same way as when determining the faithfulness C.
[0110] Next, the related information comprehensiveness generation model ME divides the correct answer 425 into multiple short sentences using the query 424 as reference information. At this time, the related information comprehensiveness generation model ME clarifies the relationship between demonstrative terms, complements the content so that each short sentence does not contain demonstrative terms, and generates a sentence that can be understood by using only the short sentence.
[0111] Next, the related information comprehensiveness generation model ME determines, for each divided short sentence, whether the information of the short sentence is included in the related information 426, and assigns a score of 1 to short sentences that are included in the related information 426, and assigns a score of 0 to short sentences that are not included in the related information 426. The related information comprehensiveness generation model ME then calculates the statistical value of the scores for each of the multiple short sentences as the related information comprehensiveness E. As the statistical value, an average value, a sum total, etc., is used.
[0112] Furthermore, the related information comprehensiveness generation model ME also generates the basis for the related information comprehensiveness E. At this time, the related information comprehensiveness generation model ME may omit the basis for the short sentences assigned a score of 1 and generate only the basis for the short sentences assigned a score of 0. In this case, the basis for the score of 0 indicates that the short sentence is not included in the related information 426.
[0113] By outputting the reason for the short sentence that has been assigned a score of 0, it becomes easy to identify information included in the correct answer 425 that is not included in the related information 426. Such information is important for improving the performance of the application 421.
[0114] For example, when the above-mentioned text T2 is input as the correct answer 425, the text T2 is divided into sentences S4 to S6 as follows.
[0115] S4: "Einstein was born in Germany."
[0116] S5: "Einstein is a physicist."
[0117] S6: "Einstein proposed the theory of relativity."
[0118] If sentences S4 and S6 are assigned a score of 1 and sentence S5 is assigned a score of 0, the average score of each of sentences S4 to S6 is 2 / 3. Therefore, 2 / 3 is output as the related information coverage E.
[0119] The related information coverage generation model ME may execute the process of determining the related information coverage E multiple times and calculate the average value of the related information coverage E generated in each of the multiple processes.
[0120] Additionally, the evaluator 413 may generate an executive summary, and the evaluation results 429 may include the executive summary, which is a summary of the coverage A, accuracy B, rationale for coverage A, rationale for accuracy B, answer 427 category, E2E score, other evaluation metrics, and other evaluation metrics.
[0121] In this case, the storage unit 415 further stores a summary generation model MS. The summary generation model MS is a text generation model trained by machine learning. The summary generation model MS may be an LLM such as GPT. The type of LLM used as the summary generation model MS, whether fine-tuning is performed, prompts, parameters, and implementation method are arbitrary.
[0122] The evaluation unit 413 generates an executive summary using the summary generation model MS and stores it in the storage unit 415. The summary generation model MS may generate a first executive summary by summarizing micro evaluation results based on multiple evaluation indicators for one evaluation sample. The summary generation model MS may also generate a second executive summary by summarizing macro evaluation results for the entire evaluation dataset including multiple evaluation samples.
[0123] The summary generation model MS may generate either the first executive summary or the second executive summary, or may generate both. The summary generation model MS may also generate an executive summary for any unit, such as for each category of answers 427.
[0124] The improvement plan generation unit 414 generates an improvement plan 430 for the application 421 using the improvement plan generation model 423 and stores it in the storage unit 415. At this time, the improvement plan generation unit 414 generates a prompt in which the query 424, the correct answer 425, related information 426, the answer 427, answer generation parameter information 428, and the evaluation result 429 are embedded. The improvement plan generation unit 414 writes, for example, the meanings and changeable ranges of various parameters of the search settings and answer generation model 442 included in the answer generation parameter information 428 in the prompt.
[0125] Next, the improvement proposal generation unit 414 inputs the generated prompt to the improvement proposal generation model 423. The improvement proposal generation model 423 generates and outputs an improvement proposal 430 in accordance with the input prompt. The improvement proposal 430 includes, for example, a proposal to change one or more parameters among the various parameters of the search setting and answer generation model 442.
[0126] Then, the improvement plan generating unit 414 outputs the improvement plan 430 to the terminal device 311 by transmitting the improvement plan 430 to the terminal device 311 via the communication unit 411 .
[0127] When the prompt includes evaluation results 429 for each of multiple evaluation samples included in the evaluation dataset, the categories of answers 427 included in each evaluation result 429 are input to the improvement proposal generation model 423. This allows the improvement proposal generation model 423 to obtain macro trends in errors in the answers 427 for the entire evaluation dataset, and therefore allows the generation of improvement proposals 430 that focus particularly on trends in errors that need to be improved.
[0128] The improvement proposal generator 414 may instruct the improvement proposal generation model 423 on specific parameters to be modified or may present a preset design pattern. Furthermore, the improvement proposal generation model 423 may generate an improvement proposal 430 for each evaluation sample included in the evaluation dataset, in addition to an improvement proposal 430 for the entire evaluation dataset.
[0129] By presenting improvement proposals 430 for the application 421 to the developer, even developers without specialized knowledge can quickly improve the performance of the application 421. The cycle of performance improvement, including evaluation and modification of the application 421, can be easily and quickly repeated, enabling anyone to deploy a high-quality application 421.
[0130] According to the model evaluation system of FIG. 3, the process from inputting the evaluation sample to outputting the evaluation result 429 and the improvement plan 430 can be executed in one go.
[0131] Fig. 7 is a flowchart showing an example of the second model evaluation process performed by the model evaluation device 312 of Fig. 4. First, the answer generation unit 412 receives an evaluation sample including the query 424 and the correct answer 425 from the terminal device 311 via the communication unit 411 (step 701).
[0132] Next, the answer generation unit 412 uses the RAG function 441 to search the database server 313 for one or more pieces of related information 426 related to the query 424. When searching for the related information 426, the answer generation unit 412 transmits the query 424 to the database server 313 via the communication unit 411 (step 702), and receives the related information 426 from the database server 313 (step 703).
[0133] Next, answer generator 412 uses answer generation model 442 to generate answer 427 from query 424 and related information 426 (step 704), and generates answer generation parameter information 428 (step 705).
[0134] Next, the evaluation unit 413 generates an evaluation result 429 of the answer 427 using the E2E evaluation model 422, the faithfulness generation model MC, the related information accuracy generation model MD, the related information coverage generation model ME, and the summary generation model MS (step 706).The evaluation unit 413 then transmits the evaluation result 429 to the terminal device 311 via the communication unit 411 (step 707).
[0135] Next, the improvement plan generating unit 414 generates an improvement plan 430 for the application 421 using the improvement plan generation model 423 (step 708), and transmits the improvement plan 430 to the terminal device 311 via the communication unit 411 (step 709).
[0136] 4 is realized using an information processing device, an application for the model evaluation process is written using a program. The application for the model evaluation process includes, for example, an application 421, an E2E evaluation model 422, an improvement proposal generation model 423, a faithfulness generation model MC, a related information accuracy generation model MD, a related information comprehensiveness generation model ME, and a summary generation model MS.
[0137] The model evaluation processing application may be created using a library such as LangChain (registered trademark) or a no-code tool such as Dify (registered trademark). A no-code tool refers to a platform or tool that allows applications to be developed without writing a program.
[0138] An application created using Dify (registered trademark) can implement an API (Application Programming Interface) and execute HTTP (Hypertext Transfer Protocol) requests internally. In this case, the processes performed by the answer generation unit 412, evaluation unit 413, and improvement plan generation unit 414 may be implemented separately, and each process may be called by an HTTP request from the model evaluation processing application to obtain the processing results. Alternatively, all processes may be implemented directly in the model evaluation processing application.
[0139] In addition to the application for model evaluation processing, an application for managing versions of the evaluation results 429, etc. may be implemented, and an application that runs on a browser and imports and visualizes the evaluation results 429, etc. may be implemented. An application that collectively performs model evaluation processing, version management, and visualization may be implemented.
[0140] The configuration of the model evaluation device 101 in FIG. 1 is merely an example, and some of the components may be omitted or changed depending on the application or conditions of the model evaluation device 101.
[0141] 3 is merely an example, and some components may be omitted or modified depending on the application or conditions of the model evaluation system. For example, if the model evaluation device 312 stores a database containing reference information, the database server 313 can be omitted. The model evaluation system may include multiple database servers 313.
[0142] 4 is merely an example, and some of the components may be omitted or changed depending on the application or conditions of the model evaluation device 312. For example, if there is no need to generate the improvement plan 430, the improvement plan generation unit 414 can be omitted.
[0143] 2 and 7 are merely examples, and some of the processes may be omitted or changed depending on the configuration or conditions of the model evaluation device. For example, if there is no need to generate the improvement plan 430 in the model evaluation device 312 in Fig. 4, the processes of steps 708 and 709 in Fig. 7 can be omitted.
[0144] The coverage A, accuracy B, categories, and E2E scores shown in FIG. 5 are merely examples, and other coverage A, accuracy B, categories, and E2E scores may be used.
[0145] The inclusion relationship between the correct answers and the answers shown in FIG. 6 is merely an example, and the inclusion relationship between the correct answers and the answers changes depending on the evaluation sample.
[0146] Fig. 8 shows an example of the hardware configuration of an information processing device used as the model evaluation device 101 in Fig. 1 and the model evaluation device 312 in Fig. 4. The information processing device in Fig. 8 includes a CPU (Central Processing Unit) 801, a memory 802, an input device 803, an output device 804, an auxiliary storage device 805, a media drive device 806, and a network connection device 807. These components are hardware and are connected to each other via a bus 808.
[0147] The memory 802 is, for example, a semiconductor memory such as a read-only memory (ROM) or a random access memory (RAM), and stores programs and data used in processing. The memory 802 may operate as the storage unit 415 in FIG.
[0148] 1 by executing a program using the memory 802. The CPU 801 (processor) also operates as the answer generation unit 412, the evaluation unit 413, and the improvement plan generation unit 414 in FIG. 4 by executing a program using the memory 802.
[0149] The input device 803 is, for example, a keyboard, a pointing device, etc., and is used to input instructions or information from a user or operator. The output device 804 is, for example, a display device, a printer, a speaker, etc., and is used to output inquiries or instructions to a user or operator and processing results. The output device 804 may operate as the output unit 112 in Fig. 1. The processing results may be the evaluation result 429 or the improvement proposal 430.
[0150] The auxiliary storage device 805 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, etc. The auxiliary storage device 805 may be a hard disk drive or a solid state drive (SSD). The information processing device can store programs and data in the auxiliary storage device 805 and load them into the memory 802 for use. The auxiliary storage device 805 may operate as the storage unit 415 in FIG. 4.
[0151] The medium drive device 806 drives a portable recording medium 809 and accesses the recorded contents thereof. The portable recording medium 809 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, etc. The portable recording medium 809 may be a CD-ROM (Compact Disk Read Only Memory), a DVD (Digital Versatile Disk), a USB (Universal Serial Bus) memory, etc. A user or operator can store programs and data in the portable recording medium 809 and load them into the memory 802 for use.
[0152] In this way, the computer-readable recording medium that stores the program and data used in the processing is a physical (non-transitory) recording medium such as the memory 802, the auxiliary storage device 805, or the portable recording medium 809.
[0153] The network connection device 807 is a communication device connected to the communication network 321 and performs data conversion associated with communication. The information processing device receives programs and data from an external device via the network connection device 807 and can use them by loading them into the memory 802. The network connection device 807 may operate as the output unit 112 in FIG. 1 or the communication unit 411 in FIG. 4.
[0154] The information processing device may further include a device such as a GPU (Graphics Processing Unit).
[0155] 8, some components may be omitted depending on the application or conditions. For example, if an interface with a user or operator is not required, the input device 803 and the output device 804 may be omitted. If the portable recording medium 809 or the communication network 321 is not used, the medium drive device 806 or the network connection device 807 may be omitted.
[0156] The terminal device 311 and the database server 313 in FIG. 3 can be the same information processing device as in FIG.
[0157] Although the disclosed embodiments and their advantages have been described in detail, those skilled in the art may make various modifications, additions, and omissions without departing from the scope of the invention as clearly set forth in the claims. [Explanation of symbols]
[0158] 101, 312 Model evaluation device 111, 413 Evaluation Department 112 Output section 311 Terminal Equipment 313 Database Server 321 Communication Network 411 Communications Department 412 Answer generation part 414 Improvement plan generation department 415 Storage section 421 Applications 422 E2E evaluation model 423 Improvement Proposal Generation Model 424 queries 425 Correct 426 Related Information 427 answers 428 Answer Generation Parameter Information 429 Evaluation Results 430 Improvement proposal 441 RAG Function 442 Answer Generation Model 801 CPU 802 memory 803 Input Device 804 Output Device 805 Auxiliary storage 806 Media drive unit 807 Network Connection Device 808 Bus 809 Portable recording media
Claims
1. generating an evaluation result of the answer based on a first indicator indicating the degree to which an answer to a query generated by a text generation model trained by machine learning covers information included in a correct answer to the query and a second indicator indicating the degree to which the answer includes information unrelated to the query; outputting the evaluation results; A model evaluation method characterized in that the processing is executed by a computer.
2. 2. The model evaluation method according to claim 1, wherein the evaluation result includes, as the answer category, any one of correct answer, excessive information, insufficient information, partially correct answer, incorrect answer, and no answer.
3. 2. The model evaluation method according to claim 1, wherein the evaluation result includes the first index, the second index, a basis for the first index, and a basis for the second index.
4. 2. The model evaluation method according to claim 1, wherein the process of generating the evaluation result includes a process of inputting the query and the correct answer into another text generation model trained by machine learning, thereby causing the other text generation model to generate the evaluation result.
5. generating an improvement plan for the text generation model based on the answer, the evaluation result, and parameter information used to generate the answer; outputting the improvement proposal; 2. The model evaluation method according to claim 1, further comprising the steps of:
6. 6. The model evaluation method according to claim 5, wherein the process of generating the improvement plan includes a process of inputting the answer, the evaluation result, and parameter information used to generate the answer into another text generation model trained by machine learning, thereby causing the other text generation model to generate the improvement plan.
7. 7. The model evaluation method according to claim 1, wherein the text generation model generates the answer using the query and related information related to the query that is searched from a database based on the query.
8. If the answer includes information unrelated to the query, the computer further performs a process of determining whether the information unrelated to the query is information based on the related information; The model evaluation method according to claim 7, characterized in that the process of generating the evaluation result includes a process of generating the evaluation result based on a determination result indicating whether information unrelated to the query is information based on the related information.
9. 8. The model evaluation method according to claim 7, wherein the evaluation result includes a third index indicating the degree to which the answer includes information based on the related information.
10. 8. The model evaluation method according to claim 7, wherein the evaluation result includes a fourth index indicating the degree to which the related information is related to the correct answer.
11. 8. The model evaluation method according to claim 7, wherein the evaluation result includes a fifth index indicating the degree to which the correct answer includes information based on the related information.
12. an evaluation unit that generates an evaluation result of the answer based on a first index indicating the degree to which an answer to a query generated by a text generation model trained by machine learning covers information included in a correct answer to the query, and a second index indicating the degree to which the answer includes information unrelated to the query; an output unit that outputs the evaluation result; A model evaluation device comprising:
13. generating an evaluation result of the answer based on a first indicator indicating the degree to which an answer to a query generated by a text generation model trained by machine learning covers information included in a correct answer to the query and a second indicator indicating the degree to which the answer includes information unrelated to the query; outputting the evaluation results; A model evaluation program that allows a computer to perform the processing.
Citation Information
Patent Citations
Model evaluation method and device, electronic equipment and storage medium
CN117474097A
Bidding field question and answer method and system based on retrieval enhancement generation architecture
CN119441446A