Skip to content

Commit 20f64fd

Browse files
authored
Merge pull request #1 from pavsingh7/core-system-changes
Core system changes. Able to resolve one conflict. Main wanted to use gpt3.5. We use 4o.
2 parents cc74772 + 3497352 commit 20f64fd

File tree

33 files changed

+14
-61
lines changed

33 files changed

+14
-61
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

data/Benefit_Options.pdf

-532 KB
Binary file not shown.

data/Contoso_Electronics_Company_Overview.md

Lines changed: 0 additions & 48 deletions
This file was deleted.
-569 KB
Binary file not shown.
-554 KB
Binary file not shown.

data/PerksPlus.pdf

-113 KB
Binary file not shown.
1.51 MB
Binary file not shown.
1.17 MB
Binary file not shown.
2.06 MB
Binary file not shown.

0 commit comments

Comments
 (0)