A method and system for cross-checking of dual large language models to reduce model hallucinations

By employing a dual-language-model cross-checking method, utilizing semantic vector models and cross-coding techniques, the differences in model outputs are identified and verified, thus solving the problem of large language model-generated illusions and ensuring the reliability and accuracy of the generated content.

CN122152992APending Publication Date: 2026-06-05TIANFU JIANGXI LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANFU JIANGXI LAB
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Large language models often suffer from the illusion problem when generating text, which affects the credibility and usability of the model, and existing technologies are unable to effectively reduce the illusion.

Method used

A dual-language-model cross-checking method is adopted. The user-input dialogue topic text is added with parameters and then fed into two independently trained language models. The semantic vector similarity is calculated, the key difference points are extracted, and these key points are cross-input into the other model for fact-checking. Finally, the cross-encoding model is used to adjudicate and generate a de-illusionized answer.

Benefits of technology

Effectively identify and reduce illusory content that may be ignored or incorrectly generated by a single model, retain consensus content of the model, ensure information reliability, and improve the coverage and accuracy of the answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152992A_ABST
    Figure CN122152992A_ABST
Patent Text Reader

Abstract

The application discloses a method for reducing model hallucination through cross-checking of two large language models, which comprises the following steps: adding a large language model parameter to the dialogue topic text input by a user; inputting the processed dialogue topic into two language models respectively to obtain a first set of answer key points and a second set of answer key points; converting each sentence in the set of answer key points into a semantic vector through a semantic vector model to obtain a set of semantic vectors, calculating the similarity between the vectors in the two sets of semantic vectors, and extracting a set of difference key points according to a preset similarity threshold; cross-inputting each key point in the set of difference key points into the language model of the other party to perform fact checking and obtaining a set of determination results; determining whether there is hallucination content according to the set of determination results and outputting a fusion result. Through mutual examination of the difference parts output by the two independently trained models, the hallucination content that may be ignored or incorrectly generated by a single model can be effectively identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a method, system, device, and medium for reducing model illusion through cross-checking of two large language models. Background Technology

[0002] Large Language Models (LLMs) have made significant progress in Natural Language Processing (NLP) and are widely used in tasks such as text generation, dialogue systems, and machine translation. However, these models often suffer from the illusion problem when generating text, where the generated content appears grammatically correct and logically sound but does not reflect reality. The illusion problem not only affects the credibility and usability of the model but may also raise legal and ethical risks. Current mainstream techniques for reducing illusions include the following:

[0003] Data cleaning and preprocessing: This reduces illusions by cleaning data and optimizing preprocessing workflows. This method requires significant human intervention and is difficult to completely eliminate biases and errors in the data.

[0004] Model architecture optimization: Adjusting the model architecture, such as improving the design of the encoder and decoder, can reduce errors during the generation process. However, this approach requires retraining the model, and the optimization results may vary depending on the model architecture.

[0005] External knowledge retrieval: This method incorporates external knowledge bases during the content generation process, retrieving relevant knowledge to verify the authenticity of the generated content. While this approach can improve the accuracy of the generated content, the retrieval process may introduce additional latency and places high demands on the quality and efficiency of the retrieval system. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device, and medium for reducing model illusion through cross-checking of two large language models, thereby solving the problem that people experience model illusion when using large language models and are unable to make judgments based on their own knowledge.

[0007] This invention is achieved through the following technical solution:

[0008] In a first aspect, the first embodiment of the present invention provides a method for reducing model illusion through cross-checking of two large language models, comprising:

[0009] Large language model parameters are added to the dialogue topic text input by the user to obtain the processed dialogue topic;

[0010] The processed dialogue topic is input into the first language model and the second language model respectively, and the first answer key point set and the second answer key point set output by the first language model and the second language model are obtained respectively.

[0011] Each sentence in the first and second answer key point sets is converted into a semantic vector using a semantic vector model, resulting in a first semantic vector set and a second semantic vector set. The similarity between the vectors in the two semantic vector sets is calculated, and a set of difference key points is extracted based on a preset similarity threshold, resulting in a set of difference key points.

