Reliability evaluation device, reliability evaluation method, and reliability evaluation program

The reliability evaluation device optimizes model parameters using indicators of information retrieval and generation certainty to accurately assess the reliability of generative language models in RAG, addressing the challenge of unreliable output evaluation.

JP2026074704APending Publication Date: 2026-05-07KDDI CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
KDDI CORP
Filing Date
2024-10-21
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

Existing methods for evaluating the reliability of generative language models, particularly in applications like Retrieval Augmented Generation (RAG), lack appropriate indicators and parameters for accurately quantifying the uncertainty and reliability of the output, making it difficult to assess the validity of generated text.

Method used

A reliability evaluation device and method that utilizes a dataset acquisition unit, model learning unit, model update unit, and explanatory variable selection unit to determine optimal explanatory variables, incorporating indicators of information retrieval certainty and generation certainty to calculate RAG certainty, thereby optimizing the model for accurate reliability evaluation.

Benefits of technology

Enables accurate evaluation of the reliability of generative language models using RAG by optimizing model parameters based on appropriate indicators, ensuring high prediction accuracy and reliable assessment of generated text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026074704000001_ABST
    Figure 2026074704000001_ABST
Patent Text Reader

Abstract

To provide a reliability evaluation device that can accurately evaluate RAG reliability using appropriate indicators and parameters. [Solution] The reliability evaluation device 1 includes a dataset acquisition unit 11 that acquires learning data that associates a set of candidate reference indicators for quantitatively indicating information retrieval reliability and generation reliability with the correctness of the generation results; a model learning unit 12 that learns the parameters of a model that uses the set of reference indicators as explanatory variables and the correctness of the generation results as the target variable, and records the prediction accuracy; a model update unit 13 that causes the model to be trained again using a set of new explanatory variables from which lower-importance reference indicators have been preferentially excluded; an explanatory variable selection unit 14 that selects the set of reference indicators as the optimal explanatory variables to maximize the prediction accuracy and constitutes a trained model; and an evaluation value output unit 15 that outputs a reliability evaluation value obtained by the trained model for a new prompt and generation results.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to a technique for evaluating the reliability of generated text in a search enhancement generation task using a generative language model. [Background technology]

[0002] A generative language model is a model that outputs a text as a response to a text input called a prompt. An example is the Generative Pre-trained Transformer (GPT) shown in Non-Patent Document 1. Internally, a generative language model processes the smallest units of text called tokens, and generates a response by successively predicting the tokens that immediately follow the prompt text. A generative language model that has learned a large amount of text can output natural-sounding text as a response in dialogue and question-answering tasks, and can achieve high performance.

[0003] However, generative language models are known to exhibit a phenomenon called hallucination, where false information is output in natural-sounding sentences. Therefore, it is difficult to accurately evaluate the truthfulness of the generated text based solely on the text itself. For this reason, there is a need for methods to evaluate the validity of the output of generative language models.

[0004] One method for quantifying the uncertainty of the output of a generative language model is Semantic Uncertainty, as shown in Non-Patent Document 2. In this method, the evaluator first generates N responses to a single prompt and obtains the likelihood of the response sentences together. The likelihood of a sentence can be calculated, for example, by taking the geometric mean of the entire sentence using the likelihood of the predicted tokens. Next, the evaluator classifies the response sentences into categories, taking into account semantic differences. For example, for the prompt "Where is the capital of France?", "Paris" and "It's Paris." are the same in meaning and therefore belong to the same category, while "London" has a different meaning and therefore belongs to a different category.

[0005] Here, the Semantic likelihood p(c|x) of a certain category c with respect to the prompt x for the generative language model is expressed by the following formula.

Number

Number

Prior Art Documents

Patent Documents

[0006]

Patent Document 1

Non-Patent Documents

[0007]

Non-Patent Document 1

Non-Patent Document 2

Non-Patent Document 3

[0008] To expand the knowledge of specific fields lacking in generative language models, there is Retrieval Augmented Generation (RAG) as a method of generating responses by referring to external knowledge. In RAG, external knowledge is stored in a database in advance, and when the generative language model generates a response, appropriate sentences are retrieved and cited from this database.

