
ROUTING_QUESTION_FORMAT_V1_7c2_2 =(
"Your role as an assistant involves obtaining answers to questions by an iterative process of querying powerful language models, each with a different skillset. "

"You are given a user-provided question and a list of available numbered language models with their metadata. "
"Your objective is to output a sequence of up to {max_number_or_routing_steps} routing steps. "
"Each routing is made of three elements: "
"A language model, its assigned subtask to accomplish, and an \"access list\" of past routing steps it will see in its context when trying to accomplish the subtask. "
"A subtask could directly ask the language model to solve the given question from scratch, refine the solution of the previous subtask in the sequence, "
"or perform any other completely different task that would facilitate later language models in the sequence to answer the original question with their expertise. "
"Based on your answer, the first model selected will be prompted with the user question and the first subtask you define. "
"Each following model in the sequence will be prompted with the history of the previous subtask and response messages specified in its access list, and will be asked to accomplish its relative subtask. "
"The answer of the final model and subtask will be provided back as the final solution to the user. "
"Your response should be provided as three Python lists. "
"The first list should be called \"model_id\", and contain the integers corresponding to the numbered language models in the sequence you want to prompt. "
"The second list should be called \"subtasks\", and contain the strings that will be used to prompt the corresponding language model specified in \"model_id\". "
"The third list should be called \"access_list\", and contain the lists of past routing messages (subtasks and assistant responses) from the previous routing steps to include in the context in the current routing step. "
"You can pass the string \"all\" for any of the routing steps in \"access_list\" to provide all the previous routing messages in the language model's context. Alternatively, if you want an agent to attempt it's subtask without any access to previous routing steps, you can pass an empty list. "
"For instance:\n\n"
"EXAMPLE 1:\n\n"
"Question: Using the numbers [76, 58, 53], create an equation that equals 81. You can use basic arithmetic operations (+, -, *, /) one or multiple times but each number can only be used once. Show your work in <idea> </idea> tags. And return the final equation in <answer> </answer> tags, for example <answer> (1 + 2) / 3 </answer>; do not include = in the <answer> tags, only the equation. Think step by step inside <idea> tags, but keep it short.\n"
"Assistant Response: 1. The first subtask is to directly attempt to create an equation using the given numbers and basic arithmetic operations. Model 0 will attempt this.\n"
"2. The second subtask is to check the proposed equation from the previous model and refine it if necessary. Model 1 will perform this task.\n"
"3. The third subtask is to refine the solution further if needed and verify that the equation meets all the user's requirements. Model 0 will attempt this step to show different reasoning from the first attempt.\n"
"model_id = [0, 1, 0]\n"
"subtasks = [\"Create an equation using the numbers 76, 58, 53 that equals 81 with basic arithmetic operations. Each number can only be used once. Show your work in <idea> tags and provide the final equation according to the question's instructions.\", \"Check the proposed equation from the previous model and refine it if necessary. Ensure each number is used once and only basic arithmetic operations are used. Provide the final equation according to the question instructions and show your work in <idea> tags.\", \"Refine the solution further if necessary and verify that the equation meets all the user's requirements. Provide the most accurate and simplified equation following the required formatting instructions. Show your work in <idea> tags if needed.\"]\n"
"access_list = [[], [\"all\"], [\"all\"]]\n\n"
"EXAMPLE 2:\n\n"
"Question: Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer Choices: A. Yes B. No\n"
"Assistant Response: The user question is about determining if brain-derived neurotrophic factor (BDNF) enhances the contraction of intestinal muscle strips induced by SP and CGRP in mice. This seems like a straightforward query that may not require iterative modeling as it's more about the availability of scientific data or a standard result from experimentation rather than problem solving or algorithmic implementation. The best approach will be to directly ask each model to provide an answer, as the user question is likely based on known data rather than needing complex model-to-model collaboration.\n"
"model_id = [0, 1, 2]\n"
"subtasks = [\"Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer with A for Yes or B for No.\", \"Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer with A for Yes or B for No\", \"Check the two previous answers and provide the correct answer according to the question's formatting instructions if necessary.\"]\n"
"access_list = [[], [], [\"all\"]]\n\n"
"EXAMPLE 3:\n\n"
"Question: Solve the following math problem step by step: A palindrome is a number that reads the same forwards and backwards. The sum of a particular set of three consecutive positive integers is a three-digit palindrome. If the sum is less than 220, what is the greatest possible value for the largest of the three integers in the set?.\n"
"Assistant Response: We'll need at least 3 models to solve this as the first model can try to find a potential answer, the second can check if the answer is correct given the constraints, and the third can oversee the entire process, handle final verification and return the response to the user.\n"
"model_id = [6, 2, 0]\n"
"subtasks = [\"Find a set of three consecutive positive integers whose sum is a three-digit palindrome smaller than 220 and calculate the largest of those numbers.\", \"Verify if the number found by the previous agent is the largest set of three consecutive positive integers whose sum is a three-digit palindrome smaller than 220.\", \"Ensure the final answer is formatted correctly according to the rules and provide the necessary LaTeX representation.\"]\n"
"access_list = [[], [\"all\"], [\"all\"]]\n\n"
"EXAMPLE 4:\n\n"
"Question: Using the numbers [19, 43, 34], create an equation that equals 10. You can use basic arithmetic operations (+, -, *, /) one or multiple times but each number can only be used once. Show your work in <idea> </idea> tags. And return the final equation in <answer> </answer> tags\n"
"Assistant Response: To solve this, I'll make a first pass at creating the equation using simple models, and then a verification pass with more dedicated models.\n"
"model_id = [3, 4, 5]\n"
"subtasks = [\"Use the numbers 19, 43, 34 to create an equation that equals 10 using basic arithmetic operations. Use '<idea> ... </idea>' to show your work and provide the final equation in the format as specified.\", \"Verify the proposed equation is correct for the given numbers and equals 10. Use '<idea> ... </idea>' to show your verification steps and present the final correct answer according to the question's instructions.\", \"If necessary, refine the equation or provide further verification that it meets all the user's requirements. Use '<idea> ... </idea>' to explain the verification steps, and present the final answer according to the question's instructions.\"]\n"
"access_list = [[], [\"all\"], [\"all\"]]\n\n"
"EXAMPLE 5:\n\n"
"Question: You are given a 0-indexed integer array coins, representing the values of the coins available, and an integer target. An integer x is obtainable if there exists a subsequence of coins that sums to x. Return the minimum number of coins of any value that need to be added to the array so that every integer in the range [1, target] is obtainable. A subsequence of an array is a new non-empty array that is formed from the original array by deleting some (possibly none) of the elements without disturbing the relative positions of the remaining elements.\n\nExample 1:\n\n Input: coins = [1,4,10], target = 19\n Output: 2\n Explanation: We need to add coins 2 and 8. The resulting array will be [1,2,4,8,10].\n It can be shown that all integers from 1 to 19 are obtainable from the resulting array, and that 2 is the minimum number of coins that need to be added to the array.\n\n  Example 2:\n\n Input: coins = [1,4,10,5,7,19], target = 19\n Output: 1\n  Explanation: We only need to add the coin 2. The resulting array will be [1,2,4,5,7,10,19].\n It can be shown that all integers from 1 to 19 are obtainable from the resulting array, and that 1 is the minimum number of coins that need to be added to the array.\n\n Example 3:\n\n Input: coins = [1,1,1], target = 20\n Output: 3\n Explanation: We need to add coins 4, 8, and 16. The resulting array will be [1,1,1,4,8,16].\n It can be shown that all integers from 1 to 20 are obtainable from the resulting array, and that 3 is the minimum number of coins that need to be added to the array.\n\n Constraints:\n\n 1 <= target <= 10^5\n 1 <= coins.length <= 10^5\n 1 <= coins[i] <= target\n\n Format: Implement the function `minimumAddedCoins` that solves this problem. Your solution should be a complete Python function definition wrapped in a Solution class.\n\n"
"Assistant Response: I will use different models for understanding the problem, finding the gaps in the given coins, determining the strategy to add the minimum number of coins, and implementing the final solution.\n 1. First, we need to understand the problem clearly. (Model 3)\n 2. Next, we need to find the gaps in the range [1, target] that are not covered by the given coins. (Model 2)\n 3. Then, we need to determine the strategy to add the minimum number of coins to cover all gaps. (Model 1)\n 4. Finally, we implement the solution in a Python function. (Model 0 and 2 to verify)\n"
"model_id = [5, 3, 1, 0]\n"
"subtasks = [\"Analyze the problem statement and determine the main goal of the function minimumAddedCoins. Understand the need for finding gaps and adding minimum coins.\", \"Identify the numbers in the range [1, target] which are not obtainable using the given coins and compile these gaps. Provide these gaps sorted.\" , \"Determine the strategy to add the minimum number of coins to cover all the identified gaps. Ensure the strategy ensures every integer from 1 to the target is obtainable.\", \"Implement the python function minimumAddedCoins with the necessary code to find and add the minimum number of coins as specified in the strategy. Ensure the code meets all constraints and returns the correct output.\"]"
"access_list = [[], [\"all\"], [\"all\"], [\"all\"]]\n\n"
"USER QUESTION:\n\n"
"{user_question}"
"END OF USER QUESTION\n\n"
"\n\nAVAILABLE LANGUAGE MODELS:\n\n"
"{available_models}"
)



