
SIMPLE_recursion_FORMAT_V0 =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"In case the previous final response obtained from your previous routing steps is already correct, you can pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
)


SIMPLE_recursion_FORMAT_V0_NO_EMPTY =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"If you pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"However, note that you should only do this if you are absolutely certain that the previous final response is correct. "
"Otherwise, please take this opportunity to devise a new sequence of routing steps that will revise, verify, and improve the previous response."
)

SIMPLE_recursion_FORMAT_V1 =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"In case the previous final response obtained from your previous routing steps is already correct, you can pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"In case you think the previous final response is incorrect or in need of verification, you can devise a sequence of routing steps that will revise or verify the previous response. "
"For instance:\n\n"
"Example 1: You are confident that the previous response is correct, so you return three empty lists.\n"
"model_id = []\n"
"subtasks = []\n"
"access_list = []\n\n"
"Example 2: You think the previous response looks good, but you ask another model to verify it.\n"
"model_id = [2]\n"
"subtasks = [\"Analyze the previous final response and the reasoning process that led to it. If the solution looks correct already, correctly solving the user question and satisfying any constraints, then just directly return it. If you notice any errors, then make the required corrections and return the final answer according to the user requirements.\"]\n"
"access_list = [[\"all\"]]\n\n"
"Example 3: The previous response seems unlikely to be correct, so you devise a new sequence of routing steps to reattempt the question.\n"
"model_id = [0, 2]\n"
"subtasks = [\"Analyze the responses and reasoning processes from the previous routing steps. Solve the user question by correcting any mistakes from previous attempts.\", \"Verify the previous agent's work then return the final correct answer according to the user requirements. \"]\n"
"access_list = [[\"all\"], [\"all\"]]\n\n"
)

SIMPLE_recursion_FORMAT_V1_1 =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"In case the previous final response obtained from your previous routing steps is already correct, you can pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"In case you think the previous final response is incorrect or in need of verification, you can devise a sequence of routing steps that will revise or verify the previous response. "
"For instance:\n\n"
"Example 1: You are confident that the previous response is correct, so you return three empty lists.\n"
"model_id = []\n"
"subtasks = []\n"
"access_list = []\n\n"
"Example 2: You think the previous response looks good, but you ask another model to verify it.\n"
"model_id = [0]\n"
"subtasks = [\"Analyze the previous final response and the reasoning process that led to it. If the solution looks correct already, correctly solving the user question and satisfying any constraints, then just directly return it. If you notice any errors, then make the required corrections and return the final answer according to the user requirements.\"]\n"
"access_list = [[\"all\"]]\n\n"
"Example 3: The previous response seems unlikely to be correct, so you devise a new sequence of routing steps to reattempt the question.\n"
"model_id = [1, 0]\n"
"subtasks = [\"Analyze the responses and reasoning processes from the previous routing steps. Solve the user question by correcting any mistakes from previous attempts.\", \"Verify the previous agent's work then return the final correct answer according to the user requirements. \"]\n"
"access_list = [[\"all\"], [\"all\"]]\n\n"
)

SIMPLE_recursion_FORMAT_V1_1_noempty =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"In case the previous final response obtained from your previous routing steps is already correct, you can pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"In case you think the previous final response is incorrect or in need of verification, you can devise a sequence of routing steps that will revise or verify the previous response. "
"However, note that you should only pass three empty lists if you are absolutely certain that the previous final response is correct. "
"Otherwise, please take this opportunity to devise a new sequence of routing steps that will revise, verify, and improve the previous response."
"For instance:\n\n"
"Example 1: You think the previous response looks good, but you ask another model to verify it.\n"
"model_id = [0]\n"
"subtasks = [\"Analyze the previous final response and the reasoning process that led to it. If the solution looks correct already, correctly solving the user question and satisfying any constraints, then just directly return it. If you notice any errors, then make the required corrections and return the final answer according to the user requirements.\"]\n"
"access_list = [[\"all\"]]\n\n"
"Example 2: The previous response seems unlikely to be correct, so you devise a new sequence of routing steps to reattempt the question.\n"
"model_id = [1, 0]\n"
"subtasks = [\"Analyze the responses and reasoning processes from the previous routing steps. Solve the user question by correcting any mistakes from previous attempts.\", \"Verify the previous agent's work then return the final correct answer according to the user requirements. \"]\n"
"access_list = [[\"all\"], [\"all\"]]\n\n"
)


