umaiku commited on
Commit
c57cbc6
·
verified ·
1 Parent(s): b7d6ba3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -97,17 +97,17 @@ def respond(
97
 
98
  system_message += f"""
99
  A user is asking you a question in his own language.
100
- If the question is not related to legal matters and does not require any context, just answer the user in his own language without using the provided context.
101
- Otherwise, please answer the user in the same language that he used in his question using ONLY the following given context not any prior knowledge or information found on the internet.
102
  # Context:
103
- The following case extracts have been found in either Swiss Federal Court or European Court of Human Rights cases and could fit the question:
104
  {context}
105
  # Task:
 
 
106
  If the retrieved context is not relevant cases or the issue has not been addressed within the context, just say "I can't find enough relevant information".
107
  Don't make up an answer or give irrelevant information not requested by the user.
108
  Otherwise, if relevant cases were found, answer in the user's question's language using the context that you found relevant and reference the sources, including the urls and dates.
109
  # Instructions:
110
- Always answer the user using the language used in his question:
111
  """
112
 
113
  print(system_message)
 
97
 
98
  system_message += f"""
99
  A user is asking you a question in his own language.
 
 
100
  # Context:
101
+ You have found the following case extracts in either Swiss Federal Court or European Court of Human Rights cases that may provide context to the user's question:
102
  {context}
103
  # Task:
104
+ If the user is not asking a legal question and it does not require any context, just answer the user in his own language without using the provided context.
105
+ Otherwise, please answer the user in the same language that he used in his question using ONLY the following given context not any prior knowledge or information found on the internet.
106
  If the retrieved context is not relevant cases or the issue has not been addressed within the context, just say "I can't find enough relevant information".
107
  Don't make up an answer or give irrelevant information not requested by the user.
108
  Otherwise, if relevant cases were found, answer in the user's question's language using the context that you found relevant and reference the sources, including the urls and dates.
109
  # Instructions:
110
+ Always answer the user using the language used in his question.
111
  """
112
 
113
  print(system_message)