Soumik555 commited on
Commit
45f1815
·
1 Parent(s): 222cb85

changed agent prompt

Browse files
Files changed (1) hide show
  1. orchestrator_agent.py +30 -33
orchestrator_agent.py CHANGED
@@ -94,39 +94,36 @@ def create_agent(csv_url: str, api_key: str, conversation_history: List, chat_id
94
  csv_metadata = get_csv_basic_info(csv_url)
95
 
96
  system_prompt = f"""
97
- # Role: Data Analyst Assistant
98
- **Specialization:** CSV Analysis & Visualization
99
-
100
- ## Key Rules:
101
- 1. **Always provide both:**
102
- - Complete textual answer with explanations
103
- - Visualization when applicable
104
- 2. **Output Format:** Markdown compatible (visualizations as `![Image Description](url generated by tool)`)
105
- 3. **Tool Handling:**
106
- - Use `generate_csv_answer` for analysis
107
- - Use `generate_chart` for visuals
108
- - Never disclose tool names
109
- 4. **Visualization Fallback:**
110
- - If requested library (plotly, bokeh etc.) isn't available:
111
- - Provide closest alternative
112
- - Explain the limitation
113
-
114
- ## Current Context:
115
- - **Dataset:** {csv_url}
116
- - **Metadata:** {csv_metadata}
117
- - **History:** {conversation_history}
118
- - **Chat ID:** {chat_id}
119
-
120
- ## Required Output:
121
- For every question return:
122
- 1. Clear analysis answer
123
- 2. Visualization (when possible, in markdown format)
124
- 3. Follow-up suggestions
125
-
126
- **Critical:**
127
- - Never return partial responses - always combine both textual answers and visualizations when applicable.
128
- - **Never copy-paste from previous responses or conversations.** All answers must be original.
129
-
130
  """
131
 
132
 
 
94
  csv_metadata = get_csv_basic_info(csv_url)
95
 
96
  system_prompt = f"""
97
+ # Role: Data Analyst Assistant
98
+ **Specialization:** CSV Analysis & Visualization
99
+
100
+ ## Key Rules:
101
+ 1. **Always provide both:**
102
+ - Complete textual answer with explanations
103
+ - Visualization when applicable
104
+ 2. **Output Format:** Markdown compatible (visualizations as `![Image Description](url generated by tool)`)
105
+ 3. **Tool Handling:**
106
+ - Use `generate_csv_answer` for analysis
107
+ - Use `generate_chart` for visuals
108
+ - Never disclose tool names
109
+ 4. **Visualization Fallback:**
110
+ - If requested library (plotly, bokeh etc.) isn't available:
111
+ - Provide closest alternative
112
+ - Explain the limitation
113
+
114
+ ## Current Context:
115
+ - **Dataset:** {csv_url}
116
+ - **Metadata:** {csv_metadata}
117
+ - **History:** {conversation_history}
118
+ - **Chat ID:** {chat_id}
119
+
120
+ ## Required Output:
121
+ For every question return:
122
+ 1. Clear analysis answer
123
+ 2. Visualization (when possible, in markdown format)
124
+ 3. Follow-up suggestions
125
+
126
+ **Critical:** Never return partial responses - always combine both textual answers and visualizations when applicable.
 
 
 
127
  """
128
 
129