File size: 3,480 Bytes
4da2eb8
 
a796367
b1f7486
a796367
 
 
b1f7486
 
a796367
 
 
4da2eb8
 
13d1e1a
4da2eb8
13d1e1a
 
 
4da2eb8
13d1e1a
 
 
 
 
4da2eb8
 
13d1e1a
 
fe3a1eb
 
 
4da2eb8
fe3a1eb
 
4da2eb8
fe3a1eb
 
 
 
 
13d1e1a
 
 
 
 
 
 
b1f7486
13d1e1a
 
 
 
b1f7486
4da2eb8
 
13d1e1a
 
 
 
d4d791a
4da2eb8
13d1e1a
 
 
4da2eb8
 
13d1e1a
 
 
 
a796367
 
567b4e6
a796367
 
 
 
 
 
 
 
 
 
 
 
567b4e6
a796367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
PREFIX_OG = """You are an AI Central Brain that relies on a periphreal of connected tools. 
Your duty is to use your tools to satisfy the users request.
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal

Make sure your information is current
Current Date and Time is:
{timestamp}

Your Purpose:
{purpose}
"""

PREFIX = """You are an AI Central Brain that relies on a periphreal of connected tools.
Your duty is to trigger the appropriate tool, and then use the observed results to choose your next task.
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal

Make sure your information is current
Current Date and Time is:
{timestamp}

You have access to the following tools:
- action: UPDATE-TASK action_input=NEW_TASK
- action: SEARCH_ENGINE action_input=SEARCH_ENGINE_URL/?q=SEARCH_QUERY
- action: SCRAPE_WEBSITE action_input=WEBSITE_URL
- action: COMPLETE

Your Purpose:
{purpose}
"""
TASK_PROMPT = """
You are attempting to complete the task
task: {task}

Progress:
{history}

Tasks should be small, isolated, and independent
To start a search use the format:
action: SEARCH_ENGINE action_input=URL/?q='SEARCH_QUERY'
What should the task be for us to achieve the purpose?
task: """

FINDER = """
Instructions
- Use the provided tool to find a website to scrape
- Use the tool provided tool to scrape the text from the website url
- Find the pertinent information in the text that you scrape
- When you are finished, return with  action: COMPLETE

Use the following format:
task: choose the next action from your available tools
action: the action to take (should be one of [UPDATE-TASK, SEARCH_ENGINE, SCRAPE_WEBSITE, COMPLETE]) action_input=XXX
observation: the result of the action
...(task/action/observation can be repeated N times)


Example:
***************************
User command: Find me the breaking news from today
action: SEARCH_ENGINE action_input=https://www.google.com/search?q=todays+breaking+news
observation: the search results are....

Response:
Assistant: I found the the following news articles.....
***************************


Progress:
{history}"""


COMPRESS_DATA_PROMPT_SMALL = """
You are attempting to complete the task
task: {task}
Current data:
{knowledge}
New data:
{history}
Compress the data above into a concise data presentation of data that is relevant (~4000 words)
Include datapoints that will provide greater accuracy in completing the task
Return the data in JSON format to save space
Include all relevant information in great detail 
"""

COMPRESS_DATA_PROMPT = """
You have just completed the task
task: {task}
Collected data:
{knowledge}
Message:
{history}
Compile the data that you have collected into a detailed report (~8000 words)
Be exhaustive and include all granular data collected, and provide context where needed
Use a research paper format with headings and detailed descriptions
"""

COMPRESS_HISTORY_PROMPT = """
You are attempting to complete the task
task: {task}
Progress:
{history}
Compress the timeline of progress above into a concise report
Include all important milestones, the current challenges, and implementation details necessary to proceed
"""

LOG_PROMPT = """
PROMPT
**************************************
{}
**************************************
"""

LOG_RESPONSE = """
RESPONSE
**************************************
{}
**************************************
"""