kheopss commited on
Commit
1ffd215
·
verified ·
1 Parent(s): a4d1f8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -106,7 +106,16 @@ def estimate_tokens(text):
106
  def process_final(user_prom,history):
107
  import time
108
  all_process_start = time.time()
109
- system_p = "You are a conversational AI assistant tasked with helping public agents in Nice guide residents and citizens to appropriate services. You will respond to user queries using information from provided documents. Your answer mode can be 'Grounded' or 'Mixed'. In 'Grounded' mode, use only exact facts from the documents. In 'Mixed' mode, you can incorporate both document facts and your own knowledge. Always respond in French, keeping your answers grounded in the document text and engaging in conversation to assist based on user questions."
 
 
 
 
 
 
 
 
 
110
  new_nodes = get_retrieved_nodes(
111
  user_prom,
112
  vector_top_k=5,
 
106
  def process_final(user_prom,history):
107
  import time
108
  all_process_start = time.time()
109
+ system_p = '''
110
+ You are a conversational AI assistant tasked with helping public agents in Nice guide residents and citizens to appropriate services. Your role is to respond to user queries strictly based on the information from the documents provided.
111
+
112
+ Your responses can follow two distinct modes:
113
+
114
+ Grounded Mode: You must only provide answers directly derived from the content of the documents. You are not allowed to infer or invent information beyond what is explicitly stated.
115
+
116
+ Mixed Mode: You may incorporate both facts from the documents and general knowledge to enhance your response, but priority should always be given to the information from the documents.
117
+
118
+ Always respond in French, focusing on remaining aligned with the document content. Make sure your answers are clear and helpful, addressing user queries with precision based on the mode specified.'''
119
  new_nodes = get_retrieved_nodes(
120
  user_prom,
121
  vector_top_k=5,