[0009] Specifically, first, documents of external knowledge are segmented, and after vectorizing the segments (chunks), they are stored in a database in a form where the chunks and vectors are associated. When a prompt is input from a user, by vectorizing the question sentence in the same way as the chunks, chunks with high similarity are retrieved from the database using the vector similarity as an index. By citing the chunks corresponding to the vectors with high similarity to form a new prompt and inputting it into the generative language model, a response based on external knowledge can be obtained.

[0010] RAG is a method expected to be applied when using a generative language model in applications in specific fields. However, in the quantification of uncertainty in the prior art (e.g., Semantic Entropy), the evaluation of a generative language model alone is assumed, and the evaluation in applications such as RAG is not assumed.

[0011] Therefore, in Patent Document 1, the applicant proposed a method that considers search quality in order to quantify the uncertainty of the response while taking into account the RAG process. In this method, an adjustment function is applied to the value obtained by quantifying the search quality, so that the obtained value is adjusted to indicate the validity of the model's output. However, appropriately determining the function to be used as the tuning function, and the parameters to be set for this tuning function, is not easy because it requires adjustment depending on conditions such as the generative language model and the target dataset, thus posing a practical challenge.

[0012] The present invention aims to provide a reliability evaluation device, a reliability evaluation method, and a reliability evaluation program that can accurately evaluate the reliability of the output of a generative language model using RAG using appropriate indicators and parameters. [Means for solving the problem]

[0013] The certainty evaluation device according to the present invention includes: a dataset acquisition unit that acquires learning data that associates a set of candidate reference indicators for quantitatively indicating information retrieval certainty and generation certainty with the correctness of the generation results for a generation result using a generative language model with search extension generation for a prompt; a model learning unit that learns model parameters with the set of reference indicators as explanatory variables and the correctness of the generation results as the target variable, and records the prediction accuracy; a model update unit that calculates the importance of each of the reference indicators, preferentially excludes the reference indicators with lower importance, and uses the resulting set as new explanatory variables to cause the processing of the model learning unit to be executed again; an explanatory variable selection unit that repeatedly executes the processing of the model update unit to select the set of reference indicators as the optimal explanatory variables so as to maximize the prediction accuracy and constitute a trained model; and an evaluation value output unit that outputs an evaluation value of certainty obtained by inputting the values ​​of the optimal explanatory variables to the trained model for a new prompt and the generation result using the generative language model with search extension generation for the new prompt.

[0014] The model update unit may, from among the reference indicators corresponding to the information retrieval certainty and the generation certainty, retain a predetermined number of reference indicators with the highest importance, and remove the reference indicator with the lowest importance, thereby creating a new set of explanatory variables and causing the model learning unit to execute the processing again.

[0015] The reliability evaluation method according to the present invention involves a computer acquiring training data by a dataset acquisition unit, which associates a set of candidate reference indicators for quantitatively indicating information retrieval reliability and generation reliability for the generation results of a generative language model using search extension generation in response to a prompt with the correctness of the generation results; a model learning unit learning the parameters of a model with the set of reference indicators as explanatory variables and the correctness of the generation results as the target variable, while also recording the prediction accuracy; a model update unit calculating the importance of each of the reference indicators, prioritizing the exclusion of the reference indicators with lower importance, and using this set as new explanatory variables to run the processing of the model learning unit again; an explanatory variable selection unit repeatedly running the processing of the model update unit to select the set of reference indicators as the optimal explanatory variables so as to maximize the prediction accuracy, thereby constructing a trained model; and an evaluation value output unit outputting the obtained reliability evaluation value by inputting the values ​​of the optimal explanatory variables for a new prompt and the generation results of the generative language model using search extension generation in response to the new prompt into the trained model.

[0016] The certainty evaluation program according to the present invention is for causing a computer to function as the certainty evaluation device. [Effects of the Invention]

[0017] According to the present invention, the reliability of the output in a generative language model using RAG can be accurately evaluated using appropriate indicators and parameters. [Brief explanation of the drawing]

