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 +7 more
9/7/2026
cs.CLcs.IR
rag

Official code: Nikol-coder/MemLoc (4 stars, Python, last commit 2026-08-25).

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.

Show full abstract

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-K 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.

View on arXivView PDF

Code Implementations(1)

Nikol-coder/MemLocOfficial100%

[EMNLP 2026 Main] Official repository of "Where to Look and What to Use: Retrieve–Localize–Generate for Long-Term Conversational Memory Question Answering"

40Python, ShellAug 23, 20263 months ago

Similar Papers

Cite this paper

@article{wang2026where,
  title  = {Where to Look and What to Use: Retrieve-Localize-Generate for Long-Term Conversational Memory Question Answering},
  author = {Yifan Wang and Xinkui Lin and Yongxiu Xu and Shen Gao and Ruochen Yang and Kun Huang and Yubin Wang and Jie Wu and Wei Liu and Jian Luan and Hongbo Xu and Shuo Shang},
  year   = {2026},
  eprint = {2609.07093},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.07093v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.07093.svg)](https://codeofpaper.com/paper/2609.07093)

Discussion