Method, apparatus, system, and computer-readable medium for preventing hallucination propagation based on memory store in multi-agent system

The method addresses hallucinogenic data propagation in multi-agent systems by calculating semantic discrepancy and implementing a two-stage verification structure to block or modify data, enhancing data reliability and reducing computational costs.

KR1020260112923APending Publication Date: 2026-07-21안태경
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
KR · KR
Patent Type
Applications
Current Assignee / Owner
안태경
Filing Date
2026-03-27
Publication Date
2026-07-21

Smart Images

  • Figure PAT00002_ABST
    Figure PAT00002_ABST
Patent Text Reader

Abstract

The present invention relates to a method, apparatus, system, and computer-readable medium for preventing the propagation of hallucinogenic data in a multi-agent system comprising a memory storage shared by a plurality of agents. A method according to the present invention comprises the steps of receiving a request to store data in a memory storage from an agent, tracing back a source chain included in the requested data to identify the original data, calculating a semantic discrepancy between the requested data and the original data, and determining to store, modify, store, or discard the data based on the semantic discrepancy. The present invention prevents the storage and propagation of hallucinogenic data in a multi-agent environment by assigning a reliability hierarchy based on source chain length to the data stored in the memory storage and performing a weighted search based on semantic similarity and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a method, apparatus, system, and computer-readable medium for preventing the propagation of hallucinogenic data in a memory storage of a multi-agent system. More specifically, the invention relates to a technique for backtracking a source chain to calculate a semantic discrepancy with the original data before storing data in a memory storage shared by a plurality of agents, and for blocking or modifying the storage of data containing hallucinations based on said semantic discrepancy. Background Technology

[0002] Multi-agent systems that perform complex tasks by linking multiple agents based on a Large Language Model (LLM) are being actively researched. In multi-agent systems, each agent performs reasoning independently and collaborates by sharing the results with other agents. In this process, a problem called hallucination propagation has been reported, in which hallucinations—information that does not correspond to facts—generated by individual agents are transmitted to other agents, degrading the overall output quality of the system.

[0003] The study by Xixun Lin, Yucheng Ning, Jingwen Zhang, and others (arXiv:2509.18970, "Agent Hallucination Survey") systematically analyzed the phenomenon of hallucinations being amplified through inter-agent interactions in multi-agent environments and classified the types of hallucinations. While this study reveals that hallucination propagation in multi-agent systems poses qualitatively different risks compared to single-agent hallucinations, it does not propose specific technical solutions at the memory storage level to prevent this.

[0004] Meanwhile, the study by Shanglin Wu and Kai Shu (TechRxiv:1367390, "MAS Memory Survey") comprehensively investigated the memory architecture of multi-agent systems and analyzed the knowledge transfer mechanism between agents via shared memory. While acknowledging that shared memory enhances collaboration efficiency, the study points out vulnerabilities where illusions or errors can be propagated to multiple agents through it, and confirms that memory-level governance technologies to address these issues are currently lacking.

[0005] Synthesizing the two studies mentioned above, while the risk of hallucinogenic propagation in multi-agent systems is academically recognized, there exists a technological gap as specific technologies to prevent hallucinogenic propagation at the memory storage level have not yet been presented.

[0006] Existing technologies for countering hallucinations primarily employ two approaches. First, there is a method of monitoring hallucinations at the message transmission layer between agents. The study by Yizhe Xie et al. (arXiv:2603.04474, "From Spark to Fire") describes a technique that constructs a genealogy graph at the message layer and tracks the propagation path of hallucinations by monitoring messages transmitted between agents in real time. However, since this technique focuses on real-time monitoring at the message layer, it cannot prevent data containing hallucinations from being retrieved and utilized by other agents once the agent has recorded that data in memory storage. In other words, there is a lack of countermeasures against the propagation path of hallucinations through memory storage.

[0007] Second, there is a post-hoc verification method for the generated output. The study by Dasha Metropolitansky and Jonathan Larson (arXiv:2505.21786, "VeriTrail") models the generation process of LLM as a Directed Acyclic Graph (DAG) and discloses a technique for post-hoc verification of the rationale for each inference step after generation is complete. While this technique is effective for post-hoc verification of the generation process of a single agent, it does not address scenarios where multiple agents in a multi-agent environment exchange data through a shared memory storage, nor does it provide a mechanism to preemptively block hallucinogenic data before it is stored in the memory storage.

[0008] The aforementioned existing technologies commonly lack consideration for preventing the propagation of hallucinogenic substances centered on memory storage. Message layer monitoring methods cannot respond to hallucinogenic data already recorded in memory storage, and post-verification methods cannot perform pre-emptive blocking before data is stored in memory storage. Furthermore, no technology has been presented to manage the quality of search results by distinguishing the reliability of data stored in memory storage. Prior art literature

[0009] Xixun Lin, Yucheng Ning, Jingwen Zhang et al., "Agent Hallucination Survey," arXiv:2509.18970, 2025.Shanglin Wu, Kai Shu, "MAS Memory Survey," TechRxiv:1367390, 2025.Yizhe Xie et al., "From Spark to Fire," arXiv:2603.04474, 2026. Dasha Metropolitansky, Jonathan Larson, "VeriTrail," arXiv:2505.21786, ICLR 2026. The problem to be solved

[0010] The present invention aims to prevent hallucinogenic data from being stored and propagated in a memory storage shared by multiple agents in a multi-agent system. Specifically, the present invention aims to provide a pre-blocking mechanism that calculates the semantic discrepancy with the original data by backtracking the source chain before storing data in the memory storage, and blocks or modifies the storage of data containing hallucinations based on the said discrepancy.

[0011] In addition, the present invention aims to enable an agent to preferentially utilize reliable data from a memory storage by assigning a reliability hierarchy based on the source chain length to data stored in a memory storage and utilizing said reliability hierarchy as a weight during search.

[0012] Furthermore, the present invention aims to simultaneously secure the accuracy of hallucination detection and the computational efficiency of the system by providing a two-stage verification structure that combines lightweight detection and precise verification. means of solving the problem

[0013] To solve the above problem, according to one embodiment of the present invention, a method for preventing hallucinogenic propagation in a multi-agent system comprising a memory storage shared by a plurality of agents is provided. The method comprises the steps of: receiving a request to store data regarding the memory storage from one of the plurality of agents; tracing back a source chain included in the requested data to identify the original data; calculating a semantic discrepancy between the requested data and the original data; and determining to store, modify, store, or discard the data based on the semantic discrepancy. The source chain represents the transmission path of one or more agents involved in the generation of the data, and the memory storage is a shared storage unit in which two or more of the plurality of agents can record and read data.

[0014] According to another embodiment of the present invention, the method for preventing hallucinogenic propagation includes a two-stage verification structure. The method includes the step of attaching a source chain to utterances generated by each of the plurality of agents; the step of a lightweight detection step of calculating the semantic discrepancy between the requested data for storage and the original data using a first metric; the step of performing a fine verification using a second metric when the semantic discrepancy exceeds a first threshold; and the step of determining the storage, modified storage, or disposal of the data based on the result of the fine verification.

[0015] According to another embodiment of the present invention, a memory storage search method is provided for each piece of data stored in a memory storage of a multi-agent system, wherein a reliability value is assigned based on the length of a source chain, and a weighted score is calculated by combining semantic similarity and a weight based on the reliability value for a search request to determine a search result.

[0016] According to another embodiment of the present invention, a hallucinogenic propagation prevention device is provided, comprising a processor and a memory for storing instructions executed by said processor, wherein said processor is configured to implement a memory storage, a source tracking module, a lifecycle management module, a verification module, and a search module. The source tracking module attaches a source chain to the utterance of an agent, the lifecycle management module traces back the source chain to identify original data, calculates semantic discrepancy, and assigns a confidence hierarchy, the verification module performs a precision verification based on the semantic discrepancy to determine whether to store, modify, store, or discard the data, and the search module performs a weighted search based on semantic similarity and a confidence hierarchy.

[0017] According to another embodiment of the present invention, a multi-agent hallucination propagation prevention system is provided, comprising a plurality of agent nodes, a memory storage server accessible to the plurality of agent nodes via a network, and a hallucination propagation prevention module implemented in the memory storage server.

[0018] According to another embodiment of the present invention, a non-transient computer-readable medium is provided that stores instructions that, when executed by a computer, cause the computer to receive a request to store data in a memory storage, identify original data through source chain backtracking, calculate a semantic discrepancy, and make a data processing decision based on said semantic discrepancy. Effects of the invention

