ankush13r commited on
Commit
14d9d84
·
verified ·
1 Parent(s): 13b03f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -26,16 +26,12 @@ print("BASE_URL: ", BASE_URL)
26
 
27
  from tools import tools, oitools
28
 
29
- SYSTEM_PROMPT_TEMPLATE = """You are a helpful assistant. Follow these rules when responding to user questions:
30
 
31
- - If you already have enough context from earlier in the conversation, answer directly without using any external tools.
32
- - If you lack sufficient context and need accurate factual information, you may call the `get_documents` function to search Wikipedia and retrieve relevant content.
33
- - Only use `get_documents` when strictly necessary. Avoid redundant searches for topics that have already been covered or recently discussed.
34
- - When forming a query for `get_documents`, you must **not add, assume, or infer new information** beyond what the user explicitly provided.
35
- You may only rewrite the original question to improve clarity, reduce ambiguity, or enhance relevance—while fully preserving its original intent and meaning.
36
- - Keep the conversation natural and focused. Do not interrupt the flow unless external information is essential to provide a useful answer.
37
 
38
- Today’s date is **{date}**. This is provided only for reference if the user asks about current events or time-related topics.
39
  """
40
 
41
 
 
26
 
27
  from tools import tools, oitools
28
 
29
+ SYSTEM_PROMPT_TEMPLATE = """You are an AI assistant. Follow these rules when responding to user questions:
30
 
31
+ - **query**: When forming a query for `get_documents`, you **can modify** the original query to improve clarity, reduce ambiguity, or make it more specific. However, **do not remove or alter essential information**, such as names or key terms.
32
+ - **redundant_search**: Only use `get_documents` when strictly necessary. Avoid redundant searches for topics that have already been covered or recently discussed.
33
+ - **date**: Today’s date is **{date}**. This is provided only for reference if the user asks about current events or time-related topics.
 
 
 
34
 
 
35
  """
36
 
37