[0012] Each key point in the set of key differences is cross-input into the other party's language model for fact-checking to obtain a set of judgment results.

[0013] Determine whether hallucination content exists based on the set of judgment results, and output the fusion result.

[0014] Furthermore, the parameters of the large language model include: model identifier, key, role, prompt word, randomness parameter, and number of tokens.

[0015] Furthermore, the specific method for calculating the similarity between vectors in two semantic vector sets and extracting a set of differing key points based on a preset similarity threshold includes:

[0016] The cosine similarity algorithm is used to calculate the similarity between each vector in the first semantic vector set and all vectors in the second semantic vector set, and the first similarity value is obtained.

[0017] Select the first maximum value from all the first similarity values;

[0018] The first maximum value is compared with a preset similarity threshold. If the first maximum value is less than the preset similarity threshold, the key point is determined to be a difference point and the key point is added to the first set of difference key points.

[0019] The cosine similarity algorithm is used to calculate the similarity between each vector in the second semantic vector set and all vectors in the first semantic vector set, and the second similarity value is obtained.

[0020] Select the second maximum value from all the second similarity values;

[0021] The second maximum value is compared with a preset similarity threshold. If the second maximum value is less than the preset similarity threshold, the key point is determined to be a difference point and the key point is added to the second set of difference key points.

[0022] Furthermore, the specific method for cross-inputting each key point in the set of difference key points into the other party's language model for fact-checking to obtain the judgment result set includes:

[0023] The content in the first set of key differences is used to construct the first verification prompt word;

[0024] The first verification prompt is input into the second language model for verification to obtain the first set of judgment results.

[0025] The contents of the second set of key differences are used to construct the second verification prompt words;

[0026] The second verification prompt is input into the first language model for verification, resulting in a second set of judgment results.

[0027] Furthermore, the specific method for determining whether hallucination content exists based on the set of determination results includes:

[0028] The decision set is adjudicated using a cross-coding model or rule parser.

[0029] Furthermore, the specific steps of using a cross-coding model or rule parser to adjudicate the set of judgment results include:

[0030] If a viewpoint in the set of key differences in one language model is determined by the other language model to be inconsistent with the facts and refuted with evidence, then the viewpoint is marked as a high-confidence illusion and removed from the final result or marked with a warning.

[0031] If a viewpoint in the key difference set of one language model is determined to be consistent with the facts by the other language model, and it is explained that the viewpoint is missing information when the other model was initially generated, the viewpoint is retained and merged into the final result;

[0032] By integrating the consensus portions of the two model responses with the differences confirmed by cross-validation, and logically reorganizing them, the final hallucination-free response is formed.

[0033] Furthermore, the semantic vector model is an open-source Chinese semantic vector model.

[0034] Secondly, another embodiment of the present invention provides a system for reducing model illusion through cross-checking of two large language models, used to implement the method described in the first embodiment above, the system comprising:

[0035] The preprocessing module adds large language model parameters to the user-input dialogue topic text to obtain the processed dialogue topic.

[0036] The dual-model parallel generation module is used to input the processed dialogue topic into the first language model and the second language model respectively, and obtain the first answer key point set and the second answer key point set output by the first language model and the second language model respectively.

[0037] The semantic analysis module is used to convert each sentence in the first answer key point set and the second answer key point set into semantic vectors through a semantic vector model, thereby obtaining the first semantic vector set and the second semantic vector set respectively. The similarity between the vectors in the two semantic vector sets is calculated, and the set of difference key points is extracted according to a preset similarity threshold to obtain the set of difference key points. The first set of difference key points and the second set of difference key points are obtained.

[0038] The cross-validation module is used to cross-input each key point in the set of key differences into the other party's language model for fact-checking, and obtain a set of judgment results;

[0039] The result synthesis module is used to determine whether there is hallucinatory content based on the set of judgment results and output the fusion result.

[0040] Thirdly, another embodiment of the present invention provides an electronic device comprising: a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are interconnected, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method described in the first embodiment above.

