Phoenix21 commited on
Commit
ed0f706
·
verified ·
1 Parent(s): 9f2c8e3

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +24 -18
prompts.py CHANGED
@@ -4,50 +4,56 @@ from langchain.prompts import PromptTemplate
4
  classification_prompt_str = """
5
  You are a helpful assistant that classifies user questions into three categories:
6
  1) "Wellness" if the question involves health, nutrition, fitness, mental well-being, self-care, or research related to these.
7
- 2) "Brand" if the question is specifically about 'DailyWellnessAI'—its mission, disclaimers, features, policies, etc.
8
- 3) "OutOfScope" if it’s neither wellness nor brand.
9
 
10
  **Response format**:
11
- Reply exactly with one word: "Wellness", "Brand", or "OutOfScope". No extra explanation.
12
 
13
  Question: {query}
14
  """
15
 
 
16
  tailor_prompt_str = """
17
- You are a helpful assistant for DailyWellnessAI. Your goal is to simplify complex ideas and provide actionable, user-friendly advice that aligns with our mission to improve daily wellness using AI.
18
 
19
  Here's the response to tailor:
20
  {response}
21
 
22
- Tailor it to make it:
23
- - Simple and easy to understand.
24
- - Practical, with actionable advice where possible (if relevant).
25
- - Aligned with DailyWellnessAI's mission to simplify daily wellness with AI.
26
 
27
- Provide the revised response below:
28
  """
29
 
 
30
  cleaner_prompt_str = """
31
- You are a helpful AI. You have two pieces of information:
32
 
33
- 1) CSV (Knowledge Base) Answer (if any):
34
  {kb_answer}
35
 
36
- 2) Web Search Result (if any):
37
  {web_answer}
38
 
39
- Combine and synthesize these details into a single cohesive answer (if relevant).
40
- If there is duplication or irrelevant text, clean it up and keep the answer straightforward.
41
- Do NOT just repeat the content verbatim; merge them meaningfully.
 
42
 
43
- Return your merged text below, nothing else:
44
  """
45
 
 
46
  refusal_prompt_str = """
47
- This question is neither wellness-related nor brand-related.
48
- Write a short, polite refusal that gently explains we only handle daily wellness or brand questions about DailyWellnessAI.
 
49
  """
50
 
 
51
  # Now we define the PromptTemplate objects:
52
  classification_prompt = PromptTemplate(
53
  template=classification_prompt_str,
 
4
  classification_prompt_str = """
5
  You are a helpful assistant that classifies user questions into three categories:
6
  1) "Wellness" if the question involves health, nutrition, fitness, mental well-being, self-care, or research related to these.
7
+ 2) "Brand" if the question specifically pertains to 'DailyWellnessAI'—its mission, disclaimers, features, policies, etc.
8
+ 3) "OutOfScope" if it does not fall into the above two categories.
9
 
10
  **Response format**:
11
+ Reply exactly with one word: "Wellness", "Brand", or "OutOfScope". Do not provide any additional explanation.
12
 
13
  Question: {query}
14
  """
15
 
16
+
17
  tailor_prompt_str = """
18
+ You are a helpful assistant for DailyWellnessAI. Your role is to simplify complex ideas and offer actionable, user-friendly advice that aligns with our mission to enhance daily wellness through AI.
19
 
20
  Here's the response to tailor:
21
  {response}
22
 
23
+ Tailor it to ensure:
24
+ - Simplicity and clarity.
25
+ - Practicality, with actionable recommendations where appropriate.
26
+ - Alignment with DailyWellnessAI's mission of simplifying daily wellness through AI.
27
 
28
+ Provide the revised, concise response below:
29
  """
30
 
31
+
32
  cleaner_prompt_str = """
33
+ You are a helpful AI. Below, you have two sources of information:
34
 
35
+ 1) CSV (Knowledge Base) Answer:
36
  {kb_answer}
37
 
38
+ 2) Web Search Result:
39
  {web_answer}
40
 
41
+ Your task:
42
+ - Combine and synthesize the two into a single, clear, cohesive answer.
43
+ - Avoid duplication or irrelevant details.
44
+ - Present the final response in straightforward, user-friendly language.
45
 
46
+ Do not repeat content verbatim. Merge the information meaningfully and provide your synthesized answer below:
47
  """
48
 
49
+
50
  refusal_prompt_str = """
51
+ This question doesn’t directly fall under the categories of daily wellness or questions about the DailyWellnessAI brand.
52
+ However, a simple benefit of this topic is that it could contribute to wellness in the sense that [briefly explain a connection, e.g., it promotes mindfulness, relaxation, balance, etc.].
53
+ For more in-depth wellness insights or questions about DailyWellnessAI, feel free to ask!
54
  """
55
 
56
+
57
  # Now we define the PromptTemplate objects:
58
  classification_prompt = PromptTemplate(
59
  template=classification_prompt_str,