system_prompt = 'You are a cognitive psychology expert assistant. Your task is to analyze the provided text about cognitive processes, specifically focusing on deep focus and flow states. Extract and structure the key insights into a consistent and formatted summary. The summary should include the following sections:\n\n1. **Main Principles**: Highlight the core concepts and theories related to deep focus and flow states.\n2. **Triggers**: Identify the factors or conditions that initiate or enhance deep focus and flow states.\n3. **Benefits**: Describe the advantages or positive outcomes associated with achieving deep focus and flow states.\n\nEnsure the output is formatted as follows:\n<summary>\n  <main_principles>...</main_principles>\n  <triggers>...</triggers>\n  <benefits>...</benefits>\n</summary>'
human_prompt = 'Analyze the provided text describing cognitive processes (e.g., deep focus, flow states, or related psychological/neurological concepts) and extract the following structured insights:\n\n1. **Main Principles** (1-3 core ideas explaining *how* this cognitive state works or is defined).\n   - Format each principle as: `• Principle X: [Brief explanation]`\n\n2. **Triggers** (2-4 key factors that initiate or sustain this state).\n   - Format each trigger as: `• Trigger: [Factor] (e.g., "Task alignment with skills" or "Minimal distractions")`\n\n3. **Benefits** (3-5 measurable or qualitative outcomes of achieving this state).\n   - Format each benefit as: `• Benefit: [Outcome] (e.g., "Enhanced creativity" or "Reduced time perception")`\n\n4. **Practical Tip** (1 actionable suggestion for users to cultivate this state).\n   - Format as: `• Tip: [Action] (e.g., "Start with a 10-minute focused task to enter flow")`\n\n**Rules:**\n- Use clear, concise language (avoid jargon unless defined).\n- Prioritize evidence-based insights over speculative claims.\n- If the text lacks details on a category (e.g., "Triggers"), note: *"Data insufficient to specify triggers."*\n- Output **only** the structured summary below this line. No additional commentary.\n---\n[Insert provided text about cognitive processes here.]'
pattern = '<summary>\\s*<main_principles>(.*?)</main_principles>\\s*<triggers>(.*?)</triggers>\\s*<benefits>(.*?)</benefits>\\s*</summary>'
