@@ -29,9 +29,7 @@ system_prompt: |-
2929 <example>
3030 <thoughts>I will use python code to compute the result of the operation and then return the final answer using the `final_answer` tool.</thoughts>
3131 <freewill>I am going to solve this task with confidence.</freewill>
32- <savetofile filename="free-will.txt">
33- I am going to solve this task with confidence.
34- </savetofile>
32+ <savetofile filename="free-will.txt">I am going to solve this task with confidence.</savetofile>
3533 <runcode>
3634 result = 5 + 3 + 1294.678
3735 final_answer(result)
@@ -40,32 +38,22 @@ system_prompt: |-
4038
4139 For saving text files (text, csv, python code), just enclose your text into the <savetofile></savetofile> tags as per examples below:
4240 <example>
43- <savetofile filename="example.txt">
44- This is the content of example.txt
45- </savetofile>
41+ <savetofile filename="example.txt">This is the content of example.txt</savetofile>
4642
47- <savetofile filename="another_file.csv">
48- header1,header2
43+ <savetofile filename="another_file.csv">header1,header2
4944 value1,value2
50- value3,value4
51- </savetofile>
45+ value3,value4</savetofile>
5246
53- <savetofile filename="hello.py">
54- print("hello")
55- </savetofile>
47+ <savetofile filename="hello.py">print("hello")</savetofile>
5648 </example>
5749
5850 For saving source code files, using the <savetofile></savetofile> tags is the best method.
5951
6052 You may also append content to file with the tags <appendtofile></appendtofile>. This is an example:
6153 <example>
62- <savetofile filename="another_csv.csv">
63- header1,header2
64- </savetofile>
65- <appendtofile filename="another_csv.csv">
66- value1,value2
67- value3,value4
68- </appendtofile>
54+ <savetofile filename="another_csv.csv">header1,header2</savetofile>
55+ <appendtofile filename="another_csv.csv">value1,value2
56+ value3,value4</appendtofile>
6957
7058 The above will create a csv file with the following content:
7159 header1,header2
@@ -77,13 +65,9 @@ system_prompt: |-
7765
7866 If you need to include any file in the file system, use the <includefile></includefile> tags. This is an example:
7967 <example>
80- <savetofile filename="first_step.py">
81- print("first step")
82- </savetofile>
68+ <savetofile filename="first_step.py">print("first step")</savetofile>
8369
84- <savetofile filename="second_step.py">
85- print("second step")
86- </savetofile>
70+ <savetofile filename="second_step.py">print("second step")</savetofile>
8771
8872 <runcode>
8973 <includefile>first_step.py</includefile>
@@ -136,10 +120,8 @@ system_prompt: |-
136120 5. If you find yourself repeating logic across steps, or if a task would benefit from
137121 reusable helper functions, create your own tools by saving Python functions to a file
138122 and importing them in later steps. Use the bpsa/ directory for this. Example:
139- <savetofile filename="bpsa/helpers.py">
140- def parse_csv_row(row):
141- return [x.strip() for x in row.split(',')]
142- </savetofile>
123+ <savetofile filename="bpsa/helpers.py">def parse_csv_row(row):
124+ return [x.strip() for x in row.split(',')]</savetofile>
143125 <runcode>
144126 from bpsa.helpers import parse_csv_row
145127 result = parse_csv_row("a, b, c")
0 commit comments