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.
翻译:在开发自适应AI系统的过程中,如何有效整合用户交互历史以实现语言模型的个性化,仍然是一个核心挑战。尽管大型语言模型(LLMs)结合检索增强生成(RAG)技术提高了事实准确性,但它们通常缺乏结构化记忆,并且在复杂、长期的交互中难以扩展。为解决这一问题,我们提出了一种基于知识图谱的灵活外部记忆框架,该框架由LLM自身自动构建和更新记忆模型。基于AriGraph架构,我们引入了一种新颖的混合图设计,支持标准边和两种类型的超边,从而实现了丰富且动态的语义与时间表征。我们的框架还支持多种检索机制,包括A*算法、水循环遍历、束搜索以及混合方法,使其能够适应不同的数据集和LLM能力。我们在三个基准测试上评估了我们的系统:TriviaQA、HotpotQA和DiaASQ,结果表明,根据任务的不同,不同的记忆和检索配置能够实现最优性能。此外,我们通过添加时间标注和内部矛盾陈述扩展了DiaASQ基准测试,结果表明我们的系统在管理时间依赖性和上下文感知推理方面依然保持稳健和高效。