[0041] Fourthly, another embodiment of the present invention provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in the first embodiment above.

[0042] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0043] This invention provides a method, system, device, and medium for reducing model illusions through cross-checking using two large language models. By having two independently trained models cross-check each other's outputs to identify discrepancies, it can effectively identify illusory content that a single model might overlook or incorrectly generate. Leveraging the superior discriminative power of large language models compared to their generative power, secondary fact-checking is performed on suspected illusory points, reducing the output of false information. The consensus content of the two models is retained to ensure the reliability of basic information. By merging the advantageous outputs of the two models, a more comprehensive and detailed answer is formed, improving content coverage. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0045] Figure 1 A simplified flowchart of a method for reducing model illusion through cross-checking of two large language models provided in the first embodiment of the present invention;

[0046] Figure 2 A detailed flowchart of a method for reducing model illusion through cross-checking of two large language models provided in the first embodiment of the present invention;

[0047] Figure 3 This is a schematic diagram of the structure of a system for reducing model illusion through cross-checking of two large language models, provided as another embodiment of the present invention. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0049] like Figure 1-2 As shown, the first embodiment of the present invention provides a method for reducing model illusion through cross-checking of two large language models, comprising the following steps:

[0050] Large language model parameters are added to the dialogue topic text input by the user to obtain the processed dialogue topic;

[0051] The processed dialogue topic is input into the first language model and the second language model respectively, and the first answer key point set and the second answer key point set output by the first language model and the second language model are obtained respectively.

[0052] Each sentence in the first and second answer key point sets is converted into a semantic vector using a semantic vector model, resulting in a first semantic vector set and a second semantic vector set. The similarity between the vectors in the two semantic vector sets is calculated, and a set of difference key points is extracted based on a preset similarity threshold, resulting in a set of difference key points.

[0053] Each key point in the set of key differences is cross-input into the other party's language model for fact-checking to obtain a set of judgment results.

[0054] Determine whether there is hallucinated content based on the determination result set and output the fusion result.

[0055] Since the conversation topics input to the large language model are generally composed of one or several sentences of natural language text, including the user's main content, intentions, requirements, etc. Before inputting the topic into the large language model, it is first necessary to add some parameters of the large language model to the input topic text, such as the model (Model), API keys (API Keys), role (Role), prompt (Prompt), randomness parameter (Temperature), maximum number of tokens (Max_tokens), etc. Select two large language models for evaluation. To ensure the fairness of the results, generally, the large language models selected need to consider that the language corpus ratios of the training models are quite similar, such as the Chinese and English ratios are quite similar; at the same time, it is also necessary to consider that the model parameters should not vary too much, such as the model parameters are all around 14B, with a plus or minus not exceeding 1B. Select two large language models of similar magnitudes, and then a comparison and verification platform needs to be selected to test the outputs of the two models. To verify the effect of the model in eliminating hallucinations, a private model inference environment can be built and verification scripts can be written for experiments (or the large model arena in the online large model evaluation platform opencompass can be selected as the experimental platform). One of the verification models is Qwen2.5-7B-Instruct (Tongyi Qianwen), denoted as the LLM-A model, and the other model is Llama3.1-8B-Instruct (Meta), denoted as the LLM-B model.

[0056] In the first round of testing, the standard open AI call parameters are used as the verification topic, and the question is "List the historical achievements made by Emperor Qin Shi Huang, list the key contribution points, and elaborate on each contribution point in detail". The question is input into the two large language models LLM-A and LLM-B respectively. The large language model answers according to the question intention and obtains several key point descriptions, with each key point being a sentence. Therefore, the first answer key point set obtained by the LLM-A model for the above question is denoted as S A , and the second answer key point set obtained by the LLM-B model for the above question is denoted as S B , as follows:

[0057] ,

[0058] ,

[0059] Among them, are the viewpoints in the first answer key point set S A of the LLM-A model, are the viewpoints in the second answer key point set S BThe viewpoint in the text.

