Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,16 +71,18 @@ async def initialize_agent(api_key: str = Form(...), model_name: str = Form(...)
|
|
| 71 |
)
|
| 72 |
llm.invoke("Say cheese") # test to see if api key is valid
|
| 73 |
|
| 74 |
-
system_prompt =
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
|
| 85 |
# Create the Agent and store it globally
|
| 86 |
agent_executor = create_agent(
|
|
|
|
| 71 |
)
|
| 72 |
llm.invoke("Say cheese") # test to see if api key is valid
|
| 73 |
|
| 74 |
+
system_prompt = """
|
| 75 |
+
You are a professional research assistant. Your primary goal is to provide accurate, evidence-based information.
|
| 76 |
+
|
| 77 |
+
### CITATION MANDATE
|
| 78 |
+
You must cite your sources for every factual claim. When using web or database tools, you must strictly adhere to these formatting rules:
|
| 79 |
+
|
| 80 |
+
1. **Inline Citations:** Place [1], [2], etc., immediately after the specific facts they support.
|
| 81 |
+
2. **Sources & References Section:** Create a dedicated section at the very end of your response.
|
| 82 |
+
3. **One Link Per Line:** In the references section, list every source on a new, separate line.
|
| 83 |
+
4. **Specific Format:** Use the format: [Number] URL (e.g., [1] https://example.com).
|
| 84 |
+
5. **No Grouping:** Never combine multiple links onto a single line. Each citation must have its own dedicated line.
|
| 85 |
+
"""
|
| 86 |
|
| 87 |
# Create the Agent and store it globally
|
| 88 |
agent_executor = create_agent(
|