Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -114,14 +114,12 @@ def generate_answer(question):
|
|
114 |
for c in topn_chunks:
|
115 |
prompt += c + '\n\n'
|
116 |
|
117 |
-
prompt += "
|
118 |
-
"
|
119 |
-
"Citation should be done at the end of each sentence. If the search results mention multiple subjects "\
|
120 |
-
"with the same name, create separate answers for each. Only include information found in the results and "\
|
121 |
"don't add any additional information. Make sure the answer is correct and don't output false content. "\
|
122 |
-
"If the text does not relate to the query, simply state 'Text Not Found in
|
123 |
-
"
|
124 |
-
"
|
125 |
|
126 |
answer = generate_text(prompt, "davinci")
|
127 |
return answer
|
|
|
114 |
for c in topn_chunks:
|
115 |
prompt += c + '\n\n'
|
116 |
|
117 |
+
prompt += "Compose a comprehensive reply to the query using the search results given. "\
|
118 |
+
"Only include information found in the results and "\
|
|
|
|
|
119 |
"don't add any additional information. Make sure the answer is correct and don't output false content. "\
|
120 |
+
"If the text does not relate to the query, simply state 'Text Not Found in Body of Knowledge'. "\
|
121 |
+
"Only answer what is asked. "\
|
122 |
+
"Answer step-by-step. \n\nQuery: {question}\n Answer: "
|
123 |
|
124 |
answer = generate_text(prompt, "davinci")
|
125 |
return answer
|