[0060] The above steps yield the topic key point sets of the two large language models' outputs for the same topic. Next, the semantic model is needed to first exclude the first answer's key point set S. A The second set of key points S B The common part of the two sets, S A and S B The common parts in the two sets represent the consensus content of the two models on the same issue; the remaining viewpoints may be illusions of each model. Using the open-source Chinese semantic vector model BGE (BAAI General Embedding), each sentence in the key answer set is first vectorized. The vectorization function is denoted as f, and the vector result is represented by f(x). The semantic vector sets of the two large language models are then represented as follows:

[0061] ,

[0062] ,

[0063] ,

[0064] Among them, V A V is the set of semantic vectors output by the LLM-A model. B This is the set of semantic vectors output by the LLM-B model.

[0065] Calculate the similarity between vectors in two semantic vector sets, and extract a set of key points showing differences based on a preset similarity threshold. The semantic vector set V is calculated using the cosine similarity algorithm. A Each vector in the set of semantic vectors V B The similarity matrix of all vectors in the semantic vector set V. A any vector in ∈V A Calculate its relationship with V B Similarity score of the best matching vector a:

[0066]

[0067] in, For the semantic vector set V A Any vector in, For the semantic vector set V B Any vector in the array. The best matching vector is the vector that maximizes the similarity score. .

[0068] Set a semantic similarity threshold (For example =0.90). By adjusting the similarity threshold, the sensitivity of hallucination detection can be flexibly controlled to adapt to the accuracy and recall requirements of different tasks. If Score a < Then determine the key point. A unique perspective of LLM-A, namely the first point of difference Add it to the first set of key differences Similarly, for V B The vectors in the data are reverse-engineered to identify key points with low similarity, i.e., the second difference points. Add it to the second set of key differences. This results in two sets of content that are "exclusive" to each model and for which no consensus has been reached:

[0069] ;

[0070] ;

[0071] in, The first set of key differences Differences in For the second set of key differences The differences in these points are the high-risk areas for "suspected hallucinations".

[0072] Cross-checking: The content of the set of discrepancies in key points is constructed as verification prompts, which are then cross-inputted into the other model for fact-checking to obtain the judgment result. This is the core step of the invention, taking advantage of the fact that the discriminative ability of large language models is usually higher than their generative ability.

[0073] Set the first key difference points Each viewpoint The first verification prompt is constructed and input into the LLM-B model to allow the model to judge the viewpoint. Does it conform to objective historical / scientific facts? Output the answer 'yes' or 'no' and briefly explain the reasoning. Obtain the verification results and record the LLM-B model's first set of key differences. First set of judgment results Similarly, the second set of key difference points... Each viewpoint The second validation prompt is constructed and input into the LLM-A model to obtain the set of second difference key points of the LLM-A model. The second set of judgment results .

[0074] The final decision is made using a cross-encoder model or a rule parser.

[0075] Confirmation of Illusion: If the LLM-B model explicitly determines the viewpoint If the answer is "no" and rebuttal evidence is provided, then... Marked as "high-confidence illusion," it will be removed from the final results or flagged as a warning.

[0076] Confirming omissions: If the LLM-B model determines the viewpoint A "yes" answer indicates that the viewpoint is accepted as correct even though the LLM-B model was not generated. This usually means that the LLM-B model missed this detail during its initial generation. In this case, the viewpoint should be... Retain and merge them into the final answer to improve the recall rate of the answer.

[0077] Output fusion result: Combine the key point set S of the first answer A The second set of key points S B The consensus part (i.e. the high similarity part) is combined with the difference part that is judged as "true" through cross-validation, and then logically reorganized to generate the final de-illusion answer.

[0078] In a comparison of the implementation examples, in the aforementioned test regarding "Qin Shi Huang's historical achievements": the LLM-A model might have generated "He built the Epang Palace as an administrative center" (controversial / partially misleading). The LLM-B model did not mention the Epang Palace, but it did mention "standardizing weights and measures." During cross-checking, the LLM-B model might indicate a correction that "the Epang Palace was not fully completed and primarily served as a court palace rather than solely an administrative center." The final output will include standardized weights and measures and correct the description of the Epang Palace, thus eliminating any exaggerations or inaccuracies that might arise from a single model.

