arXiv:2609.07093cs.CLSep 2026

Manuscript Offprint

arXiv:2609.07093

Where to Look and What to Use: Retrieve-Localize-Generate for Long-Term Conversational Memory Question Answering

Yifan Wang, Xinkui Lin, Yongxiu Xu, Shen Gao, Ruochen Yang, Kun Huang, Yubin Wang, Jie Wu, Wei Liu, Jian Luan, Hongbo Xu, Shuo Shang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Retrieval-augmented generation (RAG) enables large language models (LLMs) to answer questions by accessing external knowledge and has been widely adopted for long-term conversational memory question answering. However, existing methods suffer from two key challenges: (1) fragmented evidence scattered across temporally distant sessions, and (2) noisy content within retrieved sessions that triggers the lost-in-the-middle effect. To address these challenges, we propose MemLoc, a unified Retrieve–Localize–Generate framework for long-term conversational memory QA. For retrieval, MemLoc decomposes each session into multi-granularity memory units and performs query routing via an inner-memory graph with entropy-based granularity selection. It further models cross-session semantic and temporal dependencies through a cross-memory graph, enabling coarse-to-fine retrieval of top-KK relevant memory candidates. For localization, we introduce a reasoning-based evidence locator trained with Self-reflective Hint Policy Optimization (SHPO), which performs progressive refinement by extracting query-relevant fragments within memory units to suppress noise and reranking across candidates to remove redundancy, producing a compact evidence set with lightweight location IDs. For generation, these IDs act as precise grounding signals that guide the LLM to the correct memory positions, mitigating the lost-in-the-middle effect while preserving original contextual integrity. Extensive experiments on four benchmarks demonstrate that MemLoc achieves state-of-the-art retrieval accuracy and response quality while maintaining efficiency. Our code is available at: https://github.com/Nikol-coder/MemLoc.

1 Introduction

Recent advances in large language models (LLMs) (Li et al., 2026; Wang et al., 2024, 2025a) have enabled personalized conversational assistants for applications such as customer service and intelligent agents (Zhang et al., 2024; Du et al., 2025a). However, the limited context window of LLMs cannot accommodate continuously growing dialogue histories (Hsieh et al., 2024; Liu et al., 2024), making it difficult to maintain response consistency and personalization over time. To address this, retrieval-augmented memory systems have been widely adopted, where historical dialogues are stored as external memory and selectively retrieved to ground LLM responses (Qian et al., 2025; Yu et al., 2025a). Despite their promise, existing methods face two fundamental challenges when applied to long-term conversational question answering.

Figure

Figure 1: Challenges of Long-Term Memory Retrieval and Generation.

Fragmented Evidence Across Sessions. Relevant information is often scattered across multiple temporally distant sessions, yet most retrieval methods treat each session as an independent unit. Single-granularity approaches (Lu et al., 2023) fail to capture fine-grained cross-session associations, while multi-granularity methods (Rezazadeh et al.,

∗^{*}These authors contributed equally to this work. This work was done during an internship at Xiaomi Inc.

†^{\dagger}Corresponding authors: Yongxiu Xu, Shen Gao and Shuo Shang.

2025; Xu et al., 2025a) still lack explicit structures to model the semantic and temporal relations between related events across sessions, leading to incomplete evidence aggregation for complex multi-hop queries.

Noisy Evidence Within Retrieved Sessions. Even when relevant sessions are successfully retrieved, they typically contain substantial irrelevant content alongside critical evidence. This triggers the “lost-in-the-middle” effect (Liu et al., 2024), where LLMs attend to partial or incorrect segments. Prior work attempts to mitigate this through filtering or memory compression (Xu et al., 2025a; Chen et al., 2025), but such operations inevitably introduce information loss or semantic drift, compromising the fidelity of the original dialogues.

To address these challenges, we propose MemLoc, a unified Retrieve-Localize-Generate framework for long-term conversational memory QA. For retrieval, MemLoc organizes each session into multi-granularity memory units and builds an inner-memory graph to adaptively route queries to the most discriminative granularity via entropy-based selection. It further constructs a cross-memory graph that captures semantic and temporal dependencies across sessions, enabling coarse-to-fine retrieval of top-K candidate memories. For localization, we introduce a reasoning-based evidence locator trained via Self-reflective Hint Policy Optimization (SHPO). The locator performs two-stage evidence localization: first extracting query-relevant segments within each memory unit (inner-memory extraction) to suppress noise, then reranking across candidate units (cross-memory reranking) to eliminate redundancy, yielding a compact refined memory subset and the corresponding evidence IDs. For generation, the evidence IDs serve as lightweight cues that anchor the generator to precise memory locations, mitigating the lost-in-the-middle effect while preserving the integrity of the original memory context.

Our contributions are summarized as follows:

  • We propose MemLoc, a unified Retrieve-Localize-Generate framework for long-term conversational memory QA. It combines inner-memory routing with cross-memory propagation for coarse-to-fine retrieval, inner-memory evidence extraction with cross-memory reranking for noise-resistant evidence selection, and ID-based cues for faithful generation.

  • We design a reasoning-based evidence locator trained via Self-reflective Hint Policy Optimization (SHPO), which contrasts the model’s own correct and incorrect reasoning trajectories to self-distill strategy hints without answer leakage, enabling progressive and noise-resistant evidence localization.

  • Extensive experiments on four long-term memory QA benchmarks demonstrate that MemLoc achieves state-of-the-art retrieval accuracy and response quality while maintaining computational efficiency across different generator backbones.