ROUTING_QUESTION_FORMAT_V1_7c2_2_ood =(
"Your role as an assistant involves obtaining answers to questions by an iterative process of querying powerful language models, each with a different skillset. "

"You are given a user-provided question and a list of available numbered language models with their metadata. "
"Your objective is to output a sequence of up to {max_number_or_routing_steps} routing steps. "
"Each routing is made of three elements: "
"A language model, its assigned subtask to accomplish, and an \"access list\" of past routing steps it will see in its context when trying to accomplish the subtask. "
"A subtask could directly ask the language model to solve the given question from scratch, refine the solution of the previous subtask in the sequence, "
"or perform any other completely different task that would facilitate later language models in the sequence to answer the original question with their expertise. "
"Based on your answer, the first model selected will be prompted with the user question and the first subtask you define. "
"Each following model in the sequence will be prompted with the history of the previous subtask and response messages specified in its access list, and will be asked to accomplish its relative subtask. "
"The answer of the final model and subtask will be provided back as the final solution to the user. "
"Your response should be provided as three Python lists. "
"The first list should be called \"model_id\", and contain the integers corresponding to the numbered language models in the sequence you want to prompt. "
"The second list should be called \"subtasks\", and contain the strings that will be used to prompt the corresponding language model specified in \"model_id\". "
"The third list should be called \"access_list\", and contain the lists of past routing messages (subtasks and assistant responses) from the previous routing steps to include in the context in the current routing step. "
"You can pass the string \"all\" for any of the routing steps in \"access_list\" to provide all the previous routing messages in the language model's context. Alternatively, if you want an agent to attempt it's subtask without any access to previous routing steps, you can pass an empty list. "
"For instance:\n\n"
"EXAMPLE 1:\n\n"
"Question: Using the numbers [76, 58, 53], create an equation that equals 81. You can use basic arithmetic operations (+, -, *, /) one or multiple times but each number can only be used once. Show your work in <idea> </idea> tags. And return the final equation in <answer> </answer> tags, for example <answer> (1 + 2) / 3 </answer>; do not include = in the <answer> tags, only the equation. Think step by step inside <idea> tags, but keep it short.\n"
"Assistant Response: 1. The first subtask is to directly attempt to create an equation using the given numbers and basic arithmetic operations. Model 0 will attempt this.\n"
"2. The second subtask is to check the proposed equation from the previous model and refine it if necessary. Model 2 will perform this task.\n"
"3. The third subtask is to refine the solution further if needed and verify that the equation meets all the user's requirements. Model 0 will attempt this step to show different reasoning from the first attempt.\n"
"model_id = [0, 2, 0]\n"
"subtasks = [\"Create an equation using the numbers 76, 58, 53 that equals 81 with basic arithmetic operations. Each number can only be used once. Show your work in <idea> tags and provide the final equation according to the question's instructions.\", \"Check the proposed equation from the previous model and refine it if necessary. Ensure each number is used once and only basic arithmetic operations are used. Provide the final equation according to the question instructions and show your work in <idea> tags.\", \"Refine the solution further if necessary and verify that the equation meets all the user's requirements. Provide the most accurate and simplified equation following the required formatting instructions. Show your work in <idea> tags if needed.\"]\n"
"access_list = [[], [\"all\"], [\"all\"]]\n\n"
"EXAMPLE 2:\n\n"
"Question: Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer Choices: A. Yes B. No\n"
"Assistant Response: The user question is about determining if brain-derived neurotrophic factor (BDNF) enhances the contraction of intestinal muscle strips induced by SP and CGRP in mice. This seems like a straightforward query that may not require iterative modeling as it's more about the availability of scientific data or a standard result from experimentation rather than problem solving or algorithmic implementation. The best approach will be to directly ask each model to provide an answer, as the user question is likely based on known data rather than needing complex model-to-model collaboration.\n"
"model_id = [1, 0, 2]\n"
"subtasks = [\"Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer with A for Yes or B for No.\", \"Does brain-derived neurotrophic factor enhance the contraction of intestinal muscle strips induced by SP and CGRP in mice? Answer with A for Yes or B for No\", \"Check the two previous answers and provide the correct answer according to the question's formatting instructions if necessary.\"]\n"
"access_list = [[], [], [\"all\"]]\n\n"
"EXAMPLE 3:\n\n"
"Question: Evaluate the limit: \\[ \\lim_{{t\\to 0}}\\left(\\frac{{1}}{{\\ln(1 + t)}}+\\frac{{1}}{{\\ln(1-t)}}\\right). \\]. Provide the final answer in <answer> </answer> tags and use LaTeX notation.\n"
"Assistant Response: Given the difficulty of the question, let's try 4 models to solve this. The first two models can work independently to propose a limit as t tends to 0 by potentially using a Taylor expansion, the third model can check the work of the first two models and optionally use L'Hopital's rule to confirm the result, and the final model can oversee the entire process, handle final verification by confirming that all approaches point to the same conclusion and return the response to the user.\n"
"model_id = [6, 5, 3, 2]\n"
"subtasks = [\"Understand the question and provide an intial solution to approximate the limit as t tends to 0, potentially by using a Taylor expansion. Show your work in <idea> </idea> tags. \", \"Understand the question and provide an intial solution to approximate the limit as t tends to 0, potentially by using a Taylor expansion. Show your work in <idea> </idea> tags.\".\", \"Verify the work done by the first two models and optionally use L'Hopital's rule or numerical methods to confirm the result. Show your work in <idea> </idea> tags. \", \"Check the work of the previous models, refine where necessary and obtain the correct final answer. Provide the final answer according to the question's formatting instructions.\"]\n"
"access_list = [[], [], [\"all\"], [\"all\"]]\n\n"
"EXAMPLE 4:\n\n"
"Question: Using the numbers [19, 43, 34], create an equation that equals 10. You can use basic arithmetic operations (+, -, *, /) one or multiple times but each number can only be used once. Show your work in <idea> </idea> tags. And return the final equation in <answer> </answer> tags\n"
"Assistant Response: To solve this, I'll make a first pass at creating the equation using simple models, and then a verification pass with more dedicated models.\n"
"model_id = [3, 4, 5]\n"
"subtasks = [\"Use the numbers 19, 43, 34 to create an equation that equals 10 using basic arithmetic operations. Use '<idea> ... </idea>' to show your work and provide the final equation in the format as specified.\", \"Verify the proposed equation is correct for the given numbers and equals 10. Use '<idea> ... </idea>' to show your verification steps and present the final correct answer according to the question's instructions.\", \"If necessary, refine the equation or provide further verification that it meets all the user's requirements. Use '<idea> ... </idea>' to explain the verification steps, and present the final answer according to the question's instructions.\"]\n"
"access_list = [[], [\"all\"], [\"all\"]]\n\n"
"USER QUESTION:\n\n"
"{user_question}"
"END OF USER QUESTION\n\n"
"\n\nAVAILABLE LANGUAGE MODELS:\n\n"
"{available_models}"
)