[0079] This invention provides a method for reducing model illusions through cross-checking of two large language models. When using large language model question answering, after a user inputs a question on a given topic, the question is fed into two large language models. Each model answers the question according to its intent, summarizing the key points of its output. Then, a cross-coding model is used to verify the outputs of the two large language models, identifying areas with significant semantic discrepancies, which may contain illusionary content. The original question and the significantly different parts are then input back into the other large language model to determine if they are relevant to the question and consistent with reality. Finally, the outputs of the two large language models are cross-coded to determine semantic similarity. If a difference exists, it is an illusion; otherwise, it is relevant to the question's intent.

[0080] This invention provides a method for reducing model illusions through cross-checking using two large language models. By having two independently trained models examine the differences in each other's outputs, it can effectively identify illusory content that a single model might overlook or incorrectly generate. Leveraging the superior discriminative power of large language models compared to their generative power, secondary fact-checking is performed on suspected illusory points, reducing the output of false information. The consensus content of the two models is retained to ensure the reliability of basic information. By merging the advantageous outputs of the two models, a more comprehensive and detailed answer is formed, improving content coverage.

[0081] like Figure 3 As shown, another embodiment of the present invention provides a system for reducing model illusion through cross-checking of two large language models, used to implement the method described in the first embodiment above. The system includes:

[0082] The preprocessing module adds large language model parameters to the user-input dialogue topic text to obtain the processed dialogue topic.

[0083] The dual-model parallel generation module is used to input the processed dialogue topic into the first language model and the second language model respectively, and obtain the first answer key point set and the second answer key point set output by the first language model and the second language model respectively.

[0084] The semantic analysis module is used to convert each sentence in the first answer key point set and the second answer key point set into semantic vectors through a semantic vector model, thereby obtaining the first semantic vector set and the second semantic vector set respectively. The similarity between the vectors in the two semantic vector sets is calculated, and the set of difference key points is extracted according to a preset similarity threshold to obtain the set of difference key points. The first set of difference key points and the second set of difference key points are obtained.

[0085] The cross-validation module is used to cross-input each key point in the set of key differences into the other party's language model for fact-checking, and obtain a set of judgment results;

[0086] The result synthesis module is used to determine whether there is hallucinatory content based on the set of judgment results and output the fusion result.

[0087] The execution process of each module can be carried out according to the method flow steps of the cross-checking of two large language models to reduce model illusion provided in the first embodiment, and will not be described in detail in this embodiment.

[0088] The system for reducing model illusion through cross-checking of two large language models and the method for reducing model illusion through cross-checking of two large language models provided in this invention are based on the same inventive concept and have the same beneficial effects, and will not be described again here.

[0089] Another embodiment of the present invention provides an electronic device, which includes a processor, an input device, an output device, and a memory. The processor, the input device, the output device, and the memory are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions to execute the method described in the first embodiment above.

[0090] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0091] Input devices may include touchpads, microphones, etc., and output devices may include displays (LCDs, etc.), speakers, etc.

[0092] The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information about the device type.

[0093] In specific implementations, the processor, input device, and output device described in the embodiments of the present invention can execute the implementation of the method embodiments described in the embodiments of the present invention, or they can execute the implementation of the system embodiments described in the embodiments of the present invention, which will not be repeated here.

[0094] The present invention also provides an embodiment of a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method described in the first embodiment above.

[0095] The computer-readable storage medium can be an internal storage unit of the terminal described in the foregoing embodiments, such as the terminal's hard drive or memory. The computer-readable storage medium can also be an external storage device of the terminal, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the terminal. The computer-readable storage medium is used to store the computer program and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0096] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the terminals and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A method for reducing model illusion through cross-checking of two large language models, characterized in that, include: Large language model parameters are added to the user-input dialogue topic text to obtain the processed dialogue topic; The processed dialogue topic is input into the first language model and the second language model respectively, and the first answer key point set and the second answer key point set output by the first language model and the second language model are obtained respectively. Each sentence in the first and second answer key point sets is converted into a semantic vector using a semantic vector model, resulting in a first semantic vector set and a second semantic vector set. The similarity between the vectors in the two semantic vector sets is calculated, and a set of difference key points is extracted based on a preset similarity threshold, resulting in a set of difference key points. Each key point in the set of key differences is cross-input into the other party's language model for fact-checking to obtain a set of judgment results. Determine whether hallucination content exists based on the set of judgment results, and output the fusion result.