[0019] According to the present invention, hallucinogenic data can be blocked in advance by calculating a semantic discrepancy based on source chain backtracking before data is stored in a memory storage in a multi-agent system, thereby preventing the propagation of hallucinogenic data through the memory storage. Accordingly, the path of hallucinogenic propagation via the memory storage, which could not be addressed by conventional message layer monitoring methods, can be blocked.

[0020] In addition, through a two-stage verification structure (lightweight detection and precision verification), instead of performing high-cost precision verification on all storage requests, precision verification is performed only on suspicious data after primary filtering by a lightweight metric, thereby reducing the computational cost of the system while maintaining the accuracy of hallucination detection. Specifically, according to the two-stage verification structure, the computation of the second metric is omitted for data determined to be below the first threshold value during the lightweight detection stage, so the computational cost is reduced compared to a configuration where the second metric is applied collectively to all storage requests, while maintaining the accuracy of hallucination detection.

[0021] In addition, the reliability of search results can be improved by assigning a reliability hierarchy based on source chain length and performing reliability-weighted search, thereby allowing the agent to prioritize the use of data with a short transmission path and closeness to the original when retrieving data from the memory store. Specifically, according to reliability-weighted search, data with a short source chain length and closeness to the original is returned first in the search results, so the reliability of the search results can be improved compared to a configuration that searches based only on semantic similarity.

[0022] In addition, by attaching and managing source chains that include transmission paths between agents, the source and transmission history of data stored in the memory repository can be tracked, thereby identifying the agent that generated the hallucinogenic data and providing feedback to support the system's self-correction.

[0023] Furthermore, the present invention is applicable to various multi-agent topologies such as chain topology, mesh topology, and star topology, and can operate even in environments where agent nodes and memory storage servers are distributed across a network, thus having a wide range of industrial applications. Brief explanation of the drawing

[0024] FIG. 1 is a block diagram showing the overall configuration of a multi-agent hallucinogenic propagation prevention system according to one embodiment of the present invention. FIG. 2 is a flowchart showing the overall flow of a method for preventing hallucinogenic propagation according to one embodiment of the present invention. FIG. 3 is a flowchart illustrating the source chain generation and attachment process according to one embodiment of the present invention. FIG. 4 is a flowchart illustrating a two-step verification process according to one embodiment of the present invention. FIG. 5 is a flowchart illustrating a reliability hierarchy assignment and weighted search process according to an embodiment of the present invention. FIG. 6 is a block diagram showing the data structure and metadata schema of a memory storage according to an embodiment of the present invention. FIG. 7 is a block diagram showing the agent placement by topology of a multi-agent system according to one embodiment of the present invention. Specific details for implementing the invention

[0025] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings. These embodiments are intended to aid in understanding the present invention, and the scope of the present invention is not limited to the following embodiments. Identical reference numerals are used for identical components, and redundant descriptions are omitted.

[0026] Terms used in this specification are defined as follows. "Memory storage" refers to a shared storage unit in which two or more of a plurality of agents can write and read data. "Source chain" refers to a metadata structure representing the transmission path of one or more agents involved in the generation of data. "Semantic discrepancy" refers to a numerical value quantifying the semantic difference between the data requested for storage and the original data. "Hallucination" refers to the phenomenon in which a Large Language Model (LLM) generates content that differs from the facts, and "hallucination propagation" refers to the phenomenon in which a hallucination generated by one agent is transmitted to and spreads to other agents within a multi-agent system.

[0027] [Example 1: Basic Example - AutoGen Mesh Topology, NLI-based 2-step Verification]

[0028] 1. Overall System Configuration

[0029] Referring to FIG. 1, a multi-agent hallucination propagation prevention system (1000) according to one embodiment of the present invention includes a plurality of agent nodes (100), a memory storage server (200), and a hallucination propagation prevention module (300).

[0030] Each of the multiple agent nodes (100) includes a computing device that executes a large-scale language model. In this embodiment, the multiple agent nodes (100) are configured in a mesh topology based on the Microsoft AutoGen framework. In the mesh topology, each agent node (100) can communicate directly with all other agent nodes (100), thereby allowing various transmission paths between agents to be formed. In this embodiment, a configuration is exemplified in which four agent nodes—a first agent node (110), a second agent node (120), a third agent node (130), and a fourth agent node (140)—are connected in a mesh topology.

[0031] The memory storage server (200) is a server accessible via a network by a plurality of agent nodes (100) and includes a shared storage unit (210). The shared storage unit (210) is a storage space in which two or more of the plurality of agent nodes (100) can write and read data. In this embodiment, the shared storage unit (210) includes a vector database (211) and a metadata storage unit (212). The vector database (211) stores an embedding vector for each of the stored data, and the metadata storage unit (212) stores metadata for the corresponding data.

[0032] The hallucinogenic propagation prevention module (300) is implemented in the memory storage server (200) and includes a source tracking module (310), a lifecycle management module (320), a verification module (330), and a search module (340). The detailed configuration and operation of each module are described below.

[0033] 2. Configuration and Operation of the Source Traceability Module

[0034] Referring to FIGS. 1 and FIGS. 3, the source tracking module (310) includes a speech classification unit (311) and a chain generation unit (312).

[0035] The utterance classification unit (311) receives utterances generated by each of the multiple agent nodes (100) and classifies the utterer type of each utterance. The utterer types are divided into three categories: user original, agent generated, and agent reprocessed. "User original" is an utterance corresponding to data directly entered by the user. "Agent generated" is an utterance newly generated by the agent through a large-scale language model. "Agent reprocessed" is an utterance generated by the agent by reading existing data from a memory storage and reprocessing it.

[0036] In this embodiment, the utterance classification unit (311) determines the type of speaker by parsing the metadata field included in the utterance. Specifically, if the receiving path of the utterance is a user interface, it is classified as a user original; if there is a memory storage read history, it is classified as an agent reprocessing; and otherwise, it is classified as an agent creation.

[0037] The chain generation unit (312) generates and attaches a source chain based on the utterance type classified by the utterance classification unit (311). The method of generating the source chain varies as follows depending on the utterance type.

[0038] In the case of a user original utterance, the chain generation unit (312) sets the first node of the source chain as the user identifier and sets the source chain length to 1. In this case, the reference identifier for the original data is set to be the same as the identifier of the utterance itself.

[0039] In the case of an agent-generated utterance, the chain generation unit (312) sets the first node of the source chain as the identifier of the agent and sets the source chain length to 1. The reference identifier for the original data is set to be the same as the identifier of the utterance itself.

[0040] In the case of an agent reprocessing utterance, the chain generation unit (312) inherits the source chain of the existing data and sequentially adds the identifier of the agent that performed the reprocessing to the source chain. The source chain length is updated to a value obtained by adding 1 to the source chain length of the existing data. The reference identifier for the original data retains the original reference identifier of the existing data.

[0041] In this embodiment, the data structure of the source chain is configured in a JSON (JavaScript Object Notation) format including the following fields.

[0042] {

[0043] "source_chain": {

[0044] "originator_id": "user_001",

[0045] "path": ["user_001", "agent_A", "agent_B"],

[0046] "origin_ref": "mem_00042",

[0047] "chain_length": 3

[0048] }

[0049] }

[0050] In the above data structure, "originator_id" represents the speaker identifier, "path" is an ordered array of agent identifiers representing the transmission path between agents, "origin_ref" represents the reference identifier for the original data, and "chain_length" represents the length of the origin chain.

[0051] Referring to FIG. 3, the process of creating and attaching source chains is performed as follows. First, an utterance is received from an agent node (100) (S310). An utterance classification unit (311) determines the utterer type of the utterance (S320). If the determined utterer type is user original or agent creation, a chain creation unit (312) creates and attaches a new source chain (S330). If the determined utterer type is agent reprocessing, a chain creation unit (312) inherits the existing source chain and adds the identifier of the reprocessing agent to attach an updated source chain (S340). The utterance with the attached source chain is passed to a subsequent processing step (S350).

[0052] 3. Configuration and Operation of the Lifecycle Management Module

[0053] Referring to FIGS. 1 and FIGS. 2, the lifecycle management module (320) includes a source axis comparison unit (321) and a reliability hierarchy management unit (322).

[0054] The lifecycle management module (320) receives a data storage request for the memory storage from the agent node (100) (S100). When the storage request is received, the lifecycle management module (320) traces back the source chain attached to the requested data to identify the original data (S200). Specifically, the original data is retrieved from the shared storage unit (210) of the memory storage or the local storage of the agent node (100) using the original data reference identifier (origin_ref) included in the source chain. If the source chain length is 1, the original identification step is processed as self-referencing because the data itself is the original data.

