针对对话记忆的动态检索,设计可自适应跳过的混合查询流水线。
AgentIR: A Workload-Adaptive Cascade Retrieval Substrate for Long-Term Conversational Memory

- 基于查询置信度动态决定是否启用密集检索通道,实现快速跳过
- 在保持精度的前提下,最高提速5.76倍,吞吐量提升9倍
- 适配长对话场景,特别适合高并发实时系统
长期对话记忆是一种传统信息检索系统未充分支持的负载:索引随查询流增长,会话内查询类型变化,且每次检索延迟预算低于10毫秒。Lucene类引擎将索引视为静态、查询视为无状态,未能利用负载结构。AgentIR将融合策略作为每查询决策,沿两个维度选择:采用何种融合方式(BM25、稠密、RRF或代理感知的RRF),以及是否值得运行约52毫秒的稠密通道。第二个维度是仅依据BM25 top-k置信度的置信度触发级联路由,跨工作负载自调参无需重新训练。在LongMemEval(n=500)上,尽管稠密通道有信息增益,该级联仍能在与人工评估精度持平的情况下跳过63%查询(2.67倍更快,双评委下配对置换检验p≥0.88);按查询类型设定阈值后,在五折交叉验证下提速达5.76倍。在LoCoMo(n=1,982)上,当BM25本身已是最强单系统时,同一触发机制自动调至100%跳过率(132倍快,Hit@5提升+0.089)。共享8核虚拟机的承载能力从约154提升至约1,400个并发代理(9倍)。底层采用时间分区索引,其计算复杂度为O(log 1/ε),与语料库大小无关:语料库增长1234倍,延迟仅增加3.6倍,500万条记录下中位延迟低于100微秒,比顺序检索快1769倍。在9个BEIR数据集(最大880万文档)上,与Lucene精度相当,但该架构在Pyserini 8T上实现10倍几何平均加速,在PISA-1T BlockMax-WAND上达11倍;单张A100 GPU上达1.8–39倍加速;分块索引构建速度维持56.8K条/秒,适用于MS MARCO。三个隐蔽的BM25/GPU正确性陷阱被识别并修复,修复后CPU与GPU在所有八个能装入单张A100的测试集上,nDCG@10差异小于0.0002。
原文摘要 · Abstract (English)
Long-term conversational memory is a retrieval workload classical IR was not built for: the index grows during the query stream, query types shift intra-session, and the latency budget per retrieval is sub-10 ms. Lucene-class engines treat the index as static and the query as stateless, leaving the workload's structure unexploited. AgentIR treats fusion as a per-query decision along two axes: which fusion to apply (BM25, Dense, RRF, or agent-aware RRF), and whether the ~52 ms dense channel is worth running at all. The second axis is a confidence-triggered cascade router that decides from the BM25 top-k margin alone and re-tunes across workloads without retraining. On LongMemEval (n=500), where the dense channel does add information, the cascade skips 63% of queries at parity LLM-judged accuracy (2.67x faster under two judges, paired bootstrap p>=0.88); per-qtype thresholds extend this to 5.76x under 5-fold cross-validation. On LoCoMo (n=1,982), where BM25 alone is already the strongest single system, the same trigger auto-tunes to a 100% skip rate (132x faster, +0.089 Hit@5). Capacity on a shared 8-core VM rises from ~154 to ~1,400 concurrent agents (9x). Underneath the cascade, a time-partitioned index does O(log 1/epsilon) work independent of corpus size: 1234x corpus growth costs only 3.6x latency, ending in 1769x over sequential at sub-100 us p50 on 5M records. At parity quality with Lucene on 9 BEIR datasets up to 8.8M docs, the substrate runs 10x geo-mean over Pyserini 8T and 11x over PISA-1T BlockMax-WAND; an A100 reaches 1.8-39x over Pyserini 8T; chunked index build sustains 56.8K docs/sec on MS MARCO. Three subtle BM25/GPU correctness pitfalls that silently regress nDCG@10 by 6-8x are documented and fixed; post-fix CPU and GPU agree within 0.0002 nDCG@10 on all eight datasets that fit a single A100.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。