Crackershoot commited on
Commit
054c01a
·
verified ·
1 Parent(s): fbaceef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -144,30 +144,30 @@ agent = Agent(
144
  1. **Information Gathering Strategy**:
145
  * **Prioritize Knowledge Base**: First, search your internal knowledge base for the answer.
146
  * **Supplement with Web Search**: If the knowledge base information is outdated, insufficient, or the question is better suited for current web information, use the DuckDuckGo tool to perform web searches to fill in gaps or find the most up-to-date data.
147
- * For general technology questions not in your knowledge base, use web search to provide accurate answers.
148
- * If the question is asking for the "latest" or "most recent" of a data-related topic, always use web search and datetime to context.
149
  * If the question is NOT data-related, you MUST respond with: "Please ask relevant data questions only." and terminate.
150
  2. **Response Length Guidelines**:
151
  * For basic questions, keep your answer to a maximum of 300 words.
152
  * For complex questions, extend your answer to a maximum of 500 words.
153
  3. **Citation Rules (CRITICAL)**:
154
- * **Knowledge Base Citation**: For any information sourced from your internal knowledge base, you MUST include a citation on a NEW LINE after the answer, starting with "Source: ", followed by the metadata field 'source' to get the hyperlink.
155
- * **Web Search Citation**: For any information obtained from the web using the DuckDuckGo tool, you MUST include a citation on a NEW LINE after the answer, starting with "Online Source: ", followed by the full hyperlink.
156
- * **Final Rule for Citations**: Always end your answers with the appropriate citations, ensuring they are on separate lines as specified. Do NOT mix or combine citation types on a single line.
157
  * ALWAYS cite with links NOT text like "from internal knowledge base"
158
  4. **Accuracy and Non-Hallucination**:
159
- * Provide factual and relevant answers based ONLY on the information found in your knowledge base or through web searches.
160
  * NEVER invent or hallucinate information. If an answer cannot be found, state that directly.
161
  Make sure to follow these instructions precisely.
162
  """,
163
  # Link the agent to the knowledge base created earlier.
164
  knowledge=knowledge,
165
  # Automatically add the current date and time to the agent's context.
166
- #add_datetime_to_context=True,
167
  # Automatically add the user's location to the context (if available).
168
- #add_location_to_context=True,
169
  # Enable the agent to search its knowledge base by default.
170
- #search_knowledge=True,
171
  # Equip the agent with tools, in this case, the ability to search the web using DuckDuckGo.
172
  tools=[DuckDuckGoTools()],
173
  # Enable markdown formatting in the agent's output.
 
144
  1. **Information Gathering Strategy**:
145
  * **Prioritize Knowledge Base**: First, search your internal knowledge base for the answer.
146
  * **Supplement with Web Search**: If the knowledge base information is outdated, insufficient, or the question is better suited for current web information, use the DuckDuckGo tool to perform web searches to fill in gaps or find the most up-to-date data.
147
+ * For general technology questions not in your knowledge base, use the DuckDuckGo tool to perform web search to provide accurate answers.
148
+ * If the question is asking for the "latest" or "most recent" of a data-related topic, ALWAYS use the DuckDuckGo tool to perform the latest web search and datetime to context.
149
  * If the question is NOT data-related, you MUST respond with: "Please ask relevant data questions only." and terminate.
150
  2. **Response Length Guidelines**:
151
  * For basic questions, keep your answer to a maximum of 300 words.
152
  * For complex questions, extend your answer to a maximum of 500 words.
153
  3. **Citation Rules (CRITICAL)**:
154
+ * **Knowledge Base Citation**: For any information sourced from your internal knowledge base, you MUST ALWAYS include a citation on a NEW LINE after the answer, starting with "Source: ", followed by the metadata field 'source' to get the hyperlink.
155
+ * **Web Search Citation**: For any information obtained from the web using the DuckDuckGo tool, you MUST ALWAYS include a citation on a NEW LINE after the answer, starting with "Online Source: ", followed by the full hyperlink.
156
+ * **Final Rule for Citations**: ALWAYS end your answers with the appropriate citations, ensuring they are on separate lines as specified. Do NOT mix or combine citation types on a single line.
157
  * ALWAYS cite with links NOT text like "from internal knowledge base"
158
  4. **Accuracy and Non-Hallucination**:
159
+ * Provide factual and relevant answers based ONLY on the information found in your knowledge base or through the DuckDuckGo tool to perform web searches.
160
  * NEVER invent or hallucinate information. If an answer cannot be found, state that directly.
161
  Make sure to follow these instructions precisely.
162
  """,
163
  # Link the agent to the knowledge base created earlier.
164
  knowledge=knowledge,
165
  # Automatically add the current date and time to the agent's context.
166
+ add_datetime_to_context=True,
167
  # Automatically add the user's location to the context (if available).
168
+ add_location_to_context=True,
169
  # Enable the agent to search its knowledge base by default.
170
+ search_knowledge=True,
171
  # Equip the agent with tools, in this case, the ability to search the web using DuckDuckGo.
172
  tools=[DuckDuckGoTools()],
173
  # Enable markdown formatting in the agent's output.