[0055] The source axis comparison unit (321) calculates the semantic discrepancy between the data requested for storage and the identified original data (S300). In this embodiment, the source axis comparison unit (321) calculates the semantic discrepancy using a first metric, and this operation is performed in cooperation with the lightweight detection unit (331) of the verification module (330) described later. Specifically, when the source axis comparison unit (321) calculates the discrepancy value based on the similarity between embedding vectors, the lightweight detection unit (331) compares the calculated discrepancy value with a first threshold value to determine whether a precision verification trigger is present. That is, the source axis comparison unit (321) is responsible for calculating the discrepancy, and the lightweight detection unit (331) is responsible for making a threshold-based determination regarding the calculated discrepancy.

[0056] In this embodiment, the first metric is defined as the value obtained by subtracting the cosine similarity between the embedding vectors of the requested data and the original data, respectively, from 1. That is, the semantic disparity is calculated as = 1 - cosine_similarity(embedding(requested data), embedding(original data)). The embedding vector is generated through an embedding model executed on the memory storage server (200).

[0057] The reliability layer management unit (322) assigns a reliability layer to each piece of data stored in the memory storage based on the source chain length of the data. A higher reliability layer is assigned when the source chain length is shorter. In this embodiment, the reliability layer is divided into three stages. When the source chain length is 1, a first reliability layer (highest reliability) is assigned; when the source chain length is 2, a second reliability layer is assigned; and when the source chain length is 3 or more, a third reliability layer (lowest reliability) is assigned. In this embodiment, the reliability values ​​corresponding to each reliability layer are set as: first reliability layer = 1.0, second reliability layer = 0.7, and third reliability layer = 0.4.

[0058] 4. Configuration and Operation of the Verification Module

[0059] Referring to FIGS. 1 and FIGS. 4, the verification module (330) includes a lightweight detection unit (331) and a precision verification unit (332).

[0060] The lightweight detection unit (331) compares the semantic discrepancy calculated by the source axis comparison unit (321) with the first threshold value (S400). In this embodiment, the first threshold value is determined based on the point where the F1 score is maximum on the precision-recall curve for the first metric. Specifically, the precision and recall of the first metric are calculated for the pre-collected hallucinogenic dataset and normal dataset, and the discrepancy value at which F1 = 2 × (precision × recall) / (precision + recall) is maximum is set as the first threshold value. The specific numerical value of the first threshold value may vary depending on the characteristics of the embedding model and dataset used, and the optimal value is determined through precision-recall curve analysis.

[0061] If the semantic discrepancy is below the first threshold, the data is determined to have a low risk of hallucination and is stored in the memory storage (S500). In this case, the lifecycle state is set to "active".

[0062] If the semantic discrepancy exceeds the first threshold, the precision verification unit (332) performs precision verification using the second metric (S600). In this embodiment, the second metric uses a Natural Language Inference (NLI)-based entailment score. Specifically, the precision verification unit (332) inputs the original data as the premise and the data requested for storage as the hypothesis into the NLI model, and calculates the probability distribution for three classes: entailment, neutral, and contradiction. The entailment score is defined as the probability value of the entailment class. In this embodiment, the NLI model uses a pre-trained transformer-based model.

[0063] The precision verification unit (332) determines the processing of the requested data based on the NLI-based implication score (S700). In this embodiment, the second threshold is set to 0.7, and the predetermined reference value for the contradiction probability is set to 0.5. The processing decision criteria are as follows.

[0064] If the implication score is greater than or equal to the second threshold (0.7), the data is determined to be semantically consistent with the original data and storage is decided. In this case, the lifecycle state is set to "active".

[0065] If the implication score is less than the second threshold (0.7) and the contradiction probability is less than the predetermined threshold value (0.5), the data is determined to be partially modified and a modified save is decided. When a modified save is made, the semantic discrepancy and the reason for the modification are recorded as metadata. In this case, the lifecycle status is set to "modified".

[0066] If the implication score is less than the second threshold (0.7) and the contradiction probability is greater than or equal to a predetermined threshold value (0.5), the data is determined to be hallucinogenic and decided to be discarded. In this case, the data is not stored in the shared storage unit (210) of the memory storage. However, records of the discarded data are separately stored in the discard log storage unit (213) of the memory storage server (200). The discard log storage unit (213) records the identifier of the discarded data, the reason for discarding, the degree of semantic discrepancy, the source chain, and the timestamp of the time of discarding, which can be used for post-audits by system operators and hallucination pattern analysis. The lifecycle status of the discarded data is recorded as "discarded" in the discard log storage unit (213).

[0067] Additionally, if disposal is decided, the verification module (330) transmits feedback including the reason for disposal and the degree of semantic discrepancy to the agent node (100) that requested storage (S710). The feedback can be used as reference information to reduce the possibility of hallucination when the agent node (100) generates subsequent utterances.

[0068] Meanwhile, in this embodiment, a natural language inference-based implication score is used as the second metric, but the second metric is not limited thereto. For example, a large-scale language model-based judgment score (LLM-as-Judge) may be used as the second metric. The large-scale language model-based judgment score is a method in which the original data and the data requested for storage are input together into a large-scale language model, and the factual consistency between the two data is judged as a score between 0 and 1. A specific implementation using the large-scale language model-based judgment score as the second metric is described in detail in Embodiment 2 below.

[0069] According to the two-stage verification structure of the present embodiment, by pre-filtering data with a low risk of hallucination in the lightweight detection stage and precisely identifying data with a potential for hallucination in the precise verification stage, the propagation of hallucination through memory storage in a mesh topology environment can be effectively blocked.

[0070] 5. Configuration and Operation of the Search Module

[0071] Referring to FIGS. 1 and FIGS. 5, the search module (340) receives a search request for a memory storage and performs a weighted search based on a confidence level.

[0072] When the search module (340) receives a search request from the agent node (100), it calculates a weighted score for each piece of data stored in the shared storage unit (210) of the memory storage. The weighted score is calculated as the sum of the value obtained by multiplying the semantic similarity by a first weighting coefficient (α) and the value obtained by multiplying the trust value by a second weighting coefficient (β). That is, the weighted score is calculated as = α × semantic_similarity + β × trust_value. In this embodiment, the first weighting coefficient (α) is set to 0.6 and the second weighting coefficient (β) is set to 0.4. Semantic similarity is calculated as the cosine similarity between the search query and the embedding vector of each piece of stored data.

[0073] The search module (340) sorts the data in order of highest calculated weighted scores and returns the top K data as search results. In this embodiment, K is set to 5. Additionally, the search results are constrained so that data belonging to the first confidence level is included at a predetermined ratio or higher. In this embodiment, the predetermined ratio is set to 20% or more of the top K data. That is, when K=5, at least one piece of data belonging to the first confidence level must be included. If the above constraint is not satisfied, the search module (340) replaces the data with the lowest weighted score among the data that is not in the first confidence level in the order of weighted scores with the data with the highest weighted score among the first confidence level data.

[0074] According to the weighted search of the present embodiment, compared to the case where the search is based solely on semantic similarity, high-reliability data with a short source chain length is placed at the top of the search results by reflecting reliability weights, and the reliability distribution of the search results can be improved by the constraint of including at least a predetermined proportion of data from the first reliability layer.

[0075] 6. Data Structure of Memory Storage

[0076] Referring to FIG. 6, the shared storage unit (210) of the memory storage includes a vector database (211), a metadata storage unit (212), and a discard log storage unit (213). In this embodiment, the vector database (211) is implemented using ChromaDB.

[0077] The vector database (211) stores embedding vectors for each of the stored data. The embedding vectors are generated by mapping the text content of the data into a high-dimensional vector space through a pre-trained embedding model.

[0078] The metadata storage unit (212) stores metadata for each of the stored data. The metadata includes the following fields.

[0079] The originator_id represents the identification information of the originator who first generated the data. The source_chain is an ordered array representing the transmission path between agents leading to the creation of the data. The source_chain_length is an integer value representing the number of nodes included in the source_chain. The trust_tier represents the trust level assigned based on the source_chain_length. The timestamp (created_at) indicates the time when the data was stored in memory. The lifecycle_state indicates the current state of the data and has a value of either "active" or "modified". The semantic divergence (divergence_score) represents the divergence score from the original data calculated at the time of storage.

[0080] The discard log storage unit (213) stores records of data that has been decided to be discarded. The discard log includes the identifier of the discarded data, the reason for discarding, the semantic discrepancy, the source chain, the timestamp at the time of discarding, and the lifecycle status ("discarded").

[0081] In this embodiment, the specific schema of the metadata is implemented in the following JSON format.

