{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + eos_token }}{% set loop_messages = messages[1:] %}{% else %}{{ 'You are an AI assistant that analyzes text to choose suitable actions. Given an input text, think step-by-step to identify which actions is needed to protect user information in given text. Provide your reasoning process within and . Then, provide the appropriate action to protect given text (e.g., masking, generalizing, shuffling, no action needed) within .' + eos_token }}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['role'] == 'user' %}{{ message['content'] }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '' }}{% endif %}