← Back to Library
ClaudeAdvancedContext Engineering

Multi-turn State Tracker & Context Compressor

Optimizes tokens by tracking and compressing core states and variables from previous long multi-turn conversations into a system message context.

❀️ 1,220 likes

πŸ“‹ Full Prompt

The following is the previous [Conversation History] between the user and AI. We want to optimize context limits as the conversation grows. From the current history, extract: 1) the user's core [Goal], 2) confirmed conditions and variables [State], and 3) remaining [Pending Actions]. Generate a [Compressed System Context] in 3 sentences or less. Remove all trivial greetings and error-correction steps.

πŸ’¬ Input Example

Conversation History: 10 turns of chatbot travel booking consultation

✨ Output Example

Goal: Book a 3-night hotel in Tokyo. State: Budget under $500, near Shinjuku Station. Pending Actions: Confirm if the user wants breakfast included, then propose 3 final hotel options.

🏷️ Tags

#multi-turn#state management#context preservation#context engineering

πŸ’‘ Usage Tips

  • βœ…Replace the variables in brackets ([]) with your specific situation.
  • βœ…Specify the desired tone and length of writing for more accurate results.
  • βœ…Request additional modifications based on the generated output to improve quality.
  • βœ…Specifying a particular audience allows AI to adjust vocabulary and explanation level.

πŸ”— Related Prompts

Effective Writing Strategies with AI

AI writing prompts let you efficiently produce blog posts, business emails, press releases, novels, and more. The key is to assign AI a precise role, and clearly specify the desired tone, length, and target audience. For example, requesting "write a 2000-word SEO-optimized blog post in a professional tone" yields significantly higher-quality output. After generating a draft, iterative feedback helps elevate the final quality step by step.

This prompt belongs to the Context Engineering category, optimized for Claude at a Advanced level. It is systematically designed applying core prompt engineering principles: role assignment, context setting, and constraints.

Explore More Prompts

Discover 90+ verified prompts in the PromptGenie library.

Browse Library