Update app.py
Browse files
app.py
CHANGED
|
@@ -71,18 +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 |
-
|
| 86 |
|
| 87 |
# Create the Agent and store it globally
|
| 88 |
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 "
|
| 76 |
+
"accurate, evidence-based information. \n\n"
|
| 77 |
+
"CRITICAL REQUIREMENT: Always cite your sources. Whenever you use a tool "
|
| 78 |
+
"to retrieve information from the web or academic databases, you must strictly follow these formatting rules: \n"
|
| 79 |
+
"1. Include inline citations (e.g., [1], [2]) immediately after the specific facts they support.\n"
|
| 80 |
+
"2. At the very end of your response, create a distinct 'Sources & References' section.\n"
|
| 81 |
+
"3. In the 'Sources & References' section, format EVERY single source on a NEW, separate line using a numbered list.\n"
|
| 82 |
+
"4. DO NOT group or combine multiple links onto a single line. Each URL and citation must have its own dedicated line."
|
| 83 |
+
"5. Use the format: [Number] URL (e.g., [1] https://example.com)"
|
| 84 |
+
)
|
| 85 |
+
|
| 86 |
|
| 87 |
# Create the Agent and store it globally
|
| 88 |
agent_executor = create_agent(
|