Spaces:
Running
Running
Commit
·
d94b965
1
Parent(s):
ab0189e
Update prompt template
Browse files
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 |
-
"
|
141 |
-
"
|
|
|
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 |
)
|