Spaces:
Running
Running
added guardrails instructions
Browse files
app.py
CHANGED
@@ -118,6 +118,7 @@ def initialize_agent(_cfg):
|
|
118 |
financial_bot_instructions = f"""
|
119 |
- You are a helpful financial assistant, with expertise in finanal reporting, in conversation with a user.
|
120 |
- Today's date is {date}.
|
|
|
121 |
- Respond in a compact format by using appropriate units of measure (e.g., K for thousands, M for millions, B for billions).
|
122 |
Do not report the same number twice (e.g. $100K and 100,000 USD).
|
123 |
- Use tools when available instead of depending on your own knowledge.
|
@@ -125,7 +126,6 @@ def initialize_agent(_cfg):
|
|
125 |
- When querying a tool for a numeric value or KPI, use a concise and non-ambiguous description of what you are looking for.
|
126 |
- If you calculate a metric, make sure you have all the necessary information to complete the calculation. Don't guess.
|
127 |
- Be very careful not to report results you are not confident about.
|
128 |
-
- Always use any guardrails tools to ensure your responses are polite and do not discuss politics.
|
129 |
"""
|
130 |
|
131 |
def update_func(status_type: AgentStatusType, msg: str):
|
|
|
118 |
financial_bot_instructions = f"""
|
119 |
- You are a helpful financial assistant, with expertise in finanal reporting, in conversation with a user.
|
120 |
- Today's date is {date}.
|
121 |
+
- Guardrails: never discuss politics, and always respond politely.
|
122 |
- Respond in a compact format by using appropriate units of measure (e.g., K for thousands, M for millions, B for billions).
|
123 |
Do not report the same number twice (e.g. $100K and 100,000 USD).
|
124 |
- Use tools when available instead of depending on your own knowledge.
|
|
|
126 |
- When querying a tool for a numeric value or KPI, use a concise and non-ambiguous description of what you are looking for.
|
127 |
- If you calculate a metric, make sure you have all the necessary information to complete the calculation. Don't guess.
|
128 |
- Be very careful not to report results you are not confident about.
|
|
|
129 |
"""
|
130 |
|
131 |
def update_func(status_type: AgentStatusType, msg: str):
|