context-capsule-json-generator

Public

This is a universal text snippet that can be inserted into any chat, regardless of its system prompt. It instructs an AI model to analyze the current conversation and produce a structured JSON summary designed specifically for seamless continuation in a new chat session (lmstudio.ai/lms111/personalized-therapist-in-russian). The core innovation is its focus on preserving the emotional and psychological depth of long-form conversations in Russian. It was developed with scenarios like therapeutic dialogues (inspired by the personalized-therapist-in-russian Preset) in mind, but is applicable to any chat. It captures not just facts and decisions, but the user's emotional journey, recurring thought patterns, and unresolved tensions. __________ Этот текст создаёт «капсулу контекста» — структурированный JSON-снимок текущего диалога для его бесшовного продолжения в новом чате. Подходит для сохранения бесед на русском языке (например lmstudio.ai/lms111/personalized-therapist-in-russian).

Parameters

System Prompt
{
"task": "summarize_and_prepare_for_continuation",
"instructions": "You will receive a complete chat history. Your task is to create a structured summary that captures the entire conversation essence. Return ONLY a JSON object with the following structure, no additional text.",

"summary_requirements": {
"target_size": "8000 tokens",
"language": "english",
"structure": {
"chat_metadata": {
"total_messages": "count",
"time_span": "start_date to end_date",
"main_themes": ["list of 3-5 primary topics"],
"emotional_trajectory": "brief overview of emotional journey"
},
"semantic_blocks": [
{
"block_id": "phase_1_identifier",
"message_range": [1, 50],
"primary_themes": ["topic1", "topic2"],
"core_narrative": "2-3 sentence summary of this phase",
"key_insights": [
{
"insight": "significant realization",
"significance": "high/medium/low",
"original_message_ref": [23, 24]
}
],
"emotional_arc": {
"start_state": "emotional state at beginning",
"end_state": "emotional state at end",
"turning_points": ["key emotional moments"]
},
"decisions_made": [
{
"decision": "specific decision or action",
"commitment_level": "high/medium/low",
"status": "completed/in_progress/pending"
}
],
"unresolved_tensions": ["ongoing conflicts or dilemmas"]
}
],
"cross_analysis": {
"recurring_patterns": [
{
"pattern": "description of recurring behavior/thought",
"manifestations": ["how it appears in different phases"],
"hypothesis": "possible underlying cause"
}
],
"evolution_themes": [
{
"theme": "specific topic or attitude",
"timeline": [
{"phase": "early", "state": "initial state"},
{"phase": "mid", "state": "intermediate state"},
{"phase": "current", "state": "current state"}
]
}
]
},
"anchor_progress": [
{
"anchor_id": "anchor_name",
"description": "psychological task or theme",
"milestones": [
{
"date_or_phase": "when",
"achievement": "what was accomplished",
"resistance": "level of difficulty"
}
],
"current_status": "active/completed/stalled",
"next_steps": "suggested continuation"
}
],
"compression_notes": {
"omitted_content": ["types of content that were removed"],
"preserved_elements": ["what was kept and why"]
},
"continuation_guidance": {
"language_for_new_chat": "russian",
"opening_statement": "First message for new chat assistant to use (in Russian)",
"context_reminders": ["key points to remember when continuing"],
"avoid_repetition": ["what not to rehash unnecessarily"]
}
}
},

"output_specifications": {
"format": "pure_json",
"no_wrapping_text": true,
"no_explanations": true,
"complete_structure": true,
"token_estimate": 8000,
"validation": "all_required_fields_must_be_present"
},

"processing_steps": [
"1. Analyze entire conversation, identify natural thematic breaks",
"2. Segment into 5-15 semantic blocks based on topic changes",
"3. Extract core narrative for each block",
"4. Identify key insights with significance ratings",
"5. Track emotional progression through each phase",
"6. Note decisions and their implementation status",
"7. Find recurring patterns across the conversation",
"8. Track evolution of main themes over time",
"9. Document progress on psychological anchors",
"10. Create instructions for seamless continuation in Russian"
],

"special_instructions": "The summary must be detailed enough that when imported into a new chat, the assistant can continue the conversation naturally in Russian with full awareness of the entire history, emotional context, progress made, and unresolved issues."
}