Spaces:
Runtime error
Runtime error
Commit
·
5e19412
1
Parent(s):
e5883f8
update prompt
Browse files
app.py
CHANGED
@@ -802,12 +802,13 @@ Only when there is no information available from vector database, you can search
|
|
802 |
When the final answer has output files, you must output the **name** of the file.
|
803 |
You have access to the following tools:"""
|
804 |
|
805 |
-
PREFIX_2 = """You are a helpful AI assistant. You are capable to handle **any** task.\n
|
806 |
-
Your mission is to answer the following request as best as you can with detail information and explanation
|
807 |
-
|
808 |
-
Only when there is no information available from vector database, you can search information by using other tools.\n
|
809 |
-
---\n
|
810 |
-
You have access to the following tools:\n
|
|
|
811 |
|
812 |
|
813 |
FORMAT_INSTRUCTIONS = """Use the following format:
|
@@ -837,40 +838,40 @@ Final Answer: the final answer to the original input question"""
|
|
837 |
When you don't have enough information, you can use tools and you must define **Action** and **Action Input** after **Thought**.
|
838 |
'''
|
839 |
FORMAT_INSTRUCTIONS_3 = """
|
840 |
-
When you don't have enough information, you can use tools and you must use the following format to define **Thought**, **Action** and **Action Input**:\n
|
841 |
-
'''\n
|
842 |
-
"Thought": you should always think about what to do\n
|
843 |
-
"Action": the action to take, should be one of [{tool_names}]\n
|
844 |
-
"Action Input": the input to the action\n
|
845 |
-
"Observation": the result of the action\n
|
846 |
-
'''\n
|
847 |
-
If **Thought**, **Action**, **Action Input** is missing in the response, you must re-write the response.\n
|
848 |
-
|
849 |
-
---\n
|
850 |
-
When you are able to provide final answer, you must use the following format to define **Final Answer** after **Thought**:\n
|
851 |
-
'''\n
|
852 |
-
"Thought": I now know the final answer\n
|
853 |
-
"Final Answer": the final answer to the original input question\n
|
854 |
-
'''\n
|
855 |
-
If **Thought**, **Final Answer** is missing in the response, you must re-write the response.\n
|
856 |
-
|
857 |
-
---\n
|
858 |
-
Example of using tools:\n
|
859 |
-
```\n
|
860 |
-
Question: what is architecture ?\n
|
861 |
-
---\n
|
862 |
-
Thought: I need to check the definition of architecture in Vector Database\n
|
863 |
-
Action: Vector Database Search\n
|
864 |
-
Action Input: architecture\n
|
865 |
-
```\n
|
866 |
-
|
867 |
-
Example of final answer:\n
|
868 |
-
```\n
|
869 |
-
Question: Good morning\n
|
870 |
-
---\n
|
871 |
-
Thought: I need to make a greeting to user\n
|
872 |
-
Final Answer: Hello, how can I do for you ?\n
|
873 |
-
```\n
|
874 |
"""
|
875 |
|
876 |
SUFFIX = """
|
@@ -879,13 +880,13 @@ Begin!
|
|
879 |
Request: {input}
|
880 |
Thought: {agent_scratchpad}"""
|
881 |
|
882 |
-
SUFFIX2 = """Begin!\n
|
883 |
|
884 |
-
{chat_history}\n
|
885 |
-
---\n
|
886 |
-
Question: {input}\n
|
887 |
-
---\n
|
888 |
-
Thought: {agent_scratchpad}\n
|
889 |
"""
|
890 |
|
891 |
|
|
|
802 |
When the final answer has output files, you must output the **name** of the file.
|
803 |
You have access to the following tools:"""
|
804 |
|
805 |
+
PREFIX_2 = """You are a helpful AI assistant. You are capable to handle **any** task.\n\
|
806 |
+
Your mission is to answer the following request as best as you can with detail information and explanation.\n\
|
807 |
+
When you need information, you must always check vector database first and try to answer the question based on the information found in vector database only.\n\
|
808 |
+
Only when there is no information available from vector database, you can search information by using other tools.\n\
|
809 |
+
---\n\
|
810 |
+
You have access to the following tools:\n\
|
811 |
+
"""
|
812 |
|
813 |
|
814 |
FORMAT_INSTRUCTIONS = """Use the following format:
|
|
|
838 |
When you don't have enough information, you can use tools and you must define **Action** and **Action Input** after **Thought**.
|
839 |
'''
|
840 |
FORMAT_INSTRUCTIONS_3 = """
|
841 |
+
When you don't have enough information, you can use tools and you must use the following format to define **Thought**, **Action** and **Action Input**:\n\
|
842 |
+
'''\n\
|
843 |
+
"Thought": you should always think about what to do\n\
|
844 |
+
"Action": the action to take, should be one of [{tool_names}]\n\
|
845 |
+
"Action Input": the input to the action\n\
|
846 |
+
"Observation": the result of the action\n\
|
847 |
+
'''\n\
|
848 |
+
If **Thought**, **Action**, **Action Input** is missing in the response, you must re-write the response.\n\
|
849 |
+
|
850 |
+
---\n\
|
851 |
+
When you are able to provide final answer, you must use the following format to define **Final Answer** after **Thought**:\n\
|
852 |
+
'''\n\
|
853 |
+
"Thought": I now know the final answer\n\
|
854 |
+
"Final Answer": the final answer to the original input question\n\
|
855 |
+
'''\n\
|
856 |
+
If **Thought**, **Final Answer** is missing in the response, you must re-write the response.\n\
|
857 |
+
|
858 |
+
---\n\
|
859 |
+
Example of using tools:\n\
|
860 |
+
```\n\
|
861 |
+
Question: what is architecture ?\n\
|
862 |
+
---\n\
|
863 |
+
Thought: I need to check the definition of architecture in Vector Database\n\
|
864 |
+
Action: Vector Database Search\n\
|
865 |
+
Action Input: architecture\n\
|
866 |
+
```\n\
|
867 |
+
|
868 |
+
Example of final answer:\n\
|
869 |
+
```\n\
|
870 |
+
Question: Good morning\n\
|
871 |
+
---\n\
|
872 |
+
Thought: I need to make a greeting to user\n\
|
873 |
+
Final Answer: Hello, how can I do for you ?\n\
|
874 |
+
```\n\
|
875 |
"""
|
876 |
|
877 |
SUFFIX = """
|
|
|
880 |
Request: {input}
|
881 |
Thought: {agent_scratchpad}"""
|
882 |
|
883 |
+
SUFFIX2 = """Begin!\n\
|
884 |
|
885 |
+
{chat_history}\n\
|
886 |
+
---\n\
|
887 |
+
Question: {input}\n\
|
888 |
+
---\n\
|
889 |
+
Thought: {agent_scratchpad}\n\
|
890 |
"""
|
891 |
|
892 |
|