[0082] {

[0083] "memory_id": "mem_00128",

[0084] "content": "Market analysis results summarized by Agent B...",

[0085] "embedding": [0.123, -0.456, ...],

[0086] "metadata": {

[0087] "originator_id": "user_001",

[0088] "source_chain": ["user_001", "agent_A", "agent_B"],

[0089] "chain_length": 3,

[0090] "trust_tier": 3,

[0091] "created_at": "2026-03-15T10:30:00Z",

[0092] "lifecycle_state": "active",

[0093] "divergence_score": 0.18,

[0094] "origin_ref": "mem_00042"

[0095] }

[0096] }

[0097] 7. Examples of behavior in mesh topology

[0098] Referring to FIG. 7, in this embodiment, the multi-agent system is configured with a mesh topology. The first agent node (110), the second agent node (120), the third agent node (130), and the fourth agent node (140) each have a direct communication path with all other agent nodes. The memory storage server (200) is accessible to all agent nodes (110, 120, 130, 140) via a network.

[0099] An example of an action to prevent hallucination propagation in a mesh topology is as follows. A user inputs a request to the first agent node (110) saying, "Analyze recent AI semiconductor market trends." The first agent node (110) generates a response through a large-scale language model, and the source tracking module (310) classifies the speaker type for this utterance as "User Original" and attaches a source chain with a source chain length of 1. The analysis result generated by the first agent node (110) is requested to be stored in a memory storage, and since the source chain length is 1, the discrepancy with the original data itself is calculated as 0, and storage is decided. A first confidence layer is assigned.

[0100] Subsequently, the second agent node (120) reads the stored analysis results from the memory storage and reprocesses them. For example, when the second agent node (120) summarizes the analysis results to generate new data, the source tracking module (310) classifies the utterer type for this utterance as "agent reprocessing" and adds the identifier of the second agent node (120) to the existing source chain to attach an updated source chain with a source chain length of 2.

[0101] When a request is made to store the reprocessed data of the second agent node (120) in the memory storage, the lifecycle management module (320) traces back the source chain to identify the original data (the original analysis result of the first agent node (110)). The source axis comparison unit (321) calculates the semantic discrepancy between the reprocessed data and the original data as a first metric (based on cosine similarity).

[0102] If the calculated semantic discrepancy is below the first threshold, the data is stored. If the semantic discrepancy exceeds the first threshold, the precision verification unit (332) calculates an NLI-based implication score and determines whether to store, modify, store, or discard.

[0103] Furthermore, when the third agent node (130) reads the reprocessed data of the second agent node (120) again and reprocesses it further, the source chain length becomes 3, and a third reliability layer is assigned. As such, as the transmission path between agents in the mesh topology becomes longer, the source chain length increases and the reliability layer decreases, and the probability of triggering the precise verification step of the 2-stage verification increases. Through this, hallucinogenic propagation that may occur during the multi-stage transmission process is blocked in advance at the time of storage in the memory storage.

[0104] In this embodiment, as the source chain length increases, the semantic discrepancy with the original data tends to increase, and accordingly, the rate at which a first threshold is exceeded during the lightweight detection stage to trigger precise verification increases. Through this, hallucinations accumulated during the multi-stage transmission process can be effectively blocked at the point of storage in the memory repository.

[0105] 8. Summary of the overall flow of methods to prevent the spread of hallucinogens

[0106] Referring to FIG. 2, the overall flow of the hallucinogenic propagation prevention method according to the present embodiment is summarized as follows.

[0107] A request to store data in a memory storage is received from an agent node (100) (S100). The source chain attached to the requested data is traced back to identify the original data (S200). The semantic discrepancy between the requested data and the original data is calculated using a first metric (S300). The calculated semantic discrepancy is compared with a first threshold (S400). If the semantic discrepancy is less than or equal to the first threshold, storage is decided and the data is stored in the memory storage (S500). If the semantic discrepancy exceeds the first threshold, a fine verification is performed using a second metric (NLI-based implication score) (S600). Based on the result of the fine verification, storage, modified storage, or disposal is decided (S700). If disposal is decided, feedback is sent to the agent node that made the storage request (S710).

[0108] In the above overall flow, the creation and attachment of the source chain (see FIG. 3) is performed at the time of utterance exchange between agent nodes (100) prior to S100, and the assignment of the confidence hierarchy and weighted search (see FIG. 5) is performed at the time of the search request after storage is completed at S500.

[0109] To verify the effects of the present invention, the following experiments may be performed.

[0110] 1. Experimental Environment

[0111] Experiments are performed for each of the multiple topologies (mesh, chain, star). The number of agent nodes is varied from 3 to 8, and each agent node runs a large-scale language model. The memory storage consists of a shared storage based on a vector database. The experimental dataset is composed of a mixture of hallucinogenic data and normal data in a predetermined ratio, and data with a source chain length ranging from 1 to 5 is generated by simulating multi-stage delivery between agents.

[0112] 2. Independent variable

[0113] The independent variables include: (i) source chain length, (ii) combination of the first metric and the second metric (cosine similarity + NLI, cosine similarity + LLM-as-Judge), (iii) range of the first threshold, (iv) topology type, and (v) number of agent nodes.

[0114] 3. Dependent variable

[0115] The dependent variables include: (i) hallucination propagation blocking rate, (ii) hallucination detection precision, (iii) hallucination detection recall, (iv) F1 score, (v) false positive rate, (vi) processing latency per save request, and (vii) reduction in computational cost of the two-stage validation structure (compared to a configuration that applies the second metric in batches to all save requests).

[0116] 4. Comparison Conditions

[0117] Each experiment compares the following conditions: (i) no hallucination propagation prevention module applied (baseline), (ii) first metric applied alone, (iii) two-stage verification structure applied. For confidence-weighted search, (iv) semantic similarity search alone and (v) confidence-weighted search are compared.

[0118] (Example 2: Metric Variation - Cosine Similarity + LLM-as-Judge)

[0119] Hereinafter, with reference to FIGS. 1 to 7, a modified embodiment is described in which cosine similarity is used as the first metric and a large-scale language model-based judgment score (LLM-as-Judge) is used as the second metric. This embodiment shares the same system configuration (Fig. 1), data structure (Fig. 6), and source chain generation flow (Fig. 3) as Embodiment 1, and the metric is modified in the verification pipeline after the calculation of semantic discrepancy (S300). Therefore, configurations that overlap with Embodiment 1 are described briefly focusing on the differences, while configurations that are modified are described in detail.

[0120] 1. System Configuration and Common Elements

[0121] The multi-agent hallucination propagation prevention system (1000) of the present embodiment has the same configuration as in Embodiment 1. That is, it includes a plurality of agent nodes (100), a memory storage server (200), and a hallucination propagation prevention module (300). The memory storage server (200) includes a vector database (211), a metadata storage unit (212), and a discard log storage unit (213) within a shared storage unit (210). The hallucination propagation prevention module (300) includes a source tracking module (310), a lifecycle management module (320), a verification module (330), and a search module (340).

[0122] In this embodiment, the topology of the agent node (100), the operation of the utterance classification unit (311) and chain generation unit (312) of the source tracking module (310), the operation of the source axis comparison unit (321) and reliability hierarchy management unit (322) of the lifecycle management module (320), and the operation of the search module (340) are the same as described in Embodiment 1. The configuration that is modified in this embodiment is the first metric used by the lightweight detection unit (331) of the verification module (330) and the second metric used by the precision verification unit (332).

[0123] 2. First Metric Variation: Cosine Similarity-Based Lightweight Detection

[0124] In Example 1, the lightweight detection unit (331) used a cosine similarity-based semantic discrepancy as the first metric, and the precision verification unit (332) used a natural language inference (NLI)-based implication score as the second metric. In this embodiment, the lightweight detection unit (331) uses cosine similarity as the first metric. This corresponds to the semantic discrepancy "calculated based on similarity between embedding vectors" of claim 7.

[0125] Specifically, in the step of calculating semantic discrepancy (S300), the source axis comparison unit (321) generates an embedding vector for each of the requested data and the original data. The embedding vector may be generated using a pre-trained embedding model, and as an example, a sentence-level embedding model (such as Sentence-BERT) may be used. The source axis comparison unit (321) calculates the embedding vector of the requested data as e_req and the embedding vector of the original data as e_orig.

[0126] The lightweight detection unit (331) receives the two embedding vectors from the source axis comparison unit (321) and calculates the cosine similarity according to the following formula.

[0127] cosine_similarity = (e_req · e_orig) / (||e_req|| × ||e_orig||)

[0128] Here, (e_req · e_orig) is the inner product of the two vectors, and ||e_req|| and ||e_orig|| are the respective L2 norms.