[0018] [Figure 1]It is a block diagram showing the functional configuration of the certainty evaluation device in the embodiment. [Figure 2] It is a flowchart exemplifying the procedure of the certainty evaluation method in the embodiment.

Mode for Carrying Out the Invention

[0019] Hereinafter, an example of an embodiment of the present invention will be described. In RAG, external knowledge is divided into chunks, and each chunk is vectorized. Let the document containing external knowledge be R, the divided chunk be r, and the operation of vectorizing r be represented as f(r). When a prompt x is input to the system using RAG, a new prompt x′ is created in the following procedure, and an answer y based on x′ is output. (1)v x The vector v of the prompt x is calculated by = f(x). x is calculated. (2) For the i-th chunk r i the similarity s i = σ(v x , f(r i )) with the prompt x is calculated. Here, σ is a function for calculating the similarity, and for example, the cosine similarity is used. (3) For the original prompt x, the chunk r i with the largest s i is cited as a reference material, and a new prompt x′ is created.

[0020] In this embodiment, the certainty of the output in the generative language model using RAG, which is the target, is called RAG certainty. The RAG certainty is a value between 0 and 1. The larger the value, the more likely the output is. Note that uncertainty is an index whose relationship between the magnitude of the value and the evaluation indicated by the value is opposite to that of certainty. Since these are essentially synonymous, both certainty and uncertainty are collectively referred to as certainty.

[0021] In RAG, the accuracy of the process of searching the database based on prompts affects the quality of the response. Therefore, in order to quantify the reliability of the response from the generative language model, it is necessary to consider the search quality. Therefore, in the certainty evaluation method of this embodiment, an index representing the search quality in RAG is introduced when evaluating the certainty or uncertainty of the output by the generative language model.

[0022] The indicators that can be considered as explanatory variables for calculating RAG certainty can be broadly divided into: (1) This indicates the "reliability of information retrieval" regarding the search quality of related information in RAG, (2) What demonstrates "generative certainty" in generative language models, It consists of.

[0023] Reference metrics indicating information retrieval certainty are values ​​that quantify the quality of information retrieval in RAG, and specific examples include the quantification of search quality shown in Patent Document 1. Reference metrics indicating generation certainty are values ​​that represent the reliability of the generation language model, and specific examples include Semantic Uncertainty shown in Non-Patent Document 2 and the values ​​shown in Non-Patent Document 3. RAG certainty is calculated using these multiple reference indicators as explanatory variables.

[0024] For example, the aforementioned index U, which quantifies uncertainty. se (x) is a value that indicates the certainty of generation, without considering search quality in search extension generation. se (x) is a positive value, and a larger value indicates that the meaning of each output differs, meaning that the language model is likely unable to produce a consistent answer and is generating uncertain sentences.

[0025] In contrast, an indicator of the reliability of information retrieval can be calculated, for example, as follows: The function to quantify search quality is ρ(x s ,y r Let x be ). s is the text that will be used as the basis for the search, y rThese are the sentences obtained from the search results. Each can be assigned, for example, the following sets of values: (1)x s =prompt x, y r = chunk d (2)x s =Response y from the generative language model j , y r = chunk d However, y j This represents the j-th output when the generative language model generates an output multiple times while quantifying uncertainty.

[0026] An index indicating the certainty of information retrieval may be calculated by, for example, either (1) or (2), or it may be a value obtained by integrating (e.g., adding or multiplying) the two calculated values. Alternatively, the prompt x and the response y of the generative language model. j The sentence formed by combining and is x s That is also acceptable. Furthermore, the function ρ evaluates similarity and can be implemented using, for example, cosine similarity, Rouge-based metrics, or BERTScore.

[0027] Thus, indicators of information retrieval reliability are calculated based, for example, on the similarity between the input prompts to the generative language model and the chunks obtained from external documents through search extension generation, or the similarity between the output of the generative language model and the chunks obtained from external documents through search extension generation, or both.

