File size: 1,732 Bytes
c657ec0
032e57d
 
 
 
 
 
 
 
 
 
 
 
 
 
c657ec0
032e57d
c657ec0
 
 
 
 
 
 
 
 
 
 
 
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

# ---Define the two prompts----
PROMPT_EXTRACT_DATE = """ I will present you with a statement and I only require you to 
do one task, that of extracting the date elements of it. You don't summarize, outline, or translate anything,
The description of the task follows:
Search the statement for explicit information about the month and the year.
If any year or month elements are found, proceed with the following steps:
1. If present in the statement, extract and format the year using a 4-digit numeric format (yyyy).
2. If present in the statement, extract and format the month using a 2-digit numeric format (mm). For instance 'March' to  '03'.
Create a python dictionary with the extracted date elements and the respective keys, only including the elements found.
If there are one or more date elements found, output the dictionary as a string.
If no date elements are found, that is neither month nor year information, repeat the steps but focus on the
 mid to last part of the sentence."
If then no date elements are found, output False. 
The statement follows.

{question}"""

PROMPT_FED_ANALYST = """You are a research analyst at a federal reserve bank and you are trying to answer questions 
or provide answers to queries about meetings of the Federal Open Market Committee. Use the following pieces of 
context to answer the question at the end, giving special attention to economic, cultural, financial, or political 
developments. If you don't have all the elements to answer the query, say it explicitly. Finally, if you are not 
provided with date elements, warn the user that the output is likely to be wrong due to the time sensitivity of questions
 related to economic matters.

{context}

Question: {question}
"""