[0129] The lightweight detection unit (331) converts the cosine similarity into a semantic discrepancy. Specifically, the semantic discrepancy is calculated as follows.

[0130] divergence_score = 1 - cosine_similarity

[0131] The above semantic discrepancy has a value between 0 and 2, and the larger the value, the greater the semantic difference between the requested data and the original data. When the cosine similarity is 1 (the two vectors are in the same direction), the semantic discrepancy is 0, and when the cosine similarity is -1 (the two vectors are in opposite directions), the semantic discrepancy is 2.

[0132] Cosine similarity-based lightweight detection has the advantage of lower computational cost compared to the NLI-based implication score of Example 1. While the NLI model requires a separate Transformer forward pass for inference, cosine similarity is calculated using only vector dot product and norm operations when the embedding vector is already generated, making it advantageous in environments requiring real-time processing.

[0133] 3. Threshold Comparison (S400)

[0134] The lightweight detection unit (331) compares the calculated semantic divergence with a first threshold value (S400). The first threshold value may be determined based on the point where the F1 score is maximum on the precision-recall curve for the verification dataset, as described in Example 1 (corresponding to Claim 12). As an example, the first threshold value for the cosine similarity-based semantic divergence may be set to 0.3. That is, if the divergence_score exceeds 0.3 (if the cosine similarity is less than 0.7), the lightweight detection unit (331) determines that the data has the potential for hallucinogenic propagation and requests precision verification from the precision verification unit (332).

[0135] If the above semantic discrepancy is below the first threshold, the lightweight detection unit (331) determines the data as normal and proceeds to a storage decision (S500). In this case, since precise verification by the second metric is not performed, computational resources are saved.

[0136] 4. Second Metric Variation: LLM-as-Judge Based Precision Verification

[0137] In Example 1, the precision verification unit (332) used a natural language inference (NLI) based implication score as the second metric. In this embodiment, the precision verification unit (332) uses a large-scale language model-based judgment score (LLM-as-Judge) as the second metric. This corresponds to the "large-scale language model-based judgment score" of claim 13.

[0138] In the precision verification (S600) step, the precision verification unit (332) provides the data requested for storage and the original data as input to the large-scale language model (LLM) and requests a determination of semantic consistency. Specifically, the precision verification unit (332) constructs a prompt that includes the following elements.

[0139] First, present the text content of the original data. Second, present the text content of the data requested for storage. Third, present a task description that instructs the evaluation of semantic consistency between the two texts. Fourth, specify the output format of the judgment result.

[0140] From the response of the large-scale language model to the above prompt, the precision verification unit (332) extracts an LLM-based judgment score. The judgment score is normalized to a continuous value between 0 and 1, and a higher value indicates a higher degree of semantic consistency between the two texts. The precision verification unit (332) can convert the judgment score into a precision verification-based semantic discrepancy, which is calculated as follows, for example.

[0141] refined_divergence = 1 - judge_score

[0142] Here, judge_score is the judgment score output by a large-scale language model.

[0143] Precise verification based on LLM-as-Judge has the advantage of enabling multidimensional consistency evaluation that considers context, rather than being limited to predefined natural language inference labels (implication / contradiction / neutrality). For example, if requested data adds new information while partially preserving the content of the original data, a natural language inference model might classify it as "neutral," whereas a large-scale language model can evaluate the factual consistency of the added information to produce a more precise judgment score.

[0144] However, since precision verification based on LLM-as-Judge requires inference calls to a large-scale language model, the computational cost is higher compared to lightweight detection. For this reason, the present embodiment adopts a two-stage verification structure corresponding to claim 8, and performs precision verification using a second metric (LLM-as-Judge) only on data that exceeds a first threshold in lightweight detection using a first metric (cosine similarity). By doing so, it is possible to perform high-precision verification on data with potential for hallucination while preventing large-scale language model calls from occurring for all storage requests.

[0145] 5. Processing Decision (S700)

[0146] Based on the refined_divergence based on the precise verification calculated by the precise verification unit (332), the verification module (330) determines the processing of the requested data for storage (S700). The criteria for determining processing are applied in the same way as described in Example 1, and specifically as follows.

[0147] Based on a second threshold (e.g., 0.7), storage is determined if the semantic discrepancy based on precision verification is less than the second threshold. If the semantic discrepancy based on precision verification is greater than or equal to the second threshold but less than a predetermined threshold value (e.g., 0.5), storage with modification is determined because the LLM-based judgment score indicates partial consistency. When storage with modification is determined, the semantic discrepancy, the LLM-based judgment score, and the reason for modification are recorded as metadata in the data and stored in a memory storage (corresponding to Claim 14). If the semantic discrepancy based on precision verification is greater than or equal to the predetermined threshold value, disposal is determined.

[0148] When disposal is decided, the disposal record is stored in the disposal log storage unit (213) as described in Example 1, and feedback including the reason for disposal and the degree of semantic discrepancy is transmitted to the agent who requested the storage (S710, corresponding to Claim 15).

[0149] 6. Comparison with Example 1

[0150] The results of the performance comparison between the metric combination of this embodiment (first metric: cosine similarity, second metric: LLM-as-Judge) and the metric combination of Example 1 (first metric: NLI implication score, second metric: NLI implication score) are as follows.

[0151] The metric combination of the present embodiment (first metric: cosine similarity, second metric: LLM-as-Judge) calculates semantic discrepancy using only vector dot product operations in the lightweight detection stage, thereby lowering the computational cost of the first metric, and enables multidimensional consistency evaluation by utilizing context-based judgments of large-scale language models in the precision verification stage. Through this heterogeneous metric combination, a balance between lightweightness and precision can be achieved.

[0152] The metric combination of the present embodiment reduces the computational cost of the first metric by using cosine similarity in the lightweight detection stage and enables context-based multidimensional consistency evaluation by using LLM-as-Judge in the precision verification stage. This heterogeneous metric combination specifically supports the technical significance of the two-stage verification structure of claim 8 in that it achieves a balance of lightweightness and precision through the separation of roles between the first metric and the second metric.

[0153] Furthermore, this embodiment supports the description of "one or more of a natural language inference-based implication score and a large language model-based decision score" of claim 13 by demonstrating that a large language model-based decision score can be applied as a second metric in addition to a natural language inference-based implication score.

[0154] <Example 3 - Architecture Variations: MetaGPT Chain Topology and LangGraph Star Topology>

[0155] The following describes modified embodiments in which the method and apparatus for preventing hallucination propagation of the present invention are applied to different multi-agent topologies. Although Example 1 was described based on a mesh topology based on the AutoGen framework, the present invention is not limited to a specific topology, and the same hallucination propagation prevention pipeline can be applied to various agent communication structures, such as chain topology and star topology (see Claim 10). In this embodiment, implementations in a chain topology based on the MetaGPT framework and a star topology based on the LangGraph framework are described, respectively.

[0156] The drawing symbols, step numbers, and module names used in this embodiment are the same as those defined in Example 1. Refer to FIGS. 1 through 7 together.

[0157] 1. Integration of a middleware-based hallucination propagation prevention module

[0158] The hallucination propagation prevention module (300) of the present invention is not dependent on the internal implementation of a specific multi-agent framework and is deployed as middleware in the storage request path for the shared storage unit (210) of the memory storage server (200). Specifically, the hallucination propagation prevention module (300) is located on the data storage path between the agent node (100) and the shared storage unit (210) and wraps the memory storage interface provided by the framework.

[0159] According to this middleware method, the agent node (100) uses the memory storage access interface of the existing framework as is, without needing to recognize the existence of the hallucination propagation prevention module (300). The hallucination propagation prevention module (300) intercepts the storage request and executes a pipeline of source chain backtracking (S200), semantic discrepancy calculation (S300), threshold comparison (S400), and processing decision (S500, S600, S700), and then performs actual storage on the shared storage unit (210) or discards it depending on the result.

[0160] The specific application modes in each topology are described below.

[0161] 2. Application in MetaGPT Chain Topology

[0162] 2-1. Topology Structure and Data Flow

[0163] In the MetaGPT framework, multiple agent nodes (100) are configured in a chain topology. Referring to FIG. 7, in the chain topology, the first agent node (110), the second agent node (120), the third agent node (130), and the fourth agent node (140) form a sequential pipeline. Each agent node receives the output of the previous agent node as input, processes it, and then passes it to the next agent node.

[0164] In the chain topology of MetaGPT, data flow is unidirectional sequential delivery. For example, when a first agent node (110) receives an original request from a user, it processes it and delivers it to a second agent node (120), and the second agent node (120) reprocesses the received data and delivers it to a third agent node (130), and this process is repeated until the last agent node of the pipeline.

