KaiserShultz commited on
Commit
c667e3b
·
verified ·
1 Parent(s): c4dbcb0

Update src/prompts/prompts.py

Browse files
Files changed (1) hide show
  1. src/prompts/prompts.py +13 -25
src/prompts/prompts.py CHANGED
@@ -105,24 +105,23 @@ Example 1: "Analyze sales data and calculate growth rates"
105
  {{"id": "s2", "goal": "Calculate monthly growth rates using Python", "tool": "safe_code_run"}},
106
  {{"id": "s3", "goal": "Generate summary statistics and trends", "tool": "safe_code_run"}}
107
  ]
108
- }}
109
 
110
  Example 2: "Research recent AI developments and summarize key trends"
111
  {{
112
  "steps": [
113
- {{"id": "s1", "goal": "Search for recent AI news and developments", "tool": "tavily_search"}},
114
- {{"id": "s2", "goal": "Extract key links and pick relevant documents (PDF, reports)", "tool": "tavilyextract"}},
115
- {{"id": "s3", "goal": "Download chosen report for detailed analysis", "tool": "download_file_from_url"}},
116
- {{"id": "s4", "goal": "Analyze the downloaded document (PDF/DOCX/TXT)", "tool": "analyze_pdf_file"}},
117
- {{"id": "s5", "goal": "Summarize and synthesize key insights from the analyzed content", "tool": null}}
118
  ]
119
  }}
120
 
121
  Example 3: "Compare performance metrics between two datasets"
122
  {{
123
  "steps": [
124
- {{"id": "s1", "goal": "Load first dataset and examine structure", "tool": "analyze_csv_file"}},
125
- {{"id": "s2", "goal": "Load second dataset and examine structure", "tool": "analyze_excel_file"}},
126
  {{"id": "s3", "goal": "Calculate statistical metrics for both datasets using code", "tool": "safe_code_run"}},
127
  {{"id": "s4", "goal": "Perform statistical comparison and significance testing", "tool": "safe_code_run"}}
128
  ]
@@ -131,24 +130,13 @@ Example 3: "Compare performance metrics between two datasets"
131
  Example 4: "Create a budget analysis from expense data"
132
  {{
133
  "steps": [
134
- {{"id": "s1", "goal": "Load expense data and validate format", "tool": "analyze_csv_file"}},
135
  {{"id": "s2", "goal": "Calculate category totals and percentages using code", "tool": "safe_code_run"}},
136
  {{"id": "s3", "goal": "Generate budget variance analysis and projections", "tool": "safe_code_run"}},
137
  {{"id": "s4", "goal": "Create visualization of spending patterns", "tool": "safe_code_run"}}
138
  ]
139
  }}
140
 
141
- Example 5: "Find and analyze a scientific PDF report on renewable energy"
142
- {{
143
- "steps": [
144
- {{"id": "s1", "goal": "Search the web for renewable energy PDF reports", "tool": "tavily_search"}},
145
- {{"id": "s2", "goal": "Extract candidate PDF links from the search results", "tool": "tavilyextract"}},
146
- {{"id": "s3", "goal": "Download the most relevant PDF document", "tool": "download_file_from_url"}},
147
- {{"id": "s4", "goal": "Parse and extract text from the downloaded PDF", "tool": "analyze_pdf_file"}},
148
- {{"id": "s5", "goal": "Summarize findings and highlight key trends in renewable energy", "tool": null}}
149
- ]
150
- }}
151
-
152
  Return a single JSON object with this structure:
153
  {{
154
  "task_type": "info|calc|table|doc_qa|image_qa|multi_hop",
@@ -171,15 +159,15 @@ Return a single JSON object with this structure:
171
 
172
  Ground rules:
173
  - Prefer 2-4 steps for most tasks. Single steps only for truly trivial queries. Calculation tasks must use tools always.
174
- - Break down complex tasks into logical components - don't try to solve everything at once.
175
  - Use tool names exactly as listed. If no tool is needed, set "tool": null.
176
  - Never assume files or URLs exist—plan to search/extract before analysing.
177
  - Skip download steps when the required file is already provided.
178
  - Ensure later steps only depend on results created by earlier steps.
179
- - For any numerical work: ALWAYS use tools (calculator/code) - never manual calculation.
180
- - If the query involves analysis of multiple sources, plan separate steps for each source.
181
- - Consider data validation and error checking as separate steps when handling files.
182
- - Plan for visualization or formatting steps when presenting complex results.
183
  """
184
 
185
 
 
105
  {{"id": "s2", "goal": "Calculate monthly growth rates using Python", "tool": "safe_code_run"}},
106
  {{"id": "s3", "goal": "Generate summary statistics and trends", "tool": "safe_code_run"}}
107
  ]
108
+ }}ф
109
 
110
  Example 2: "Research recent AI developments and summarize key trends"
111
  {{
112
  "steps": [
113
+ {{"id": "s1", "goal": "Search for recent AI news and developments", "tool": "web_search"}},
114
+ {{"id": "s2", "goal": "Extract all info from founded urls", "tool": "web_extract"}},
115
+ {{"id": "s3", "goal": "Extract and organize key information from articles", "tool": "analyze_(csv, docx, pdf etc.)_file"}},
116
+ {{"id": "s4", "goal": "Analyze and synthesize key trends from gathered information", "tool": null}}
 
117
  ]
118
  }}
119
 
120
  Example 3: "Compare performance metrics between two datasets"
121
  {{
122
  "steps": [
123
+ {{"id": "s1", "goal": "Load first dataset and examine structure", "tool": "analyze_(csv, docx, pdf etc.)_file"}},
124
+ {{"id": "s2", "goal": "Load second dataset and examine structure", "tool": "analyze_(csv, docx, pdf etc.)_file"}},
125
  {{"id": "s3", "goal": "Calculate statistical metrics for both datasets using code", "tool": "safe_code_run"}},
126
  {{"id": "s4", "goal": "Perform statistical comparison and significance testing", "tool": "safe_code_run"}}
127
  ]
 
130
  Example 4: "Create a budget analysis from expense data"
131
  {{
132
  "steps": [
133
+ {{"id": "s1", "goal": "Load expense data and validate format", "tool": "analyze_(csv, docx, pdf etc.)_file"}},
134
  {{"id": "s2", "goal": "Calculate category totals and percentages using code", "tool": "safe_code_run"}},
135
  {{"id": "s3", "goal": "Generate budget variance analysis and projections", "tool": "safe_code_run"}},
136
  {{"id": "s4", "goal": "Create visualization of spending patterns", "tool": "safe_code_run"}}
137
  ]
138
  }}
139
 
 
 
 
 
 
 
 
 
 
 
 
140
  Return a single JSON object with this structure:
141
  {{
142
  "task_type": "info|calc|table|doc_qa|image_qa|multi_hop",
 
159
 
160
  Ground rules:
161
  - Prefer 2-4 steps for most tasks. Single steps only for truly trivial queries. Calculation tasks must use tools always.
162
+ - Break down complex tasks into logical components - don't try to solve everything at once
163
  - Use tool names exactly as listed. If no tool is needed, set "tool": null.
164
  - Never assume files or URLs exist—plan to search/extract before analysing.
165
  - Skip download steps when the required file is already provided.
166
  - Ensure later steps only depend on results created by earlier steps.
167
+ - For any numerical work: ALWAYS use tools (calculator/code) - never manual calculation
168
+ - If the query involves analysis of multiple sources, plan separate steps for each source
169
+ - Consider data validation and error checking as separate steps when handling files
170
+ - Plan for visualization or formatting steps when presenting complex results
171
  """
172
 
173