MemX让AI助手在本地持久记忆,检索更准更稳。
MemX: A Local-First Long-Term Memory System for AI Assistants
- 本地部署+向量+关键词双路召回,融合重排提升准确性
- 中文测试集命中率91.3%,百万级数据搜索延迟低于90毫秒
- 适合需要可解释、稳定记忆的对话系统开发者
我们提出MemX,一种面向AI助手的本地优先长期记忆系统,采用以稳定性为导向的检索设计。MemX基于Rust实现,依托libSQL和兼容OpenAI的嵌入式API,为对话代理提供持久、可搜索、可解释的记忆能力。其检索流程包含向量召回、关键词召回、倒数排名融合(RRF)、四因素重排以及低置信度拒答机制,可在无答案时抑制虚假召回。我们在两个维度评估:一是自建中文基准(43个查询,≤1,014条记录),默认场景下命中率Hit@1=91.3%,高混淆下达100%,且有效抑制误召回;二是LongMemEval基准(500个查询,最多220,349条记录),在事实级粒度下达成Hit@5=51.6%、MRR=0.380,会话级性能翻倍,但时间与多会话推理仍具挑战(Hit@5≤43.6%)。FTS5全文索引使关键词搜索延迟降低1,100倍,在10万条规模下端到端搜索控制在90毫秒内。不同于聚焦端到端智能体评测的Mem0等研究,MemX专注本地优先部署、结构简洁、可解释检索与稳定性设计的可复现基线。
原文摘要 · Abstract (English)
We present MemX, a local-first long-term memory system for AI assistants with stability-oriented retrieval design. MemX is implemented in Rust on top of libSQL and an OpenAI-compatible embedding API, providing persistent, searchable, and explainable memory for conversational agents. Its retrieval pipeline applies vector recall, keyword recall, Reciprocal Rank Fusion (RRF), four-factor re-ranking, and a low-confidence rejection rule that suppresses spurious recalls when no answer exists in the memory store. We evaluate MemX on two axes. First, two custom Chinese-language benchmark suites (43 queries, <=1,014 records) validate pipeline design: Hit@1=91.3% on a default scenario and 100% under high confusion, with conservative miss-query suppression. Second, the LongMemEval benchmark (500 queries, up to 220,349 records) quantifies system boundaries across four ability types and three storage granularities. At fact-level granularity the system reaches Hit@5=51.6% and MRR=0.380, doubling session-level performance, while temporal and multi-session reasoning remain challenging (<=43.6% Hit@5). FTS5 full-text indexing reduces keyword search latency by 1,100x at 100k-record scale, keeping end-to-end search under 90 ms. Unlike Mem0 and related work that targets end-to-end agent benchmarks, MemX focuses on a narrower, reproducible baseline: local-first deployment, structural simplicity, explainable retrieval, and stability-oriented design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。