[0165] 2-2. Propagation Path of the Source Chain

[0166] In the chain topology, the transmission path of the source chain is linear and predictable. The utterance classification unit (311) of the source tracking module (310) receives utterances generated by each agent node (100) (S310) and determines the utterer type (S320). In the chain topology, when the first agent node (110) receives user input and initially stores it in the shared storage unit (210) of the memory storage server (200), the utterer type is classified as "user source".

[0167] The chain generation unit (312) generates a source chain based on the classified speaker type (S330). The source chain of the original data generated by the first agent node (110) is as follows.

[0168] {

[0169] "origin_agent": "Agent_110",

[0170] "path": ["Agent_110"],

[0171] "origin_ref": "mem_001",

[0172] "chain_length": 1

[0173] }

[0174] When the second agent node (120) reads the original data from the shared storage unit (210) and reprocesses it, the chain generation unit (312) updates the source chain by adding the identifier of the second agent node (120) to the existing source chain (S340, see claim 4). The updated source chain is as follows.

[0175] {

[0176] "origin_agent": "Agent_110",

[0177] "path": ["Agent_110", "Agent_120"],

[0178] "origin_ref": "mem_001",

[0179] "chain_length": 2

[0180] }

[0181] Due to the nature of the chain topology, the path array of the source chain always represents a linear order identical to the order of the pipeline. This contrasts with the mesh topology, where the path array can branch non-linearly. Therefore, in the chain topology, the source chain length (chain_length) directly indicates which agent in the pipeline requested the data to be stored in the shared storage unit (210).

[0182] 2-3. Application of Hallucinogen Transmission Prevention Pipelines

[0183] In the chain topology, the hallucination propagation prevention module (300) acts as middleware when each agent node (100) attempts to store data in the shared storage unit (210). Specifically, it is as follows.

[0184] Reception of storage request (S100): When the third agent node (130) issues a storage request to the shared storage unit (210) for data processed from the output of the second agent node (120), the hallucinogenic propagation prevention module (300) intercepts the request.

[0185] Original data identification (S200): The lifecycle management module (320) identifies the original data in the shared storage unit (210) by referring to the origin_ref("mem_001") of the source chain attached to the data requested for storage. In the chain topology, since the path array of the source chain is linear, the identification of the original data is completed with a single reference lookup.

[0186] Calculation of semantic discrepancy (S300): The source axis comparison unit (321) calculates the semantic discrepancy based on the similarity between the embedding vectors of the requested data and the original data (see claims 7 and 22). In the chain topology, data with a source chain length of 3 (path = ["Agent_110", "Agent_120", "Agent_130"]) has undergone two reprocessing steps, so the semantic discrepancy relative to the original is likely to be greater than that of data with a source chain length of 1.

[0187] Threshold comparison and verification (S400, S600): The lightweight detection unit (331) compares the calculated semantic discrepancy with the first threshold (S400). If it exceeds the first threshold, the precision verification unit (332) performs precision verification using the second metric (S600, see claim 23).

[0188] Processing Decision (S500, S700): Based on the results of the detailed verification, storage (S500), modified storage, or disposal (S700) is determined. If disposal is determined, the source chain of the disposed data, the semantic discrepancy, and the reason for disposal are recorded in the disposal log storage unit (213), and feedback is transmitted to the corresponding agent node (e.g., the third agent node (130)) (S710, see Clause 15). In the chain topology, the disposal feedback has the effect of preventing subsequent agents in the pipeline from performing additional processing based on the contaminated data.

[0189] 2-4. Confidence Hierarchies and Weighted Search

[0190] The reliability layer management unit (322) assigns a reliability layer to each piece of data stored in the shared storage unit (210) based on the source chain length (see claim 22). Since the source chain length in the chain topology corresponds directly to the position on the pipeline, data stored in the initial stage of the pipeline (e.g., the first agent node (110)) is assigned a first reliability layer (reliability value 1.0), data stored in the mid-stage (e.g., the second agent node (120)) is assigned a second reliability layer (reliability value 0.7), and data stored in the late stage (e.g., the third agent node (130) and later) is assigned a third reliability layer (reliability value 0.4).

[0191] The search module (340) calculates a weighted score based on semantic similarity and confidence values ​​for a search request (see claim 6). In a chain topology environment, weighted search provides the effect that highly reliable data generated in the early stages of the pipeline is prioritized in search results over data that has been reprocessed multiple times in later stages.

[0192] 2-5. Device Module Configuration

[0193] In this embodiment, the hallucinogenic propagation prevention device (see claim 20) is implemented within the memory storage server (200). The module configuration is the same as in Embodiment 1. The source tracking module (310) includes a speech classification unit (311) and a chain generation unit (312) (see claim 21), the lifecycle management module (320) includes a source axis comparison unit (321) and a reliability hierarchy management unit (322) (see claim 22), and the verification module (330) includes a lightweight detection unit (331) and a precision verification unit (332) (see claim 23). A shared storage unit (210) includes a vector database (211), a metadata storage unit (212), and a discard log storage unit (213), and the vector database (211) stores embedding vectors and metadata for each of the stored data, said metadata including a speaker identifier, source chain, source chain length, confidence level, timestamp, lifecycle state, and semantic discrepancy (see claim 24).

[0194] However, in the MetaGPT chain topology, the hallucination propagation prevention module (300) is deployed as middleware that wraps the memory access interface of the MetaGPT framework (e.g., the add method of the Memory class). That is, when each agent node (100) attempts to store data in the shared storage (210) through a call to MetaGPT's Memory.add(), the hallucination propagation prevention module (300) intercepts the call and executes the pipeline.

[0195] 3. Application of LangGraph in Star Topology

[0196] 3-1. Topology Structure and Data Flow

[0197] In the LangGraph framework, multiple agent nodes (100) can be configured in a star topology. Referring to FIG. 7, in the star topology, one agent node acts as a hub, and the remaining agent nodes act as spokes. In this embodiment, the first agent node (110) acts as a hub, and the second agent node (120), the third agent node (130), and the fourth agent node (140) act as spokes.

[0198] In a star topology, data flow is centralized and passes through a hub. Spoke agent nodes do not communicate directly with each other, but exchange data through a hub agent node (110). For example, for a third agent node (130) to utilize data generated by a second agent node (120), it is transmitted via the first agent node (110), which is the hub.

[0199] 3-2. Propagation Path of the Source Chain

[0200] In a star topology, the transmission path of the source chain is formed radially around a hub. The utterance classification unit (311) of the source tracking module (310) receives utterances generated by each agent node (100) (S310) and determines the utterer type (S320).

[0201] When a spoke agent node (e.g., a second agent node (120)) receives user input and initially stores it in the shared storage (210) of the memory storage server (200), the source chain is as follows.

[0202] {

[0203] "origin_agent": "Agent_120",

[0204] "path": ["Agent_120"],

[0205] "origin_ref": "mem_010",

[0206] "chain_length": 1

[0207] }

[0208] Afterwards, when the hub agent node (110) reads the data from the shared storage unit (210), reprocesses it, and saves it again, the chain generation unit (312) updates the source chain as follows (S340).

[0209] {

[0210] "origin_agent": "Agent_120",

[0211] "path": ["Agent_120", "Agent_110"],

[0212] "origin_ref": "mem_010",

[0213] "chain_length": 2

[0214] }

[0215] Furthermore, when the hub agent node (110) transmits the reprocessed data to the third agent node (130), and the third agent node (130) reprocesses it again and requests storage in the shared storage unit (210), the source chain is updated as follows.

[0216] {

[0217] "origin_agent": "Agent_120",

[0218] "path": ["Agent_120", "Agent_110", "Agent_130"],

[0219] "origin_ref": "mem_010",

[0220] "chain_length": 3

[0221] }

[0222] Due to the characteristics of the star topology, the hub agent node (110) appears frequently in the path array of the source chain. This contrasts with the fact that in the mesh topology, all agent nodes appear with equal frequency, and in the chain topology, the path corresponds to the pipeline order. In the star topology, the source chain length reflects the number of transmissions through the hub, and since communication between spokes always passes through the hub, the source chain length can be longer than in the chain topology even at the same logical transmission stage.

[0223] 3-3. Application of Hallucinogen Transmission Prevention Pipelines

[0224] In a star topology, the hallucination propagation prevention module (300) is placed as middleware on the storage request path for the shared storage unit (210), just as in a chain topology. Each stage of the pipeline (S100–S710) is executed identically regardless of the topology.

