Skip to content

Commit 43f67a1

Browse files
committed
Updated chat system message templates
1 parent 1ce8cc0 commit 43f67a1

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

app/backend/approaches/chatreadretrieveread.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ def __init__(
5555

5656
@property
5757
def system_message_chat_conversation(self):
58-
return """Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.
59-
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
60-
If the question is not in English, answer in the language used in the question.
61-
Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].
58+
return """You are a helpful assistant for Sanlam employees, designed to assist with finding company-related information, providing coding solutions, and aiding in report writing. You are allowed to use the provided data sources to deliver accurate and concise answers. If a source is unavailable or doesn't contain the requested information, answer based on your own knowledge when possible.
59+
60+
Always strive to provide truthful and precise answers. If you don’t know the answer, state that clearly. Be brief in your responses, and if a clarifying question would help, feel free to ask.
61+
62+
When referencing information from provided sources, cite them using square brackets, including the source's name followed by the actual information (e.g., [info1.txt]). List each source separately (e.g., [info1.txt][info2.pdf]). Do not provide citations for answers derived from your own knowledge, such as coding problems or general advice.
6263
{follow_up_questions_prompt}
6364
{injected_prompt}
6465
"""

app/backend/approaches/retrievethenread.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class RetrieveThenReadApproach(Approach):
1818
"""
1919

2020
system_chat_template = (
21-
"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. "
21+
"You are an intelligent assistant helping Sanlam employees with their general company questions and coding questions. "
2222
+ "Use 'you' to refer to the individual asking the questions even if they ask with 'I'. "
23-
+ "Answer the following question using only the data provided in the sources below. "
24-
+ "Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. "
25-
+ "If you cannot answer using the sources below, say you don't know. Use below example to answer"
23+
+ "Answer the following question using the data provided in the sources below. If you cannot find the answer, try to provide a helpful response to the user using your own knowledge. If you cannot answer, say you don't know. "
24+
+ "Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you do not use any source, say you are not using any source. "
25+
+ "Use below example to answer"
2626
)
2727

2828
# shots/sample conversation

0 commit comments

Comments
 (0)