1hangzhao commited on
Commit
bcd7704
·
verified ·
1 Parent(s): 7a31918

Update ontochat/functions.py

Browse files
Files changed (1) hide show
  1. ontochat/functions.py +45 -46
ontochat/functions.py CHANGED
@@ -8,103 +8,102 @@ openai_api_key = None
8
 
9
  current_preidentified_prompts = []
10
  current_preidentified = [
11
- """The ontology's domain is **[DOMAIN]**.
12
-
13
  Ensure all subsequent responses strictly adhere to the scope of my domain.""",
14
-
15
  """My name is **[NAME]**, I am **[AGE]** years old, and I work as a **[OCCUPATION]**. My skills include **[SKILLS]**, and I have a strong interest in **[INTERESTS]**.
16
-
17
  Please refine my response to ensure:
18
 
19
  1. The persona is clearly described.
20
  2. The details (name, age, occupation, skills, interests) are logically and professionally aligned.
21
- 3. If the skills and interests provided by the user are very similar and hard to differentiate, try to generate distinct ones. Skills should focus on technical aspects, while interests should be more general.
22
- 4. The language is concise, precise, and written in a professional tone.
23
- 5. The final refined answer is structured as bullet points.""",
 
 
24
 
25
-
26
- """My user goal description is **[USER GOAL DESCRIPTION]**.
27
-
28
  Please refine my response to ensure:
29
 
30
  1. The goal is clearly described and practical.
31
  2. Expand the user goal description, if necessary, to ensure it starts with a high-level overview *[LONG-TERM GOAL]*, emphasizing the overall impact, followed by a specific *[SHORT-TERM GOAL]*, focusing on immediate outcomes.
32
- 3. Ensure the goal description aligns with my interests, domain expertise.
33
  4. The focus remains solely on the goal, without referencing unrelated elements.
34
- 5. The language is concise, precise, and written in a professional tone.
35
- 6. The final refined answer is presented as bullet points, with the first bullet for the long-term goal and the second bullet for the short-term goal.""",
 
 
36
 
37
- """The actions I need to take to achieve my goal are **[ACTIONS]**.
38
-
39
  Please refine my response to ensure:
40
-
41
  1. The actions are clearly described.
42
  2. The actions are actionable and presented as a logical sequence of steps.
43
  3. Each step includes specific *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]*, and is practical.
44
  4. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the actions.
45
  5. Ensure the actions align logically with my skills, occupation, and overall goal.
46
- 6. The language is concise, precise, and written in a professional tone.
47
- 7. The final refined answer is structured as bullet points, with each step represented as a separate bullet.""",
48
 
49
  """The keywords for my user goal and actions are **[KEYWORDS]**.
50
-
51
  Please refine my response to ensure:
52
-
53
- 1. The Keywords are clearly defined.
54
  2. Each keyword directly supports my goals and actions.
55
  3. Keywords are expanded with the same level of granularity as *[KEYWORD]*.
56
  4. Keywords are broadened to include additional options.
57
- 5. The language is concise, precise, and professional.
58
- 6. The final refined answer is structured as bullet points.""",
59
 
60
  """The current methods I use to perform my actions are **[CURRENT METHODS]**.
61
-
62
  Please refine my response to ensure:
63
-
64
  1. The methods are clearly described.
65
  2. The methods must be manually time-intensive.
66
  3. The methods are actionable and presented as a logical sequence of steps.
67
  4. Each step includes specific *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]*, and is practical.
68
  5. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the methods.
69
  6. The methods align logically with my skills, occupation, and overall goal.
70
- 7. The methods include only the methods themselves, without any words describing challenges, new methods and outcomes.
71
- 8. The language is concise, precise, and written in a professional tone.
72
- 9. The final refined answer is structured as bullet points, with each step represented as a separate bullet.""",
73
 
74
- """The challenges I face with my current methods are **[CHALLENGES]**.
75
-
76
  Please refine my response to ensure:
77
-
78
  1. The challenges are clearly described.
79
  2. Each challenge should be derived from the *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]* used.
80
  3. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the challenges.
81
  4. The challenges align logically with my skills, occupation, and overall goal.
82
- 5. The challenges include only the challenges themselves, without any words describing current methods, new methods and outcomes.
83
- 6. The language is concise, precise, and written in a professional tone.
84
- 7. The final refined answer is structured as bullet points, with each challenge represented as a separate bullet.""",
85
 
86
  """The new methods I will use through this ontology to address my challenges are **[NEW METHODS]**.
87
-
88
  Please refine my response to ensure:
89
-
90
  1. The new methods are clearly described.
91
  2. The new methods must align with what a knowledge-based system can offer.
92
  3. The new methods align logically with my overall goal.
93
- 4. The new methods include only the new methods themselves, without any words describing current methods, challenges and outcomes.
94
- 5. The language is concise, precise, and written in a professional tone.
95
- 6. The final refined answer is presented as a single, well-crafted sentence.""",
 
 
96
 
97
- """The outcomes I expect after implementing the new methods are **[OUTCOMES]**..
98
-
99
  Please refine my response to ensure:
100
-
101
  1. The outcomes are clearly described.
102
  2. The outcomes must align with the benefits a knowledge-based system can provide.
103
  3. The outcomes align logically with my overall goal.
104
- 4. The outcomes include only the outcomes themselves, without any words describing current methods, challenges and new methods.
105
- 5. The language is concise, precise, and written in a professional tone.
106
- 6. The final refined answer is structured as bullet points, with each outcome represented as a separate bullet.""",
107
- ]
108
 
