arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.13017cs.AIcs.CLcs.IR
收藏

结构化蒸馏用于个性化代理记忆:11倍token减少并保持检索能力

Structured Distillation for Personalized Agent Memory: 11x Token Reduction with Retrieval Preservation

Sydney Lewis

AI总结:

本文提出一种结构化蒸馏方法,将用户与代理的对话历史压缩至38个token,实现11倍压缩,同时保持检索性能,通过实验验证了压缩后检索质量的可靠性。

摘要:

长对话与AI代理创建了一个简单的问题:历史信息有用,但逐字携带成本高昂。我们研究了个性化代理记忆:将用户与代理的对话历史压缩成一个紧凑的检索层,以便后续搜索。每段对话被压缩成一个包含四个字段的复合对象(exchange_core, specific_context, thematic room_assignments, and regex-extracted files_touched)。压缩后的可检索文本平均每段对话38个token。应用于6个软件工程项目的4182次对话(14340次交互),该方法将平均交互长度从371降至38个token,实现11倍压缩。我们评估了压缩后个性化召回是否能保持,使用201个召回导向查询、107个配置(涵盖5种纯检索和5种跨层检索模式)以及5个LLM评估者(214519个共识评分查询-结果对)。最佳纯压缩配置达到最佳原文MRR的96%(0.717 vs 0.745)。结果依赖于机制。所有20种向量搜索配置在Bonferroni校正后仍不显著,而所有20种BM25配置显著下降(效应量|d|=0.031-0.756)。最佳跨层设置略微超过最佳纯原文基线(MRR 0.759)。结构化蒸馏在不均匀牺牲检索质量的情况下压缩单用户代理记忆。在1/11的上下文成本下,成千上万的交互可以放入单个提示中,而原文源仍可用于深入挖掘。我们发布了实现和分析流程作为开源软件。

英文摘要:

Long conversations with an AI agent create a simple problem for one user: the history is useful, but carrying it verbatim is expensive. We study personalized agent memory: one user's conversation history with an agent, distilled into a compact retrieval layer for later search. Each exchange is compressed into a compound object with four fields (exchange_core, specific_context, thematic room_assignments, and regex-extracted files_touched). The searchable distilled text averages 38 tokens per exchange. Applied to 4,182 conversations (14,340 exchanges) from 6 software engineering projects, the method reduces average exchange length from 371 to 38 tokens, yielding 11x compression. We evaluate whether personalized recall survives that compression using 201 recall-oriented queries, 107 configurations spanning 5 pure and 5 cross-layer search modes, and 5 LLM graders (214,519 consensus-graded query-result pairs). The best pure distilled configuration reaches 96% of the best verbatim MRR (0.717 vs 0.745). Results are mechanism-dependent. All 20 vector search configurations remain non-significant after Bonferroni correction, while all 20 BM25 configurations degrade significantly (effect sizes |d|=0.031-0.756). The best cross-layer setup slightly exceeds the best pure verbatim baseline (MRR 0.759). Structured distillation compresses single-user agent memory without uniformly sacrificing retrieval quality. At 1/11 the context cost, thousands of exchanges fit within a single prompt while the verbatim source remains available for drill-down. We release the implementation and analysis pipeline as open-source software.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