[0028] Next, this metric indicating the certainty of information retrieval is normalized to a range between 0 and 1 using, for example, an adjustment function g(), and the degree to which it influences the search quality output is adjusted. In other words, the function ρ′ that quantifies search quality by introducing an adjustment function is ρ′(x s ,y r )=g(ρ(x s ,y r This is expressed as )). However, ρ' is assumed to be a larger value as the search quality decreases, and the uncertainty of the output of the generative language model increases.

[0029] Specifically, the following function can be used as the adjustment function g(z). • The minimum value z that the original function ρ can take min and the maximum value z max Use this to normalize the value between 0 and 1.

number

number

[0030] Depending on the definition of the argument z, as mentioned above, a tuning function such as g'(z) = (1-g(z)) may be used so that the value increases as the search quality decreases.

[0031] Then, a quantitative value of RAG certainty is obtained by multiplying the index indicating generation certainty by an adjusted value indicating information retrieval certainty. In other words, if we denote the uncertainty of the output considering search quality as U', the uncertainty U'(x) for the prompt x is expressed by the following formula.

number

[0032] As mentioned above, appropriately determining the function to be used as the adjustment function, and the parameters to be set for this adjustment function, requires adjustment depending on conditions such as the generative language model and the target dataset. Also, although a function with two indicators as explanatory variables was exemplified here, it is possible to construct evaluation models with many more indicators as explanatory variables.

[0033] Let M be the model used to evaluate RAG certainty. Model M is a model that predicts the certainty of the generated result given the explanatory variables used to calculate RAG certainty (described later), and is an arbitrary function or neural network model whose internal parameters can be optimized by methods such as machine learning. The certainty evaluation device of this embodiment evaluates RAG certainty using the optimized model M by optimizing the model M using the dataset D.

[0034] Figure 1 is a block diagram showing the functional configuration of the reliability evaluation device 1 in this embodiment. The reliability evaluation device 1 is an information processing device equipped with a control unit 10, a storage unit 20, and various input / output interfaces.

[0035] The control unit 10 controls the entire reliability evaluation device 1 and realizes each function in this embodiment by appropriately reading and executing various programs and data stored in the storage unit 20. The control unit 10 may be a CPU. The memory unit 20 is a storage area for various programs and data necessary for the hardware group to function as a reliability evaluation device 1, and may be ROM, RAM, flash memory, or a hard disk drive (HDD).

[0036] The control unit 10 functions as a dataset acquisition unit 11, a model learning unit 12, a model update unit 13, an explanatory variable selection unit 14, and an evaluation value output unit 15 by executing the software (certainty evaluation program) stored in the memory unit 20.

[0037] The dataset acquisition unit 11 acquires a dataset of training data that associates the correctness of the generation results of a generative language model using RAG in response to a prompt with a set of reference indices that serve as candidates for explanatory variables to quantitatively show the information retrieval certainty and generation certainty described later, and the correctness of these generation results.

[0038] Here, the i-th data of dataset D is d iThis is expressed as follows: A vector of values ​​for reference indicators used to calculate RAG certainty is x i And the correctness of the RAG generation result corresponding to this is y i When this is the case, d i =(x i ,y i ) is expressed as. Furthermore, the explanatory variables for RAG certainty include all reference indicators that are considered available as initial conditions, and the explanatory variable selection unit 14 selects effective reference indicators as explanatory variables.

[0039] The model learning unit 12 learns the parameters of model M, which uses a set of reference indicators as explanatory variables and the correctness of the output generated by the generative language model as the objective variable, and also records the prediction accuracy.

[0040] The model update unit 13 calculates the importance of each reference indicator and, prioritizing the exclusion of lower-importance reference indicators, uses the resulting set as new explanatory variables to run the model learning unit 12's processing again. The importance can be calculated using methods such as Permutation Importance or the Gini coefficient method in Random Forest described in Non-Patent Literature 4. Specifically, the model update unit 13 selects the reference indicators corresponding to information retrieval certainty and generation certainty, retaining at least the reference indicator with the highest importance, and excluding the reference indicator with the lowest overall importance. This set of indicators is then used as a new explanatory variable, and the model learning unit 12 processes the data again.

[0041] The explanatory variable selection unit 14 repeatedly executes the processing of the model update unit 13, selects the set of reference indicators that maximizes prediction accuracy as the optimal explanatory variables, and constructs a trained model.

