yetessam commited on
Commit
2d270fb
·
verified ·
1 Parent(s): 0ce9e39

Put Jinja inside a block

Browse files
Files changed (1) hide show
  1. prompts/planning.yml +62 -46
prompts/planning.yml CHANGED
@@ -1,43 +1,44 @@
1
- {%- if custom_instructions %}
2
- {{custom_instructions}}
3
- {%- endif %}
4
-
5
- Now Begin!
6
  planning:
7
- initial_plan : |-
 
 
 
8
  You are a world expert at analyzing a situation to derive facts, and plan accordingly towards solving a task.
9
- Below I will present you a task. You will need to 1. build a survey of facts known or needed to solve the task, then 2. make a plan of action to solve the task.
 
 
 
10
  ## 1. Facts survey
11
  You will build a comprehensive preparatory survey of which facts we have at our disposal and which ones we still need.
12
  These "facts" will typically be specific names, dates, values, etc. Your answer should use the below headings:
 
13
  ### 1.1. Facts given in the task
14
  List here the specific facts given in the task that could help you (there might be nothing here).
15
 
16
  ### 1.2. Facts to look up
17
- List here any facts that we may need to look up.
18
  Also list where to find each of these, for instance a website, a file... - maybe the task contains some sources that you should re-use here.
19
 
20
  ### 1.3. Facts to derive
21
  List here anything that we want to derive from the above by logical reasoning, for instance computation or simulation.
22
-
23
- Don't make any assumptions. For each item, provide a thorough reasoning. Do not add anything else on top of three headings above.
24
 
25
  ## 2. Plan
26
  Then for the given task, develop a step-by-step high-level plan taking into account the above inputs and list of facts.
27
  This plan should involve individual tasks based on the available tools, that if executed correctly will yield the correct answer.
28
- Do not skip steps, do not add any superfluous steps. Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
29
- After writing the final step of the plan, write the '<end_plan>' tag and stop there.
 
30
 
31
  You can leverage these tools, behaving like regular python functions:
32
  ```python
33
- {%- for tool in tools.values() %}
34
- {{ tool.to_code_prompt() }}
35
- {% endfor %}
36
  ```
37
 
38
  {%- if managed_agents and managed_agents.values() | list %}
39
- You can also give tasks to team members.
40
- Calling a team member works similarly to calling a tool: provide the task description as the 'task' argument. Since this team member is a real human, be as detailed and verbose as necessary in your task description.
 
41
  You can also include any relevant variables or context using the 'additional_args' argument.
42
  Here is a list of the team members that you can call:
43
  ```python
@@ -46,7 +47,8 @@ planning:
46
  """{{ agent.description }}
47
  Args:
48
  task: Long detailed description of the task.
49
- additional_args: Dictionary of extra inputs to pass to the managed agent, e.g. images, dataframes, or any other contextual data it may need.
 
50
  """
51
  {% endfor %}
52
  ```
@@ -58,6 +60,7 @@ planning:
58
  {{task}}
59
  ```
60
  First in part 1, write the facts survey, then in part 2, write your plan.
 
61
  update_plan_pre_messages: |-
62
  You are a world expert at analyzing a situation, and plan accordingly towards solving a task.
63
  You have been given the following task:
@@ -68,35 +71,40 @@ planning:
68
  You will first have to produce a survey of known and unknown facts, then propose a step-by-step high-level plan to solve the task.
69
  If the previous tries so far have met some success, your updated plan can build on these results.
70
  If you are stalled, you can make a completely new plan starting from scratch.
71
-
72
  Find the task and history below:
 
73
  update_plan_post_messages: |-
74
  Now write your updated facts below, taking into account the above history:
 
75
  ## 1. Updated facts survey
76
  ### 1.1. Facts given in the task
77
  ### 1.2. Facts that we have learned
78
  ### 1.3. Facts still to look up
79
  ### 1.4. Facts still to derive
 
80
  Then write a step-by-step high-level plan to solve the task above.
 
81
  ## 2. Plan
82
- ### 2. 1. ...
83
- Etc.
 
84
  This plan should involve individual tasks based on the available tools, that if executed correctly will yield the correct answer.
85
  Beware that you have {remaining_steps} steps remaining.
86
- Do not skip steps, do not add any superfluous steps. Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
87
- After writing the final step of the plan, write the '<end_plan>' tag and stop there.
 
88
 
89
  You can leverage these tools, behaving like regular python functions:
90
  ```python
