Apparatus and Method for Evaluating Degree of Hallucination for Generative Artificial Intelligence Model
Patent Information
- Application Number
- KR1020240061878
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2026-09-09
- Estimated Expiration
- 2044-05-10
Smart Images

Figure 112024051042068-PAT00001_ABST
Abstract
Description
Technology Field
[0001] The present disclosure relates to an apparatus and method for evaluating hallucinations, and more specifically, to an apparatus and method for evaluating hallucinations of a generative artificial intelligence model. Background Technology
[0002] Research on artificial intelligence models is being conducted in various fields, and among them, research on generative AI models is particularly active. Currently, generative models are utilized in large language models, and sentence generation, logical judgment, and reasoning are key factors in evaluating the performance of generative models.
[0003] Meanwhile, the issue of hallucination in artificial intelligence models has recently become a topic of discussion. Hallucination in artificial intelligence models refers to the generation of incorrect or false information by an AI model that is not based on given data, context, or reality. Hallucination in AI models can occur due to a lack of training or input data, inconsistencies between data, or errors in the learning and inference processes. There is a problem in that hallucination in AI models can cause social and economic damage by spreading false information or inducing incorrect decisions. Meanwhile, a prior art document related to the present invention is Korean Patent Publication No. 10-2024-0000750, which was disclosed on January 3, 2024. The problem to be solved
[0004] The purpose of the present disclosure is to provide an apparatus and method for evaluating hallucinations that can measure the hallucinations of a generative artificial intelligence model that determines the truthfulness of a sentence.
[0005] The purpose of the present disclosure is to provide an apparatus and method for evaluating hallucinations that can measure hallucinations based on the judgment results of a generative artificial intelligence model for a plurality of evaluation sentences generated by combining a plurality of class-specific truth sentences with various types of conjunctions. means of solving the problem
[0006] According to one embodiment of the present disclosure, a hallucination evaluation device performs the steps of: generating a plurality of evaluation sentences, each composed of a plurality of true sentences and a conjunction, to have a truth value of true or false according to a set truth and false ratio; inputting the plurality of evaluation sentences into a generative artificial intelligence model that determines the truth or falsehood of an input sentence to obtain a determination result for each of the plurality of evaluation sentences; and comparing the truth value and the determination result for the plurality of evaluation sentences to calculate the hallucination degree of the generative artificial intelligence model.
[0007] The above generating step may generate the evaluation sentence by selecting two sentences from a plurality of sentences classified into at least one sentence class among a plurality of sentence classes, selecting at least one conjunction from a plurality of conjunctions classified into at least one conjunction class among a plurality of conjunction classes, and inserting the selected conjunction between the two selected sentences.
[0008] The above generating step can generate the plurality of evaluation sentences by changing the sentence class for the selected sentence and the conjunction class for the conjunction according to all possible combinations.
[0009] The above generating step can generate multiple sentences with true content by using a trained sentence generation model.
[0010] The step of calculating the hallucination level involves selecting at least one sentence class for the first sentence in the evaluation sentence composed of two sentences and one conjunction, calculating the accuracy rate by comparing the truth value and judgment result for a plurality of evaluation sentences having the first sentence of the selected at least one sentence class, and calculating the hallucination level according to the sentence class from the calculated accuracy rate.
[0011] The step of calculating the hallucination level involves selecting at least one class for each of two or more components in the evaluation sentence composed of two sentences and one conjunction, calculating the accuracy rate by comparing the truth value and judgment result for a plurality of evaluation sentences including the sentence or conjunction of the selected class, and calculating the hallucination level according to the sentence class from the calculated accuracy rate.
[0012] The step of calculating the hallucination level can select one sentence class for each of the two sentences among the two sentences and one conjunction constituting the evaluation sentence according to all possible combinations, and calculate the hallucination level for each sentence class for each of the two sentences based on the correct answer rate for each of the two sentences.
[0013] The step of calculating the hallucination level can calculate the Pearson correlation coefficient for the hallucination level by sentence class for each of the two sentences, and calculate the correlation of the hallucination level between the two sentence classes.
[0014] A method for evaluating hallucinations according to another embodiment of the present disclosure is a method performed by a processor, comprising: generating a plurality of evaluation sentences, each consisting of a plurality of true sentences and a conjunction, such that the evaluation sentences have a truth value of true or false according to a set truth and false ratio; inputting the plurality of evaluation sentences into a generative artificial intelligence model that determines the truth or falsehood of an input sentence to obtain a determination result for each of the plurality of evaluation sentences; and comparing the truth value for the plurality of evaluation sentences with the determination result to calculate the hallucinations of the generative artificial intelligence model. Effects of the invention
[0015] The apparatus and method for evaluating the hallucination level of a generative artificial intelligence model disclosed in the present disclosure can accurately evaluate the hallucination level of a generative artificial intelligence model that determines the truthfulness of a sentence based on the judgment results of the generative artificial intelligence model for a plurality of evaluation sentences generated by combining a plurality of class-specific truth sentences with various types of conjunctions. Brief explanation of the drawing
[0016] Figure 1 shows a configuration of a hallucination evaluation device of a generative artificial intelligence model according to one embodiment, classified according to operation. Figures 2 to 6 show examples of false evaluation sentences according to the class of conjunctions. Figure 7 shows an example of hallucinogenicity evaluation by sentence class. Figure 8 shows an example of hallucinogenicity evaluation according to sentence structure. FIG. 9 illustrates a method for evaluating hallucinations of a generative artificial intelligence model according to one embodiment. Figure 10 is a diagram showing the hallucination evaluation step of Figure 9 in detail. FIG. 11 is a drawing for explaining a computing environment including a computing device according to one embodiment. Specific details for implementing the invention
[0017] Hereinafter, specific embodiments according to embodiments of the present disclosure will be described with reference to the drawings. The following detailed description is provided to facilitate a comprehensive understanding of the methods, apparatuses, and / or systems described herein. However, this is merely illustrative and the present invention is not limited thereto.
[0018] In describing the embodiments of the present disclosure, detailed descriptions of known technology related to the present invention are omitted if it is determined that such detailed descriptions would unnecessarily obscure the essence of the embodiments. Furthermore, terms described below are defined with consideration of their functions in the present invention, and these may vary depending on the intentions or practices of the user or operator. Therefore, such definitions should be based on the content throughout this specification. Terms used in the detailed description are intended merely to describe specific embodiments and should not be limiting. Unless explicitly stated otherwise, expressions in the singular form include the meaning of the plural form. In this description, expressions such as “include” or “compose” are intended to refer to certain characteristics, numbers, steps, actions, elements, parts thereof, or combinations thereof, and should not be interpreted to exclude the existence or possibility of one or more other characteristics, numbers, steps, actions, elements, parts thereof, or combinations thereof other than those described. Additionally, terms such as “...part,” “...unit,” “module,” and “block” described in the specification refer to a unit that processes at least one function or operation, and this may be implemented in hardware, software, or a combination of hardware and software.
[0019] Figure 1 shows a configuration of a hallucination evaluation device of a generative artificial intelligence model according to one embodiment, classified according to operation.
[0020] Referring to FIG. 1, a hallucination evaluation device according to one embodiment may include a sentence element collection module (10), an evaluation sentence generation module (20), an evaluation sentence judgment model (30), and a hallucination evaluation module (40).
[0021] First, the sentence element collection module (10) collects and stores sentence elements for generating an evaluation sentence that the evaluation sentence judgment model (30) must determine as true or false. Here, the evaluation sentence consists of at least one conjunction connecting two or more sentences and sentences, and accordingly, the sentence element collection module (10) collects and stores multiple sentences and multiple conjunctions.
[0022] The sentence element collection module (10) may include a sentence collection module (11) and a conjunction collection module (13). The sentence collection module (11) collects and stores multiple sentences. In one embodiment, the evaluation sentence is composed of sentences that are true in content, and accordingly, the sentence collection module (11) must be able to collect and store only sentences that have true content. The sentence collection module (11) may be authorized to receive sentences that have been verified as true in advance. For example, the sentence collection module (11) may collect and store sentences from various dictionaries or specialized journals such as academic journals.
[0023] In addition, the sentence element collection module (10) may further include a sentence generation model (15) that is implemented as a generative artificial intelligence model and trained to generate true sentences. In this case, the sentence collection module (11) may receive and store not only the collected sentences but also multiple sentences generated by the sentence generation model (15). Additionally, although not illustrated, the sentence element collection module (10) may further include an artificial intelligence model (not illustrated) that determines the truthfulness of the accepted sentences, so that only sentences determined to be true are transmitted to and stored in the sentence collection module (11). At this time, the artificial intelligence model that determines the truthfulness of the sentences may be a model that receives a single sentence and determines its truthfulness.
[0024] At this time, the sentence collection module (11) may store the collected sentences by classifying them into multiple sentence classes according to their content. Here, for example, the explanation assumes that the sentences are classified into six sentence classes—history, humanities, social sciences, arts and physical education, natural sciences, and engineering—but is not limited thereto. Accordingly, the sentence generation model (15) may also be configured to generate truth sentences according to the designated sentence classes. However, each sentence may not be classified into only one class but may be classified into multiple classes. For example, a single sentence may be classified into two classes, history and natural science.
[0025] Meanwhile, the conjunction collection module (13) collects and stores multiple conjunctions that can connect two sentences. At this time, the conjunction collection module (13) can also collect multiple conjunctions by classifying them into multiple conjunction classes according to the way each of the collected conjunctions connects two sentences, similar to the sentence collection module (11). Here, as an example, the explanation assumes that the conjunctions are classified into five conjunction classes—conjunctions, contrasts, acknowledgments, descriptives, and temporal conjunctions—and is not limited thereto.
[0026] In this case, depending on the conjunction, it may not be classified into one of the five classes but may be classified into two or more classes. This is because even the same conjunction can be used for the purposes of different classes depending on the sentences placed before and after it.
[0027] Each of the sentence collection module (11) and the conjunction collection module (13) can be implemented as a database.
[0028] The evaluation sentence generation module (20) selects and authorizes two or more sentences from among a number of sentences stored in the sentence collection module (11), selects at least one conjunction from among a number of conjunctions stored in the conjunction collection module (13), and generates an evaluation sentence by connecting the two or more authorized sentences with the selected at least one conjunction. The evaluation sentence generation module (20) can generate multiple evaluation sentences, and at this time, it can select sentences and conjunctions while changing the sentence class and the conjunction class. That is, two or more sentences and at least one conjunction included in the evaluation sentence can be composed of a combination of various classes. In addition, the evaluation sentence can be generated by selecting sentences and conjunction classes of sentence classes and conjunction classes specified in various ways, such as user commands.
[0029] As described above, the evaluation sentence generation module (20) may generate an evaluation sentence by selecting two or more sentences and at least one conjunction, but here, the explanation assumes that the evaluation sentence generation module (20) generates an evaluation sentence by selecting two sentences and one conjunction. When the evaluation sentence has a simple structure consisting of two sentences and one conjunction connecting the two sentences, it is easy to evaluate the hallucination degree by class.
[0030] In particular, in one embodiment, when the evaluation sentence generation module (20) generates an evaluation sentence by combining two true sentences with a conjunction, it can generate not only a true evaluation sentence but also a false evaluation sentence.
[0031] Even if the two sentences constituting an evaluation sentence are both true, the evaluation sentence formed by combining the two sentences may be false. This is because the two true sentences in an evaluation sentence are not simply listed, but their contents are connected by a conjunction. In other words, falsehood may occur in the content of the two sentences connected by a conjunction, and thus, depending on the content of the two sentences and the type of conjunction, the evaluation sentence may be true or false. Furthermore, even if falsehood does not occur in the content of the evaluation sentence, the conjunction connecting the two sentences may be disconnected from the flow of the sentence; in this case, too, from the perspective of the evaluation sentence as a whole, an incorrect conjunction has been used, so it may be judged as false.
[0032] FIGS. 2 to 6 illustrate examples of false evaluation sentences according to the class of conjunctions. FIGS. 2 to 6 illustrate examples of false evaluation sentences using conjunctions of the sequential, contrastive, acknowledgment, explanatory, and time classes, respectively. In FIGS. 2 to 6, sentences ① and ② are both true sentences, and the following shows a false sentence as an evaluation sentence formed by connecting the true sentences ① and ② with conjunctions of different conjunction classes.
[0033] As shown in Figure 2, conjunctions of the conjunction class may include conjunctions such as "and, moreover, furthermore, moreover, in addition, as well as, at the same time, in that respect, perhaps, moreover, like this, thus, exactly." And the following evaluation statement, which connects the true sentences Sentence ① and Sentence ② with "like this," one of the conjunctions of the conjunction class, becomes false.
[0034] And as shown in FIG. 3, conjunctions of the contrast class may include conjunctions such as “but, however, nevertheless, on the other hand, rather, rather, conversely.” Although the evaluation sentence connected by the conjunction “on the other hand” in FIG. 3 is true based only on the content of sentences ① and ②, the content of sentences ① and ② is not contradictory to each other, so the contrast conjunction “on the other hand” is not suitable for insertion. Therefore, the evaluation sentence in FIG. 3 can also be considered a false sentence.
[0035] Figure 4 shows causal conjunctions, which may include "therefore, thus, so, thus, because, so, then, therefore, eventually, finally, because." As shown in Figure 4, even when using causal conjunctions, an evaluative sentence can be a false evaluative sentence. In Figure 5, it can be confirmed that a false evaluative sentence can be formed by explanatory conjunctions such as "on the other hand, although, merely, to put it another way, that is, immediately, so to speak, for example, as an example, in fact, for instance, in addition, specifically, because." Finally, Figure 6 shows temporal conjunctions such as "after, the next day, the day before, the following year, 10 years later," and temporal conjunctions can also be used to combine two true sentences to form a false evaluative sentence.
[0036] Consequently, as shown in FIGS. 2 to 6, when the evaluation sentence generation module (20) generates an evaluation sentence by connecting two true sentences with a conjunction, the generated evaluation sentence may be a true evaluation sentence, but may also be a false evaluation sentence.
[0037] And the evaluation sentence generation module (20) can adjust the ratio of true evaluation sentences and false evaluation sentences generated among the generated multiple evaluation sentences. That is, the evaluation sentence generation module (20) can adjust the ratio of true evaluation sentences and false evaluation sentences among the multiple evaluation sentences generated according to a pre-set ratio of true and false. Here, the ratio of true and false may be set by the user, but is not limited thereto.
[0038] Additionally, the evaluation sentence generation module (20) can label a truth value indicating whether each generated evaluation sentence is a true evaluation sentence or a false evaluation sentence and transmit it to the hallucination evaluation module (40).
[0039] The evaluation sentence determination model (30) is implemented as a generative artificial intelligence model trained to determine whether an authorized sentence is true or false, as an evaluation target of the hallucination evaluation device according to one embodiment. The evaluation sentence determination model (30) receives a plurality of evaluation sentences generated by the evaluation sentence generation module (20), determines whether the authorized evaluation sentence is a true evaluation sentence or a false evaluation sentence, and outputs it. Here, as described above, the evaluation sentence determination model (30) does not stop at determining whether the content of the input evaluation sentence is logically true or false, but can also determine whether it is true or false by considering whether an appropriate conjunction is used in the flow of the content.
[0040] In one embodiment, the evaluation sentence generation module (20) generates a true or false evaluation sentence by connecting two true sentences with a conjunction, so as to enable the evaluation sentence judgment model (30) to accurately evaluate the degree of hallucination. When a generative artificial intelligence model such as the evaluation sentence judgment model (30) determines the truth or falsity of a sentence composed of multiple sentences and a conjunction, such as an evaluation sentence, it is relatively more prone to falling into a degree of hallucination compared to determining the truth or falsity of a single sentence. That is, it is easier to evaluate the degree of hallucination of the evaluation sentence judgment model (30) compared to a single sentence. However, if at least one of the multiple sentences included in the evaluation sentence is a clearly false sentence, even though the evaluation sentence is composed of multiple sentences, this does not differ significantly from the case where a judgment is performed on a single sentence. Therefore, in the degree of hallucination evaluation device of one embodiment, the evaluation sentence is generated using only true sentences and a conjunction, and the evaluation sentence judgment model (30) determines the truth or falsity of the generated evaluation sentence, thereby enabling the evaluation sentence judgment model (30) to accurately evaluate the degree of hallucination.
[0041] The hallucination evaluation module (40) evaluates the hallucination of the evaluation sentence judgment model (30) by analyzing the result of the evaluation sentence judgment model (30) judging each of the multiple evaluation sentences.
[0042] The hallucination evaluation module (40) may include a correct answer rate calculation module (41) and a hallucination calculation module (43). The correct answer rate calculation module (41) receives the result of the evaluation sentence judgment model (30) determining each of a plurality of evaluation sentences and the truth value labeled by the evaluation sentence generation module (20) for each generated evaluation sentence, and checks whether the evaluation result of the evaluation sentence judgment model (30) is identical to the received truth value. Then, it calculates the ratio of evaluation results identical to the truth value among the total evaluation results to obtain the correct answer rate. At this time, the correct answer rate calculation module (41) may check the class of each sentence constituting the evaluation sentence and the conjunction, and obtain the correct answer rate by classifying it according to the confirmed class.
[0043] The hallucination calculation module (43) calculates the hallucination of the evaluation sentence judgment model (30) based on the accuracy rate calculated by the accuracy rate calculation module (41). Here, the hallucination calculation module (43) can not only calculate and evaluate the hallucination according to individual sentence classes, but also evaluate the hallucination according to sentence structure.
[0044] Figure 7 shows an example of hallucinogenicity evaluation by sentence class, and Figure 8 shows an example of hallucinogenicity evaluation according to sentence structure.
[0045] When the hallucination level calculation module (43) evaluates the hallucination level according to each sentence class, the hallucination level calculation module (43) selects a sentence class for the first sentence from an evaluation sentence composed of a first sentence, a conjunction, and a second sentence, checks the accuracy rate for the evaluation sentence having the first sentence of the selected sentence class, and calculates and checks the hallucination level (1 - accuracy rate) from the accuracy rate. At this time, as described above, since each sentence can be divided into multiple classes, theoretically, the hallucination level calculation module (43) can select a sentence class from one of a total of 63 possible cases for the first sentence and check the accuracy rate for the selected sentence class. Accordingly, as illustrated in FIG. 7, the hallucination level according to all possible sentence class combinations, as well as individual single sentence classes, can be evaluated separately. FIG. 7 illustrates the accuracy rate and hallucination rate when the first sentence is divided into a single sentence class or a combination of two sentence classes.
[0046] Meanwhile, when the hallucination level calculation module (43) evaluates the hallucination level according to the sentence structure, the hallucination level calculation module (43) selects a combination of classes for two or more of the two sentences and conjunctions included in the evaluation sentence, and calculates the hallucination level (1 - correct answer rate) by checking the correct answer rate according to the class of the selected combination. For example, the hallucination level calculation module (43) may select one of the sentence classes for the first and second sentences, which can each consist of 63 combinations (63 * 63 = 3,969), or select a sentence class for one of the first and second sentences and a conjunction class for five conjunctions, respectively (63 * 5 = 315). Additionally, the hallucination level calculation module (43) may individually select the sentence class for the first and second sentences and the conjunction class for the conjunctions, respectively (63 * 5 * 63 = 19,845). Therefore, one class combination out of up to 19,845 class combinations can be individually distinguished to obtain the hallucination (or correct answer rate) for each.
[0047] Figure 8 shows the accuracy rate and illusion rate for each class when the class of the first sentence, conjunction, and second sentence of the evaluation sentence is selected as the history class, the time conjunction class, and the history class, respectively, and (d) shows the accuracy rate and illusion rate for evaluation sentences having the same class.
[0048] In this way, the hallucination calculation module (43) can determine which class or sentence combination has a high hallucination and is vulnerable by distinguishing and individually evaluating the hallucination for each sentence class and the hallucination according to the sentence structure.
[0049] Additionally, the hallucination evaluation module (40) may further include a correlation analysis module (45) for analyzing the hallucination correlation between two sentence classes included in the evaluation sentence. The correlation analysis module (45) can analyze the hallucination correlation between two sentence classes by calculating the Pearson correlation coefficient based on the calculated hallucination (or correct answer rate) when the hallucination calculation module (43) selects one sentence class from each of the first and second sentences included in the evaluation sentence in all possible combinations, and when the hallucination (or correct answer rate) by class of the first sentence and the hallucination (or correct answer rate) by class of the second sentence are calculated according to all selected combinations.
[0050] In the illustrated embodiments, each component may have different functions and capabilities in addition to those described above and may include additional components not described. Additionally, in one embodiment, each component may be implemented using one or more physically separated devices, or by one or more processors or a combination of one or more processors and software, and may not be clearly distinguished in specific operation as in the illustrated examples.
[0051] And the hallucination evaluation device of the generative artificial intelligence model illustrated in FIG. 1 may be implemented within a logic circuit by hardware, firmware, software, or a combination thereof, or may be implemented using a general-purpose or specific-purpose computer. The device may be implemented using a hardwired device, a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc. Additionally, the device may be implemented as a system-on-chip (SoC) including one or more processors and controllers.
[0052] Furthermore, the hallucination evaluation device of a generative artificial intelligence model may be installed in the form of software, hardware, or a combination thereof on a computing device or server equipped with hardware elements. A computing device or server may refer to various devices that include, in whole or in part, communication devices such as communication modems for communicating with various devices or wired / wireless communication networks, memory for storing data for executing programs, and microprocessors for executing programs to perform calculations and commands.
[0053] FIG. 9 shows a method for evaluating hallucinations of a generative artificial intelligence model according to one embodiment, and FIG. 10 is a diagram showing the hallucination evaluation step of FIG. 9 in detail.
[0054] Referring to FIG. 9, a method for evaluating hallucinations of a generative artificial intelligence model according to one embodiment first collects and stores multiple sentences and multiple conjunctions (61). At this time, all collected sentences must be true sentences that are true in content. Each collected sentence and conjunction may be stored with a class separated. Here, each sentence is stored as one of multiple sentence classes, whereas conjunctions may be stored as duplicates in two or more conjunction classes among multiple conjunction classes. Additionally, multiple true sentences may be generated and stored by a sentence generation model (15) trained to generate true sentences.
[0055] When multiple sentences and conjunctions are collected and stored, the ratio of true evaluation sentences and false evaluation sentences is set in the multiple evaluation sentences generated by combining the collected multiple sentences and multiple conjunctions (62). Then, in order to generate multiple evaluation sentences according to the set ratio of true evaluation sentences and false evaluation sentences, two sentences are selected from the stored multiple sentences (63). Then, a conjunction is selected to connect the two selected sentences (64). At this time, the class of each selected sentence and conjunction may be specified in advance, but may also be changed in various ways.
[0056] When a sentence and a conjunction are selected, the selected conjunction is inserted between the selected sentences to generate an evaluation sentence (65). At this time, a truth value indicating whether the generated evaluation sentence is a true evaluation sentence or a false evaluation sentence can be labeled.
[0057] Then, the generated evaluation sentence is input into an evaluation sentence judgment model (30), which is a generative artificial intelligence model that is the subject of evaluation, and the evaluation sentence judgment model (30) obtains a judgment result that determines whether the input evaluation sentence is true or false (66).
[0058] When the judgment result of the evaluation sentence judgment model (30) is obtained, the accuracy rate is calculated by comparing the obtained judgment result with the truth value (67). At this time, the accuracy rate can be calculated separately according to the class of each of the two sentences included in the evaluation sentence, and can also be calculated separately according to the class of the conjunction as well as the two sentences.
[0059] Then, the hallucination level of the evaluation sentence judgment model (30) is evaluated based on the correct answer rate calculated by class (68).
[0060] Referring to FIG. 10, in the step (68) of evaluating hallucinations, it is first determined whether the hallucination to be evaluated is a sentence class hallucination evaluation (71). If it is determined that it is a sentence class hallucination evaluation, at least one sentence class for the first sentence among the two sentences of the evaluation sentence is selected and designated (72). Then, the hallucination for the corresponding class is calculated (1 - correct answer rate) using the correct answer rate calculated for the evaluation sentence containing the first sentence having the selected at least one sentence class (73).
[0061] Then, it is determined whether to evaluate the sentence structure illusion (74). If it is determined that the sentence structure illusion is to be evaluated, two or more of the two sentences and one conjunction that constitute the evaluation sentence are selected, and at least one class is selected for each of the two selected components (75). Then, the accuracy rate calculated for the evaluation sentence having the sentence structure according to at least one class selected for each component is checked, and the illusion according to the selected sentence structure is calculated (76).
[0062] Meanwhile, it is determined whether to perform a correlation analysis of hallucinations between two sentence classes included in the evaluation sentence (77). If it is determined that a correlation analysis is to be performed, a sentence class for each of the first and second sentences included in the evaluation sentence is selected according to all combinations (78). At this time, only one sentence class is selected for each of the first and second sentences in order to calculate the correlation of hallucinations between the classes. Then, the hallucinations of the first sentence by class and the hallucinations of the second sentence by class are calculated (79). Subsequently, the Pearson correlation coefficient is calculated based on the calculated hallucinations of the first and second sentences by class to calculate the correlation of hallucinations between the two sentence classes (80).
[0063] Although FIGS. 9 and FIGS. 10 describe each process as being executed sequentially, this is merely an illustrative description, and a person skilled in the art can apply various modifications and variations by changing the order described in FIGS. 9 and FIGS. 10, executing one or more processes in parallel, or adding other processes, within the scope of not departing from the essential characteristics of the embodiment of the present invention.
[0064] FIG. 11 is a drawing for explaining a computing environment including a computing device according to one embodiment.
[0065] In the illustrated embodiments, each component may have different functions and capabilities in addition to those described below, and may include additional components in addition to those described below. The illustrated computing environment (90) may include a computing device (91) to perform the hallucination evaluation method of the generative artificial intelligence model illustrated in FIG. 9 and FIG. 10. In one embodiment, the computing device (91) may be one or more components included in the hallucination evaluation device of the generative artificial intelligence model illustrated in FIG. 1.
[0066] A computing device (91) includes at least one processor (92), a computer-readable storage medium (93), and a communication bus (95). The processor (92) may enable the computing device (91) to operate according to the exemplary embodiment described above. For example, the processor (92) may execute one or more programs (94) stored in the computer-readable storage medium (93). The one or more programs (94) may include one or more computer-executable instructions, and the computer-executable instructions may be configured to enable the computing device (91) to perform operations according to the exemplary embodiment when executed by the processor (92).
[0067] The communication bus (95) interconnects various other components of the computing device (91), including the processor (92) and the computer-readable storage medium (93).
[0068] The computing device (91) may also include one or more input / output interfaces (96) and one or more communication interfaces (97) that provide an interface for one or more input / output devices (98). The input / output interfaces (96) and communication interfaces (97) are connected to a communication bus (95). The input / output devices (98) may be connected to other components of the computing device (91) through the input / output interfaces (96). An exemplary input / output device (98) may include an input device such as a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touchpad or touchscreen), a voice or sound input device, various types of sensor devices and / or imaging devices, and / or an output device such as a display device, a printer, a speaker and / or a network card. An exemplary input / output device (98) may be included inside the computing device (91) as a component constituting the computing device (91), or it may be connected to the computing device (91) as a separate device distinct from the computing device (91).
[0069] Although the present invention has been described in detail above through representative embodiments, those skilled in the art will understand that various modifications and equivalent alternative embodiments are possible therefrom. Accordingly, the true technical scope of protection of the present invention should be determined by the technical spirit of the appended claims.
Claims
Claim 1 A device comprising: a memory; and a processor that executes at least a portion of an operation according to a program stored in the memory, wherein the processor performs the steps of: generating a plurality of evaluation sentences, each composed of a plurality of true sentences and a conjunction, having a truth value of true or false according to a set truth and false ratio; inputting the plurality of evaluation sentences into a generative artificial intelligence model that determines the truth or falsehood of an input sentence to obtain a determination result for each of the plurality of evaluation sentences; and comparing the truth value and the determination result for the plurality of evaluation sentences to calculate the hallucination degree of the generative artificial intelligence model, wherein the generating step involves selecting two sentences from a plurality of sentences classified into at least one sentence class among a plurality of sentence classes, selecting at least one conjunction from a plurality of conjunctions classified into at least one conjunction class among a plurality of conjunction classes, and inserting the selected conjunction between the two selected sentences to generate the evaluation sentences, wherein the plurality of evaluation sentences are generated while changing the sentence class for the selected sentences and the conjunction class for the conjunction according to all possible combinations. Claim 2 delete Claim 3 delete Claim 4 In claim 1, the generating step is a hallucination evaluation device that generates multiple sentences with true content using a learned sentence generation model. Claim 5 A hallucination evaluation device according to claim 1, wherein the step of calculating the hallucination degree involves selecting at least one sentence class for a first sentence from an evaluation sentence composed of two sentences and one conjunction, calculating an accuracy rate by comparing truth values and judgment results for a plurality of evaluation sentences having the first sentence of the selected at least one sentence class, and calculating the hallucination degree according to the sentence class from the calculated accuracy rate. Claim 6 A hallucination evaluation device according to claim 1, wherein the step of calculating the hallucination degree involves selecting at least one class for each of two or more components in an evaluation sentence composed of two sentences and one conjunction, calculating an accuracy rate by comparing a truth value and a judgment result for a plurality of evaluation sentences including the sentence or conjunction of the selected class, and calculating the hallucination degree according to the sentence class from the calculated accuracy rate. Claim 7 In claim 1, the step of calculating the hallucination degree is a hallucination degree evaluation device that selects one sentence class for each of the two sentences among the two sentences and one conjunction constituting the evaluation sentence according to all possible combinations, and calculates the hallucination degree for each of the two sentences for each of the sentence classes based on the correct answer rate for each of the two sentences. Claim 8 In claim 7, the step of calculating the hallucination degree is a hallucination degree evaluation device that calculates the Pearson correlation coefficient for the hallucination degree by sentence class for each of the two sentences, and calculates the hallucination degree correlation between the two sentence classes. Claim 9 A method for evaluating hallucinations performed by a processor, comprising: a step of generating a plurality of evaluation sentences, each composed of a plurality of true sentences and a conjunction, to have a truth value of true or false according to a set truth and false ratio; a step of inputting the plurality of evaluation sentences into a generative artificial intelligence model that determines the truth or falsehood of an input sentence to obtain a determination result for each of the plurality of evaluation sentences; and a step of comparing the truth value and the determination result for the plurality of evaluation sentences to calculate the hallucination degree of the generative artificial intelligence model, wherein the generating step comprises selecting two sentences from a plurality of sentences classified into at least one sentence class among a plurality of sentence classes, selecting at least one conjunction from a plurality of conjunctions classified into at least one conjunction class among a plurality of conjunction classes, and generating the evaluation sentences by inserting the selected conjunction between the two selected sentences, wherein the plurality of evaluation sentences are generated while changing the sentence class of the selected sentences and the conjunction class for the conjunction according to all possible combinations. Claim 10 delete Claim 11 delete Claim 12 In claim 9, the generating step is a hallucination evaluation method that generates multiple sentences with true content using a learned sentence generation model. Claim 13 In claim 9, the step of calculating the hallucination degree involves selecting at least one sentence class for a first sentence from an evaluation sentence composed of two sentences and one conjunction, calculating a correct answer rate by comparing the truth value and judgment result for a plurality of evaluation sentences having a first sentence of the selected at least one sentence class, and calculating the hallucination degree according to the sentence class from the calculated correct answer rate. Claim 14 In claim 9, the step of calculating the hallucination degree involves selecting at least one class for each of two or more components in the evaluation sentence composed of two sentences and one conjunction, calculating the accuracy rate by comparing the truth value and judgment result for a plurality of evaluation sentences including the sentence or conjunction of the selected class, and calculating the hallucination degree according to the sentence class from the calculated accuracy rate. Claim 15 In claim 9, the step of calculating the hallucination degree is a hallucination degree evaluation method that selects one sentence class for each of the two sentences among the two sentences and one conjunction constituting the evaluation sentence according to all possible combinations, and calculates the hallucination degree for each of the two sentences for each of the sentence classes based on the correct answer rate for each of the two sentences. Claim 16 In claim 15, the step of calculating the hallucination level is a hallucination level evaluation method that calculates the Pearson correlation coefficient for the hallucination level by sentence class for each of the two sentences, and calculates the hallucination level correlation between the two sentence classes.
Citation Information
Patent Citations
Big language model-based illusion detection method and system and storage medium
CN117688164A
Piece-of-writing evaluation system, piece-of-writing evaluation method and piece-of-writing evaluation program
JP2022140337A
Electronic apparatus capable of determining whether the content contained in a sentence is true through the creation of an artificial intelligence-based truth judgment model and the operating method thereof
KR1020240000750A