Update ontochat/functions.py
Browse files- ontochat/functions.py +16 -12
ontochat/functions.py
CHANGED
@@ -8,6 +8,7 @@ openai_api_key = None
|
|
8 |
|
9 |
current_preidentified_prompts = []
|
10 |
current_preidentified = [
|
|
|
11 |
"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]**. Can you help me refine my answers to ensure: 1. Each detail is clearly described, specific, and easy to understand, avoiding vague or overly broad statements. 2. The details (name, age, occupation, skills, interests) are logically and professionally aligned to showcase a cohesive and relevant persona. 3. The refined skills and interests highlight areas of expertise and enthusiasm directly connected to my occupation and goals. 4. The language is polished, concise, and written in a professional tone suitable for formal contexts. 5. The refined output is structured in a clear, well-organized bullet-point format for easy readability and usability.",
|
12 |
"My user goal description is **[USER GOAL DESCRIPTION]**. Can you help me refine my answer to ensure: 1. The goal is clearly articulated, specific, and easy to understand, avoiding ambiguity or overly broad statements. 2. The description is aligned with my interests, domain expertise, and intended purpose, showcasing its relevance to my context. 3. The focus remains solely on the goal, without referencing or including actions, keywords, or unrelated details. 4. The refined description highlights the significance of the goal and its practical value within my domain. 5. The language is polished, concise, and professionally written, suitable for formal contexts. 6. The original intent and relevance of the goal are preserved without altering its meaning or purpose. 7. The final refined answer is presented in a single, clear, and well-crafted sentence.",
|
13 |
"The actions I need to take to achieve my goal are **[ACTIONS]**. Can you help me refine my answer to ensure: 1. The actions are clearly described and actionable, detailing specific steps or processes. 2. They align logically with my skills, expertise, and overall goal, showcasing their relevance and practicality. 3. Each action is specific enough to illustrate its purpose but adaptable enough to apply to varying scenarios. 4. The description avoids redundancy and focuses solely on the actions without referencing unrelated elements. 5. The language is concise, precise, and written in a professional tone. 6. The final refined answer is presented as a single, polished, and well-crafted sentence.",
|
@@ -45,28 +46,31 @@ def user_story_generator(message, history):
|
|
45 |
"content": (
|
46 |
"Ontology construction involves creating structured frameworks to represent knowledge in a specific domain. Ontology Requirements Engineering (ORE) ensures these frameworks align with user needs by having ontology engineers conduct interviews with domain experts to gather user stories. These stories outline typical users (personas), their goals, and scenarios where the ontology provides solutions. They are then translated into Competency Questions (CQs), such as 'Which artists have collaborated with a specific composer?', guiding the ontology's design to address real-world queries and enhance its practical use and reuse."
|
47 |
|
48 |
-
"You are an ontology engineer conducting an interview with a domain expert to gather information for writing an ontology user story.
|
49 |
-
"
|
50 |
-
"
|
|
|
|
|
51 |
"If the user's answer doesn't address the current question, gently remind them of the question and prompt them to respond accordingly."
|
52 |
-
"If the user doesn't confirm the current result is satisfactory
|
53 |
"Do not answer any queries that are not related to this task. \n\n"
|
54 |
|
55 |
"1. Persona\n"
|
56 |
-
"Start by creating a persona that represents a typical user of your ontology.
|
|
|
57 |
"Once the expert provides this information, suggest possible improvements or clarifications. After all persona details are collected, move to the next section.\n\n"
|
58 |
|
59 |
"2. Goal\n"
|
60 |
-
"[User goal description]: Ask one elicitation question
|
61 |
-
"[Actions]: Ask one elicitation question for the specific [actions] the persona will take to accomplish the goal
|
62 |
-
"[Keywords]: Ask one elicitation question for gathering up to 5 relevant [keywords] that summarize the goal and actions
|
63 |
"Once the expert has answered, offer suggestions for further refinement, then proceed to the next section.\n\n"
|
64 |
|
65 |
"3. Scenario\n"
|
66 |
-
"[Scenario before]: Ask one elicitation question for the expert to describe the [current methods] the persona uses to perform the actions
|
67 |
-
"[Challenges]: Ask one elicitation question for the [challenges] they face when performing current methods, making sure these align with the persona's occupation and skills
|
68 |
-
"[Scenario during]: Ask one elicitation question for the expert to explain how their ontology introduces [new methods] to help them overcome these challenges,
|
69 |
-
"[Scenario after]: Ask one elicitation question for the expert to describe the [outcomes] after using the ontology and how it helps them achieve their goal
|
70 |
"Provide feedback on each scenario part and refine the answers if needed before moving on."
|
71 |
|
72 |
"4. Create User Story\n"
|
|
|
8 |
|
9 |
current_preidentified_prompts = []
|
10 |
current_preidentified = [
|
11 |
+
"The domain of this ontology is **[DOMAIN]**. Please take note of this specified domain, as all subsequent responses and information provided should be strictly aligned with and accurately reflect the scope and context of this domain.",
|
12 |
"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]**. Can you help me refine my answers to ensure: 1. Each detail is clearly described, specific, and easy to understand, avoiding vague or overly broad statements. 2. The details (name, age, occupation, skills, interests) are logically and professionally aligned to showcase a cohesive and relevant persona. 3. The refined skills and interests highlight areas of expertise and enthusiasm directly connected to my occupation and goals. 4. The language is polished, concise, and written in a professional tone suitable for formal contexts. 5. The refined output is structured in a clear, well-organized bullet-point format for easy readability and usability.",
|
13 |
"My user goal description is **[USER GOAL DESCRIPTION]**. Can you help me refine my answer to ensure: 1. The goal is clearly articulated, specific, and easy to understand, avoiding ambiguity or overly broad statements. 2. The description is aligned with my interests, domain expertise, and intended purpose, showcasing its relevance to my context. 3. The focus remains solely on the goal, without referencing or including actions, keywords, or unrelated details. 4. The refined description highlights the significance of the goal and its practical value within my domain. 5. The language is polished, concise, and professionally written, suitable for formal contexts. 6. The original intent and relevance of the goal are preserved without altering its meaning or purpose. 7. The final refined answer is presented in a single, clear, and well-crafted sentence.",
|
14 |
"The actions I need to take to achieve my goal are **[ACTIONS]**. Can you help me refine my answer to ensure: 1. The actions are clearly described and actionable, detailing specific steps or processes. 2. They align logically with my skills, expertise, and overall goal, showcasing their relevance and practicality. 3. Each action is specific enough to illustrate its purpose but adaptable enough to apply to varying scenarios. 4. The description avoids redundancy and focuses solely on the actions without referencing unrelated elements. 5. The language is concise, precise, and written in a professional tone. 6. The final refined answer is presented as a single, polished, and well-crafted sentence.",
|
|
|
46 |
"content": (
|
47 |
"Ontology construction involves creating structured frameworks to represent knowledge in a specific domain. Ontology Requirements Engineering (ORE) ensures these frameworks align with user needs by having ontology engineers conduct interviews with domain experts to gather user stories. These stories outline typical users (personas), their goals, and scenarios where the ontology provides solutions. They are then translated into Competency Questions (CQs), such as 'Which artists have collaborated with a specific composer?', guiding the ontology's design to address real-world queries and enhance its practical use and reuse."
|
48 |
|
49 |
+
"You are an ontology engineer conducting an interview with a domain expert to gather information for writing an ontology user story."
|
50 |
+
"Ask elicitation questions one at a time, providing an example answer and the prompt template the user should use, while incorporating user feedback if needed."
|
51 |
+
"If all requirements for the current elicitation are fully addressed, always ask the user if this meets their expectations. Do not ask the next question unless the user confirms the current one is satisfactory."
|
52 |
+
"When a domain expert requests refinement, provide just one focused point in one sentence, directly aligned with their current answer."
|
53 |
+
"The user can request to revisit any previously completed steps."
|
54 |
"If the user's answer doesn't address the current question, gently remind them of the question and prompt them to respond accordingly."
|
55 |
+
"If the user doesn't confirm the current result is satisfactory, their attempt to answer the next question should be rejected, and they should be asked to respond to the current one."
|
56 |
"Do not answer any queries that are not related to this task. \n\n"
|
57 |
|
58 |
"1. Persona\n"
|
59 |
+
"Start by creating a persona that represents a typical user of your ontology."
|
60 |
+
"[Persona]: Ask one elicitation question for details includes [name], [age], [occupation], [skills], and [interests], along with a brief example answer as guidance, and include the message 'Use template **[Create Persona]** to answer' as a reminder.\n"
|
61 |
"Once the expert provides this information, suggest possible improvements or clarifications. After all persona details are collected, move to the next section.\n\n"
|
62 |
|
63 |
"2. Goal\n"
|
64 |
+
"[User goal description]: Ask one elicitation question to describe the [user goal description] that the user aims to achieve using this ontology, along with a brief example answer as guidance, and include the message 'Use template **[Create User Goal]** to answer' as a reminder.\n"
|
65 |
+
"[Actions]: Ask one elicitation question for the specific [actions] the persona will take to accomplish the goal, along with a brief example answer as guidance, and include the message 'Use template **[Create Actions]** to answer' as a reminder.\n"
|
66 |
+
"[Keywords]: Ask one elicitation question for gathering up to 5 relevant [keywords] that summarize the goal and actions, along with a brief example answer as guidance, and include the message 'Use template **[Create Keywords]** to answer' as a reminder.\n"
|
67 |
"Once the expert has answered, offer suggestions for further refinement, then proceed to the next section.\n\n"
|
68 |
|
69 |
"3. Scenario\n"
|
70 |
+
"[Scenario before]: Ask one elicitation question for the expert to describe the [current methods] the persona uses to perform the actions, along with a brief example answer as guidance, and include the message 'Use template **[Create Current Methods]** to answer' as a reminder.\n"
|
71 |
+
"[Challenges]: Ask one elicitation question for the [challenges] they face when performing current methods, making sure these align with the persona's occupation and skills, along with a brief example answer as guidance, and include the message 'Use template **[Create Challenges]** to answer' as a reminder.\n"
|
72 |
+
"[Scenario during]: Ask one elicitation question for the expert to explain how their ontology introduces [new methods] to help them overcome these challenges, along with a brief example answer as guidance, and include the message 'Use template **[Create New Methods]** to answer' as a reminder.\n"
|
73 |
+
"[Scenario after]: Ask one elicitation question for the expert to describe the [outcomes] after using the ontology and how it helps them achieve their goal, along with a brief example answer as guidance, and include the message 'Use template **[Create Outcomes]** to answer' as a reminder.\n"
|
74 |
"Provide feedback on each scenario part and refine the answers if needed before moving on."
|
75 |
|
76 |
"4. Create User Story\n"
|