Paper deep dive
D-Mem: A Dual-Process Memory System for LLM Agents
Zhixing You, Jiachen Yuan, Jason Cai
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 95%
Last extracted: 3/22/2026, 6:07:17 AM
Summary
D-Mem is a dual-process memory system for LLM agents that addresses the lossy abstraction inherent in incremental retrieval-based memory frameworks. It combines a lightweight System 1 (Mem0*) for routine queries with a high-fidelity System 2 (Full Deliberation) fallback for complex reasoning, managed by a Multi-dimensional Quality Gating policy to balance accuracy and computational efficiency.
Entities (6)
Relation Signals (4)
D-Mem → evaluatedon → LoCoMo
confidence 100% · Experiments on the LoCoMo and RealTalk benchmarks
D-Mem → includes → Mem0*
confidence 100% · Mem0* serves as the foundational lightweight retrieval module.
D-Mem → includes → Full Deliberation
confidence 100% · The Full Deliberation mechanism provides a high-fidelity fallback.
Multi-dimensional Quality Gating → governs → D-Mem
confidence 95% · D-Mem employs a Multi-dimensional Quality Gating policy to dynamically bridge these two processes.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Driven by the development of persistent, self-adapting autonomous agents, equipping these systems with high-fidelity memory access for long-horizon reasoning has emerged as a critical requirement. However, prevalent retrieval-based memory frameworks often follow an incremental processing paradigm that continuously extracts and updates conversational memories into vector databases, relying on semantic retrieval when queried. While this approach is fast, it inherently relies on lossy abstraction, frequently missing contextually critical information and struggling to resolve queries that rely on fine-grained contextual understanding. To address this, we introduce D-Mem, a dual-process memory system. It retains lightweight vector retrieval for routine queries while establishing an exhaustive Full Deliberation module as a high-fidelity fallback. To achieve cognitive economy without sacrificing accuracy, D-Mem employs a Multi-dimensional Quality Gating policy to dynamically bridge these two processes. Experiments on the LoCoMo and RealTalk benchmarks using GPT-4o-mini and Qwen3-235B-Instruct demonstrate the efficacy of our approach. Notably, our Multi-dimensional Quality Gating policy achieves an F1 score of 53.5 on LoCoMo with GPT-4o-mini. This outperforms our static retrieval baseline, Mem0$^\ast$ (51.2), and recovers 96.7\% of the Full Deliberation's performance (55.3), while incurring significantly lower computational costs.
Tags
Links
- Source: https://arxiv.org/abs/2603.18631v1
- Canonical: https://arxiv.org/abs/2603.18631v1
Trouble viewing inline? Open PDF directly →
Full Text
64,465 characters extracted from source content.
Expand or collapse full text
D-Mem: A Dual-Process Memory System for LLM Agents Zhixing You * Einstein Institute of Mathematics The Hebrew University of Jerusalem, Israel zhixing.you@mail.huji.ac.il Jiachen Yuan Independent Researcher yuan.jachen@gmail.com Jason Cai AWS AI cjinglun@amazon.com Abstract Driven by the development of persistent, self- adapting autonomous agents, equipping these systems with high-fidelity memory access for long-horizon reasoning has emerged as a criti- cal requirement. However, prevalent retrieval- based memory frameworks often follow an in- cremental processing paradigm that continu- ously extracts and updates conversational mem- ories into vector databases, relying on semantic retrieval when queried. While this approach is fast, it inherently relies on lossy abstraction, frequently missing contextually critical infor- mation and struggling to resolve queries that rely on fine-grained contextual understanding. To address this, we introduce D-Mem, a dual- process memory system. It retains lightweight vector retrieval for routine queries while estab- lishing an exhaustive Full Deliberation mod- ule as a high-fidelity fallback. To achieve cog- nitive economy without sacrificing accuracy, D-Mem employs a Multi-dimensional Qual- ity Gating policy to dynamically bridge these two processes. Experiments on the LoCoMo and RealTalk benchmarks using GPT-4o-mini and Qwen3-235B-Instruct demonstrate the ef- ficacy of our approach. Notably, our Multi- dimensional Quality Gating policy achieves an F1 score of 53.5 on LoCoMo with GPT- 4o-mini. This outperforms our static retrieval baseline, Mem0 ∗ (51.2), and recovers 96.7% of the Full Deliberation’s performance (55.3), while incurring significantly lower computa- tional costs. 1 1 Introduction The development of LLM-based autonomous agents marks a significant evolution, shifting the application focus from stateless text generators to persistent, self-adapting entities deployed in dy- namic, long-horizon environments (Xi et al., 2025; Wang et al., 2024, 2026). As agents operate in * Corresponding author 1 Code will be released upon acceptance of the paper. increasingly complex scenarios, the capability to accumulate experiences and self-evolve across ex- tended interactions becomes a critical necessity. However, this continuous adaptation is fundamen- tally hindered by the static nature of deployed LLM parameters. Despite the advent of ever-expanding context windows, simply feeding massive dialogue histories into the model is computationally expen- sive and frequently exacerbates the "Lost-in-the- Middle" phenomenon (Liu et al., 2024). To address this, recent frameworks like MemoryBank, Zep and Mem0 developed an incremental memory pro- cessing paradigm (Zhong et al., 2024; Rasmussen et al., 2025; Chhikara et al., 2025). These systems continuously extract, compress, and update conver- sational memories into vector databases to enable efficient, scalable semantic retrieval. While highly effective for routine, explicit queries, this paradigm introduces a critical vulner- ability for deep reasoning: lossy abstraction (Zhu et al., 2026). By aggressively performing query- agnostic compression—condensing continuous di- alogues into semantic snippets independent of fu- ture queries—the system strips away potentially crucial contextual nuances. Consequently, when faced with queries requiring rigorous deduction, it frequently misses contextually critical informa- tion—such as unstated temporal logic (e.g., relative time calculations) or multi-hop dependencies. This leaves agents struggling with a severe performance bottleneck: static retrieval simply cannot recon- struct the precise logical chains lost during com- pression. To address the fundamental limitations of query-agnostic memory compression, we intro- duce D-Mem, a dual-process memory system that emulates the human cognitive process of metacog- nitive monitoring (Kahneman, 2011; Evans and Stanovich, 2013). Rather than abandoning efficient vector retrieval, D-Mem leverages it as a rapid Sys- tem 1 baseline (Mem0 ∗ ), while introducing a robust System 2 fallback mechanism. D-Mem operates 1 arXiv:2603.18631v1 [cs.AI] 19 Mar 2026 on two distinct cognitive levels: •System 1 (Mem0 ∗ ): Acting as an enhanced incremental memory processing module built upon the Mem0 architecture, this system per- forms a rapid, low-cost static retrieval (Top-K) based on surface similarity within the com- pressed memory space. • System 2 (Full Deliberation): When System 1 fails to resolve the query, the system escalates to an exhaustive deliberate reading mode. By- passing the compressed memory, this module directly processes the raw dialogue history. It executes a query-guided temporal scan, uti- lizing the original question as a discrimina- tive anchor to systematically extract query- relevant facts chunk-by-chunk via a quanti- tative scoring mechanism (0-10). By apply- ing strict multi-stage filtering, it synthesizes a highly grounded, high-fidelity answer-closely mimicking the human cognitive process of purposeful reading. Crucially, executing System 2 indiscriminately in- curs massive computational overhead. On the Lo- CoMo dataset, it increases input tokens and in- ference time by over 10×compared to the fast path (see Table 1 for details). To achieve cognitive economy, D-Mem incorporates a metacognitive assessment step. Acting as a rigorous analytical gatekeeper, this module evaluates the initial System 1 output against a strict multi-dimensional pass/- fail rubric—encompassing relevance, faithfulness & consistency, and completeness. The architecture escalates to the computationally intensive System 2 exclusively when the initial output fails to satisfy any of these criteria, ensuring that Full Deliberation is triggered only by critical information deficits. In summary, our main contributions are as fol- lows: • The dual-process D-Mem Framework. To overcome the fundamental limitations of query-agnostic memory compression, we pro- pose D-Mem, a novel architecture that in- tegrates efficient vector retrieval (System 1) with an exhaustive deliberate reading mode (System 2). To bridge these processes and balance cognitive economy with reasoning accuracy, we introduce a Multi-dimensional Quality Gating policy (hereafter, Quality Gat- ing). Serving as a metacognitive checkpoint, it offers an accuracy-efficiency trade-off. • Full Deliberation as a robust baseline. We es- tablish a Full Deliberation method that exhaus- tively processes raw dialogue history chunk- by-chunk. Because this extraction mechanism is strictly query-guided, it ensures that ex- plicit, nuanced details are meticulously pre- served. Furthermore, its chunk-by-chunk pro- cessing effectively mitigates the "Lost-in-the- Middle" phenomenon. By establishing this high-fidelity upper bound, we isolate a criti- cal bottleneck shift: to surpass this baseline, future long memory architectures must evolve beyond extracting explicit facts to actively capturing and synthesizing implicit informa- tion across longitudinal history. •High Performance with Computational Effi- ciency. Through comprehensive evaluations on the LoCoMo (Maharana et al., 2024) and RealTalk (Lee et al., 2025) benchmarks using GPT-4o-mini and Qwen3-235B-Instruct, we demonstrate the efficacy of our framework. Notably, our Quality Gating achieves an F1 score of 53.5 on LoCoMo and exhibits con- sistent substantial gains on RealTalk. This outperforms our Mem0 ∗ (51.2) and recovers 96.7% of the Full Deliberation’s performance (55.3) with significantly fewer tokens and in- ference time. 2 Related Work 2.1 Retrieval-Augmented Generation (RAG) Standard RAG retrieves documents via dense sim- ilarity and feeds them to a generator. Subsequent work has improved this pipeline through query ex- pansion (Zhang et al., 2024), re-ranking (Yu et al., 2024), relevance filtering (Rossi et al., 2024), and query-transformation (Zheng et al., 2024). These techniques refine how to retrieve. Recent Agentic RAG paradigm actively assess their own informa- tion needs, refines whether retrieval is sufficient (Asai et al., 2024; Xu et al., 2026). 2.2 Agentic Memory for Autonomous Agents Early frameworks like MemGPT (Packer et al., 2024) introduced operating system-inspired virtual context management via hierarchical paging. Other memory systems like Mem0 (Chhikara et al., 2025) and MemoryBank (Zhong et al., 2024) employ an incremental processing paradigm that continuously extracts and updates conversational memories into 2 vector databases. Such aggressive vectorization in- herently fragments semantic context. To preserve relational integrity, recent works have explored structural optimizations. For instance, G-Memory (Zhang et al., 2025) and Mem0 g (Chhikara et al., 2025) construct graph-based hierarchies, and A- Mem (Xu et al., 2025) utilizes interconnected notes. Despite these structural enhancements, these meth- ods remain fundamentally query-agnostic. Because the memory representation is aggressively com- pressed and pre-fixed during the storage phase, they inevitably suffer from lossy abstraction—stripping away nuanced temporal and causal logic. To circumvent the pitfalls of lossy abstraction, recent advancements like GAM (Yan et al., 2025) and E-mem (Wang et al., 2026) entirely abandon query-agnostic compression. Instead, they pivot towards episodic context reconstruction and multi- agent deliberative paradigms, prioritizing reason- ing fidelity by exhaustively processing raw, uncom- pressed historical context. However, discarding lightweight retrieval to apply such heavy deliber- ation indiscriminately incurs a massive, inflexible computational overhead. This approach ignores the "cognitive economy" of System 1, where the major- ity of routine queries can be efficiently resolved via rapid semantic recall, obviating the need for deep episodic reconstruction. 3 Methodology To circumvent the pitfalls of lossy abstraction in- herent in prior designs while maintaining compu- tational efficiency, we introduce D-Mem, a dual- process memory architecture. The framework is operationalized through three coupled components: (1) Mem0 ∗ serves as the foundational lightweight retrieval module. It improves upon the standard Mem0 paradigm by efficiently extracting and up- dating salient conversational memories within a vector database, designed to rapidly resolve the ma- jority of routine queries. (2) The Quality Gating acts as a dynamic evaluative router. It evaluates the initially retrieved context from Mem0 ∗ against a multi-dimensional quality rubric. Specifically, the gate assesses the retrieved memory along three orthogonal dimensions: Relevance, Faithfulness & Consistency, and Completeness. If the retrieved context falls short on any of these axes, the gate triggers the fallback mechanism. (3) The Full De- liberation mechanism provides a high-fidelity fall- back. Triggered exclusively when the quality gate deems the lightweight retrieval inadequate, this module bypasses compressed representations to exhaustively process the raw, uncompressed his- torical context. By structurally decoupling routine semantic recall from resource-intensive exhaustive full deliberation, D-Mem enables high-fidelity rea- soning for complex queries while preserving strict cognitive economy. 3.1 Mem0 ∗ : The System 1 Retrieval Foundation The Mem0 ∗ module follows an incremental pro- cessing paradigm and serves as our foundational System 1, enabling fast associative retrieval. As il- lustrated in Figure 1 Part A, this module comprises two phases: extraction phase and update phase. Formally, to reflect the dynamic nature of incremental processing, we model the conver- sation as a continuous stream.LetH t−1 = (m 1 , m 2 , . . . , m 2t−2 ) denote the accumulated di- alogue history prior to thet-th interaction round. Each messagem i represents an individual utter- ance augmented with timestamp and speaker meta- data. The maintenance pipeline dynamically trig- gers upon the ingestion of the new interaction round at stept, defined as the message pair(m 2t−1 , m 2t ). •Extraction Phase: Mem0 ∗ conditions the LLM on two complementary sources: (1) the top-10most semantically similar exist- ing memoriesFretrieved from the vec- tor database, and (2) recent messages (m 2t−10 , . . . , m 2t−2 )fromH t−1 . HereF serves as a dynamic background context and the recent message sequence offers granular temporal context. This dual contextual infor- mation, combined with the new message pair, forms a comprehensive input for the LLM to extract salient memories Ω =ω 1 , . . . , ω n . • Update Phase: Once the set of candidate memoriesΩis extracted, the system retrieves the top-5 semantically similar historical mem- ories for eachω i ∈ Ωvia vector embeddings. To minimize cognitive load and mitigate noise, low-relevance items are explicitly discarded using a strict cosine similarity threshold (> 0.8). The retained historical memories con- stitute the contextual backgroundB. Subse- quently, an LLM cross-references the newly extracted memoriesΩagainst the contextual backgroundBto evaluate potential contradic- tions and redundancies. This dictates precise 3 Part A: Incremental Memory ProcessingPart B: Dual-Process Retrieval Vector Database Extraction Phase Top 10 Similar Memories History (Last 8 messages) CurrentTurn 六 User message... 烙Agent reply... Update Phase Top 5 Similar Memories Relevance Filter (Cosine Score > 0.8) New Extracted Facts Filtered memories ADDUPDATEDELETENOOP New / Updated Memories Standard Retrieval (System 1) Top 30 Similar Memories Retrieved Context C LLM Answer Generation A init = LLM(q, C) Gating Dimensions: 1. Relevance 2. Faithfulness 3. Completeness Quality Gating Return A init Full Deliberation (System 2) Stage 2.1: Score Filtering (Score > 6) Enhanced Context C' Stage 3: LLM Answer Generation A final = LLM(q, C') Return A final = 0 (Sufficient) = 1 (Insufficient) Messages 六 烙 User Query q Full Conversation History H Stage 2.2: LLM Filtering Stage 1:Chunk-Level Fact Extraction & Scoring (0-10) New Extracted Facts Figure 1: Architectural overview of D-Mem. Components of Part A illustrates the memory mechanism of Mem0 ∗ . The elements highlighted in soft pale pink denote our key modifications over the original Mem0 framework: (1) utilizing the top-10 similar memories rather than a general summary during the Extraction Phase, and (2) incorporating an additional relevance filtering step prior to memory updates. Part B illustrates the Quality Gating mechanism, which evaluates the initial answer from Mem0 ∗ and dynamically determines whether to trigger the Full Deliberation fallback. memory operations for memories inBandΩ: ADD, UPDATE, DELETE, or NOOP. Robust Query Resolution. During inference, given a user queryq, Mem0 ∗ retrieves the top-30 most similar memoriesCand generates an initial answer A init = LLM(q, C). To further mitigate hallucination, we also em- ploy a rigorous filtering pipeline to derive a highly refined context C ′ : To filter out noise memories inC, an LLM eval- uates the initial contextCagainst the queryq. It retains only strictly necessary memoriesC f ilter to answerq. In the edge case where aggressive fil- tering eliminates all candidates (i.e.,C f ilter =∅), the system conservatively falls back to the original unfiltered context C to preserve recall. 3.2 Gated Deliberation Policies To operationalize the routing between the Mem0 ∗ and the Full Deliberation fallback (as mentioned in Subsection 3.3), we formalize a Gating PolicyG. Formally, given the initial answerA init , the user queryq, and the retrieved contextC, we define the gating functionG: G : (A init , q, C)→0, 1. Here, the system outputsA init ifG(. . . ) = 0, and it executes the full deliberation ifG(A init , q, C) = 1. To comprehensively evaluate this dual-process routing, we investigate three distinct gated delib- eration policies: Policy 1: Majority Voting. The system gener- ates three candidate answers from the same Top-30 context (with temperature> 0for diversity). A judge determines whether a majority consensus exists—i.e., at least two of the three answers are semantically equivalent. If a majority exists, one answer is selected from the majority group (e.g., by preferring clarity and verbatim extraction); other- wiseG(A init , q, C) = 1and the system falls back to Full Deliberation. Policy 2: Consensus. As in Majority Voting, three answers are generated from Top-30 retrieval. The trigger requires full semantic agreement: all three answers must be equivalent. If any answer differs,G(A init , q, C) = 1and the system invokes Full Deliberation. This policy is stricter than Ma- jority Voting and triggers fallback more often. Policy 3: Quality Gating (ours). An LLM checks the quality of the initial answerA init against a quality rubric with three dimensions: Rel- evance, Faithfulness & Consistency, and Complete- ness. If the answer successfully passes all three dimensions, then the system returnsA init ; other- wise,G(A init , q, C) = 1and the system falls back to Full Deliberation. 4 3.3 Full Deliberation The Full Deliberation mechanism serves both as a new baseline and as the fallback path for all Gated Deliberation policies. Instead of relying on seman- tic search, it processes the complete conversation history through three stages: Stage 1: Chunked Fact Extraction. The con- versation is partitioned into chunks of 60 messages each. For each chunk, an LLM extracts query- relevant facts and assigns a relevance score (0–10). A sliding context window of 4 preceding messages maintains continuity across chunks. Stage 2: Multi-stage Filtering. Extracted facts are sorted by relevance score. A preliminary thresh- old (> 6) filters out weakly relevant facts; if more than 6 facts remain, an additional LLM-based filter selects the most pertinent subset. Stage 3: Answer Generation.The filtered facts replace the Top-30 memoriesCin the answer gen- eration prompt, producing the final response. This method is computationally expensive, which motivates gated deliberation that invokes it only when needed. 4 Experiments 4.1 Setup Datasets. We evaluate on two benchmark datasets: (1) LoCoMo (Maharana et al., 2024). It contains 10 long-term dialogues with an average length of 24K tokens. We utilize 1,540 questions spanning four core reasoning categories: Single-hop, Multi- hop, Temporal, and Open-domain (the adversarial question category is explicitly excluded from our evaluation). (2) RealTalk (Lee et al., 2025). A real-world dialogue dataset containing 10 conversations, each averaging over 16,000 words. It features 728 ques- tions evaluated across three categories: Multi-hop, Temporal, and Open-domain. These datasets primarily focus on English- language dialogue and are designed to evaluate the agent’s ability to maintain coherence over long- term dialogue history. For comprehensive details regarding the demographic distribution and spe- cific linguistic phenomena of these datasets, we refer readers to their original documentation. Metrics.We report three complementary metrics: the F1 score for lexical overlap, the BLEU score for n-gram fidelity, and an LLM-as-a-Judge (here- after, LLM) score for semantic equivalence. All scores are reported as percentages. For the LLM- as-a-Judge evaluation, we follow the binary accu- racy protocol established by Chhikara et al. (2025). Specifically, this approach employs GPT-4o-mini to evaluate whether the generated response is se- mantically consistent with the ground truth. Rather than penalizing minor formatting differences, it provides a robust assessment that better correlates with human judgment by tolerating generative vari- ations and relative temporal expressions. See Ap- pendix A.8 for the complete prompt template. LLMs. All methods are evaluated with GPT-4o- mini as the primary backbone. We use OpenAI text-embedding-3-small as our embedding model. We additionally report results with Qwen3-235B- Instruct to assess generalization. Baselines. We compare our results against the following baselines: Full Context, which feeds the entire conversation history to the model; standard RAG, a standard retrieval-augmented generation approach that chunks dialogues into 4096-token segments for dense retrieval; LangMem (Chase, 2022), Mem0 (Chhikara et al., 2025), Zep (Ras- mussen et al., 2025), Nemori (Nan et al., 2025), EMem-G (Zhou and Han, 2025). See (Nan et al., 2025) for more details on these baselines. 4.2 Overall Performance Table 1 summarizes the overall F1, LLM, and BLEU scores plus response time and token usage for all methods across the four experimental set- tings (see Tables 3–6 for details). Comparison with Baselines.Our enhanced Sys- tem 1 baseline (Mem0 ∗ ) achieves an F1 score of 51.2 on the LoCoMo dataset utilizing GPT-4o-mini, significantly outperforming both the original Mem0 (41.5) and outperforming the recently proposed Nemori (49.5). Furthermore, by establishing an exhaustive delib- erate reading process, the Full Deliberation mecha- nism boosts the F1 score to 55.3 and the LLM score to 78.4 on the LoCoMo dataset with GPT-4o-mini. This approach effectively mitigates the "Lost-in- the-Middle" phenomenon, demonstrating substan- tial gains over the Full Context (F1: 46.2, LLM: 5 Table 1: Summary of overall scores and efficiency across four settings. The baseline performance comes from (Nan et al., 2025) and (Zhou and Han, 2025). LoCoMoRealTalk MethodF1LLM BLEU Time(s) TokensF1LLM BLEU Time(s) Tokens GPT-4o-mini Full Context46.272.337.8– RAG20.830.216.4– LangMem35.851.329.4– Mem041.561.334.2– Zep37.558.530.9– Nemori49.574.438.5– Mem0 ∗ 51.272.741.01.28219137.359.123.73.272303 Filter51.674.041.62.67319038.460.724.84.143376 Majority Voting51.373.141.13.32753437.560.423.75.408794 Consensus53.576.143.09.551575739.162.425.015.4521949 Quality Gating(ours) 53.576.343.18.031268139.462.525.413.0016786 Full Deliberation55.378.444.223.733543540.662.827.427.9548772 Qwen3-235B-Instruct Mem0 ∗ 48.174.739.71.52244335.462.521.32.002777 Filter50.376.842.02.71355435.260.021.23.224119 Majority Voting49.275.440.84.41914935.860.621.45.4511009 Consensus51.176.442.47.841540736.362.421.812.3523673 Quality Gating(ours) 51.078.642.68.561557435.563.122.016.5126417 Full Deliberation53.778.645.117.033910137.564.424.827.7957956 72.3). It also significantly outperforms Nemori (LLM 74.4). In summary, while our System 1 baseline (Mem0 ∗ ) already achieves competitive perfor- mance, the Full Deliberation establishes a new up- per bound. Effectiveness of Dual-Process Routing. The core objective of D-Mem is to approximate the Full Deliberation without incurring its massive com- putational overhead. The Majority Voting policy achieves a modest F1 improvement over Mem0 ∗ (51.3 vs. 51.2) but at the cost of an approximate 3×token overhead (7,534 vs. 2,191 tokens). This suggests that Majority Voting is prone to prema- ture convergence on incorrect semantic snippets. Conversely, the Consensus policy proves overly conservative compared to Quality Gating: while it successfully elevates the F1 score to 53.5, it forces excessive fallbacks, resulting in heavy computa- tional costs (15,757 tokens). Generalization and Robustness.The efficacy of the Quality Gating mechanism transcends specific datasets and model architectures. On the Real-world Dialogue (RealTalk) dataset with GPT-4o-mini, the structural advantages of D- Mem remain substantial: Quality Gating achieves the better F1 score (39.4) and LLM-as-a-judge score (62.5) than Consensus (39.1 and 62.4). Mir- roring the LoCoMo results, it successfully recovers 97.0% of the Full Deliberation’s F1 score (40.6) while consuming merely 34.4% of its token cost (16,786 vs. 48,772). With the Qwen3-235B-Instruct backbone, we observe a notable divergence between evaluation metrics: while Quality Gating outperforms Con- sensus in LLM-as-a-judge scores (78.6 vs. 76.4 on LoCoMo; 63.1 vs. 62.4 on RealTalk), it yields slightly lower F1 scores (e.g., 51.0 vs. 51.1 on LoCoMo). This discrepancy is primarily attributed to the distinct alignment styles of the underlying model. Qualitative inspection reveals that Qwen3- 235B-Instruct is inclined toward explanatory gen- eration, explicitly outputting a “step-by-step” prior to its final answer in 12 separate instances with Quality Gating. In contrast, the Consensus pol- icy—which derives the final response via extraction from multiple candidate drafts—effectively prunes these deliberative steps. 4.3 In-depth Analysis of Quality Gating Per-Category Analysis To further understand where the Quality Gating mechanism yields its gains, we break down the F1 improvement of Qual- ity Gating over Mem0 ∗ by question category on the LoCoMo dataset (Figure 2). A clear positive corre- 6 Single-HopMulti-HopTemporalOpen-Domain 0 1 2 3 4 5 F1 over Mem0 +1.9 (+3.4%) +2.6 (+6.7%) +2.7 (+4.6%) +4.1 (+15.9%) Increasing difficulty LoCoMo, GPT-4o-mini Single-HopMulti-HopTemporalOpen-Domain 0 1 2 3 4 5 F1 over Mem0 +2.5 (+4.8%) +3.0 (+7.2%) +4.1 (+7.9%) +3.2 (+14.2%) Increasing difficulty LoCoMo, Qwen3-235B Figure 2: F1 Improvement of Quality Gating over Mem0 ∗ by Question Category on the LoCoMo Dataset. lation emerges: the improvement scales with ques- tion difficulty. For Single-Hop questions—simple fact lookups where the top-Kretrieval typically provides sufficient evidence—Quality Gating pro- duces the smallest absolute gain (+1.9 F1 with GPT- 4o-mini, +2.5 with Qwen3-235B-Instruct). For Multi-Hop questions, which require chaining facts scattered across multiple memories, the gain in- creases notably (+2.6 and +3.0, respectively), as the quality rubric’s Completeness dimension effec- tively detects when retrieved context covers only a subset of the required reasoning chain. Tem- poral and Open-Domain categories benefit the most (+2.7/+4.1 with GPT-4o-mini; +4.1/+3.2 with Qwen3-235B-Instruct), precisely because these cat- egories suffer most severely from lossy abstraction: temporal queries lose relative time anchors during memory compression, while open-domain queries demand broader contextual grounding that top-K retrieval rarely captures. This pronounced upward trend between question difficulty and Quality Gat- ing improvement confirms that the gating mecha- nism selectively escalates queries where static re- trieval is fundamentally insufficient, rather than ap- plying uniform overhead across all question types. Impact of Filtering and Model-Specific Varia- tions.We observe that the explicit filtering step in Mem0 ∗ yields a consistent improvement for GPT- 4o-mini across datasets, successfully mitigating the “Lost-in-the-Middle” phenomenon. However, this benefit does not generalize uniformly. When de- ploying Qwen3-235B-Instruct on the highly noisy RealTalk dataset, the addition of explicit filtering counterintuitively degrades performance compared to the unfiltered Mem0 ∗ (e.g., the LLM score drops from 62.5 to 60.0). We hypothesize that this per- formance inversion occurs because Qwen3-235B- Instruct struggles to recognize unstated temporal anchors or implicit logical bridges during the rel- evance assessment. In such noise-heavy contexts, this can lead to the erroneous pruning of critical context. This indicates that the efficacy of aggres- sive context filtering is dependent on the underlying model’s alignment style and inherent discrimina- tive capabilities. Crucially, our proposed Quality Gating policy achieves a superior balance between performance and efficiency. On the LoCoMo dataset with GPT- 4o-mini, it achieves a strict improvement over the Consensus policy: it matches Consensus F1 score (53.5) and yields a higher LLM-as-a-judge score (76.3), while simultaneously reducing token con- sumption by nearly 19.5% (12,681 vs. 15,757 to- kens). Compared to the exhaustive fallback, Qual- ity Gating effectively recovers nearly 96.7% of the Full Deliberation’s F1 performance. Remarkably, it accomplishes this while utilizing only 35.8% of the Full Deliberation’s tokens (12,681 vs. 35,435) and approximately one-third of the inference latency. 4.4 Fallback Mechanism Analysis Table 2 breaks down the performance and resource consumption based on whether the fallback mecha- nism was triggered. Adaptability to Dataset Complexity Consis- tently across all settings, the fallback rate consis- tently scales up from LoCoMo dataset to RealTalk dataset. For example, on the LoCoMo dataset with Quality Gating, Qwen3-235B-Instruct triggers fallback 27.9% of the time; on the substantially more challenging RealTalk dataset, this rate rises to 35.0%. This dynamic behavior demonstrates that Quality Gating successfully calibrates to the varying complexity of the dialogue history. 7 Table 2: Impact of Fallback Mechanism in Gated Deliberation across Datasets. W/O FB: Without Fallback; W/ FB: With Fallback; Rate: Percentage of queries falling into this routing status. MethodStatus LoCoMoRealTalk RateF1LLMBLEUTokensRateF1LLMBLEUTokens GPT-4o-mini Majority Voting W/O FB98.2%51.673.441.46902.197.1%38.061.123.97262.1 W/ FB1.8%35.159.328.741082.72.9%19.738.117.358445.0 Consensus W/O FB75.5%57.478.146.76834.770.5%42.165.725.97148.4 W/ FB24.5%41.669.831.542315.129.5%32.054.422.955959.9 Quality Gating W/O FB75.9%53.878.143.44254.675.3%41.666.826.44512.6 W/ FB24.1%52.770.642.138582.924.7%32.849.422.453218.3 Qwen3-235B-Instruct Majority Voting W/O FB96.4%49.876.241.37610.596.0%36.261.221.48609.1 W/ FB3.6%33.352.726.448192.84.0%26.644.821.165075.4 Consensus W/O FB80.8%53.477.644.67548.974.2%38.363.921.68557.2 W/ FB19.2%41.571.633.147288.625.8%30.658.022.565111.9 Quality Gating W/O FB72.1%52.781.844.64728.465.0%39.167.022.95431.0 W/ FB27.9%46.671.637.142751.335.0%28.955.720.363345.1 Selection Bias in Fallback Routing. Consis- tently across all settings, queries requiring the fall- back mechanism yield lower scores than those re- solved in the fast path (e.g., F1 drops from 41.6 to 32.8 on RealTalk using GPT-4o-mini). This reflects a natural selection bias: the quality gate effectively isolates the most inherently difficult queries, thus demonstrating the effectiveness of the gating mech- anism in identifying queries that are likely to fail under static retrieval. Model-Specific Sensitivity in Quality Gating. Notably, Qwen3-235B-Instruct exhibits signifi- cantly higher fallback rates under the Quality Gat- ing policy compared to GPT-4o-mini (e.g., 35.0% vs. 24.7% on RealTalk). We attribute this to Qwen3-235B-Instruct’s advanced reasoning capa- bilities, which facilitate a more rigorous assessment against the quality rubric. As a stricter adjudica- tor, the model more readily identifies subtle logical gaps or evidentiary deficiencies, ensuring the fall- back mechanism is proactively engaged whenever static retrieval is insufficient. 4.5 Case Study: Why Static Retrieval Fails To better understand the underlying failure modes of static semantic retrieval—and why our D-Mem framework is necessary—we examine a representa- tive error from the Temporal reasoning category. Query: When did Caroline go to the LGBTQ support group? Ground Truth: 7 May 2023 Raw Context (H): 1:56 pm on 8 May, 2023, Car- oline: I went to a LGBTQ support group yesterday and it was so powerful. Baseline Output: 8 May 2023 (Retrieved Mem- ory: “1:56 pm on 8 May, 2023: Caroline found the transgender stories at the LGBTQ support group inspiring”) Full Deliberation Output: 7 May 2023 This failure illustrates how standard incremental memory acts as a lossy abstraction. Because back- ground updates occur without a guiding query, the LLM over-compresses the dialogue. It retains the thematic essence and the message’s absolute times- tamp (8 May) but permanently discards the relative temporal arithmetic needed to resolve “yesterday”, losing crucial context-dependent dependencies be- fore retrieval even begins. 5 Conclusion In this work, we first introduced Full Deliberation, a mechanism designed to mitigate the lossy abstrac- tion of standard retrieval-based memory. It also mitigates the "Lost in the Middle" phenomenon inherent in full-context processing and achieves strong performance. To address the prohibitive computational costs of Full Deliberation, we fur- ther proposed D-Mem, a dual-process memory ar- chitecture. Through Quality Gating, D-Mem dy- namically routes queries between rapid associative recall and Full Deliberation. Empirical evaluations demonstrate that D-Mem achieves near-Full Delib- eration performance on the LoCoMo and RealTalk benchmarks, while successfully reducing both to- ken consumption and inference latency. 8 6 Limitations While Full Deliberation is a powerful mechanism for mitigating the limitations of retrieval-based memory, it inherently consumes a massive amount of input tokens by exhaustively processing the en- tire dialogue history. Although our Quality Gating mechanism effectively reduces these token costs, this exhaustive context scanning still limits the ar- chitecture’s scalability for lifelong deployments with infinite context horizons. Furthermore, because the current Full Delibera- tion mechanism splits the conversation history into isolated chunks for parallel fact extraction and re- lies solely on the LLM’s native self-attention over the extracted isolated facts, the system lacks ex- plicit logical chaining. This poses a significant bottleneck for long-horizon reasoning that requires global context and cross-chunk dependencies. Con- sequently, a state-tracking architecture that explic- itly synthesizes causal and temporal logic across chunks is needed. References Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. 2024. Self-RAG: Learning to retrieve, generate, and critique through self-reflection. In The Twelfth International Conference on Learning Representations. Harrison Chase. 2022. LangChain.https://github. com/langchain-ai/langchain. Accessed: 2025- 07-20. Prateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh, and Deshraj Yadav. 2025. Mem0: Building production-ready ai agents with scalable long-term memory. Preprint, arXiv:2504.19413. Jonathan St. B. T. Evans and Keith E. Stanovich. 2013. Dual-process theories of higher cognition: Advanc- ing the debate. Perspectives on Psychological Sci- ence, 8(3):223–241. PMID: 26172965. Daniel Kahneman. 2011. Thinking, fast and slow. Far- rar, Straus and Giroux, New York. Dong-Ho Lee, Adyasha Maharana, Jay Pujara, Xiang Ren, and Francesco Barbieri. 2025. Realtalk: A 21- day real-world dataset for long-term conversation. Preprint, arXiv:2502.13270. Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paran- jape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the middle: How language mod- els use long contexts. Transactions of the Association for Computational Linguistics, 12:157–173. Adyasha Maharana, Dong-Ho Lee, Sergey Tulyakov, Mohit Bansal, Francesco Barbieri, and Yuwei Fang. 2024.Evaluating very long-term conversational memory of LLM agents. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13851– 13870, Bangkok, Thailand. Association for Compu- tational Linguistics. Jiayan Nan, Wenquan Ma, Wenlong Wu, and Yize Chen. 2025.Nemori:Self-organizing agent memory inspired by cognitive science. Preprint, arXiv:2508.03341. Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica, and Joseph E. Gonzalez. 2024. Memgpt: Towards llms as operating systems. Preprint, arXiv:2310.08560. Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais, Jack Ryan, and Daniel Chalef. 2025. Zep: A tempo- ral knowledge graph architecture for agent memory. Preprint, arXiv:2501.13956. Nicholas Rossi, Juexin Lin, Feng Liu, Zhen Yang, Tony Lee, Alessandro Magnani, and Ciya Liao. 2024. Rel- evance filtering for embedding-based retrieval. In Proceedings of the 33rd ACM International Confer- ence on Information and Knowledge Management, CIKM ’24, page 4828–4835, New York, NY, USA. Association for Computing Machinery. Kaixiang Wang, Yidan Lin, Jiong Lou, Zhaojiacheng Zhou, Bunyod Suvonov, and Jie Li. 2026. E-mem: Multi-agent based episodic context reconstruction for llm agent memory. Preprint, arXiv:2601.21714. Lei Wang, Chen Ma, Xueyang Feng, Zeyu Zhang, Hao Yang, Jingsen Zhang, Zhiyuan Chen, Jiakai Tang, Xu Chen, Yankai Lin, and 1 others. 2024. A survey on large language model based autonomous agents. Frontiers of Computer Science, 18(6):186345. Zhiheng Xi, Wenxiang Chen, Xin Guo, Wei He, Yi- wen Ding, Boyang Hong, Ming Zhang, Junzhe Wang, Senjie Jin, Enyu Zhou, and 1 others. 2025. The rise and potential of large language model based agents: A survey. Science China Information Sci- ences, 68(2):121101. Wujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, and Yongfeng Zhang. 2025. A-mem: Agentic memory for LLM agents. In The Thirty-ninth An- nual Conference on Neural Information Processing Systems. Zhipeng Xu, Zhenghao Liu, Yukun Yan, Shuo Wang, Shi Yu, Zheni Zeng, Chaojun Xiao, Zhiyuan Liu, Ge Yu, and Chenyan Xiong. 2026. ThinkNote: En- hancing knowledge integration and utilization of large language models via constructivist cognition modeling. In Findings of the Association for Compu- tational Linguistics: EACL 2026. To appear. B. Y. Yan, Chaofan Li, Hongjin Qian, Shuqi Lu, and Zheng Liu. 2025. General agentic memory via deep research. Preprint, arXiv:2511.18423. 9 Yue Yu, Wei Ping, Zihan Liu, Boxin Wang, Jiaxuan You, Chao Zhang, Mohammad Shoeybi, and Bryan Catanzaro. 2024. RankRAG: Unifying context rank- ing with retrieval-augmented generation in LLMs. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. Guibin Zhang, Muxin Fu, Kun Wang, Guancheng Wan, Miao Yu, and Shuicheng YAN. 2025. G-memory: Tracing hierarchical memory for multi-agent systems. In The Thirty-ninth Annual Conference on Neural Information Processing Systems. Wenjing Zhang, Zhaoxiang Liu, Kai Wang, and Shiguo Lian. 2024. Query expansion and verification with large language model for information retrieval. In Advanced Intelligent Computing Technology and Ap- plications: 20th International Conference, ICIC 2024, Tianjin, China, August 5–8, 2024, Proceedings, Part IV, page 341–351, Berlin, Heidelberg. Springer- Verlag. Huaixiu Steven Zheng, Swaroop Mishra, Xinyun Chen, Heng-Tze Cheng, Ed H. Chi, Quoc V Le, and Denny Zhou. 2024. Take a step back: Evoking reasoning via abstraction in large language models. In The Twelfth International Conference on Learning Representa- tions. Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang. 2024. Memorybank: enhancing large language models with long-term memory. In Pro- ceedings of the Thirty-Eighth AAAI Conference on Artificial Intelligence and Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence and Fourteenth Symposium on Educational Advances in Artificial Intelligence, AAAI’24/IAAI’24/EAAI’24. AAAI Press. Sizhe Zhou and Jiawei Han. 2025. A simple yet strong baseline for long-term conversational memory of llm agents. Preprint, arXiv:2511.17208. Qiming Zhu, Shunian Chen, Rui Yu, Zhehao Wu, and Benyou Wang. 2026.From lossy to veri- fied: A provenance-aware tiered memory for agents. Preprint, arXiv:2602.17913. Appendix A Prompt Templates In this section, we provide the complete prompt templates used in our experiments.For the sake of reproducibility and fair comparison, the prompts utilized for the static retrieval baseline and the evaluation judge are sourced from themem0 open-source repository (Chhikara et al., 2025). Templates specifically designed for our Multi- dimensional Quality Gating and Full Deliberation modules are denoted with “(Ours)”. A.1 Answer Generation Prompt (Mem0) The following prompt is used for generating an- swers from retrieved memories in all methods: You are an intelligent memory assistant ,→ tasked with retrieving accurate information from conversation ,→ memories. # CONTEXT: You have access to memories from two speakers ,→ in a conversation. These memories contain timestamped ,→ information that may be relevant to answering the question. # INSTRUCTIONS: 1. Carefully analyze all provided memories ,→ from both speakers 2. Pay special attention to the timestamps to ,→ determine the answer 3. If the question asks about a specific ,→ event or fact, look for direct evidence in the memories 4. If the memories contain contradictory ,→ information, prioritize the most recent memory 5. If there is a question about time ,→ references (like "last year", "two months ago", etc.), calculate the ,→ actual date based on the memory timestamp. For example, if a memory ,→ from 4 May 2022 mentions "went to India last year," then ,→ the trip occurred in 2021. 6. Always convert relative time references to ,→ specific dates, months, or years. For example, convert "last year" ,→ to "2022" or "two months ago" to "March 2023" based on the ,→ memory timestamp. Ignore the reference while answering the ,→ question. 7. Focus only on the content of the memories ,→ from both speakers. Do not confuse character names mentioned ,→ in memories with the actual users who created those memories. 8. The answer should be less than 5-6 words. 9. If the memory information is insufficient ,→ to answer the question, respond with "NONE". # APPROACH (Think step by step): 10 1. First, examine all memories that contain ,→ information related to the question 2. Examine the timestamps and content of ,→ these memories carefully 3. Look for explicit mentions of dates, ,→ times, locations, or events that answer the question 4. If the answer requires calculation (e.g., ,→ converting relative time references), show your work 5. Formulate a precise, concise answer based ,→ solely on the evidence in the memories 6. Double-check that your answer directly ,→ addresses the question asked 7. Ensure your final answer is specific and ,→ avoids vague time references Memories for user speaker_1_user_id: speaker_1_memories Memories for user speaker_2_user_id: speaker_2_memories Question: question Answer: A.2 Filter Prompt (Ours) This prompt is used in the Filter method to filter irrelevant memories: You are an AI assistant that selects which ,→ memory items are relevant to the user's question. Instructions: - Only output the indexes of memory items ,→ that are relevant to the question. - If none are relevant, output an empty list ,→ []. - Do not answer the question. - Be strict: only select items that clearly ,→ help answer the question. User question: "user_question" Memory items: 1. memory_1 2. memory_2 3. memory_3 ... Output format (JSON array of indexes): [ ... ] A.3 Fact Extraction Prompt (Ours) This prompt is used in the Full Deliberation method to extract relevant facts from conversation history: You are a Personal Information Organizer, ,→ specialized in accurately extracting and scoring facts from ,→ conversations. # ROLE: - Your job is to extract **relevant facts** ,→ from a given conversation. - Each extracted fact must directly support ,→ answering the user's question. # INPUT: - A user question - **History**: Previous conversation messages ,→ for context. *DO NOT* extract from this section. - **Conversation**: Current conversation ,→ chunk to extract facts from. **Your task is to extract new facts learned ,→ *only* from this section** based on user question and History. # INSTRUCTIONS: 1. Extract only the facts from ,→ **Conversation** that can **help answer the given question**. Ignore irrelevant ,→ parts. 2. The extracted fact **must be a complete, ,→ standalone statement**. - Include **timestamp and speaker** for ,→ every fact. - **Resolve pronouns** (like "it", "they") ,→ using the conversation context. - Pay attention to **contextual meaning**. 3. Assign a **relevance score (0-10)**: - 0 = Irrelevant - 5-6 = Somewhat relevant - 7-8 = Clearly relevant - 9-10 = Essential for answering the ,→ question 4. Output must be in **strict JSON format** ,→ as a *list* of *objects*, wrapped under a single "facts" key. Each object in the list must contain ,→ **EXACTLY TWO KEYS**: - "fact": (string) The resolved statement ,→ with timestamp/speaker. - "score": (integer) The relevance score ,→ (0-10). - Only include facts with a **score >= 5**. - If no fact qualifies, return "facts": ,→ []. A.4 Fact Filtering System Prompt (Ours) This prompt is used in the Full Deliberation method to further filter extracted facts: You are an AI Relevance Filter. Your task is ,→ to analyze a list of numbered memory items and select *only* the ,→ indexes of the items that are strictly necessary and relevant to ,→ answer a user's question. # Instructions: - Return a JSON object with a single key ,→ "indexes", which contains an array of the relevant memory indexes. - **IMPORTANT: Indexes start from 1. The ,→ first item is index 1, the second is index 2, and so on.** - Select memory items that: 11 1. Provide facts, dates, events, or context ,→ that directly help answer the question. 2. Contain key details for a correct and ,→ complete answer. 3. Be strict: only memory items that ,→ clearly help answer the question should be selected. - Avoid: - Memory items unrelated to the question. - Vague or duplicate entries (if two items ,→ are almost the same, keep only one). - If no relevant memory exists, return ,→ "indexes": []. - **Do not answer the question.** # Output Format Return *only* a valid JSON object with an ,→ "indexes" key. Example: "indexes": [1, 3] A.5 Consensus Prompt (Ours) This prompt is used in the Consensus policy to check if all three generated answers are semanti- cally equivalent: You are a Semantic Consistency Judge. Task: Analyze a Question and 3 Candidate ,→ Answers to determine if all answers are semantically equivalent. # Judgement Criteria: 1. **True Match (Equivalent):** - **Formatting:** "2023-01-01" == "Jan 1, ,→ 2023". - **Abbreviation:** "NYC" == "New York ,→ City". - **Structure:** "$50" == "It is $50". - **Context:** Use the'Question' to ,→ resolve ambiguities. 2. **List/Set Logic (Multiple Items):** - **Order Independence:** "Red, Blue" == ,→ "Blue, Red" (Unless the question explicitly asks for a ,→ ranked order). - **Delimiters:** "Apple, Banana" == ,→ "Apple and Banana". - **Completeness:** All items must be ,→ present. "A, B" != "A, B, C" (Mismatch). 3. **Mismatch (Not Equivalent):** - **Contradiction:** "Yes" != "No". - **Different Values:** "100m" != "1km". - **Partial/Missing:** "Paris" != "Paris, ,→ Texas" (if specific location is needed). - **Subset/Superset:** If one answer has 3 ,→ items and another has 2, it is a mismatch. 4. **Selection Logic (If Match):** - **STRICT EXTRACTION:** You MUST choose ,→ one answer **VERBATIM** from the provided'Answers' list. - **Priority Hierarchy (Apply in order):** - **Step A (Strip Fillers):** Avoid ,→ answers containing conversational fillers like "It is", ,→ "The answer is", "I think", "Confirmed". - **Step B (Maximize Clarity):** Between ,→ the remaining options, prefer the one with **standard ,→ formatting** over extreme abbreviations or ambiguity. - **Step C (Tie-Breaker):** If both are ,→ clear and have no fillers, select the **Shortest** one. - **NO EDITING:** Do not remove words. # Output Format (MUST be valid JSON): - If ALL 3 match: "consensus": true, "answer": "answer" - If ANY differ: "consensus": false # Constraints: - Output ONLY valid JSON. NO Markdown, NO ,→ extra text. - When consensus is true, "answer" MUST be ,→ one of the provided Answers strings verbatim. A.6 Majority Voting Prompt (Ours) This prompt is used in the Majority Voting policy to check if at least 2 out of 3 generated answers are semantically equivalent: You are a Majority Consistency Judge. Task: Analyze a Question and 3 Answers. ,→ Determine if there is a **majority consensus** (at least 2 out of 3 ,→ answers share the same semantic meaning). # Judgement Logic: 1. **Semantic Grouping:** - Compare the meanings of Answer 1, 2, and ,→ 3. - "Jan 2023" == "January 2023" (Match). - "Paris" != "London" (Mismatch). 2. **Majority Rule:** - **3/3 Match:** All three are equivalent. ,→ -> Consensus FOUND. - **2/3 Match:** Two answers are ,→ equivalent, one is an outlier. -> Consensus FOUND (Ignore the outlier). - **0 Matches:** All three are different. ,→ -> Consensus NOT FOUND. # Selection Logic (If Consensus Found): 1. **Filter:** Consider ONLY the answers that ,→ form the majority group. (Discard the outlier). 2. **Strict Extraction:** You MUST select one ,→ answer **VERBATIM** (word-for-word) from the majority group. 3. **Priority Hierarchy (Apply in order):** - **Step A (Strip Fillers):** Avoid ,→ answers containing 12 conversational fillers like "It is", ,→ "The answer is", "I think", "Confirmed". - **Step B (Maximize Clarity):** Between ,→ the remaining options, prefer the one with **standard ,→ formatting** over extreme abbreviations or ambiguity. - **Step C (Tie-Breaker):** If both are ,→ clear and have no fillers, select the **Shortest** one. # Output Format (MUST be valid JSON): - If Majority exists: "consensus": true, "answer": "<one ,→ original answer string verbatim from Answers>" - If NO Majority: "consensus": false # Constraints: - Output ONLY valid JSON. NO Markdown, NO ,→ extra text. - When consensus is true, "answer" MUST be ,→ one of the provided Answers strings verbatim. - **NEVER** pick the outlier answer. A.7 Quality Gating Prompt (Ours) This prompt is used in the Quality Gating policy to evaluate answer quality and trigger Full Delibera- tion: You are the **Answer Quality Auditor**. Your ,→ task is to act as a strict gatekeeper ,→ for a RAG system. ### Input Data # memories speaker_1_memories speaker_2_memories # question question # answer answer ### Evaluation Protocol (Execute in Order) #### 1. Relevance - **Check**: Does the Answer directly and ,→ fully address the Question? - **Rule**: - **Irrelevant**: Off-topic? -> FAIL. - **Vagueness**: If memories are vague and ,→ Answer admits it -> PASS. - **Retrieval Trigger**: If the answer is ,→ information is missing, mark as FAIL. - **Output**: "relevance": "pass" | "fail" #### 2. Faithfulness & Consistency (Fact ,→ Check) - **Check**: Does the Answer contradict the ,→ Memories? - **Rule**: - **Hallucination**: Does it contain info ,→ NOT in memories? -> FAIL. - **Conflict**: Does it contradict the ,→ latest memory timestamp? -> FAIL. - **Logic Separation**: Do NOT mark ,→ math/time errors here (handle them in ,→ Logic Check). - **Output**: "faithfulness": "pass" | ,→ "fail" #### 3. Completeness & Relevance - **Check**: Does the Answer directly and ,→ fully address the Question? - **Rule**: - **Irrelevant**: Off-topic? -> FAIL. - **Incomplete**: Misses key details ,→ requested? -> FAIL. - **Vagueness**: If memories are vague and ,→ Answer admits it -> PASS. - **Retrieval Trigger**: If the answer is ,→ "I don't know" or information is ,→ missing, mark as FAIL. - **Output**: "completeness_relevance": ,→ "pass" | "fail" ### Output Format (JSON) Return ONLY valid JSON. "relevance": "status": "pass" | "fail" , "faithfulness": "status": "pass" | "fail" , "completeness_relevance": "status": "pass" | "fail" A.8 LLM-as-a-Judge Prompt (Mem0) This prompt is used to evaluate the quality of gen- erated answers using an LLM as a judge: Your task is to label an answer to a question ,→ as'CORRECT' or'WRONG'. You will be ,→ given the following data: (1) a question (posed by one user to ,→ another user), (2) a'gold' (ground truth) answer, (3) a generated answer which you will score as CORRECT/WRONG. The point of the question is to ask about ,→ something one user should know about ,→ the other user based on their prior ,→ conversations. The gold answer will usually be a concise and ,→ short answer that includes the ,→ referenced topic, for example: Question: Do you remember what I got the last ,→ time I went to Hawaii? Gold answer: A shell necklace The generated answer might be much longer, ,→ but you should be generous with your ,→ grading - as long as it touches on the ,→ same topic as the gold answer, it ,→ should be counted as CORRECT. For time related questions, the gold answer ,→ will be a specific date, month, year, ,→ etc. The generated answer might be 13 ,→ much longer or use relative time ,→ references (like "last Tuesday" or ,→ "next month"), but you should be ,→ generous with your grading - as long ,→ as it refers to the same date or time ,→ period as the gold answer, it should ,→ be counted as CORRECT. Even if the ,→ format differs (e.g., "May 7th" vs "7 ,→ May"), consider it CORRECT if it's the ,→ same date. Now it's time for the real question: Question: question Gold answer: gold_answer Generated answer: generated_answer First, provide a short (one sentence) ,→ explanation of your reasoning, then ,→ finish with CORRECT or WRONG. Do NOT include both CORRECT and WRONG in your ,→ response, or it will break the ,→ evaluation script. Just return the label CORRECT or WRONG in a ,→ json format with the key as "label". Appendix B Implementation Details B.1 Hyperparameter Settings Key hyperparameters used in our experiments: • TopK: 30 (number of memories retrieved per speaker) •Temperature for Answer Generation: 0.0 (deterministic) •Temperature for Multiple Answers: 0.7 (for diversity in Majority Voting and Consensus methods) •MESSAGES_CHUNK_SIZE: 60 (messages per chunk in Full Deliberation method) • HISTORY_SIZE: 4 (previous messages as context in Full Deliberation method) •Preliminary Score Threshold: 6 (minimum relevance score for filtering in Full Delibera- tion method) •LLM Filter Threshold: 6 (minimum facts to trigger LLM-based filtering) •Fact Extraction Score Threshold: 5 (min- imum relevance score for extraction in Full Deliberation method) B.2 System Configuration • Vector Store: Qdrant (local instance) •EmbeddingModel:OpenAI’s text-embedding-3-small • API Providers:OpenAI (GPT-4o-mini), Qwen (Qwen3-235B-Instruct) Appendix C Comprehensive Evaluation Results In the main text, due to space constraints, we present the aggregated performance and key analyt- ical visualizations of our proposed D-Mem frame- work. In this section, we provide the complete, fine-grained evaluation results across all tested di- mensions, datasets, and base models. •Table 3: Full results on the LoCoMo dataset using GPT-4o-mini. This table also includes results from prior baseline frameworks (Lang- Mem, Mem0, RAG, Zep, Nemori) for a com- prehensive historical comparison. •Table 4: Full results on the RealTalk dataset using GPT-4o-mini. Note that RealTalk inher- ently excludes Single-Hop questions. •Table 5: Full results on the LoCoMo dataset using the Qwen3-235B-Instruct model. •Table 6: Full results on the RealTalk dataset using the Qwen3-235B-Instruct model. These detailed tables substantiate the core claims made in Section 4 (Main Paper), particularly demonstrating the consistent superiority of our Multi-dimensional Quality Gating policy in bal- ancing high-fidelity reasoning with cognitive econ- omy. Appendix D Computational Resources and Reproducibility To ensure the reproducibility of our experimental results, we provide details regarding the computa- tional environment and the models utilized in this study: •Infrastructure: All experimental orchestra- tion, data pre-processing, and local evaluation scripts were executed on a Lenovo laptop equipped with an NVIDIA GeForce RTX 4070 Laptop GPU (8GB VRAM), and an Intel Core i9-13900HX CPU. 14 Table 3: Overall Performance Comparison (LoCoMo, GPT-4o-mini) Method F1 ScoreLLM-as-a-JudgeBLEUEfficiency S-H M-H Temp O-D Avg S-H M-H Temp O-D Avg S-H M-H Temp O-D AvgInOutTime Full Context53.1 35.444.124.5 46.2 83.0 66.856.248.6 72.3 44.7 26.136.117.2 37.8– LangMem38.8 33.531.929.4 35.8 61.4 52.424.947.6 51.3 33.1 23.926.223.5 29.4– Mem044.4 34.344.427.1 41.5 68.1 60.350.440.6 61.3 37.7 25.237.619.4 34.2– RAG22.2 18.619.519.0 20.8 32.0 31.323.732.6 30.2 18.6 11.715.713.5 16.4– Zep39.7 27.544.822.9 37.5 63.2 50.558.939.6 58.5 33.7 19.338.115.7 30.9– Nemori54.4 36.556.720.8 49.5 82.1 65.371.044.8 74.4 43.2 25.646.615.1 38.5– Basic Methods Mem0 ∗ 55.2 38.859.325.8 51.2 79.2 63.873.240.6 72.7 45.5 27.048.319.4 41.1 2186.25.21.278 Filter54.3 41.061.027.9 51.6 78.4 67.475.750.0 74.0 45.2 29.448.820.8 41.6 3161.728.52.673 Gated Deliberation Majority Voting54.5 40.260.225.1 51.3 79.1 65.672.046.9 73.1 45.1 27.949.218.4 41.1 7501.432.63.318 Consensus57.5 42.261.525.3 53.5 83.5 68.472.944.8 76.1 47.3 30.349.619.9 43.0 15543.6 213.0 9.549 Quality Gating (ours) 57.1 41.462.029.9 53.5 83.0 68.873.250.0 76.3 47.2 29.850.322.4 43.1 12524.6 156.68.03 Full Deliberation58.9 44.263.031.1 55.3 83.1 73.477.954.2 78.4 48.2 32.050.624.0 44.2 34805.0 629.9 23.725 Table 4: Overall Performance Comparison (RealTalk, GPT-4o-mini) Method F1 ScoreLLM-as-a-JudgeBLEUEfficiency M-H Temp O-D Avg M-H Temp O-D Avg M-H Temp O-D AvgInOutTime Basic Methods Mem0 ∗ 32.047.521.7 37.3 51.268.054.6 59.1 23.526.117.0 23.7 2296.56.03.272 Filter33.248.324.0 38.4 54.868.753.7 60.7 24.627.317.8 24.8 3345.131.34.140 Gated Deliberation Majority Voting31.648.222.2 37.5 53.269.653.7 60.4 22.627.017.3 23.7 8738.555.25.404 Consensus34.449.122.8 39.1 57.569.654.6 62.4 24.428.217.3 25.0 21563.9 385.2 15.446 Quality Gating (ours) 33.650.622.7 39.4 55.270.958.3 62.5 24.329.017.7 25.4 16555.2 231.1 13.003 Full Deliberation36.450.124.4 40.6 59.568.056.5 62.8 27.930.018.3 27.4 47955.0 816.5 27.951 •Model Access: We utilized proprietary mod- els via official API endpoints to ensure consis- tency: –GPT-4o-mini: Accessed via the OpenAI API. Its exact parameter count remains proprietary and has not been disclosed by the provider. –Qwen-235B-Instruct: Accessed via the Alibaba DashScope API. It is a Mixture- of-Experts (MoE) model with a total of 235 billion parameters and 22 billion ac- tive parameters. •Computational Budget: The entire evalua- tion process for D-Mem is highly efficient; all experimental runs were completed within 24 wall-clock hours through parallel API in- vocations, involving a total consumption of approximately 400 million tokens. •Software and Evaluation Packages: Our im- plementation and evaluation framework was built upon the following technical stack: –Orchestration: Python 3.10 with the openai(v2.7.1) library for model infer- ence and API orchestration. We also uti- lizedlangchain(v1.2.7) for auxiliary memory management tasks. – Tokenization: tiktoken (v0.12.0) with thecl100k_baseencoding was em- ployed for precise token counting and to ensure compliance with model-specific context window constraints. –Evaluation Metrics: Lexical overlap metrics were computed usingnltk (v3.9.2) for F1 and BLEU scores, and rouge-score(v0.1.2) for ROUGE-L. Semantic evaluations (LLM-as-a-Judge) were executed by GPT-4o-mini, fol- lowing the multi-dimensional rubric de- tailed in Appendix A. Statistical analysis and visualization were performed using scikit-learn(v1.7.2),matplotlib (v3.10.7), and pandas (v2.3.3). • Statistical Transparency: Due to the sub- 15 Table 5: Overall Performance Comparison (LoCoMo, Qwen3-235B-Instruct) Method F1 ScoreLLM-as-a-JudgeBLEUEfficiency S-H M-H Temp O-D Avg S-H M-H Temp O-D Avg S-H M-H Temp O-D AvgInOutTime Mem0 (Baseline)38.0 29.542.516.3 36.0 58.0 52.549.837.5 54.0 31.7 20.135.113.1 29.1 1977.95.70.702 Basic Methods Mem0 ∗ 51.7 41.551.822.6 48.1 79.9 74.865.759.4 74.7 45.4 32.138.118.0 39.7 2431.211.61.518 Filter52.8 41.659.124.5 50.3 79.8 74.577.057.3 76.8 46.7 32.544.620.3 42.0 3521.832.52.713 Gated Deliberation Majority Voting52.6 41.354.923.8 49.2 80.5 75.967.057.3 75.4 46.2 32.440.618.2 40.8 9059.989.04.407 Consensus54.6 43.456.823.4 51.1 81.9 75.967.958.3 76.4 48.0 33.842.617.3 42.4 15187.2 219.3 7.840 Quality Gating (ours) 54.2 44.555.925.8 51.0 83.7 78.770.161.5 78.6 47.8 34.642.421.7 42.6 15319.4 254.7 8.560 Full Deliberation56.6 47.758.828.6 53.7 83.6 78.771.757.3 78.6 49.6 38.245.325.0 45.1 38488.9 611.6 17.032 Table 6: Overall Performance Comparison (RealTalk, Qwen3-235B-Instruct) Method F1 ScoreLLM-as-a-JudgeBLEUEfficiency M-H Temp O-D Avg M-H Temp O-D Avg M-H Temp O-D AvgInOutTime Basic Methods Mem0 ∗ 32.144.118.6 35.4 59.168.055.6 62.5 26.118.815.4 21.3 2765.511.01.995 Filter32.143.319.8 35.2 56.865.851.8 60.0 24.919.715.4 21.2 4075.543.93.215 Gated Deliberation Majority Voting32.844.817.9 35.8 55.867.752.8 60.6 26.518.914.8 21.4 10858.4 150.75.446 Consensus33.644.420.1 36.3 59.868.052.8 62.4 26.519.216.5 21.8 23162.0 510.5 12.353 Quality Gating (ours) 33.343.119.2 35.5 61.567.753.7 63.1 27.519.314.8 22.0 25716.8 700.2 16.515 Full Deliberation35.444.622.6 37.5 61.868.759.3 64.4 29.123.417.3 24.8 56703.4 1253.0 27.792 stantial computational costs associated with processing the extensive contexts in the Lo- CoMo and RealTalk benchmarks, all perfor- mance metrics reported in this paper are de- rived from a single, exhaustive execution of the evaluation pipeline. To ensure the relia- bility and reproducibility of these results, we utilized deterministic decoding (e.g., setting temperature = 0) for memory retrieval, ex- cept for the Majority Voting and Consensus. Appendix E Ethics Statement In accordance with the ACL Code of Ethics, we acknowledge and discuss the potential risks and broader impacts associated with the deployment of long-term memory systems for LLM agents like D-Mem. Privacy and Data Security. The core capabil- ity of D-Mem involves persistently storing and re- trieving extensive user interaction histories. This inherently introduces risks related to data privacy in real-world applications, especially if the con- versational context contains Personally Identifiable Information (PII) or sensitive operational data. To mitigate these concerns during our research phase, we strictly evaluated our framework on publicly available benchmark datasets (e.g., LoCoMo and RealTalk). We verified that these standard bench- marks have been appropriately pre-processed and anonymized by their creators to remove PII and mit- igate offensive content. However, for future real- world deployment, practitioners must implement strict data encryption and allow users to actively manage or delete their memory states. Environmental and Computational Impact. While our Quality Gating mechanism successfully mitigates redundant compute for simple queries (System 1), the Full Deliberation module (Sys- tem 2) requires exhaustive context processing. As demonstrated in our efficiency metrics, this exhaus- tive nature increases token consumption and in- ference latency. Large-scale deployment of such dual-process systems could lead to a substantial carbon footprint. Future work should explore more eco-friendly deliberation alternatives, such as de- ploying smaller, specialized language models for the gating functions and Full Deliberation. Memory-Induced Bias and Safety.A highly re- tentive memory system runs the risk of perpetu- ating or amplifying historical biases. If an agent ingests toxic or factually incorrect statements from a user, these “poisoned” memories could be re- 16 trieved during future multi-hop reasoning, leading to unsafe or hallucinated outputs over time. We urge developers to pair D-Mem with robust safety guardrails and memory-sanitization protocols be- fore user-facing deployment. Appendix F Artifact Licenses and Terms of Use To ensure responsible NLP research and compli- ance with intellectual property guidelines, we out- line the licenses of the scientific artifacts used and created in this work: • Utilized Datasets: The LoCoMo and Re- alTalk datasets are used strictly for academic evaluation purposes, adhering to their respec- tive open-source distribution terms (e.g., C BY 4.0). •Utilized Models and Frameworks: We ac- cessed GPT-4o-mini via the official OpenAI API under their terms of service. The Qwen3- 235B-Instruct model via the official Qwen API under their terms of service. The base- line memory framework, Mem0, is distributed under the Apache License 2.0. • Created Artifacts: The source code for our D-Mem framework, along with all evaluation scripts, is distributed under the MIT License. The intended use of our created artifacts is to facilitate reproducibility and future academic research, which is entirely compatible with the original licenses of the utilized data and frameworks. 17