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

长程LLM推理的上下文回收

Context Recycling for Long-Horizon LLM Inference

Independent Researcher(独立研究员)

Derek Thomas

AI总结:

提出ContextForge系统,通过结构化查询生成、外部记忆检索和受控合成实现上下文回收,在15轮对话基准中减少令牌消耗并保持回答质量。

摘要:

大型语言模型(LLM)在短上下文推理中表现出强大能力,但由于上下文窗口限制和低效的令牌使用,在长时间对话中的性能会下降。我们引入了ContextForge,一个用于上下文回收的系统,通过结合结构化查询生成、外部记忆检索和受控合成,在对话轮次中维护任务相关信息。该系统能够在不依赖完整上下文重放的情况下高效重用先前的计算,从而在保持答案质量的同时减少令牌开销。我们使用一个15轮对话基准来评估ContextForge,该基准测试了结构化医疗查询中的多轮推理、反向引用和领域转移。与使用相同底层模型的基线代理相比,ContextForge在保持可比响应准确性的同时,展示了一致性的提高和令牌消耗的减少。这些结果表明,上下文回收为扩展LLM在长程任务中的能力提供了一种实用方法,而无需更大的上下文窗口或模型重新训练。代码和评估工件可从此https URL获取。

英文摘要:

Large language models (LLMs) exhibit strong capabilities in short-context reasoning but degrade in performance over long conversational horizons due to context window limitations and inefficient token usage. We introduce ContextForge, a system for context recycling that maintains task-relevant information across turns by combining structured query generation, external memory retrieval, and controlled synthesis. The system enables efficient reuse of prior computation without relying on full context replay, reducing token overhead while preserving answer quality. We evaluate ContextForge using a 15-turn conversational benchmark that tests multi-turn reasoning, back-references, and domain shifts across structured healthcare queries. Compared to a baseline agent using identical underlying models, ContextForge demonstrates improved consistency and reduced token consumption, while maintaining comparable response accuracy. These results suggest that context recycling provides a practical approach for extending LLM capabilities in long-horizon tasks without requiring larger context windows or model retraining. Code and evaluation artifacts are available at https://github.com/Betanu701/ContextForge.

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

↑