91
- {%- for tool in tools.values() %}
92
- {{ tool.to_code_prompt() }}
93
- {% endfor %}
94
  ```
95
 
96
  {%- if managed_agents and managed_agents.values() | list %}
97
  You can also give tasks to team members.
98
- Calling a team member works similarly to calling a tool: provide the task description as the 'task' argument. Since this team member is a real human, be as detailed and verbose as necessary in your task description.
 
99
  You can also include any relevant variables or context using the 'additional_args' argument.
 
100
  Here is a list of the team members that you can call:
101
  ```python
102
  {%- for agent in managed_agents.values() %}
@@ -104,35 +112,43 @@ planning:
104
  """{{ agent.description }}
105
  Args:
106
  task: Long detailed description of the task.
107
- additional_args: Dictionary of extra inputs to pass to the managed agent, e.g. images, dataframes, or any other contextual data it may need.
 
108
  """
109
  {% endfor %}
110
  ```
111
  {%- endif %}
112
 
113
  Now write your updated facts survey below, then your new plan.
 
114
  managed_agent:
115
  task: |-
116
- You're a helpful agent named '{{name}}'.
117
- You have been submitted this task by your manager.
118
- ---
119
- Task:
120
- {{task}}
121
- ---
122
- You're helping your manager solve a wider task: so make sure to not provide a one-line answer, but give as much information as possible to give them a clear understanding of the answer.
123
- Your final_answer WILL HAVE to contain these parts:
124
- ### 1. Task outcome (short version):
125
- ### 2. Task outcome (extremely detailed version):
126
- ### 3. Additional context (if relevant):
127
-
128
- Put all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.
129
- And even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.
130
- report: |-
131
- Here is the final answer from your managed agent '{{name}}':
132
- {{final_answer}}
 
 
 
 
 
133
  final_answer:
134
  pre_messages: |-
135
- An agent tried to answer a user query but it got stuck and failed to do so. You are tasked with providing an answer instead. Here is the agent's memory:
 
136
  post_messages: |-
137
  Based on the above, please provide an answer to the following user task:
138
  {{task}}
 
 
 
 
 
 
1
  planning:
2
+ initial_plan: |-
3
+ {%- if custom_instructions %} {{custom_instructions}} {%- endif %}
4
+ Now Begin!
5
+
6
  You are a world expert at analyzing a situation to derive facts, and plan accordingly towards solving a task.
7
+ Below I will present you a task. You will need to
8
+ 1. build a survey of facts known or needed to solve the task, then
9
+ 2. make a plan of action to solve the task.
10
+
11
  ## 1. Facts survey
12
  You will build a comprehensive preparatory survey of which facts we have at our disposal and which ones we still need.
13
  These "facts" will typically be specific names, dates, values, etc. Your answer should use the below headings:
14
+
15
  ### 1.1. Facts given in the task
16
  List here the specific facts given in the task that could help you (there might be nothing here).
17
 
18
  ### 1.2. Facts to look up
 
19
  Also list where to find each of these, for instance a website, a file... - maybe the task contains some sources that you should re-use here.
20
 
21
  ### 1.3. Facts to derive
22
  List here anything that we want to derive from the above by logical reasoning, for instance computation or simulation.
23
+ Don't make any assumptions. For each item, provide a thorough reasoning.
24
+ Do not add anything else on top of three headings above.
25
 
26
  ## 2. Plan
27
  Then for the given task, develop a step-by-step high-level plan taking into account the above inputs and list of facts.
28
  This plan should involve individual tasks based on the available tools, that if executed correctly will yield the correct answer.
29
+ Do not skip steps, do not add any superfluous steps.
30
+ Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
31
+ After writing the final step of the plan, write the '' tag and stop there.
32
 
33
  You can leverage these tools, behaving like regular python functions:
34
  ```python