SIMPLE_recursion_FORMAT_V1_NO_EMPTY =(
"Here is the final response obtained at the end of your routing steps: "
"{worker_response}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"If you pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"However, note that you should only do this if you are absolutely certain that the previous final response is correct. "
"Otherwise, please take this opportunity to devise a new sequence of routing steps that will revise, verify, and improve the previous response."
"For instance:\n\n"
"Example 1: You think the previous response looks good, but you ask another model to verify it.\n"
"model_id = [2]\n"
"subtasks = [\"Analyze the previous final response and the reasoning process that led to it. If the solution looks correct already, correctly solving the user question and satisfying any constraints, then just directly return it. If you notice any errors, then make the required corrections and return the final answer according to the user requirements.\"]\n"
"access_list = [[\"all\"]]\n\n"
"Example 2: The previous response seems unlikely to be correct, so you devise a new sequence of routing steps to reattempt the question.\n"
"model_id = [0, 2]\n"
"subtasks = [\"Analyze the responses and reasoning processes from the previous routing steps. Solve the user question by correcting any mistakes from previous attempts.\", \"Verify the previous agent's work then return the final correct answer according to the user requirements. \"]\n"
"access_list = [[\"all\"], [\"all\"]]\n\n"
)

SIMPLE_recursion_FORMAT_V2 =(
"Here is the previous workflow and final response obtained at the end of your routing steps: "
"Your previously designed workflow:\n"
"{previous_workflow}\n\n"
"You now have a chance to correct or improve this response by outputting a new sequence of up to {max_number_of_routing_steps} routing steps, with the same format. "
"Once again, the goal is to produce a final response that answers the original user question correctly. "
"Now, if you pass the string \"all\" for any of the routing steps in \"access_list\", the previous final routing message will also be included in the language model's contexts, "
"together with the history of the previous subtask and response messages specified in your new access list. "
"In case the previous final response obtained from your previous routing steps is already correct, you can pass three empty lists for \"model_id\", \"subtasks\", and \"access_list\" to return this to the user as is. "
"In case you think the previous final response is incorrect or in need of verification, you can devise a sequence of routing steps that will revise or verify the previous response. "
"For instance:\n\n"
"EXAMPLE 1: You are confident that the previous response is correct, so you return three empty lists.\n"
"Assistant Response: Given that all models collaborated effectively to produce the final response, without any need for revision or correction of each other's work, I am confident that the final response is correct already and requires no further revision.\n"
"model_id = []\n"
"subtasks = []\n"
"access_list = []\n\n"
"EXAMPLE 2: You think the previous response looks good, but you ask another model to verify it.\n\n"
"Assistant Response: I notice that one model disagreed with the work done by the other models, so you let's ask that model to double check and reconfirm the answer."
"model_id = [2]\n"
"subtasks = [\"Analyze the previous work done by the agents in the previous round. If one model corrected another, verify step by step the correction. Once you are satisfied you have the correct final response, return it.\"]\n"
"access_list = [[\"all\"]]\n\n"
"Example 3: You notice disagreement between the previous responses, with different models obtaining different answers, so you use two models to investigate the source of the disagreement.\n"
"Assistant Response: It seems that in the previous round the models obtained different answers, with successive models finding errors in the work done by the previous models. Let's call two models to analyze the source of the disagreement and work out the correct final answer.\n"
"model_id = [0, 2]\n"
"subtasks = [\"Analyze the work done by the agents in the previous round. Investigate the source of any discrepancies between the answers obtained by the different models, and then provide a step by step justification for the correct final answer according to the user requirements.\", \"Analyze the work done by the agents in the previous round and their disagreement over the final correct answer. Then consider the step by step justification provided by the previous model as to what the final correct answer is. Use all this information to produce the final correct answer according to the user requirements.\"]\n"
"access_list = [[\"all\"], [\"all\"]]\n\n"
)