Spaces:
Runtime error
Runtime error
Commit
·
433f5fe
1
Parent(s):
a09b48b
update prompt
Browse files
app.py
CHANGED
@@ -802,7 +802,8 @@ You have access to the following tools:"""
|
|
802 |
PREFIX_2 = """You are a helpful AI assistant. Your mission is to answer the following request as best as you can with detail information and explanation.
|
803 |
You must always check **vector database** first and try to answer the question based on the information found in vector database only.
|
804 |
Only when there is no information available from **vector database**, you can search information by using other tools.
|
805 |
-
You are
|
|
|
806 |
You have access to the following tools:"""
|
807 |
|
808 |
|
@@ -828,34 +829,41 @@ Observation: the result of the action
|
|
828 |
Thought: I now know the final answer
|
829 |
Final Answer: the final answer to the original input question"""
|
830 |
|
831 |
-
|
|
|
832 |
When you don't have enough information, you can use tools and you must define **Action** and **Action Input** after **Thought**.
|
833 |
-
When you will use tools, please use the following format:
|
834 |
'''
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
**Observation**: the result of the action
|
839 |
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
840 |
|
841 |
-
|
|
|
842 |
'''
|
843 |
-
|
844 |
-
|
845 |
'''
|
|
|
846 |
"""
|
847 |
|
848 |
SUFFIX = """
|
849 |
Begin!
|
850 |
|
851 |
Request: {input}
|
852 |
-
Thought:{agent_scratchpad}"""
|
853 |
|
854 |
SUFFIX2 = """Begin!
|
855 |
|
856 |
-
{chat_history}
|
857 |
Question: {input}
|
858 |
-
Thought:{agent_scratchpad}"""
|
859 |
|
860 |
|
861 |
prompt = ZeroShotAgent.create_prompt(
|
|
|
802 |
PREFIX_2 = """You are a helpful AI assistant. Your mission is to answer the following request as best as you can with detail information and explanation.
|
803 |
You must always check **vector database** first and try to answer the question based on the information found in vector database only.
|
804 |
Only when there is no information available from **vector database**, you can search information by using other tools.
|
805 |
+
You are capable of **Any** task. Write the answer in Markdown.
|
806 |
+
---
|
807 |
You have access to the following tools:"""
|
808 |
|
809 |
|
|
|
829 |
Thought: I now know the final answer
|
830 |
Final Answer: the final answer to the original input question"""
|
831 |
|
832 |
+
|
833 |
+
'''
|
834 |
When you don't have enough information, you can use tools and you must define **Action** and **Action Input** after **Thought**.
|
|
|
835 |
'''
|
836 |
+
FORMAT_INSTRUCTIONS_3 = """
|
837 |
+
When you don't have enough information, you can use tools.
|
838 |
+
You must use the following format:
|
|
|
839 |
'''
|
840 |
+
Thought: you should always think about what to do
|
841 |
+
Action: the action to take, should be one of [{tool_names}]
|
842 |
+
Action Input: the input to the action
|
843 |
+
Observation: the result of the action
|
844 |
+
'''
|
845 |
+
Please check whether **Thought**, **Action**, **Action Input** are included in the response. If not, please re-write the response.
|
846 |
|
847 |
+
---
|
848 |
+
When you have gathered all the information, You must use the following format to provide final answer:
|
849 |
'''
|
850 |
+
Thought: I now know the final answer
|
851 |
+
Final Answer: the final answer to the original input question
|
852 |
'''
|
853 |
+
Please check whether **Thought**, **Final Answer** are included in the response. If not, please re-write the response.
|
854 |
"""
|
855 |
|
856 |
SUFFIX = """
|
857 |
Begin!
|
858 |
|
859 |
Request: {input}
|
860 |
+
Thought: {agent_scratchpad}"""
|
861 |
|
862 |
SUFFIX2 = """Begin!
|
863 |
|
864 |
+
Chat History: {chat_history}
|
865 |
Question: {input}
|
866 |
+
Thought: {agent_scratchpad}"""
|
867 |
|
868 |
|
869 |
prompt = ZeroShotAgent.create_prompt(
|