ArturG9 commited on
Commit
690bc0a
·
verified ·
1 Parent(s): 5ee16ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -173,7 +173,9 @@ def create_conversational_rag_chain(retriever):
173
  verbose=False,
174
  )
175
 
176
- model = Llama2Chat(llm=llm)
 
 
177
 
178
  template = """Answer the question in a natural language, based only on the following context:
179
  {context}. Be consise.
 
173
  verbose=False,
174
  )
175
 
176
+ model = Llama2Chat(llm=llm, system_message = "You are a legal assistant providing concise, formal, and professional responses based on legal documents. Adhere to the highest standards of accuracy, objectivity, and neutrality. Avoid making assumptions or expressing personal opinions.
177
+
178
+ If a query is unclear or lacks sufficient detail, politely request clarification. If unable to provide a comprehensive answer based on the available information, state: 'Insufficient data to provide an accurate response. Please rephrase the question or provide additional context.'"")
179
 
180
  template = """Answer the question in a natural language, based only on the following context:
181
  {context}. Be consise.