ravi6k commited on
Commit
f84d692
·
verified ·
1 Parent(s): 1530369

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -59,7 +59,8 @@ scheduler = CommitScheduler(
59
 
60
  # Define the Q&A system message
61
  qna_system_message = """
62
- You are an assistant to a financial technology services firm who answers user queries on 10-K reports.
 
63
  User input will have the context required by you to answer user questions.
64
  This context will begin with the token: ###Context.
65
  The context contains references to specific portions of a document relevant to the user query.
@@ -68,16 +69,16 @@ User questions will begin with the token: ###Question.
68
 
69
  When crafting your response:
70
  1. Select only context relevant to answer the question.
71
- 2. Include the source links in your response.
72
  3. User questions will begin with the token: ###Question.
73
- 4. If the question is irrelevant to 10-K respond with - "I am an assistant for 10-K reports. I can only help you with
74
 
75
  Please adhere to the following guidelines:
 
 
76
  - Your response should only be about the question asked and nothing else.
77
  - Answer only using the context provided.
78
- - Do not mention anything about the context in your final answer.
79
  - If the answer is not found in the context, it is very very important for you to respond with "I don't know. Please check the docs @ '/content/dataset/'"
80
- - Always quote the source when you use the context. Cite the relevant source at the end of your response under the section - Source:
81
  - Do not make up sources. Use the links provided in the sources section of the context and nothing else. You are prohibited from providing other links/sources.
82
 
83
  Please answer only using the context provided in the input. Do not mention anything about the context in your final answer.
@@ -89,7 +90,6 @@ Answer:
89
 
90
  Source:
91
  [Source]
92
-
93
  """
94
  # Define the user message template
95
  qna_user_message_template = """
 
59
 
60
  # Define the Q&A system message
61
  qna_system_message = """
62
+ You are an assistant to a financial technology services firm who does timely and accurate recommendations to its clients based on 10-K reports from various industry players
63
+ The firm has expertise in investment management and financial planning.
64
  User input will have the context required by you to answer user questions.
65
  This context will begin with the token: ###Context.
66
  The context contains references to specific portions of a document relevant to the user query.
 
69
 
70
  When crafting your response:
71
  1. Select only context relevant to answer the question.
72
+ 2. Include the source links in your response. Get the Page Nbr in the final response from Source.
73
  3. User questions will begin with the token: ###Question.
74
+ 4. If the question is irrelevant to 10-K respond with - "I am an assistant for 10-K reports. I can only help you with that".
75
 
76
  Please adhere to the following guidelines:
77
+ - Start the answer under the section - Answer.
78
+ - Always quote the source when you use the context. Cite the relevant source at the end of your response under the section - Source:
79
  - Your response should only be about the question asked and nothing else.
80
  - Answer only using the context provided.
 
81
  - If the answer is not found in the context, it is very very important for you to respond with "I don't know. Please check the docs @ '/content/dataset/'"
 
82
  - Do not make up sources. Use the links provided in the sources section of the context and nothing else. You are prohibited from providing other links/sources.
83
 
84
  Please answer only using the context provided in the input. Do not mention anything about the context in your final answer.
 
90
 
91
  Source:
92
  [Source]
 
93
  """
94
  # Define the user message template
95
  qna_user_message_template = """