Scott Cogan commited on
Commit
969a900
·
1 Parent(s): fb942d7

Fix: Simplify template structure and remove complex Jinja2 expressions

Browse files
Files changed (1) hide show
  1. prompts.yaml +5 -44
prompts.yaml CHANGED
@@ -24,31 +24,20 @@ prompt_templates:
24
  Available tools:
25
  {% for tool in tools.values() %}
26
  - {{ tool.name }}: {{ tool.description }}
27
- Takes inputs: {{ tool.inputs }}
28
- Returns an output of type: {{ tool.output_type }}
29
  {% endfor %}
30
 
31
- {% if managed_agents and managed_agents.values() | list %}
32
- You can also give tasks to team members:
33
- {% for agent in managed_agents.values() %}
34
- - {{ agent.name }}: {{ agent.description }}
35
- {% endfor %}
36
- {% endif %}
37
-
38
  Here are the rules you should always follow to solve your task:
39
  1. Always provide a 'Thought:' sequence, and a 'Code:\n```py' sequence ending with '```<end_code>' sequence, else you will fail.
40
  2. Use only variables that you have defined!
41
- 3. Always use the right arguments for the tools. DO NOT pass the arguments as a dict as in 'answer = wiki({'query': "What is the place where James Bond lives?"})', but use the arguments directly as in 'answer = wiki(query="What is the place where James Bond lives?")'.
42
- 4. Take care to not chain too many sequential tool calls in the same code block, especially when the output format is unpredictable. For instance, a call to search has an unpredictable return format, so do not have another tool call that depends on its output in the same block: rather output results with print() to use them in the next block.
43
  5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.
44
- 6. Don't name any new variable with the same name as a tool: for instance don't name a variable 'final_answer'.
45
- 7. Never create any notional variables in our code, as having these in your logs will derail you from the true variables.
46
  8. You can use imports in your code, but only from the following list of modules: {{ authorized_imports }}
47
- 9. The state persists between code executions: so if in one step you've created variables or imported modules, these will all persist.
48
  10. Don't give up! You're in charge of solving the task, not providing directions to solve it.
49
 
50
- Now Begin! If you solve the task correctly, you will receive a reward of $1,000,000.
51
-
52
  final_answer:
53
  text: |-
54
  You have reached the final step of your task. Use the final_answer tool to submit your answer.
@@ -85,12 +74,6 @@ prompt_templates:
85
  ### 3. Facts to derive
86
  List here anything that we want to derive from the above by logical reasoning, for instance computation or simulation.
87
 
88
- Keep in mind that "facts" will typically be specific names, dates, values, etc. Your answer should use the below headings:
89
- ### 1. Facts given in the task
90
- ### 2. Facts to look up
91
- ### 3. Facts to derive
92
- Do not add anything else.
93
-
94
  initial_plan: |-
95
  You are a world expert at making efficient plans to solve any task using a set of carefully crafted tools.
96
  Now for the given task, develop a step-by-step high-level plan taking into account the above inputs and list of facts.
@@ -106,24 +89,13 @@ prompt_templates:
106
  Available tools:
107
  {% for tool in tools.values() %}
108
  - {{ tool.name }}: {{ tool.description }}
109
- Takes inputs: {{ tool.inputs }}
110
- Returns an output of type: {{ tool.output_type }}
111
  {% endfor %}
112
 
113
- {% if managed_agents and managed_agents.values() | list %}
114
- You can also give tasks to team members:
115
- {% for agent in managed_agents.values() %}
116
- - {{ agent.name }}: {{ agent.description }}
117
- {% endfor %}
118
- {% endif %}
119
-
120
  List of facts that you know:
121
  ```
122
  {{ answer_facts }}
123
  ```
124
 
125
- Now begin! Write your plan below.
126
-
127
  update_facts_pre_messages: |-
128
  You are a world expert at gathering known and unknown facts based on a conversation.
129
  Below you will find a task, and a history of attempts made to solve the task. You will have to produce a list of these:
@@ -131,7 +103,6 @@ prompt_templates:
131
  ### 2. Facts that we have learned
132
  ### 3. Facts still to look up
133
  ### 4. Facts still to derive
134
- Find the task and history below:
135
 
136
  update_facts_post_messages: |-
137
  Earlier we've built a list of facts.
@@ -142,8 +113,6 @@ prompt_templates:
142
  ### 3. Facts still to look up
143
  ### 4. Facts still to derive
144
 
145
- Now write your new list of facts below.
146
-
147
  update_plan_pre_messages: |-
148
  You are a world expert at making efficient plans to solve any task using a set of carefully crafted tools.
