Latency Optimization in Long-Context GPT-5 Dialogues Using Memory-Block Compression and Controlled Context Refresh

Read full text
Authors: Hemant Kushwaha
Cited by: 0

Abstract

This work investigates the problem of response latency escalation in long, multi-turn interactions with large language models (LLMs), such as GPT-5. As conversational history grows, transformer-based models repeatedly attend to an expanding context window, leading to significant increases in inference time and degraded user experience. The paper proposes a prompt-level optimization technique called the Memory-Block Protocol (MBP). MBP segments extended conversations into fixed-size blocks and replaces raw dialogue with compact semantic summaries, persistent state information, and a task ledger. By periodically refreshing the active context while preserving conversational continuity, the protocol bounds prompt growth and stabilizes response latency without requiring model retraining, architectural modification, or external memory infrastructure. An evaluation framework is presented to compare raw long-context conversations with MBP-optimized conversations across reasoning and technical tasks. The results indicate that MBP maintains semantic coherence while significantly improving responsiveness in long conversational sessions. The approach is model-agnostic and immediately applicable to real-world LLM usage in research, education, and professional workflows.

Fields of Study & Subjects

Speech and dialogue systems Topic Modeling Natural Language Processing Techniques

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
1 January 2026
Language
EN
Document type
Preprint