[0225] However, the pattern of hallucination propagation in a star topology is different from that in a chain topology. In a chain topology, when a hallucination occurs, it is propagated sequentially to subsequent agents in the pipeline, whereas in a star topology, when a hallucination is introduced into a hub agent node (110), it can be propagated simultaneously to all spoke agent nodes (120, 130, 140). Therefore, in a star topology, blocking the hallucination in response to a storage request from the hub agent node (110) by the hallucination propagation prevention module (300) has the effect of preventing simultaneous propagation to multiple spoke agent nodes.

[0226] Reception of storage request (S100): When the third agent node (130) requests storage in the shared storage unit (210) after reprocessing the data received via the hub agent node (110), the hallucinogenic propagation prevention module (300) intercepts the request.

[0227] Identification of source data (S200): The lifecycle management module (320) identifies the source data by referencing origin_ref("mem_010") of the source chain. Even in a star topology, the identification of source data is performed by a single reference lookup for origin_ref and does not depend on the structure of the path array.

[0228] Calculation of semantic discrepancy (S300): The source axis comparison unit (321) calculates the semantic discrepancy between the data requested for storage and the original data (see Clause 22). In a star topology, when multiple spoke agent nodes each intend to store reprocessed data for the same original data, the discrepancy is calculated independently for each storage request.

[0229] Threshold comparison, precision verification, and processing decision (S400~S710): The lightweight detection unit (331), precision verification unit (332), and processing decision logic operate identically regardless of the topology (see Clause 23). When disposal is decided, the source chain of the disposed data, the semantic discrepancy, and the reason for disposal are recorded in the disposal log storage unit (213), and feedback is transmitted to the corresponding agent node (S710, see Clause 15).

[0230] 3-4. Confidence Hierarchy and Weighted Search

[0231] The reliability layer management unit (322) assigns a reliability layer based on the source chain length even in a star topology (see Clause 22). A first reliability layer is assigned when the spoke agent node directly stores the original data (chain_length = 1), a second reliability layer is assigned when it is reprocessed once via a hub (chain_length = 2), and a third reliability layer is assigned when it is reprocessed after being transmitted to another spoke via a hub (chain_length = 3 or more).

[0232] The search module (340) calculates weighted scores based on semantic similarity and confidence values ​​even in a star topology environment (see claim 6). In a star topology, since hub agent nodes (110) frequently reprocess data, the proportion of data in the second confidence layer may be relatively high. Weighted search ensures that high-confidence data close to the original is prioritized in the search results even in such an environment.

[0233] 3-5. Device Module Configuration

[0234] In this embodiment, the hallucinogenic propagation prevention device (see claim 20) is implemented within the memory storage server (200). The module configuration is the same as the application of MetaGPT in Examples 1 and 3. The source tracking module (310) includes a speech classification unit (311) and a chain generation unit (312) (see claim 21), the lifecycle management module (320) includes a source axis comparison unit (321) and a reliability hierarchy management unit (322) (see claim 22), and the verification module (330) includes a lightweight detection unit (331) and a precision verification unit (332) (see claim 23). A shared storage unit (210) includes a vector database (211), a metadata storage unit (212), and a discard log storage unit (213), and the vector database (211) stores embedding vectors and metadata for each of the stored data, said metadata including a speaker identifier, source chain, source chain length, confidence level, timestamp, lifecycle state, and semantic discrepancy (see claim 24).

[0235] In a LangGraph star topology, the hallucination propagation prevention module (300) is deployed as middleware that wraps an access node to the shared storage (210) of the memory storage server (200) on the state management graph (StateGraph) of the LangGraph framework. That is, when a node of the StateGraph performs a write operation on the shared storage (210), the hallucination propagation prevention module (300) intercepts the operation and executes the pipeline.

[0236] 4. Comparison of Hallucinogenic Propagation Characteristics by Topology

[0237] As described in Examples 1 to 3 above, the hallucinogenic propagation prevention method and device of the present invention operate with the same pipeline (source chain attachment → backtracking → deviation calculation → threshold comparison → processing decision) regardless of topology. However, depending on the topology, the pattern of hallucinogenic propagation and the effect of the hallucinogenic propagation prevention module (300) differ.

[0238] In a mesh topology (Example 1, AutoGen), since all agent nodes (100) can communicate directly with each other, there are multiple paths for hallucination propagation. The path array of the source chain can branch non-linearly, and multiple different transmission paths may occur for the same source data. The hallucination propagation prevention module (300) independently verifies the degree of deviation for each storage request, thereby blocking hallucination if it occurs in any of the multiple propagation paths.

[0239] In the chain topology (Example 3 Section 2, MetaGPT), the data flow is unidirectional and sequential, so there is a single path for hallucination propagation. The source chain length corresponds directly to the position on the pipeline, and the longer the source chain, the greater the possibility of hallucination for the data in the later part of the pipeline. The hallucination propagation prevention module (300) verifies the storage request at each stage of the pipeline and sequentially blocks the propagation of hallucination to subsequent stages.

[0240] In a star topology (Example 3 Section 3, LangGraph), centralized communication is performed via a hub agent node (110). Since a hallucination can be simultaneously propagated to all spokes when introduced into the hub, the hallucination blocking of storage requests from the hub is highly effective. Hub agent identifiers are frequently included in the path array of the source chain, and since communication between spokes passes through the hub, the length of the source chain can be longer compared to a chain topology.

[0241] In all three topologies, confidence stratification and weighted search based on source chain length are applied on the same principle, and differences in source chain length distribution according to topological characteristics are reflected in the confidence distribution of search results.

[0242] The hallucination propagation prevention method of the present invention operates with the same pipeline regardless of the topology and can block hallucinations at the time of storage in memory in correspondence with the hallucination propagation characteristics of each topology (multipath propagation of mesh topology, sequential propagation of chain topology, simultaneous propagation via hub of star topology). Industrial applicability

[0243] The present invention can be applied to multi-agent systems in which multiple agents share a memory repository. Specifically, the present invention can be applied to large-scale language model-based multi-agent collaboration systems, autonomous agent-based task automation systems, conversational AI assistant systems, and multi-agent-based knowledge management systems to maintain the consistency of shared memories among agents and prevent errors caused by the propagation of illusions. Furthermore, according to the middleware-based modular structure of the present invention, it can be integrated into existing multi-agent frameworks (AutoGen, MetaGPT, LangGraph, etc.) without additional framework modifications, making deployment and application in industrial settings easy. Explanation of the symbols

[0244] 1000: Multi-Agent Hallucinogen Propagation Prevention System 100: Agent Node 110: 1st Agent Node 120: 2nd agent node 130: Third agent node 140: 4th Agent Node 200: Memory Storage Server 210: Shared Storage 211: Vector Database 212: Metadata Storage 213: Discard Log Storage 300: Hallucination Propagation Prevention Module 310: Source Trace Module 311: Speech Classification Unit 312: Chain generation section 320: Lifecycle Management Module 321: Source axis comparison section 322: Trust Hierarchy Management Department 330: Verification Module 331: Lightweight sensor 332: Precision Verification Department 340: Search Module S100: Received save request S200: Identify source data S300: Calculation of Semantic Discrepancy S310: Received utterance S320: Speaker Type Identification S330: Create new source chain S340: Source chain inheritance and update S350: Subsequent processing delivery S400: Threshold comparison S500: Storage decision S600: Perform precise verification S700: Processing decision S710: Send feedback

Claims

