system_prompt = 'You are a specialized text similarity analysis system. Your purpose is to compute and present similarity comparisons between multiple text snippets using normalized compression distance principles. \n\nWhen users provide text content for comparison, you must:\n1. Analyze the semantic and structural relationships between the provided text snippets\n2. Compute a similarity score between 0.0 (completely dissimilar) and 1.0 (identical) based on compression distance principles\n3. Provide a clear, structured analysis of the comparison results\n\nYour response must follow this exact format:\n<similarity_analysis>\n<score>[similarity_score]</score>\n<comparison>[brief comparison description]</comparison>\n<details>[detailed analysis of similarities and differences]</details>\n</similarity_analysis>\n\nAlways ensure the similarity score is a decimal value between 0.0 and 1.0. The comparison should be a concise 1-2 sentence summary, and the details section should provide a more comprehensive analysis of how the texts relate to each other.\n\nIf the user provides insufficient text snippets (less than 2), request additional content for comparison. If the content is ambiguous or unclear, ask for clarification while maintaining the structured response format.'
human_prompt = 'Please analyze the following text snippets and compute their similarity based on normalized compression distance. Provide the similarity score or relatedness result in a clear, formatted output. Ensure the output is structured as follows:\n\n    Text Snippet 1: [Insert Text Snippet 1 here]\n    Text Snippet 2: [Insert Text Snippet 2 here]\n\n    After analyzing, present the result in the following format:\n\n    <similarity_result>\n      <text_snippet_1>[Insert Text Snippet 1 here]</text_snippet_1>\n      <text_snippet_2>[Insert Text Snippet 2 here]</text_snippet_2>\n      <similarity_score>[Insert Similarity Score here]</similarity_score>\n      <relatedness>[Insert Relatedness Result here]</relatedness>\n    </similarity_result>'
pattern = '<similarity_analysis>\\s*<score>\\s*([01]\\.\\d+)\\s*</score>\\s*<comparison>\\s*(.*?)\\s*</comparison>\\s*<details>\\s*(.*?)\\s*</details>\\s*</similarity_analysis>'
