ArturG9 commited on
Commit
b2ec3a4
1 Parent(s): 2c751e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -173,11 +173,16 @@ def create_conversational_rag_chain(retriever):
173
  verbose=False,
174
  )
175
 
176
- template = """Answer the question based only on the following context:
177
- {context}
178
- Question: {question}
 
 
 
 
179
  """
180
- prompt = ChatPromptTemplate.from_template(template, type = "Ai")
 
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