109
  def set_openai_api_key(api_key: str):
110
  global openai_api_key
 
8
 
9
  current_preidentified_prompts = []
10
  current_preidentified = [
11
+ """The ontology's domain is **[DOMAIN]**.
12
+
13
  Ensure all subsequent responses strictly adhere to the scope of my domain.""",
14
+
15
  """My name is **[NAME]**, I am **[AGE]** years old, and I work as a **[OCCUPATION]**. My skills include **[SKILLS]**, and I have a strong interest in **[INTERESTS]**.
16
+
17
  Please refine my response to ensure:
18
 
19
  1. The persona is clearly described.
20
  2. The details (name, age, occupation, skills, interests) are logically and professionally aligned.
21
+ 3. If the skills and interests provided by the user are very similar and hard to differentiate, generate distinct ones. Skills should focus on technical aspects, while interests should be more general.
22
+ 4. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
23
+ 5. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
24
+
25
+ """My user goal description is **[USER GOAL DESCRIPTION]**.
26
 
 
 
 
27
  Please refine my response to ensure:
28
 
29
  1. The goal is clearly described and practical.
30
  2. Expand the user goal description, if necessary, to ensure it starts with a high-level overview *[LONG-TERM GOAL]*, emphasizing the overall impact, followed by a specific *[SHORT-TERM GOAL]*, focusing on immediate outcomes.
31
+ 3. Ensure the goal description aligns with my interests and domain expertise.
32
  4. The focus remains solely on the goal, without referencing unrelated elements.
33
+ 5. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
34
+ 6. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
35
+
36
+ """The actions I need to take to achieve my goal are **[ACTIONS]**.
37
 
 
 
38
  Please refine my response to ensure:
39
+
40
  1. The actions are clearly described.
41
  2. The actions are actionable and presented as a logical sequence of steps.
42
  3. Each step includes specific *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]*, and is practical.
43
  4. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the actions.
44
  5. Ensure the actions align logically with my skills, occupation, and overall goal.
45
+ 6. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
46
+ 7. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
47
 
48
  """The keywords for my user goal and actions are **[KEYWORDS]**.
49
+
50
  Please refine my response to ensure:
51
+
52
+ 1. The keywords are clearly defined.
53
  2. Each keyword directly supports my goals and actions.
54
  3. Keywords are expanded with the same level of granularity as *[KEYWORD]*.
55
  4. Keywords are broadened to include additional options.
56
+ 5. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
57
+ 6. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
58
 
59
  """The current methods I use to perform my actions are **[CURRENT METHODS]**.
60
+
61
  Please refine my response to ensure:
62
+
63
  1. The methods are clearly described.
64
  2. The methods must be manually time-intensive.
65
  3. The methods are actionable and presented as a logical sequence of steps.
66
  4. Each step includes specific *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]*, and is practical.
67
  5. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the methods.
68
  6. The methods align logically with my skills, occupation, and overall goal.
69
+ 7. The methods include only the methods themselves, without any words describing challenges, new methods, or outcomes.
70
+ 8. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
71
+ 9. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
72
 
73
+ """The challenges I face with my current methods are **[CHALLENGES]**.
74
+
75
  Please refine my response to ensure:
76
+
77
  1. The challenges are clearly described.
78
  2. Each challenge should be derived from the *[TOOLS]*, *[METHODS]*, or *[TECHNIQUES]* used.
79
  3. Where relevant, incorporate *[INTERDISCIPLINARY INSIGHTS]* to describe the challenges.
80
  4. The challenges align logically with my skills, occupation, and overall goal.
81
+ 5. The challenges include only the challenges themselves, without any words describing current methods, new methods, or outcomes.
82
+ 6. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
83
+ 7. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
84
 
85
  """The new methods I will use through this ontology to address my challenges are **[NEW METHODS]**.
86
+
87
  Please refine my response to ensure:
88
+
89
  1. The new methods are clearly described.
90
  2. The new methods must align with what a knowledge-based system can offer.
91
  3. The new methods align logically with my overall goal.
92
+ 4. The new methods include only the new methods themselves, without any words describing current methods, challenges, or outcomes.
93
+ 5. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
94
+ 6. The final answer is structured as *[A SINGLE SENTENCE / A DETAILED PARAGRAPH]*.""",
95
+
96
+ """The outcomes I expect after implementing the new methods are **[OUTCOMES]**.
97
 
 
 
98
  Please refine my response to ensure:
99
+
100
  1. The outcomes are clearly described.
101
  2. The outcomes must align with the benefits a knowledge-based system can provide.
102
  3. The outcomes align logically with my overall goal.
103
+ 4. The outcomes include only the outcomes themselves, without any words describing current methods, challenges, or new methods.
104
+ 5. The language is *[CONCISE & PRECISE / CREATIVE & DETAILED]*, ensuring clarity and professionalism.
105
+ 6. The final answer is structured as *[BULLET POINTS / A DETAILED PARAGRAPH]*.""",
106
+ ]
107
 
108
  def set_openai_api_key(api_key: str):
109
  global openai_api_key