ArturG9 commited on
Commit
4467613
·
verified ·
1 Parent(s): d4a4176

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -174,12 +174,16 @@ def create_conversational_rag_chain(retriever):
174
  verbose=False,
175
  )
176
 
177
- template = """You are an assistant for question-answering task.
178
- Extract relevant information from context {context} to answer the question {question}. Answer based only on relevant information.
179
- Do not rephraze the question.
180
- Provide answer as a summary, which answers the question.
181
- Provide a lot of relevant information from context at the answer.Be consise.
182
- Answer in English Language. DO NOT ASK more questions by yourself!
 
 
 
 
183
  Answer:
184
  """
185
  prompt = ChatPromptTemplate.from_template(template, role='ai')
 
174
  verbose=False,
175
  )
176
 
177
+ template = """Given the context (format: dictionary) and question, provide a comprehensive answer in natural language that addresses the question directly.
178
+
179
+ The context contains documents with a 'page_content' field and potentially other metadata. Focus on the 'page_content' field for information retrieval.
180
+
181
+ When answering, prioritize including all relevant details from the context to support your response. Avoid yes/no answers or simple options (A, B, etc.).
182
+
183
+ Question: {question}
184
+
185
+ Context: {context}
186
+
187
  Answer:
188
  """
189
  prompt = ChatPromptTemplate.from_template(template, role='ai')