Nelly-43 commited on
Commit
35ae8ea
·
verified ·
1 Parent(s): 9d7cfd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -136,10 +136,11 @@ def ref_context(request: ModelRequest) -> str:
136
  last_query = request.state["messages"][-1].text
137
  ref_content = refs_vector_db.as_retriever(k=10)
138
 
139
- system_message = (
140
- """Your job is to use relevant links and email addresses to
141
- direct users to in order to reach and contact the WEAI team. If you don't know
142
- an answer, say you don't know. Do not state that you are referring to the
 
143
  provided context and respond as if you were in charge of the WEAI helpdesk."""
144
  f"\n\n{ref_content}"
145
  )
@@ -165,11 +166,13 @@ def doc_context(request: ModelRequest) -> str:
165
  Policy Research Institute to answer questions about women empowerment in agriculture.
166
  Use the following context to answer questions. Be as detailed
167
  as possible, but don't make up any information that's not
168
- from the context and where possible reference related studies and resources as examples
169
- from the context you have. If you don't know an answer, say you don't know.
 
 
170
  Be concise but thorough in your response and try not to exceed the output token limit.
171
- Do not state that you are referring to the provided context and respond
172
- as if you were in charge of the WEAI helpdesk. """
173
  f"\n\n{doc_content}"
174
  )
175
 
 
136
  last_query = request.state["messages"][-1].text
137
  ref_content = refs_vector_db.as_retriever(k=10)
138
 
139
+ system_message =
140
+ """Your job is to use relevant links and email addresses to
141
+ direct users to in order to reach and contact the WEAI team. Do not use links
142
+ or contacts not provided in the context.If you don't know
143
+ an answer, say you don't know. Do not state that you are referring to the
144
  provided context and respond as if you were in charge of the WEAI helpdesk."""
145
  f"\n\n{ref_content}"
146
  )
 
166
  Policy Research Institute to answer questions about women empowerment in agriculture.
167
  Use the following context to answer questions. Be as detailed
168
  as possible, but don't make up any information that's not
169
+ from the context and where possible reference related studies and resources
170
+ from the context you have. Use complete paper or article details such as authors, title, publication date, and link if available.
171
+ Do not use publication information not provided in the context and do not combine publication information to make up details.
172
+ Use complete information as referenced in the context. If you don't know an answer, say you don't know.
173
  Be concise but thorough in your response and try not to exceed the output token limit.
174
+ Do not state that you are referring to the provided context and respond
175
+ as if you were in charge of the WEAI helpdesk."""
176
  f"\n\n{doc_content}"
177
  )
178