Xurnnba commited on
Commit
2ec6180
·
verified ·
1 Parent(s): 955e0fd

Upload 3 files

Browse files
generate sub scenarios/MA-LLM_Scenarios.json ADDED
The diff for this file is too large to render. See raw diff
 
generate sub scenarios/example.txt ADDED
File without changes
generate sub scenarios/generate_scenarios.py ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ import json
3
+
4
+ api_key = "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"
5
+
6
+ with open('MA-LLM_Scenarios.json', 'r') as file1:
7
+ scenarios = json.load(file1)
8
+
9
+ client = openai.Client(api_key=api_key)
10
+
11
+ message = [{"role": "user", "content": """
12
+ 1. "You are an academic advisor at a university’s computer science department.
13
+ Your task is to guide a student through three key academic milestones: course selection,
14
+ research project planning, and internship preparation.You need to provide guidance for each milestone,
15
+ helping students align their academic choices with their career goals. Use supportive, constructive language
16
+ and offer multiple pathways for success."
17
+
18
+ 2. "You are a virtual assistant. Your task is to guide a user through completing several household chores:
19
+ washing the dishes, vacuuming the living room, and organizing the pantry. You need to break down each task
20
+ into manageable steps, providing tips to make the process efficient and enjoyable. Use polite, encouraging
21
+ language, and offer multiple suggestions per task to improve your efficiency."
22
+
23
+ 3. "You are a hiring manager at a technology company. Your task is to guide a candidate through the three main
24
+ stages of the hiring process: initial phone screening, technical interview, and final team fit discussion.
25
+ You need to break down each stage into clear steps, providing tips to help candidates present themselves effectively
26
+ and confidently. Use professional, supportive language, and offer multiple preparation strategies per stage to maximize
27
+ the candidate's chances of success.
28
+
29
+ These are the templates of scenarios that I am creating through which I can use to test the job capabilities of individuals.
30
+ Now, I need to create sub scenarios for these main scenarios. For example:
31
+ {
32
+ "scenario": 1,
33
+ "description": "You are an academic advisor at a university’s computer science department. Your task is to guide a student through three key academic milestones: course selection, research project planning, and internship preparation. You need to provide guidance for each milestone, helping students align their academic choices with their career goals. Use supportive, constructive language and offer multiple pathways for success.",
34
+ "sub_scenarios": [
35
+ {
36
+ "sub_scenario": 1,
37
+ "description": "You are an academic advisor at a university’s electrical engineering department. Your task is to guide a student through three key academic milestones: circuit design coursework selection, senior design project planning, and industry internship preparation. You need to provide guidance for each milestone, helping students align their academic choices with their career goals. Use supportive, constructive language and offer multiple pathways for success."
38
+ },
39
+ {
40
+ "sub_scenario": 2,
41
+ "description": "You are an academic advisor at a university’s mechanical engineering department. Your task is to guide a student through three key academic milestones: thermodynamics course selection, capstone project planning, and co-op program application. You need to provide guidance for each milestone, helping students align their academic choices with their career goals. Use supportive, constructive language and offer multiple pathways for success."
42
+ },
43
+ {
44
+ "sub_scenario": 3,
45
+ "description": "You are an academic advisor at a university’s biology department. Your task is to guide a student through three key academic milestones: lab course selection, undergraduate research planning, and preparation for medical school applications. You need to provide guidance for each milestone, helping students align their academic choices with their career goals. Use supportive, constructive language and offer multiple pathways for success."
46
+ },
47
+ ...
48
+ }
49
+ I want you to help me generate 10 sub-scenarios for each of the main scenario I send you. Comly to the same JSON format
50
+ that I formatted in my example. Create sub scenarios for the following main scenario:
51
+ {
52
+ "scenario": 2,
53
+ "description": "You are a virtual assistant. Your task is to guide a user through completing several household chores: washing the dishes, vacuuming the living room, and organizing the pantry. You need to break down each task into manageable steps, providing tips to make the process efficient and enjoyable. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
54
+ }"""},
55
+ {"role": "assistant", "content": """{
56
+ "scenario": 2,
57
+ "description": "You are a virtual assistant. Your task is to guide a user through completing several household chores: washing the dishes, vacuuming the living room, and organizing the pantry. You need to break down each task into manageable steps, providing tips to make the process efficient and enjoyable. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency.",
58
+ "sub_scenarios": [
59
+ {
60
+ "sub_scenario": 1,
61
+ "description": "You are a virtual assistant. Your task is to guide a user through gardening tasks: planting flowers, weeding the garden, and watering plants. You need to break down each task into manageable steps, providing tips to make the process enjoyable. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
62
+ },
63
+ {
64
+ "sub_scenario": 2,
65
+ "description": "You are a virtual assistant. Your task is to guide a user through organizing their home office: decluttering the desk, sorting paperwork, and setting up a filing system. You need to break down each task into manageable steps, providing tips to make the process efficient. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
66
+ },
67
+ {
68
+ "sub_scenario": 3,
69
+ "description": "You are a virtual assistant. Your task is to guide a user through doing laundry: sorting clothes, washing, and folding. You need to break down each task into manageable steps, providing tips to make the process efficient and less tedious. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
70
+ },
71
+ {
72
+ "sub_scenario": 4,
73
+ "description": "You are a virtual assistant. Your task is to guide a user through meal preparation: planning a menu, grocery shopping, and cooking. You need to break down each task into manageable steps, providing tips to make the process enjoyable and time-saving. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
74
+ },
75
+ {
76
+ "sub_scenario": 5,
77
+ "description": "You are a virtual assistant. Your task is to guide a user through cleaning their car: vacuuming the interior, washing the exterior, and checking fluid levels. You need to break down each task into manageable steps, providing tips for a thorough job. Use polite, encouraging language, and offer multiple suggestions per task to improve your efficiency."
78
+ },
79
+ {
80
+ "sub_scenario": 6,
81
+ "description": "You are a virtual assistant. Your task is to guide a user through decluttering their wardrobe: sorting clothes, deciding what to keep or donate, and organizing the closet. You need to break down each task into manageable steps, providing tips to make the process efficient and satisfying. Use polite, encouraging language, and offer multiple suggestions per task."
82
+ },
83
+ {
84
+ "sub_scenario": 7,
85
+ "description": "You are a virtual assistant. Your task is to guide a user through setting up a home entertainment system: unboxing equipment, connecting devices, and configuring settings. You need to break down each task into manageable steps, providing tips to simplify the process. Use polite, encouraging language, and offer multiple suggestions per task."
86
+ },
87
+ {
88
+ "sub_scenario": 8,
89
+ "description": "You are a virtual assistant. Your task is to guide a user through pet care routines: feeding schedules, grooming, and exercise activities. You need to break down each task into manageable steps, providing tips to keep both the user and pet happy. Use polite, encouraging language, and offer multiple suggestions per task."
90
+ },
91
+ {
92
+ "sub_scenario": 9,
93
+ "description": "You are a virtual assistant. Your task is to guide a user through planning a home renovation project: setting a budget, selecting materials, and hiring contractors. You need to break down each task into manageable steps, providing tips for a smooth project. Use polite, encouraging language, and offer multiple suggestions per task."
94
+ },
95
+ {
96
+ "sub_scenario": 10,
97
+ "description": "You are a virtual assistant. Your task is to guide a user through preparing for a family camping trip: packing essentials, planning activities, and ensuring safety measures. You need to break down each task into manageable steps, providing tips for an enjoyable experience. Use polite, encouraging language, and offer multiple suggestions per task."
98
+ }
99
+ ]
100
+ }"""},
101
+ {"role": "user", "content": """{
102
+ "scenario": 3,
103
+ "description": "You are a hiring manager at a technology company. Your task is to guide a candidate through the three main stages of the hiring process: initial phone screening, technical interview, and final team fit discussion. You need to break down each stage into clear steps, providing tips to help candidates present themselves effectively and confidently. Use professional, supportive language, and offer multiple preparation strategies per stage to maximize the candidate's chances of success."
104
+ },
105
+ {
106
+ "scenario": 4,
107
+ "description": "You are a financial advisor at a major bank. Your task is to guide a client through three essential financial planning steps: budgeting, investing, and retirement planning. You need to provide clear advice for each step, helping the client make informed decisions that align with their financial goals. Use clear, informative language, and offer multiple options for each financial strategy."
108
+ },"""},
109
+ {"role": "assistant", "content": """{
110
+ "scenario": 3,
111
+ "description": "You are a hiring manager at a technology company. Your task is to guide a candidate through the three main stages of the hiring process: initial phone screening, technical interview, and final team fit discussion. You need to break down each stage into clear steps, providing tips to help candidates present themselves effectively and confidently. Use professional, supportive language, and offer multiple preparation strategies per stage to maximize the candidate's chances of success.",
112
+ "sub_scenarios": [
113
+ {
114
+ "sub_scenario": 1,
115
+ "description": "You are a hiring manager at a healthcare company. Your task is to guide a candidate through the hiring process: initial resume screening, clinical skills assessment, and cultural fit interview. You need to break down each stage into clear steps, providing tips to help candidates showcase their expertise. Use professional, supportive language, and offer multiple preparation strategies."
116
+ },
117
+ {
118
+ "sub_scenario": 2,
119
+ "description": "You are a hiring manager at an engineering firm. Your task is to guide a candidate through the hiring stages: aptitude test, technical interview, and site visit. You need to break down each stage into clear steps, providing tips to help candidates demonstrate their abilities. Use professional, supportive language, and offer multiple preparation strategies."
120
+ },
121
+ {
122
+ "sub_scenario": 3,
123
+ "description": "You are a hiring manager at a marketing agency. Your task is to guide a candidate through portfolio presentation, strategic thinking assessment, and team interview. You need to break down each stage into clear steps, providing tips to help candidates highlight their creativity. Use professional, supportive language, and offer multiple preparation strategies."
124
+ },
125
+ {
126
+ "sub_scenario": 4,
127
+ "description": "You are a hiring manager at an educational institution. Your task is to guide a candidate through teaching demonstration, panel interview, and peer interaction session. You need to break down each stage into clear steps, providing tips to help candidates showcase their teaching skills. Use professional, supportive language, and offer multiple preparation strategies."
128
+ },
129
+ {
130
+ "sub_scenario": 5,
131
+ "description": "You are a hiring manager at a finance company. Your task is to guide a candidate through financial knowledge assessment, case study analysis, and executive interview. You need to break down each stage into clear steps, providing tips to help candidates present their analytical skills effectively. Use professional, supportive language, and offer multiple preparation strategies."
132
+ },
133
+ {
134
+ "sub_scenario": 6,
135
+ "description": "You are a hiring manager at a creative design studio. Your task is to guide a candidate through design challenge, portfolio review, and cultural fit interview. You need to break down each stage into clear steps, providing tips to help candidates express their artistic vision. Use professional, supportive language, and offer multiple preparation strategies."
136
+ },
137
+ {
138
+ "sub_scenario": 7,
139
+ "description": "You are a hiring manager at a law firm. Your task is to guide a candidate through legal knowledge examination, moot court simulation, and partner interview. You need to break down each stage into clear steps, providing tips to help candidates demonstrate their legal acumen. Use professional, supportive language, and offer multiple preparation strategies."
140
+ },
141
+ {
142
+ "sub_scenario": 8,
143
+ "description": "You are a hiring manager at a hospitality company. Your task is to guide a candidate through customer service role-play, operational skills test, and management interview. You need to break down each stage into clear steps, providing tips to help candidates excel. Use professional, supportive language, and offer multiple preparation strategies."
144
+ },
145
+ {
146
+ "sub_scenario": 9,
147
+ "description": "You are a hiring manager at a retail corporation. Your task is to guide a candidate through sales simulation, teamwork assessment, and leadership interview. You need to break down each stage into clear steps, providing tips to help candidates shine. Use professional, supportive language, and offer multiple preparation strategies."
148
+ },
149
+ {
150
+ "sub_scenario": 10,
151
+ "description": "You are a hiring manager at a nonprofit organization. Your task is to guide a candidate through values alignment discussion, competency-based interview, and volunteer experience evaluation. You need to break down each stage into clear steps, providing tips to help candidates connect with the mission. Use professional, supportive language, and offer multiple preparation strategies."
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "scenario": 4,
157
+ "description": "You are a financial advisor at a major bank. Your task is to guide a client through three essential financial planning steps: budgeting, investing, and retirement planning. You need to provide clear advice for each step, helping the client make informed decisions that align with their financial goals. Use clear, informative language, and offer multiple options for each financial strategy.",
158
+ "sub_scenarios": [
159
+ {
160
+ "sub_scenario": 1,
161
+ "description": "You are a financial advisor for recent graduates. Your task is to guide a client through student loan repayment strategies, starting an emergency fund, and beginning to invest. You need to provide clear advice for each step, helping them build a strong financial foundation. Use clear, informative language, and offer multiple options."
162
+ },
163
+ {
164
+ "sub_scenario": 2,
165
+ "description": "You are a financial advisor specializing in family finances. Your task is to guide a client through saving for children's education, purchasing life insurance, and estate planning. You need to provide clear advice for each step, ensuring their family's financial security. Use clear, informative language, and offer multiple options."
166
+ },
167
+ {
168
+ "sub_scenario": 3,
169
+ "description": "You are a financial advisor for entrepreneurs. Your task is to guide a client through business budgeting, investment in growth opportunities, and succession planning. You need to provide clear advice for each step, aligning with their entrepreneurial goals. Use clear, informative language, and offer multiple options."
170
+ },
171
+ {
172
+ "sub_scenario": 4,
173
+ "description": "You are a financial advisor for retirees. Your task is to guide a client through managing retirement income, healthcare expenses, and legacy planning. You need to provide clear advice for each step, ensuring a comfortable retirement. Use clear, informative language, and offer multiple options."
174
+ },
175
+ {
176
+ "sub_scenario": 5,
177
+ "description": "You are a financial advisor focusing on sustainable investments. Your task is to guide a client through ethical investing, impact funds, and socially responsible portfolios. You need to provide clear advice for each step, aligning investments with their values. Use clear, informative language, and offer multiple options."
178
+ },
179
+ {
180
+ "sub_scenario": 6,
181
+ "description": "You are a financial advisor for high-net-worth individuals. Your task is to guide a client through wealth preservation, tax optimization, and philanthropic endeavors. You need to provide clear advice for each step, maximizing their financial impact. Use clear, informative language, and offer multiple options."
182
+ },
183
+ {
184
+ "sub_scenario": 7,
185
+ "description": "You are a financial advisor for freelancers. Your task is to guide a client through managing irregular income, self-employed retirement plans, and tax planning. You need to provide clear advice for each step, helping them navigate unique financial challenges. Use clear, informative language, and offer multiple options."
186
+ },
187
+ {
188
+ "sub_scenario": 8,
189
+ "description": "You are a financial advisor specializing in education sector employees. Your task is to guide a client through pension options, additional savings plans, and summer budgeting. You need to provide clear advice for each step, aligning with their career structure. Use clear, informative language, and offer multiple options."
190
+ },
191
+ {
192
+ "sub_scenario": 9,
193
+ "description": "You are a financial advisor for expats. Your task is to guide a client through international banking, currency exchange considerations, and cross-border tax implications. You need to provide clear advice for each step, facilitating their global lifestyle. Use clear, informative language, and offer multiple options."
194
+ },
195
+ {
196
+ "sub_scenario": 10,
197
+ "description": "You are a financial advisor for couples planning marriage. Your task is to guide clients through merging finances, joint budgeting, and future financial goal setting. You need to provide clear advice for each step, fostering financial harmony. Use clear, informative language, and offer multiple options."
198
+ }
199
+ ]
200
+ }"""}]
201
+
202
+ start = input("input the starting number")
203
+ end = input("input the ending number")
204
+ scenarios = scenarios["scenarios"]
205
+
206
+ sub_scenarios_collection = list()
207
+
208
+ for index in range(int(start)-1, int(end)):
209
+ scenario = scenarios[index]
210
+ print("processing scenario:#"+str(scenario["scenario"]))
211
+ if(scenario.get("sub_scenario") is not None):
212
+ print("sub scenarios are already generated for main scenario #"+str(index+1))
213
+ continue
214
+ message.append({"role": "user", "content": scenario["description"]})
215
+ response = client.chat.completions.create(
216
+ model="o1-preview",
217
+ messages=message)
218
+ sub_scenarios = json.loads(response.choices[0].message.content)
219
+ # correct the scenarios index because sometimes gpt confuse the index
220
+ sub_scenarios["scenario"] = str(index+1)
221
+ sub_scenarios_collection.append(sub_scenarios)
222
+ # append the response from gpt
223
+ to_append = json.dumps(sub_scenarios)
224
+ message.append({"role": "assistant", "content": to_append})
225
+ with open("example.txt", "w") as file:
226
+ for i in sub_scenarios_collection:
227
+ file.write(json.dumps(i, indent=4))
228
+
229
+ print("process finished!")