pritish commited on
Commit
1ce310a
·
1 Parent(s): 82c735d

Changes to GPT3 prompt

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -122,15 +122,16 @@ def generate_answer(question):
122
  for c in topn_chunks:
123
  prompt += c + '\n\n'
124
 
125
- prompt += "Instructions: Compose a comprehensive reply to the query using the search results given."\
126
- "Cite each reference using [number] notation (every result has this number at the beginning)."\
127
- "Citation should be done at the end of each sentence. If the search results mention multiple subjects"\
128
- "with the same name, create separate answers for each. Only include information found in the results and"\
129
- "don't add any additional information. Make sure the answer is correct and don't output false content."\
130
- "If the text does not relate to the query, simply state 'Found Nothing'. Don't write 'Answer:'"\
131
- "Directly start the answer.\n"
 
132
 
133
- prompt += f"Query: {question}\n\n"
134
  answer = generate_text(prompt)
135
  return answer
136
 
 
122
  for c in topn_chunks:
123
  prompt += c + '\n\n'
124
 
125
+ prompt += "Instructions: Compose a comprehensive reply to the query using the search results given. "\
126
+ "Cite each reference using [number] notation (every result has this number at the beginning). "\
127
+ "Citation should be done at the end of each sentence. If the search results mention multiple subjects "\
128
+ "with the same name, create separate answers for each. Only include information found in the results and "\
129
+ "don't add any additional information. Make sure the answer is correct and don't output false content. "\
130
+ "If the text does not relate to the query, simply state 'Found Nothing'. Ignore outlier "\
131
+ "search results which has nothing to do with the question. Only answer what is asked. The "\
132
+ "answer should be short and concise.\n\nQuery: {question}\nAnswer: "
133
 
134
+ prompt += f"Query: {question}\nAnswer:"
135
  answer = generate_text(prompt)
136
  return answer
137