silvanocerza commited on
Commit
d94b965
·
1 Parent(s): ab0189e

Update prompt template

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -137,8 +137,9 @@ def search(question: str) -> GeneratedAnswer:
137
  retriever = InMemoryBM25Retriever(document_store=document_store(), top_k=5)
138
 
139
  template = (
140
- "Take a deep breath and think then answer given the context"
141
- "Context: {{ documents|map(attribute='text')|replace('\n', ' ')|join(';') }}"
 
142
  "Question: {{ query }}"
143
  "Answer:"
144
  )
 
137
  retriever = InMemoryBM25Retriever(document_store=document_store(), top_k=5)
138
 
139
  template = (
140
+ "Using the information contained in the context, give a comprehensive answer to the question."
141
+ "If the answer cannot be deduced from the context, do not give an answer."
142
+ "Context: {{ documents|map(attribute='content')|replace('\n', ' ')|join(';') }}"
143
  "Question: {{ query }}"
144
  "Answer:"
145
  )