Update app.py
Browse files
app.py
CHANGED
@@ -173,11 +173,16 @@ def create_conversational_rag_chain(retriever):
|
|
173 |
verbose=False,
|
174 |
)
|
175 |
|
176 |
-
template = """
|
177 |
-
{context}
|
178 |
-
|
|
|
|
|
|
|
|
|
179 |
"""
|
180 |
-
prompt = ChatPromptTemplate.from_template(template,
|
|
|
181 |
|
182 |
rag_chain = prompt | llm | StrOutputParser()
|
183 |
|
|
|
173 |
verbose=False,
|
174 |
)
|
175 |
|
176 |
+
template = """You are an assistant for question-answering task.
|
177 |
+
Extract relevant information from context {context} to answer the question {question}. Answer based only on relevant information.
|
178 |
+
Do not rephraze the question.
|
179 |
+
Provide answer as a summary, which answers the question.
|
180 |
+
Provide a lot of relevant information from context at the answer.Be consise.
|
181 |
+
Answer in English Language. DO NOT ASK more questions by yourself!
|
182 |
+
Answer:
|
183 |
"""
|
184 |
+
prompt = ChatPromptTemplate.from_template(template, role='ai')
|
185 |
+
|
186 |
|
187 |
rag_chain = prompt | llm | StrOutputParser()
|
188 |
|