ArturG9 commited on
Commit
bd19e7a
·
verified ·
1 Parent(s): b279902

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -174,9 +174,15 @@ def create_conversational_rag_chain(retriever):
174
  verbose=False,
175
  )
176
 
177
- template = """Answer the question based only on the following context:
178
- {context}
179
- Question: {question}
 
 
 
 
 
 
180
  """
181
  prompt = ChatPromptTemplate.from_template(template)
182
 
 
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
+ **context:** {context}
185
+
186
  """
187
  prompt = ChatPromptTemplate.from_template(template)
188