Personalizing language models that effectively incorporating user interaction history remains a central challenge in development of adaptive AI systems. While large language models (LLMs), combined with Retrieval-Augmented Generation (RAG), have improved factual accuracy, they often lack structured memory and fail to scale in complex, long-term interactions. To address this, we propose a flexible external memory framework based on knowledge graph, which construct and update memory model automatically by LLM itself. Building upon the AriGraph architecture, we introduce a novel hybrid graph design that supports both standard edges and two types of hyper-edges, enabling rich and dynamic semantic and temporal representations. Our framework also supports diverse retrieval mechanisms, including A*, water-circle traversal, beam search and hybrid methods, making it adaptable to different datasets and LLM capacities. We evaluate our system on three benchmarks: TriviaQA, HotpotQA, DiaASQ and demonstrate that different memory and retrieval configurations yield optimal performance depending on the task. Additionally, we extend the DiaASQ benchmark with temporal annotations and internally contradictory statements, showing that our system remains robust and effective in managing temporal dependencies and context-aware reasoning.
翻译:在自适应人工智能系统开发中,如何有效融合用户交互历史以实现语言模型个性化仍是一个核心挑战。尽管大型语言模型(LLMs)与检索增强生成(RAG)相结合提升了事实准确性,但它们通常缺乏结构化记忆能力,且在复杂长期交互中难以扩展。为此,我们提出一种基于知识图谱的灵活外部记忆框架,该框架通过LLM自身自动构建并更新记忆模型。基于AriGraph架构,我们引入了一种新颖的混合图设计,支持标准边与两类超边,从而实现了丰富且动态的语义与时间表征。本框架同时支持多样化检索机制,包括A*算法、水循环遍历、束搜索及混合方法,使其能够适配不同数据集与LLM能力。我们在TriviaQA、HotpotQA和DiaASQ三个基准数据集上评估系统性能,结果表明不同记忆与检索配置在不同任务中均能实现最优性能。此外,我们通过时间标注与内部矛盾陈述对DiaASQ基准进行扩展,证明本系统在管理时间依赖性与上下文感知推理方面始终保持鲁棒性与高效性。