Claim 1 A method for preventing hallucinogenic propagation in a multi-agent system comprising a memory storage shared by multiple agents, wherein the memory storage is a shared storage unit in which two or more of the multiple agents can record and read data, comprising: (a) receiving a request to store data in the memory storage from any one of the multiple agents; (b) identifying original data by tracing back a source chain included in the requested data, wherein the source chain represents the transmission path of one or more agents involved in the generation of the data; (c) calculating a semantic discrepancy between the requested data and the original data; and (d) determining a processing of the data based on the semantic discrepancy, wherein the processing includes one or more of storage, modified storage, and disposal. Claim 2 A method for preventing hallucinogenic propagation according to claim 1, further comprising, prior to step (b), receiving a speech generated by each of the plurality of agents and attaching a source chain including speechr identification information and transmission path information to each of the speech. Claim 3 A method for preventing hallucinogenic propagation according to paragraph 2, wherein the source chain comprises a speaker identifier, an order arrangement of agent identifiers representing the transmission path, a reference identifier for the original data, and the length of the source chain. Claim 4 A method for preventing hallucination propagation according to paragraph 2, wherein the source chain attachment is performed on data that has been reprocessed by any one of the plurality of agents reading existing data from the memory storage, and the source chain of the reprocessed data is generated by adding the identifier of the agent that performed the reprocessing to the source chain of the existing data. Claim 5 A method for preventing hallucination propagation according to claim 1, further comprising the step of assigning a reliability layer based on the source chain length of each data stored in the memory storage, wherein a higher reliability layer is assigned as the source chain length is shorter. Claim 6 A method for preventing hallucinogenic propagation according to claim 5, further comprising: receiving a search request for the memory storage; and, for the search request, calculating a search result by combining semantic similarity with stored data and weights based on the confidence hierarchy. Claim 7 A method for preventing hallucination propagation according to claim 1, wherein in step (c), the semantic discrepancy is calculated based on the similarity between the embedding vectors of the requested storage data and the original data, respectively. Claim 8 A method for preventing hallucinogenic propagation according to claim 7, wherein step (c) comprises a lightweight detection step of calculating the semantic discrepancy using a first metric, and step (d) comprises: a step of performing a precision verification using a second metric different from the first metric when the semantic discrepancy calculated in the lightweight detection step exceeds a first threshold; and a step of determining the processing of the data based on the result of the precision verification. Claim 9 A method for preventing hallucinogenic propagation according to claim 1, wherein the memory storage includes a vector database, the vector database stores an embedding vector and metadata for each of the stored data, and the metadata includes one or more of the source chain, confidence hierarchy, lifecycle state, and semantic discrepancy. Claim 10 A method for preventing hallucinogenic propagation according to claim 1, wherein the multi-agent system comprises one or more topologies among chain topology, mesh topology, and star topology. Claim 11 A method for preventing hallucinogenic propagation in a multi-agent system comprising a memory storage shared by multiple agents, wherein the memory storage is a shared storage unit in which two or more of the multiple agents can record and read data, comprising: (a) attaching a source chain indicating speaker identification information and a transmission path between agents to a speech generated by each of the multiple agents; (b) receiving a request to store data in the memory storage from any one of the multiple agents; (c) tracing back the source chain attached to the requested data to identify the original data; (d) a lightweight detection step of calculating the degree of semantic discrepancy between the requested data and the original data using a first metric; (e) performing a precision verification of the requested data using a second metric different from the first metric when the degree of semantic discrepancy exceeds a first threshold; and (f) determining to store, modify, store, or discard the data based on the result of the precision verification. Claim 12 A method for preventing hallucinogenic propagation according to claim 11, wherein the first threshold is determined based on the point where the F1 score is maximum in the precision-recall curve for the first metric. Claim 13 A method for preventing hallucination propagation according to claim 11, wherein the second metric comprises one or more of a natural language inference-based implication score and a large-scale language model-based judgment score. Claim 14 A method for preventing hallucination propagation according to claim 11, wherein if a modified storage is determined in step (f) above, the semantic discrepancy and the reason for the modification are recorded as metadata in the data and stored in the memory storage. Claim 15 A method for preventing hallucinogenic propagation according to claim 11, further comprising the step of transmitting feedback including the reason for disposal and the semantic discrepancy to the agent who made the storage request when disposal is determined in step (f) above. Claim 16 A method for searching a memory storage of a multi-agent system, comprising: a step of assigning a reliability value based on the length of a source chain representing the transmission path of the agent involved in the generation of the data, for each of the data stored in a memory storage accessible to multiple agents, wherein a higher reliability value is assigned as the length of the source chain is shorter; a step of receiving a search request for the memory storage; and a step of, for the search request, calculating a weighted score by combining the semantic similarity with each of the data stored in the memory storage and a weight based on the reliability value, and determining a search result based on the weighted score. Claim 17 In claim 16, the reliability value is classified into a first reliability layer when the length of the source chain is 1, a second reliability layer when the length of the source chain is 2, and a third reliability layer when the length of the source chain is 3 or more, and the first reliability layer has the highest reliability value, a memory storage search method. Claim 18 A memory storage search method according to claim 16, wherein the weighted score is calculated as the sum of the value obtained by multiplying the semantic similarity by a first weighting coefficient and the value obtained by multiplying the confidence value by a second weighting coefficient. Claim 19 A memory storage search method according to claim 16, wherein the search results include the top K data sorted in order of highest weighted scores, and constrains that among the top K data, data belonging to the first confidence level is included at a predetermined ratio or higher. Claim 20 A hallucinogenic propagation prevention device comprising: a processor; and a memory for storing instructions executed by the processor, wherein the processor is configured to implement a memory storage unit capable of recording and reading data by a plurality of agents; a source tracking module that attaches a source chain representing speaker identification information and a transmission path between agents to a speech generated by each of the plurality of agents; a lifecycle management module that receives a data storage request for the memory storage unit, backtracks the source chain attached to the requested data to identify the original data, calculates the semantic discrepancy between the requested data and the original data, and assigns a confidence level based on the source chain length to each of the data stored in the memory storage unit; a verification module that performs a precision verification of the requested data when the semantic discrepancy exceeds a first threshold, and determines whether to store, modify, store, or discard the data based on the result of the precision verification; and a search module that calculates a search result by combining the semantic similarity with the stored data and a weight based on the confidence level in response to a search request for the memory storage unit. Claim 21 In claim 20, the source tracking module comprises: a speech classification unit that classifies the speech source type of the speech into one of user original, agent generated, and agent reprocessing; and a chain generation unit that determines the first node of the source chain based on the classified speech source type and sequentially adds an agent identifier to the source chain upon subsequent transmission, thereby preventing hallucination propagation. Claim 22 In claim 20, the lifecycle management module comprises: a source axis comparison unit that calculates the semantic discrepancy based on the similarity between embedding vectors; and a reliability layer management unit that determines a reliability layer based on the source chain length, wherein a higher reliability layer is assigned as the source chain length is shorter. Claim 23 In claim 20, the verification module comprises: a lightweight detection unit that calculates the semantic discrepancy using a first metric; and a precision verification unit that performs precision verification using a second metric different from the first metric when the semantic discrepancy exceeds the first threshold. Claim 24 A hallucinogenic propagation prevention device according to claim 20, wherein the memory storage comprises a vector database, the vector database stores an embedding vector and metadata for each of the stored data, and the metadata includes a speaker identifier, a source chain, a source chain length, a confidence level, a timestamp, a lifecycle state, and a semantic discrepancy. Claim 25 A multi-agent hallucination propagation prevention system comprising: a plurality of agent nodes - each agent node includes a computing device that executes a large-scale language model -; a memory storage server accessible via a network by the plurality of agent nodes - the memory storage server includes a shared storage unit in which two or more of the plurality of agent nodes can write and read data -; and a hallucination propagation prevention module implemented in the memory storage server, which, in response to a data storage request from the agent nodes, traces back the source chain included in the requested data to identify the original data, calculates the semantic discrepancy between the requested data and the original data, and determines the processing of the data based on the semantic discrepancy. Claim 26 A multi-agent hallucinogenic propagation prevention system according to claim 25, wherein the hallucinogenic propagation prevention module calculates the semantic discrepancy between the requested storage data and the original data using a first metric, performs a precision verification using a second metric different from the first metric when the semantic discrepancy exceeds a first threshold, and determines the processing of the data based on the result of the precision verification. Claim 27 A multi-agent hallucination propagation prevention system according to claim 25, wherein the memory storage server assigns a reliability hierarchy based on the length of the source chain to each of the data stored in the shared storage unit, and calculates a search result by combining the semantic similarity with the stored data and a weight based on the reliability hierarchy in response to a search request. Claim 28 A non-transient computer-readable medium storing instructions that, when executed by a computer, cause the computer to perform the following operations: receiving a data storage request for a memory storage shared by multiple agents—the memory storage being a shared storage unit where two or more of the multiple agents can write and read data—; identifying original data by tracing back a source chain included in the data requested for storage—the source chain representing the transmission path of one or more agents involved in the generation of the data—; calculating a semantic discrepancy between the data requested for storage and the original data; and determining processing for the data based on the semantic discrepancy—the processing including one or more of storage, modified storage, and disposal. Claim 29 A non-transient computer-readable medium, wherein the above instruction further enables the computer to perform the operation of calculating the semantic discrepancy using a first metric; the operation of performing a precision verification using a second metric different from the first metric when the semantic discrepancy exceeds a first threshold; and the operation of determining the processing of the data based on the result of the precision verification. Claim 30 A non-transient computer-readable medium, wherein, in paragraph 28, the above instruction further enables the computer to perform the operation of assigning a confidence level based on the length of the source chain to each of the data stored in the memory storage; and the operation of generating a search result by combining the semantic similarity with the stored data and the weight based on the confidence level in response to a search request.