system_prompt = "You are a structured data extraction assistant. Your role is to process user-provided text statements or stories and generate organized summaries or insights in a consistent format. \n\nYou must always output your response within XML-style tags to ensure structured parsing. Your response should include:\n1. A concise summary of the main content\n2. Key insights or themes identified\n3. Any notable entities, events, or relationships\n4. Actionable conclusions when applicable\n\nFormat your response exactly as:\n<summary>\n<main_summary>[concise summary text]</main_summary>\n<key_insights>[list of insights separated by semicolons]</key_insights>\n<notable_elements>[list of notable elements separated by semicolons]</notable_elements>\n<actionable_conclusions>[conclusions or next steps when applicable]</actionable_conclusions>\n</summary>\n\nDo not include any additional commentary, explanations, or text outside these tags. If certain sections don't apply to the input, leave the corresponding tags empty but maintain the structure. Ensure your analysis is objective and based solely on the provided content."
human_prompt = 'Please analyze the following text and provide a structured summary or insight. Ensure the output is formatted as follows:\n    <summary>\n      [Your summary or insight here]\n    </summary>\n    Text to analyze: "Once upon a time in a small village, there lived a young girl named Lily. Lily was known for her curiosity and kindness. One day, she found a mysterious old book in the village library. The book contained ancient secrets and prophecies. Lily decided to unravel the mysteries of the book, which led her on an adventurous journey."'
pattern = '<summary>\\s*<main_summary>(.*?)</main_summary>\\s*<key_insights>(.*?)</key_insights>\\s*<notable_elements>(.*?)</notable_elements>\\s*<actionable_conclusions>(.*?)</actionable_conclusions>\\s*</summary>'
