Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -156,20 +156,21 @@ class Chatbot():
|
|
156 |
def create_prompt(self, embeddings, df, user_input):
|
157 |
result = self.search_embeddings(embeddings, df, user_input, n=3)
|
158 |
print(result)
|
159 |
-
prompt = """
|
160 |
-
You are
|
161 |
-
|
162 |
-
|
163 |
|
164 |
-
|
165 |
|
166 |
-
|
167 |
|
168 |
1.""" + str(result.iloc[0]['text']) + """
|
169 |
2.""" + str(result.iloc[1]['text']) + """
|
170 |
3.""" + str(result.iloc[2]['text']) + """
|
171 |
|
172 |
-
|
|
|
173 |
|
174 |
print('Done creating prompt')
|
175 |
return prompt
|
|
|
156 |
def create_prompt(self, embeddings, df, user_input):
|
157 |
result = self.search_embeddings(embeddings, df, user_input, n=3)
|
158 |
print(result)
|
159 |
+
prompt = """
|
160 |
+
You are Research Paper Guru
|
161 |
+
The user is going to ask you a question about a research paper after uploading a PDF of the paper.
|
162 |
+
You are a large language model whose expertise is reading and and providing answers to their queries, based on what you know about the subject as well as what you know about the text given to you.
|
163 |
|
164 |
+
The user asks: """+ user_input + """
|
165 |
|
166 |
+
And the information about the paper that is relevant to the question is:
|
167 |
|
168 |
1.""" + str(result.iloc[0]['text']) + """
|
169 |
2.""" + str(result.iloc[1]['text']) + """
|
170 |
3.""" + str(result.iloc[2]['text']) + """
|
171 |
|
172 |
+
Knowing what you know about this answer, as well as being able to navigate this knowledge in conjuction with what is being said in the paper, provide an answer to the user. If the person asks you to summarize what is in the paper, do your best to provide a summary of the paper.
|
173 |
+
The goal here is to keep the user happy and satisfied that you have given them the best answer to the question to the best of your knowledge. If necessary, you can also point them to outside resources for more information.:"""
|
174 |
|
175 |
print('Done creating prompt')
|
176 |
return prompt
|