AI
New Framework Helps AI Chatbots Remember Instructions Over Long Conversations
Researchers introduce REA, a context-management technique that prevents large language models from forgetting key instructions and conversation history in extended multi-turn chats.
Multi-turn conversations pose a persistent challenge for large language models: as dialogue extends over many exchanges, critical instructions and earlier context fade into the background, degrading the quality of responses. A research team has identified and addressed three distinct failure modes that underlie this problem.
The Problem: Contextual Decay#
As conversations grow longer, language models struggle to maintain fidelity to their original instructions and retain relevant prior exchanges. The researchers characterize this breakdown through three related phenomena:
- Attention pollution: irrelevant or contradictory information competing for focus
- Dilution: key constraints becoming obscured by accumulated noise
- Drift: the model gradually diverging from its intended behavior and conversational role
The Solution: Role-Aware Heuristic Episodic Attention#
The team proposes REA (Role-aware Heuristic Episodic Attention), a framework that applies different persistence strategies to different types of content. Rather than treating all conversation history equally, REA separates and manages:
- Instructional Memory: global constraints and role definitions stored in a dedicated prefix that remains stable throughout the conversation
- Episodic Memory: user inputs and model responses subject to selective compression and retrieval based on relevance
The system uses heuristic retrieval to decide, for each past turn, whether to preserve raw text, use a compressed summary, or omit the turn entirely.
Performance Gains#
Testing on Long-MT-Bench+—a benchmark for extended role-playing conversations—REA achieved substantial improvements:
- Judge score jumped from 6.32 to 7.36 on a 10-point scale (16.5% relative gain over baseline)
- Average latency reduced by 2.91x, improving responsiveness
- Gains observed across multiple model sizes (1.7B to 7B parameters)
- Effectiveness demonstrated in both English and Chinese role-playing tasks
These results suggest that role-aware context management offers a practical path toward sustaining instruction adherence and conversational continuity in extended interactions with language models.