[0042] The evaluation value output unit 15 outputs an evaluation value of the obtained certainty by inputting the optimal explanatory variable values ​​selected by the explanatory variable selection unit 14 into the trained model for the new prompt and the generation result by the generative language model using search extension generation for this new prompt.

[0043] Figure 2 is a flowchart illustrating the procedure for the certainty evaluation method in this embodiment. In step S1, the dataset acquisition unit 11 initially sets the set of explanatory variables as F={j:j∈[N]} and creates a vector x which is a list of reference index values ​​that are candidates for calculating RAG certainty. i Let's assume it has N elements. Furthermore, the dataset acquisition unit 11 acquires the dataset D to be used for learning, and the training dataset D train And, validation dataset D val Divide it into two parts.

[0044] The following is a description of the certainty evaluation device 1, using the training dataset D. train When training the parameters of model M using the validation dataset D val To prevent a decrease in prediction accuracy when using this method, the model M is optimized by removing explanatory variables in order of decreasing importance, based on the importance of each explanatory variable.

[0045] In step S2, the model learning unit 12 uses the training dataset D train From this, a vector x corresponding to the set of explanatory variables F is extracted, and the parameters of the model M are learned using data combined with the correctness of the RAG generation results.

[0046] In step S3, the model learning unit 12 processes the validation dataset D val We measure the prediction accuracy of model M for [the given value].

[0047] In step S4, the model learning unit 12 records the measured prediction accuracy in association with the set F.

[0048] In step S5, the explanatory variable selection unit 14 determines whether the explanatory variables corresponding to information retrieval certainty and generation certainty included in set F are both a predetermined minimum number (for example, 1). If the determination is YES, the process moves to step S8; if the determination is NO, the process moves to step S6.

[0049] In step S6, the model update unit 13 obtains the importance of each explanatory variable in the model M learned in step S2, and, excluding the explanatory variables with the highest importance or a predetermined number of top explanatory variables among the explanatory variables for information retrieval certainty and generation certainty, selects the explanatory variable with the lowest importance among the remaining explanatory variables j min Select this option.

[0050] In step S7, the model update unit 13 selects the explanatory variables from j min Excluding the set of explanatory variables, that is, the set of explanatory variables is F = F\{j min The model is updated as}. Then, the process returns to step S2, and the model M is retrained.

[0051] In step S8, the explanatory variable selection unit 14 selects the set of explanatory variables that results in the highest prediction accuracy of the measured model M as F best They will be hired as such.

[0052] In step S9, the model learning unit 12 uses the data included in dataset D to determine the set of explanatory variables F best The parameters of model M are learned using the corresponding values.

[0053] In step S10, the evaluation value output unit 15 outputs a set of explanatory variables F for calculating the RAG certainty of the generative language model using RAG to be evaluated, including prompts, answers, and external knowledge. best Calculate the corresponding value (vector).

[0054] In step S11, the evaluation value output unit 15 uses the model M trained in step S10 to calculate and output the RAG certainty, taking the value calculated in step S10 as input.

[0055] In this procedure, the certainty evaluation device 1 sequentially removed explanatory variables until the number of variables was minimized, searching for the case with the highest prediction accuracy. However, the conditions for terminating the loop (steps S2-S7) that updates the model M are not limited to this. For example, the loop may be repeated a predetermined number of times, and the one with the highest accuracy may be selected. Alternatively, the certainty evaluation device 1 may assume that the prediction accuracy decreases monotonically and terminate the loop when the prediction accuracy falls below the previous level.

[0056] According to this embodiment, the reliability evaluation device 1 can predict the RAG reliability of the output of a generative language model using RAG with high accuracy by learning the model parameters using reference indices that quantitatively represent information retrieval reliability and generation reliability, respectively, as explanatory variables. Here, among the multiple possible reference indicators, the importance of each indicator as an explanatory variable depends on the content and style of the dataset being evaluated, so adjustment is necessary. The certainty evaluation device 1 can determine appropriate indicators and parameters to maximize prediction accuracy by excluding explanatory variables with lower importance in the model, and can accurately evaluate RAG certainty using an appropriate model.

