Codemaster67 commited on
Commit
eb06bfe
·
verified ·
1 Parent(s): 7a2fe80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
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
- 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(
 
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(