|
21 | 21 | </input> |
22 | 22 | <output id=0> |
23 | 23 | I need to use agent_0 to perform 3+5 and 5+8, they can be executed in parallel. |
24 | | -```tasks |
25 | | -- result_11 = subtask(agent_0, "Perform 3 + 5") |
26 | | -- result_12 = subtask(agent_0, "Perform 5 + 8") |
27 | | -``` |
| 24 | +<tasks> |
| 25 | + <subtask> |
| 26 | + result_11 = subtask(agent_0, "Perform 3 + 5") |
| 27 | + </subtask> |
| 28 | + <subtask> |
| 29 | + result_12 = subtask(agent_0, "Perform 5 + 8") |
| 30 | + </subtask> |
| 31 | +</tasks> |
28 | 32 | <input id=1> |
29 | 33 | - result_11 = 8 |
30 | 34 | - result_12 = 13 |
31 | 35 | </input> |
32 | 36 | <output id=1> |
33 | 37 | I need to use agent_1 to perform the subtraction between result_11 and result_12 |
34 | | -```tasks |
35 | | -- result_21 = subtask(agent_1, "Perform result_11 - result_12") |
36 | | -``` |
| 38 | +<tasks> |
| 39 | + <subtask> |
| 40 | + result_21 = subtask(agent_1, "Perform result_11 - result_12") |
| 41 | + </subtask> |
| 42 | +</tasks> |
37 | 43 | </output> |
38 | 44 | <input id=2> |
39 | 45 | - result_21 = -5 |
|
44 | 50 | <explanation> |
45 | 51 | Above is an example of how to plan the task into a list of steps. The following is the explanation step by step: |
46 | 52 | - For each new step, you should start with your goal in this step. |
47 | | -- After goal, you should wrap the tasks of this step with code block ```tasks. |
48 | | -- The content of the code block is lines of subtasks: |
49 | | - - `- RESULT_ID = subtask(AGENT_ID, TASK_DESCRIPTION)` is a notation of a subtask, where you use the agent with id AGENT_ID to perform the task TASK_DESCRIPTION, and denote the result of this subtask as RESULT_ID. |
| 53 | +- After goal, you should wrap the tasks of this step with tag <tasks>. |
| 54 | +- The content of the <tasks> is XML of subtasks: |
| 55 | +``` |
| 56 | +<subtask> |
| 57 | +RESULT_ID = subtask(AGENT_ID, TASK_DESCRIPTION) |
| 58 | +</subtask> |
| 59 | +<subtask> |
| 60 | +... |
| 61 | +``` |
| 62 | +- `RESULT_ID = subtask(AGENT_ID, TASK_DESCRIPTION)` is a notation of a subtask, where you use the agent with id AGENT_ID to perform the task TASK_DESCRIPTION, and denote the result of this subtask as RESULT_ID. |
50 | 63 | - After your plan, the user will give you the result of tasks, with the format: |
51 | 64 | ``` |
52 | 65 | - RESULT_ID1 = AGENT_RETURN_1 |
|
55 | 68 | ``` |
56 | 69 | - You need to decide which step to go next based on the result. |
57 | 70 | - Remember to use the same RESULT_ID in your later steps instead the actual value. |
58 | | -- When you have finished the user task or you have no more steps to go, output the final result to response and no more ```tasks is needed. |
| 71 | +- When you have finished the user task or you have no more steps to go, output the final result to response and no more <tasks> is needed. |
59 | 72 | </explanation> |
60 | 73 | </example> |
61 | 74 |
|
|
68 | 81 | ## Notes |
69 | 82 | - If you find the previous results is wrong or not useful, you can re-plan the task with same result_id. |
70 | 83 | - You should decide if you have enough agents to perform the task, if not, you should ask the user to add more agents. |
71 | | -- Make sure you give enough context to the agents in TASK_DESCRIPTION, you ```tasks block is the only way to communicate with other agents. |
| 84 | +- Make sure you give enough context to the agents in TASK_DESCRIPTION, you <tasks> block is the only way to communicate with other agents. |
| 85 | +- If you want to agent to use the previous results, make sure you told the agent about the RESULT_ID you need them to use in TASK_DESCRIPTION |
72 | 86 | - If you have finished the task, you need to answer the user's question and restate some result if needed. |
73 | 87 |
|
74 | 88 | Now, understand the task in user input, and plan the task into a list of steps based on the above instructions: |
|
0 commit comments