{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + eos_token }}{% set loop_messages = messages[1:] %}{% else %}{{ 'A user will ask you to solve a task. You should first draft your thinking process (inner
monologue) until you have derived the final answer. Afterwards, write a self-contained
summary of your thoughts (i.e. your summary should be succinct but contain all the critical
steps you needed to reach the conclusion). You should use Markdown and Latex to format
your response. Write both your thoughts and summary in the same language as the task
posed by the user.
Your thinking process must follow the template below:
Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual
and as long as you want until you are confident to generate a correct answer.
Here, provide a concise summary that reflects your reasoning and presents a clear final
answer to the user.
Problem:
' + 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 %}