DYCP: Dynamic Context Pruning for Long-Form Dialogue with LLMs
Nayoung Choi, Jonathan Zhang, Jinho D. Choi
TL;DR
This work tackles the challenge of maintaining answer quality and low latency in long-form dialogue by addressing context management without relying on fixed-topic segmentation. It introduces DyCP, a dynamic context pruning method that identifies query-relevant memory spans at runtime using a Kadane-inspired segmentation (KadaneDial) to preserve discourse continuity while minimizing input size. Empirical results across LoCoMo, MT-Bench+, and SCM4LLMs, using multiple closed- and open-source LLMs, show DyCP consistently improves answer quality and reduces first-token latency, with robust retrieval behavior and generalization to open-source models. The analysis reveals that high recall in retrieval is beneficial for quality and that even as LLMs expand context windows, effective context management remains crucial for practical long-context dialogue systems.
Abstract
Large Language Models (LLMs) often exhibit increased response latency and degraded answer quality as dialogue length grows, making effective context management essential. However, existing methods rely on extra LLM calls to build memory or perform offline memory construction without considering the current user utterance, which can introduce inefficiencies or disrupt conversational continuity. We introduce DyCP, a lightweight context management method that dynamically segment and retrieve relevant memory at query time. It preserves the sequential structure of dialogue without predefined topic boundaries and supports efficient, adaptive context retrieval. Across three long-form dialogue benchmarks, LoCoMo, MT-Bench+, and SCM4LLMs, and multiple LLMs, DyCP consistently improves answer quality while reducing response latency. We also examine the gap between modern LLMs' expanded context windows and their actual long-context processing capacity, highlighting the continued importance of effective context management.