[0057] Furthermore, the certainty evaluation device 1 maintains a minimum configuration for evaluating RAG certainty by retaining at least one or a predetermined number of explanatory variables for both information retrieval certainty and generation certainty, while automatically performing the selection of explanatory variables algorithmically. This streamlines the processes of selecting indicators and setting parameters such as thresholds that were previously required.

[0058] Furthermore, this embodiment makes it possible to accurately demonstrate the reliability of responses from generative language models using RAG, thereby contributing to Goal 9 of the United Nations-led Sustainable Development Goals (SDGs), "Build resilient infrastructure, promote sustainable industrialization and foster innovation."

[0059] Although embodiments of the present invention have been described above, the present invention is not limited to the embodiments described above. Furthermore, the effects described in the embodiments described above are merely a list of the most preferred effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.

[0060] The reliability evaluation method by the reliability evaluation device 1 is implemented by software. When implemented by software, the programs constituting this software are installed on an information processing device (computer). These programs may be distributed to users by being recorded on removable media such as a CD-ROM, or by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a web service via a network without being downloaded. [Explanation of symbols]

[0061] 1. Reliability evaluation device 10 Control Unit 11. Dataset Acquisition Section 12 Model Learning Section 13 Model Update Section 14. Explanatory Variable Selection Section 15. Evaluation Value Output Unit 20 Memory section

Claims

1. A dataset acquisition unit acquires training data that associates a set of candidate reference metrics for quantitatively demonstrating the accuracy of information retrieval and generation accuracy of the generation results produced by a generative language model using search extension generation in response to prompts with the correctness of the said generation results. A model learning unit learns the parameters of a model that uses the set of reference indicators mentioned above as explanatory variables and the correctness of the generated results as the objective variable, and also records the prediction accuracy. A model update unit calculates the importance of each of the aforementioned reference indicators, and, using the set obtained by preferentially excluding the reference indicators with lower importance as a new explanatory variable, causes the model learning unit to execute the processing again. The process of the model update unit is repeatedly executed, and a set of reference indicators is selected as the optimal explanatory variables to maximize the prediction accuracy, and the explanatory variable selection unit that constitutes the trained model is performed. A certainty evaluation device comprising: an evaluation value output unit that outputs a certainty evaluation value obtained by inputting the values ​​of the optimal explanatory variables for a new prompt and the generation result by a generative language model using the search extension generation for the new prompt into the trained model.

2. The certainty evaluation device according to claim 1, wherein the model update unit causes the model learning unit to execute the processing again, using a new set of reference indicators obtained by retaining a predetermined number of reference indicators with the highest importance among the reference indicators corresponding to the information retrieval certainty and the generation certainty, respectively, and excluding the reference indicator with the lowest importance, as new explanatory variables.

3. Computers The dataset acquisition unit acquires training data that associates a set of candidate reference metrics for quantitatively indicating the accuracy of information retrieval and generation accuracy of the generation results produced by a generative language model using search extension generation in response to prompts, with the correctness of the said generation results. The model learning unit learns the parameters of a model in which the set of reference indicators are used as explanatory variables and the correctness of the generated results is used as the objective variable, and also records the prediction accuracy. The model update unit calculates the importance of each of the reference indicators, and the set obtained by preferentially excluding the reference indicators with lower importance is used as a new explanatory variable, and the model learning unit is executed again. The explanatory variable selection unit repeatedly executes the processing of the model update unit to select the optimal set of reference indicators as explanatory variables so as to maximize the prediction accuracy, thereby constructing a trained model. A certainty evaluation method in which an evaluation value output unit outputs an evaluation value of the obtained certainty by inputting the values ​​of the optimal explanatory variables for a new prompt and the generation result by a generative language model using the search extension generation for the new prompt into the trained model.

4. A reliability evaluation program for causing a computer to function as a reliability evaluation device according to claim 1 or claim 2.

Citation Information

Patent Citations

  • Gas-liquid interface physical property evaluation method and gas-liquid interface physical property evaluation device

    JP2024064828A