2. The method according to claim 1, characterized in that, The parameters of the large language model include: model identifier, key, role, prompt word, randomness parameter, and number of tokens.

3. The method according to claim 1, characterized in that, The specific method for calculating the similarity between vectors in two semantic vector sets and extracting a set of key difference points based on a preset similarity threshold includes: The cosine similarity algorithm is used to calculate the similarity between each vector in the first semantic vector set and all vectors in the second semantic vector set, and the first similarity value is obtained. Select the first maximum value from all the first similarity values; The first maximum value is compared with a preset similarity threshold. If the first maximum value is less than the preset similarity threshold, the key point is determined to be a difference point and the key point is added to the first set of difference key points. The cosine similarity algorithm is used to calculate the similarity between each vector in the second semantic vector set and all vectors in the first semantic vector set, and the second similarity value is obtained. Select the second maximum value from all the second similarity values; The second maximum value is compared with a preset similarity threshold. If the second maximum value is less than the preset similarity threshold, the key point is determined to be a difference point and the key point is added to the second set of difference key points.

4. The method according to claim 3, characterized in that, The specific method for cross-inputting each key point in the set of difference key points into the other party's language model for fact-checking to obtain the set of judgment results includes: The content in the first set of key differences is used to construct the first verification prompt word; The first verification prompt is input into the second language model for verification to obtain the first set of judgment results. The content in the second set of key differences is used to construct the second verification prompt word; The second verification prompt is input into the first language model for verification, resulting in a second set of judgment results.

5. The method according to claim 4, characterized in that, The specific method for determining whether hallucination content exists based on the set of determination results includes: The decision set is adjudicated using a cross-coding model or rule parser.

6. The method according to claim 5, characterized in that, The specific steps of using a cross-coding model or rule parser to adjudicate the set of judgment results include: If a viewpoint in the set of key differences of one language model is determined by the other language model to be inconsistent with the facts and refutation evidence is provided, then the viewpoint is marked as a high-confidence illusion and removed from the final result or marked with a warning. If a viewpoint in the key difference set of one language model is determined to be consistent with the facts by the other language model, and it is explained that the viewpoint is missing information when the other model was initially generated, the viewpoint is retained and merged into the final result; By integrating the consensus portions of the two model responses with the differences confirmed by cross-validation, and logically reorganizing them, the final hallucination-free response is formed.

7. The method according to claim 1, characterized in that, The semantic vector model is an open-source Chinese semantic vector model.

8. A system for reducing model illusion through cross-checking of two large language models, characterized in that, The system for implementing the method as described in any one of claims 1-7 includes: The preprocessing module adds large language model parameters to the user-input dialogue topic text to obtain the processed dialogue topic. The dual-model parallel generation module is used to input the processed dialogue topic into the first language model and the second language model respectively, and obtain the first answer key point set and the second answer key point set output by the first language model and the second language model respectively. The semantic analysis module is used to convert each sentence in the first answer key point set and the second answer key point set into semantic vectors through a semantic vector model, thereby obtaining the first semantic vector set and the second semantic vector set respectively. The similarity between the vectors in the two semantic vector sets is calculated, and the set of difference key points is extracted according to a preset similarity threshold to obtain the set of difference key points. The first set of difference key points and the second set of difference key points are obtained. The cross-validation module is used to cross-input each key point in the set of key differences into the other party's language model for fact-checking, and obtain a set of judgment results; The result synthesis module is used to determine whether there is hallucinatory content based on the set of judgment results and output the fusion result.

9. An electronic device, comprising: The processor, input device, output device, and memory are interconnected, the memory being used to store a computer program, the computer program including program instructions, characterized in that the processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-7.