Incremental Context Distillation: A Tiered Memory Architecture for Efficient, Long-Context Conversational AI
State-of-the-art conversational agents built on Large Language Models (LLMs) are constrained by finite context windows and escalating computational costs. As dialogues lengthen, the naive approach of including the entire conversational history with each turn leads to prohibitive latency and API expenses, while simple truncation results in a significant loss of conversational coherence. To address this challenge, we propose Incremental Context Distillation (ICD), a novel memory management architecture for LLMs. ICD utilizes a tiered system comprising a volatile Short-Term Memory (STM) and a persistent, hierarchically compressed Long-Term Memory (LTM). The system periodically distills conversational turns from the STM into concise summaries, which are then integrated into the LTM. The LTM itself undergoes recursive compression to maintain a bounded token footprint. Our experiments, conducted over simulated 50-turn dialogues, demonstrate that ICD reduces the total token load by an average of 78% and API costs by 72% compared to a full-context baseline, while incurring only a negligible 4% reduction in human-rated coherence scores. This work presents a practical and effective solution for enabling long, coherent, and cost-efficient conversations with modern LLMs.
Paper
The full text of this publication is not hosted on 44B due to licensing.
Read it at OpenAlex