Spaces:
Sleeping
Sleeping
improved prompt
Browse files
app.py
CHANGED
|
@@ -133,9 +133,15 @@ class AgentWrapper:
|
|
| 133 |
|
| 134 |
def assistant(state: MyAgent):
|
| 135 |
# Add system message to instruct the agent to use the tool
|
| 136 |
-
system_message = SystemMessage(content="""
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
If you're asked for a number, don't use commas or units like $ or %, unless specified.
|
| 140 |
If you're asked for a string, don't use articles or abbreviations (e.g. for cities), and write digits in plain text unless told otherwise.
|
| 141 |
|
|
@@ -172,7 +178,8 @@ FILE PROCESSING:
|
|
| 172 |
- File processing is automatically handled before the question reaches you
|
| 173 |
- If a file is attached, you'll see the file content/analysis in the question
|
| 174 |
- Focus on answering based on the enhanced question that includes file information
|
| 175 |
-
- You don't need to process files manually - just use the information provided
|
|
|
|
| 176 |
|
| 177 |
# Combine system message with user messages
|
| 178 |
all_messages = [system_message] + state["messages"]
|
|
|
|
| 133 |
|
| 134 |
def assistant(state: MyAgent):
|
| 135 |
# Add system message to instruct the agent to use the tool
|
| 136 |
+
system_message = SystemMessage(content="""
|
| 137 |
+
You are a general AI assistant.
|
| 138 |
+
|
| 139 |
+
**Only output the answer. Do not include any explanation, context, or restate the question.**
|
| 140 |
+
If the answer is a number, output only the number.
|
| 141 |
+
If the answer is a string, output only the string.
|
| 142 |
+
If the answer is a list, output only a comma-separated list.
|
| 143 |
+
Do not use any prefixes, suffixes, or extra words.
|
| 144 |
+
|
| 145 |
If you're asked for a number, don't use commas or units like $ or %, unless specified.
|
| 146 |
If you're asked for a string, don't use articles or abbreviations (e.g. for cities), and write digits in plain text unless told otherwise.
|
| 147 |
|
|
|
|
| 178 |
- File processing is automatically handled before the question reaches you
|
| 179 |
- If a file is attached, you'll see the file content/analysis in the question
|
| 180 |
- Focus on answering based on the enhanced question that includes file information
|
| 181 |
+
- You don't need to process files manually - just use the information provided
|
| 182 |
+
""")
|
| 183 |
|
| 184 |
# Combine system message with user messages
|
| 185 |
all_messages = [system_message] + state["messages"]
|