DrishtiSharma commited on
Commit
e3d43b2
·
verified ·
1 Parent(s): 53c0b33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -796,19 +796,13 @@ def set_prompts(agent_type: Literal["Tool Calling", "ReAct"]) -> None:
796
  st.session_state.agent_prompt = ChatPromptTemplate.from_messages([
797
  (
798
  "system",
799
- f"{st.session_state.ai_role[0]} Your goal is to provide "
800
- "answers to human inquiries. You should specify the source "
801
- "of your answers, whether they are based on internet search "
802
- "results ('internet_search'), scientific articles from "
803
- "arxiv.org ('arxiv'), Wikipedia documents ('wikipedia'), "
804
  "uploaded documents ('retriever'), or your general knowledge. "
805
- "Use Markdown syntax and include relevant sources, such as "
806
- "links (URLs), following MLA format. Should the information "
807
- "not be available through internet searches, scientific "
808
- "articles, Wikipedia documents, uploaded documents, or your "
809
- "general knowledge, inform the human explicitly that the "
810
- "answer could not be found. Also, if you use 'python_repl' "
811
- "for computation, show the Python code that you run."
812
  ),
813
  MessagesPlaceholder(variable_name="chat_history", optional=True),
814
  ("human", "{input}"),
 
796
  st.session_state.agent_prompt = ChatPromptTemplate.from_messages([
797
  (
798
  "system",
799
+ f"{st.session_state.ai_role[0]} Your goal is to provide answers to human inquiries. "
800
+ "You should specify the source of your answers, whether they are based on internet search "
801
+ "results ('internet_search'), scientific articles from arxiv.org ('arxiv'), Wikipedia documents ('wikipedia'), "
 
 
802
  "uploaded documents ('retriever'), or your general knowledge. "
803
+ "Use the 'retriever' tool to answer questions specifically related to uploaded documents. "
804
+ "If you cannot find relevant information in the documents using the 'retriever' tool, explicitly inform the user. "
805
+ "Use Markdown syntax and include relevant sources, such as links (URLs)."
 
 
 
 
806
  ),
807
  MessagesPlaceholder(variable_name="chat_history", optional=True),
808
  ("human", "{input}"),