35
+ {%- for tool in tools.values() %} {{ tool.to_code_prompt() }} {% endfor %}
 
 
36
  ```
37
 
38
  {%- if managed_agents and managed_agents.values() | list %}
39
+ You can also give tasks to team members. Calling a team member works similarly to calling a tool:
40
+ provide the task description as the 'task' argument. Since this team member is a real human,
41
+ be as detailed and verbose as necessary in your task description.
42
  You can also include any relevant variables or context using the 'additional_args' argument.
43
  Here is a list of the team members that you can call:
44
  ```python
 
47
  """{{ agent.description }}
48
  Args:
49
  task: Long detailed description of the task.
50
+ additional_args: Dictionary of extra inputs to pass to the managed agent,
51
+ e.g. images, dataframes, or any other contextual data it may need.
52
  """
53
  {% endfor %}
54
  ```
 
60
  {{task}}
61
  ```
62
  First in part 1, write the facts survey, then in part 2, write your plan.
63
+
64
  update_plan_pre_messages: |-
65
  You are a world expert at analyzing a situation, and plan accordingly towards solving a task.
66
  You have been given the following task:
 
71
  You will first have to produce a survey of known and unknown facts, then propose a step-by-step high-level plan to solve the task.
72
  If the previous tries so far have met some success, your updated plan can build on these results.
73
  If you are stalled, you can make a completely new plan starting from scratch.
 
74
  Find the task and history below:
75
+
76
  update_plan_post_messages: |-
77
  Now write your updated facts below, taking into account the above history:
78
+
79
  ## 1. Updated facts survey
80
  ### 1.1. Facts given in the task
81
  ### 1.2. Facts that we have learned
82
  ### 1.3. Facts still to look up
83
  ### 1.4. Facts still to derive
84
+
85
  Then write a step-by-step high-level plan to solve the task above.
86
+
87
  ## 2. Plan
88
+ ### 2.
89
+ 1. ... Etc.
90
+
91
  This plan should involve individual tasks based on the available tools, that if executed correctly will yield the correct answer.
92
  Beware that you have {remaining_steps} steps remaining.
93
+ Do not skip steps, do not add any superfluous steps.
94
+ Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
95
+ After writing the final step of the plan, write the '' tag and stop there.
96
 
97
  You can leverage these tools, behaving like regular python functions:
98
  ```python
99
+ {%- for tool in tools.values() %} {{ tool.to_code_prompt() }} {% endfor %}
 
 
100
  ```
101
 
102
  {%- if managed_agents and managed_agents.values() | list %}
103
  You can also give tasks to team members.
104
+ Calling a team member works similarly to calling a tool: provide the task description as the 'task' argument.
105
+ Since this team member is a real human, be as detailed and verbose as necessary in your task description.
106
  You can also include any relevant variables or context using the 'additional_args' argument.
107
+
108
  Here is a list of the team members that you can call:
109
  ```python
110
  {%- for agent in managed_agents.values() %}
 
112
  """{{ agent.description }}
113
  Args:
114
  task: Long detailed description of the task.
115
+ additional_args: Dictionary of extra inputs to pass to the managed agent,
116
+ e.g. images, dataframes, or any other contextual data it may need.
117
  """
118
  {% endfor %}
119
  ```
120
  {%- endif %}
121
 
122
  Now write your updated facts survey below, then your new plan.
123
+
124
  managed_agent:
125
  task: |-
126
+ You're a helpful agent named '{{name}}'. You have been submitted this task by your manager.
127
+
128
+ ---
129
+ Task: {{task}}
130
+ ---
131
+
132
+ You're helping your manager solve a wider task: so make sure to not provide a one-line answer,
133
+ but give as much information as possible to give them a clear understanding of the answer.
134
+
135
+ Your final_answer WILL HAVE to contain these parts:
136
+ ### 1. Task outcome (short version):
137
+ ### 2. Task outcome (extremely detailed version):
138
+ ### 3. Additional context (if relevant):
139
+
140
+ Put all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.
141
+ And even if your task resolution is not successful, please return as much context as possible,
142
+ so that your manager can act upon this feedback.
143
+
144
+ report: |-
145
+ Here is the final answer from your managed agent '{{name}}':
146
+ {{final_answer}}
147
+
148
  final_answer:
149
  pre_messages: |-
150
+ An agent tried to answer a user query but it got stuck and failed to do so.
151
+
152
  post_messages: |-
153
  Based on the above, please provide an answer to the following user task:
154
  {{task}}