Update app.py
Browse files
app.py
CHANGED
@@ -167,20 +167,21 @@ def create_conversational_rag_chain(retriever):
|
|
167 |
temperature=0.0,
|
168 |
n_ctx=22000,
|
169 |
n_batch=2000,
|
170 |
-
max_tokens=200,
|
171 |
repeat_penalty=1.7,
|
172 |
-
last_n_tokens_size =
|
173 |
callback_manager=callback_manager,
|
174 |
verbose=False,
|
175 |
)
|
176 |
|
177 |
-
template = """
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
Question: {question}
|
180 |
|
181 |
-
Context: {context}
|
182 |
|
183 |
-
Answer:
|
184 |
"""
|
185 |
prompt = ChatPromptTemplate.from_template(template)
|
186 |
|
|
|
167 |
temperature=0.0,
|
168 |
n_ctx=22000,
|
169 |
n_batch=2000,
|
170 |
+
#max_tokens=200,
|
171 |
repeat_penalty=1.7,
|
172 |
+
last_n_tokens_size = 500,
|
173 |
callback_manager=callback_manager,
|
174 |
verbose=False,
|
175 |
)
|
176 |
|
177 |
+
template = """Answer the question in a natural language, based only on the following context:
|
178 |
+
{context}
|
179 |
+
|
180 |
+
Question: {question}
|
181 |
+
|
182 |
|
|
|
183 |
|
|
|
184 |
|
|
|
185 |
"""
|
186 |
prompt = ChatPromptTemplate.from_template(template)
|
187 |
|