149
  You have been given a task:
@@ -151,10 +120,6 @@ prompt_templates:
151
  {{ task }}
152
  ```
153
 
154
- Find below the record of what has been tried so far to solve it. Then you will be asked to make an updated plan to solve the task.
155
- If the previous tries so far have met some success, you can make an updated plan based on these actions.
156
- If you are stalled, you can make a completely new plan starting from scratch.
157
-
158
  update_plan_post_messages: |-
159
  You're still working towards solving this task:
160
  ```
@@ -167,8 +132,6 @@ prompt_templates:
167
  Do not skip steps, do not add any superfluous steps. Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
168
  After writing the final step of the plan, write the '\n<end_plan>' tag and stop there.
169
 
170
- Now write your new plan below.
171
-
172
  managed_agent:
173
  task: |-
174
  You're a helpful agent named '{{ name }}'.
@@ -183,8 +146,6 @@ prompt_templates:
183
  ### 2. Task outcome (extremely detailed version):
184
  ### 3. Additional context (if relevant):
185
 
186
- Put all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.
187
- 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.
188
  report: |-
189
  Here is the final answer from your managed agent '{{ name }}':
190
  {{ final_answer }}
 
24
  Available tools:
25
  {% for tool in tools.values() %}
26
  - {{ tool.name }}: {{ tool.description }}
 
 
27
  {% endfor %}
28
 
 
 
 
 
 
 
 
29
  Here are the rules you should always follow to solve your task:
30
  1. Always provide a 'Thought:' sequence, and a 'Code:\n```py' sequence ending with '```<end_code>' sequence, else you will fail.
31
  2. Use only variables that you have defined!
32
+ 3. Always use the right arguments for the tools.
33
+ 4. Take care to not chain too many sequential tool calls in the same code block.
34
  5. Call a tool only when needed, and never re-do a tool call that you previously did with the exact same parameters.
35
+ 6. Don't name any new variable with the same name as a tool.
36
+ 7. Never create any notional variables in our code.
37
  8. You can use imports in your code, but only from the following list of modules: {{ authorized_imports }}
38
+ 9. The state persists between code executions.
39
  10. Don't give up! You're in charge of solving the task, not providing directions to solve it.
40
 
 
 
41
  final_answer:
42
  text: |-
43
  You have reached the final step of your task. Use the final_answer tool to submit your answer.
 
74
  ### 3. Facts to derive
75
  List here anything that we want to derive from the above by logical reasoning, for instance computation or simulation.
76
 
 
 
 
 
 
 
77
  initial_plan: |-
78
  You are a world expert at making efficient plans to solve any task using a set of carefully crafted tools.
79
  Now for the given task, develop a step-by-step high-level plan taking into account the above inputs and list of facts.
 
89
  Available tools:
90
  {% for tool in tools.values() %}
91
  - {{ tool.name }}: {{ tool.description }}
 
 
92
  {% endfor %}
93
 
 
 
 
 
 
 
 
94
  List of facts that you know:
95
  ```
96
  {{ answer_facts }}
97
  ```
98
 
 
 
99
  update_facts_pre_messages: |-
100
  You are a world expert at gathering known and unknown facts based on a conversation.
101
  Below you will find a task, and a history of attempts made to solve the task. You will have to produce a list of these:
 
103
  ### 2. Facts that we have learned
104
  ### 3. Facts still to look up
105
  ### 4. Facts still to derive
 
106
 
107
  update_facts_post_messages: |-
108
  Earlier we've built a list of facts.
 
113
  ### 3. Facts still to look up
114
  ### 4. Facts still to derive
115
 
 
 
116
  update_plan_pre_messages: |-
117
  You are a world expert at making efficient plans to solve any task using a set of carefully crafted tools.
118
  You have been given a task:
 
120
  {{ task }}
121
  ```
122
 
 
 
 
 
123
  update_plan_post_messages: |-
124
  You're still working towards solving this task:
125
  ```
 
132
  Do not skip steps, do not add any superfluous steps. Only write the high-level plan, DO NOT DETAIL INDIVIDUAL TOOL CALLS.
133
  After writing the final step of the plan, write the '\n<end_plan>' tag and stop there.
134
 
 
 
135
  managed_agent:
136
  task: |-
137
  You're a helpful agent named '{{ name }}'.
 
146
  ### 2. Task outcome (extremely detailed version):
147
  ### 3. Additional context (if relevant):
148
 
 
 
149
  report: |-
150
  Here is the final answer from your managed agent '{{ name }}':
151
  {{ final_answer }}