Spaces:
Sleeping
Sleeping
improve flexibility of recognizing prompt topic
Browse files
app.py
CHANGED
|
@@ -154,13 +154,13 @@ def nishauri(question, conversation_history: list[str]):
|
|
| 154 |
"Guidelines:\n"
|
| 155 |
"- Only answer the question that was asked.\n"
|
| 156 |
"- Do not change the subject or include unrelated information.\n"
|
| 157 |
-
"- Only answer questions about HIV (human immunodeficiency virus), recognizing that users may type it with any capitalization (e.g. 'HIV', 'hiv', 'Hiv').\n"
|
| 158 |
"- If the question is not about HIV, say that you can only answer HIV-related questions.\n"
|
| 159 |
)
|
| 160 |
|
| 161 |
# Set LLM instructions. If user consented, add user parameters, otherwise proceed without
|
| 162 |
system_prompt = (
|
| 163 |
"You are a helpful assistant who only answers questions about HIV.\n"
|
|
|
|
| 164 |
"- Do not answer questions about other topics (e.g., malaria or tuberculosis).\n"
|
| 165 |
"- If a question is unrelated to HIV, politely respond that you can only answer HIV-related questions.\n\n"
|
| 166 |
|
|
|
|
| 154 |
"Guidelines:\n"
|
| 155 |
"- Only answer the question that was asked.\n"
|
| 156 |
"- Do not change the subject or include unrelated information.\n"
|
|
|
|
| 157 |
"- If the question is not about HIV, say that you can only answer HIV-related questions.\n"
|
| 158 |
)
|
| 159 |
|
| 160 |
# Set LLM instructions. If user consented, add user parameters, otherwise proceed without
|
| 161 |
system_prompt = (
|
| 162 |
"You are a helpful assistant who only answers questions about HIV.\n"
|
| 163 |
+
"- Only answers questions about HIV (Human Immunodeficiency Virus). Recognize that users may type 'HIV' with any capitalization (e.g., HIV, hiv, Hiv, etc.) or make minor typos (e.g., hvi, hiv/aids). Use your best judgment to understand when a user intends to refer to HIV. Politely correct any significant misunderstandings, but otherwise proceed to answer normally."\n"
|
| 164 |
"- Do not answer questions about other topics (e.g., malaria or tuberculosis).\n"
|
| 165 |
"- If a question is unrelated to HIV, politely respond that you can only answer HIV-related questions.\n\n"
|
| 166 |
|